From 5033f17be2b74d8cce7d5653bb973bec9e383ff5 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 13 Jun 2020 16:21:56 -0400 Subject: [PATCH] 8086asm: tidy up a bit --- blk/753 | 10 +++++----- blk/755 | 2 +- blk/811 | 2 +- blk/812 | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/blk/753 b/blk/753 index 425fda8..ed9f937 100644 --- a/blk/753 +++ b/blk/753 @@ -1,12 +1,12 @@ +: OP1 CREATE C, DOES> C@ A, ; +0xac OP1 LODSB, 0xfa OP1 CLI, 0xfb OP1 STI, +0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD, +( no argument, jumps with abs addrs are special ) +0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ, : MOVri, SWAP 0xb0 OR A, A, ; : MOVrI, SWAP 0xb0 OR A, SPLITB A, A, ; : MOVsx, 0x8e A, SWAP MODRMrr A, ; : INT, 0xcd A, A, ; -( no argument, flow ops are special ) -: JMP8, 0xeb A, ; : JMP16, 0xe9 A, ; : JZ, 0x74 A, ; : JMPr, 0xff A, 7 AND 0xe0 OR A, ; -: LODSB, 0xac A, ; : CLI, 0xfa A, ; : HLT, 0xf4 A, ; -: STI, 0xfb A, ; : ORrr, 0x08 A, MODRMrr A, ; : XORxx, 0x31 A, MODRMrr A, ; -: CLD, 0xfc A, ; : STD, 0xfd A, ; diff --git a/blk/755 b/blk/755 index 2dd46c4..e0bb0f9 100644 --- a/blk/755 +++ b/blk/755 @@ -1,4 +1,4 @@ -: FWR8 BSET 0 A, ; +: FWRs BSET 0 A, ; : FSET @ THEN, ; ( : BREAK, FJR, 0x8000 OR ; : BREAK?, DUP 0x8000 AND IF diff --git a/blk/811 b/blk/811 index a2d4b97..1b8d2e7 100644 --- a/blk/811 +++ b/blk/811 @@ -1,5 +1,5 @@ H@ ORG ! 0x7c00 BIN( ! ( BIOS loads boot bin at 0x7c00 ) -JMP8, L1 FWR8 ( start ) +JMPs, L1 FWRs ( start ) ORG @ 0x25 + HERE ! ( bypass BPB ) L1 FSET ( start ) CLI, CLD, AX AX XORxx, DS AX MOVsx, ES AX MOVsx, diff --git a/blk/812 b/blk/812 index 87dac03..768fb96 100644 --- a/blk/812 +++ b/blk/812 @@ -1,10 +1,10 @@ H@ ORG ! 0x8000 BIN( ! -JMP8, L1 FWR8 ( start ) +JMPs, L1 FWRs ( start ) L2 ( msg ) BSET ," Hello World!" 0 A, L1 FSET ( start ) SI L2 @ ( msg ) MOVrI, AH 0x0e MOVri, ( print char ) L1 BSET ( loop ) LODSB, AL AL ORrr, ( end of str? ) -JZ, L2 FWR8 ( next ) 0x10 INT, ( print char ) -JMP8, L1 ( loop ) BWR +JZ, L2 FWRs ( next ) 0x10 INT, ( print char ) +JMPs, L1 ( loop ) BWR L2 FSET ( next ) AH 0 MOVri, 0x16 INT, ( read kbd ) AH 0x0e MOVri, 0x10 INT, ( spit read char ) HLT, ( done )