8086asm: begin adding MODRM-enabled ops
This commit is contained in:
parent
749fdf1b18
commit
210b833c71
7
blk/731
7
blk/731
@ -3,7 +3,12 @@ JMP8, L1 FWR8 ( start )
|
||||
L2 BSET ( msg )
|
||||
," Hello, World!" 0 A,
|
||||
L1 FSET ( start )
|
||||
AH 0x42 MOVri,
|
||||
CLI,
|
||||
AH 0 MOVri,
|
||||
AL 2 MOVri,
|
||||
0x10 INT,
|
||||
SI L2 @ ( msg ) MOVrI,
|
||||
AH 0x0e MOVri,
|
||||
LODSB,
|
||||
AL AL ORrr,
|
||||
PC ORG @ DUMP
|
||||
|
6
blk/752
6
blk/752
@ -1,2 +1,8 @@
|
||||
( Splits word into msb/lsb, lsb being on TOS )
|
||||
: SPLITB
|
||||
256 /MOD SWAP
|
||||
;
|
||||
: PC H@ ORG @ - ;
|
||||
: A, C, ;
|
||||
( dst8 src8 -- modrm )
|
||||
: MODRMrr 0x7 AND 3 LSHIFT SWAP 0x7 AND OR 0xc0 OR ;
|
||||
|
5
blk/753
5
blk/753
@ -1,6 +1,9 @@
|
||||
: MOVri, SWAP 0xb0 OR A, A, ;
|
||||
: MOVrI, SWAP 0xb0 OR A, 256 /MOD A, A, ;
|
||||
: 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, ;
|
||||
: ORrr, 0x08 A, MODRMrr A, ;
|
||||
|
Loading…
Reference in New Issue
Block a user