From 4e18fafe4696cd5dce262b31e0a83eaac4ab8a34 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 12 Jun 2020 13:12:41 -0400 Subject: [PATCH] 8086asm: now enough tooling to assemble a PC/AT Hello World boot --- blk/731 | 18 ++++++++---------- blk/753 | 6 ++---- blk/755 | 6 +++--- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/blk/731 b/blk/731 index 2373fc5..ce7982a 100644 --- a/blk/731 +++ b/blk/731 @@ -1,14 +1,12 @@ H@ ORG ! JMP8, L1 FWR8 ( start ) -L2 BSET ( msg ) -," Hello, World!" 0 A, +L2 BSET ( msg ) ," Hello, World!" 0 A, L1 FSET ( start ) -CLI, -AH 0 MOVri, -AL 2 MOVri, -0x10 INT, -SI L2 @ ( msg ) MOVrI, -AH 0x0e MOVri, -LODSB, -AL AL ORrr, +CLI, AH 0 MOVri, AL 2 MOVri, 0x10 INT, +SI L2 @ ( msg ) MOVrI, AH 0x0e MOVri, +L1 BSET ( loop ) LODSB, AL AL ORrr, +JZ, L2 FWR8 ( next ) 0x10 INT, +JMP8, L1 ( loop ) BWR +L2 FSET ( next ) AH 0 MOVri, 0x16 INT, +AH 0x0e MOVri, 0x16 INT, HLT, PC ORG @ DUMP diff --git a/blk/753 b/blk/753 index 559be80..886eaeb 100644 --- a/blk/753 +++ b/blk/753 @@ -2,8 +2,6 @@ : MOVrI, SWAP 0xb0 OR A, SPLITB A, A, ; : INT, 0xcd A, A, ; ( no argument, flow ops are special ) -: JMP8, 0xeb A, ; -: JMP16, 0xe9 A, ; -: LODSB, 0xac A, ; -: CLI, 0xfa A, ; +: JMP8, 0xeb A, ; : JMP16, 0xe9 A, ; : JZ, 0x74 A, ; +: LODSB, 0xac A, ; : CLI, 0xfa A, ; : HLT, 0xf4 A, ; : ORrr, 0x08 A, MODRMrr A, ; diff --git a/blk/755 b/blk/755 index 64c47ed..2dd46c4 100644 --- a/blk/755 +++ b/blk/755 @@ -3,7 +3,7 @@ ( : BREAK, FJR, 0x8000 OR ; : BREAK?, DUP 0x8000 AND IF 0x7fff AND 1 ALLOT THEN, -1 ALLOT - THEN ; -: AGAIN, BREAK?, PC - 1- A, ; ) -( : BWR @ AGAIN, ; ) + THEN ; ) +: AGAIN, ( BREAK?, ) PC - 1- A, ; +: BWR @ AGAIN, ;