diff --git a/blk/730 b/blk/730 index 56e8271..75717f6 100644 --- a/blk/730 +++ b/blk/730 @@ -6,7 +6,7 @@ Mnemonics are followed by argument types. For example, MOVri, moves 8-bit immediate to 8-bit register. 'r' = 8-bit register 'x' = 16-bit register -'i' = immediate, size depends on other operand. +'i' = 8-bit immediate 'I' = 16-bit immediate 's' = SREG register Mnemonics that only have one signature (for example INT,) don't diff --git a/blk/755 b/blk/755 index ce9ea5a..5b1cae2 100644 --- a/blk/755 +++ b/blk/755 @@ -1,11 +1,16 @@ : OPrm CREATE C, DOES> C@ A, SWAP 3 LSHIFT OR A, ; 0x8a OPrm MOVr[], 0x8b OPrm MOVx[], +: OPrm+ ( r m off ) CREATE C, DOES> + C@ A, ROT 3 LSHIFT ROT OR 0x40 OR A, A, ; +0x8a OPrm+ MOVr[]+, 0x8b OPrm+ MOVx[]+, + : MOVri, SWAP 0xb0 OR A, A, ; -: MOVxi, SWAP 0xb8 OR A, A,, ; +: MOVxI, SWAP 0xb8 OR A, A,, ; : MOVsx, 0x8e A, SWAP 3 LSHIFT OR 0xc0 OR A, ; : MOVxm, 0x8b A, SWAP 3 LSHIFT 0x6 OR A, A,, ; : INT, 0xcd A, A, ; -: ADDAXi, 0x05 A, A,, ; : ADDALi, 0x04 A, A, ; +: ADDAXI, 0x05 A, A,, ; : ADDALi, 0x04 A, A, ; +: SUBxi, 0x83 A, SWAP 0xe8 OR A, A, ; : JMPr, 0xff A, 7 AND 0xe0 OR A, ; : JMPf, ( seg off ) 0xea A, SPLITB A, A, A,, ; diff --git a/blk/811 b/blk/811 index d6a1af9..b7a0bbb 100644 --- a/blk/811 +++ b/blk/811 @@ -2,9 +2,9 @@ H@ ORG ! 0x7c00 BIN( ! ( BIOS loads boot bin at 0x7c00 ) JMPs, L1 FWRs ( start ) ORG @ 0x25 + HERE ! ( bypass BPB ) L1 FSET ( start ) -CLI, CLD, AX 0x800 MOVxi, DS AX MOVsx, ES AX MOVsx, -SS AX MOVsx, SP 0xffff MOVxi, STI, -AH 2 MOVri, DX 0 MOVxi, CH 0 MOVri, CL 2 MOVri, AL 1 MOVri, -BX 0 MOVxi, 0x13 INT, ( read 2nd sector of boot floppy ) +CLI, CLD, AX 0x800 MOVxI, DS AX MOVsx, ES AX MOVsx, +SS AX MOVsx, SP 0xffff MOVxI, STI, +AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 1 MOVri, +BX 0 MOVxI, 0x13 INT, ( read 2nd sector of boot floppy ) 0x800 0 JMPf, ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A, diff --git a/blk/815 b/blk/815 index fed4712..3cc714b 100644 --- a/blk/815 +++ b/blk/815 @@ -5,12 +5,12 @@ L4 BSET PC 3 - ORG @ 4 + ! ( find ) SI INCx, ( first char ) AX AX XORxx, ( initial prev ) BEGIN, ( loop ) DI AX SUBxx, ( jump to prev wordref ) - DI DECx, AL [DI] MOVr[], ( strlen ) + AL [DI] -1 MOVr[]+, ( strlen ) CL AL CMPrr, IFZ, ( same len ) SI PUSHx, DI PUSHx, CX PUSHx, ( --> lvl 3 ) - 2 ADDALi, ( prev ) AH AH XORrr, DI AX SUBxx, + 3 ADDALi, ( header ) AH AH XORrr, DI AX SUBxx, REPZ, CMPSB, CX POPx, DI POPx, SI POPx, ( <-- lvl 3 ) - IFZ, DI INCx, AL AL XORrr, ( Z ) RETn, THEN, + IFZ, AL AL XORrr, ( Z ) RETn, THEN, THEN, ( cont. ) diff --git a/blk/816 b/blk/816 index 6831b7f..8fa387c 100644 --- a/blk/816 +++ b/blk/816 @@ -1,5 +1,5 @@ ( find cont. ) - DI DECx, DI DECx, AX [DI] MOVx[], ( prev ) + DI 3 SUBxi, AX [DI] MOVx[], ( prev ) AX AX ORxx, JNZ, AGAIN, ( loop ) AX INCx, ( NZ ) RETn, diff --git a/blk/817 b/blk/817 index ab07de1..56bc3a1 100644 --- a/blk/817 +++ b/blk/817 @@ -1,7 +1,7 @@ L3 BSET 3 A, 'F' A, 'O' A, 'O' A, PC 3 - ORG @ 1+ ! ( main ) DI 0x08 MOVxm, ( LATEST ) - SI L3 @ MOVxi, + SI L3 @ MOVxI, CALLn, L4 @ RPCn, ( find ) IFZ, JMPs, L1 @ RPCs, ( execute ) THEN, AH 0x0e MOVri, ( print char ) AL '!' MOVri, 0x10 INT,