Compare commits

..

No commits in common. "4e18fafe4696cd5dce262b31e0a83eaac4ab8a34" and "1871c46614efa06eae207a82b1b1e712ae8a6139" have entirely different histories.

9 changed files with 1 additions and 76 deletions

View File

@ -9,7 +9,7 @@ MASTER INDEX
490 TRS-80 Recipe 520 Fonts
550 TI-84+ Recipe 580 RC2014 Recipe
620 Sega Master System Recipe
650 AVR assembler 730 8086 assembler
650 AVR assembler

16
blk/730
View File

@ -1,16 +0,0 @@
8086 assembler
Work in progress. Load with "750 LOAD".
Test code at B731

12
blk/731
View File

@ -1,12 +0,0 @@
H@ ORG !
JMP8, L1 FWR8 ( start )
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,
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

View File

@ -1 +0,0 @@
1 5 LOADR+

View File

@ -1,6 +0,0 @@
VARIABLE ORG
VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
: AL 0 ; : CL 1 ; : DL 2 ; : BL 3 ;
: AH 4 ; : CH 5 ; : DH 6 ; : BH 7 ;
: AX 8 ; : CX 9 ; : DX 10 ; : BX 11 ;
: SP 12 ; : BP 13 ; : SI 14 ; : DI 15 ;

View File

@ -1,8 +0,0 @@
( 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 ;

View File

@ -1,7 +0,0 @@
: MOVri, SWAP 0xb0 OR 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, ; : JZ, 0x74 A, ;
: LODSB, 0xac A, ; : CLI, 0xfa A, ; : HLT, 0xf4 A, ;
: ORrr, 0x08 A, MODRMrr A, ;

16
blk/754
View File

@ -1,16 +0,0 @@
( Place BEGIN, where you want to jump back and AGAIN after
a relative jump operator. Just like BSET and BWR. )
: BEGIN, PC ;
: BSET PC SWAP ! ;
( same as BSET, but we need to write a placeholder )
( : FJR, PC 0 A, ;
: IFZ, JRNZ, FJR, ;
: IFNZ, JRZ, FJR, ;
: IFC, JRNC, FJR, ;
: IFNC, JRC, FJR, ; )
: THEN,
DUP PC ( l l pc )
-^ 1- ( l off )
( warning: l is a PC offset, not a mem addr! )
SWAP ORG @ + ( BIN( @ - ) ( off addr )
C! ;

View File

@ -1,9 +0,0 @@
: FWR8 BSET 0 A, ;
: FSET @ THEN, ;
( : BREAK, FJR, 0x8000 OR ;
: BREAK?, DUP 0x8000 AND IF
0x7fff AND 1 ALLOT THEN, -1 ALLOT
THEN ; )
: AGAIN, ( BREAK?, ) PC - 1- A, ;
: BWR @ AGAIN, ;