pcat: more native words
This commit is contained in:
parent
bd508daad9
commit
6b07296d30
4
blk/811
4
blk/811
@ -4,7 +4,7 @@ ORG @ 0x25 + HERE ! ( bypass BPB )
|
||||
L1 FSET ( start )
|
||||
CLI, CLD, AX 0x800 MOVxI, DS AX MOVsx, ES AX MOVsx,
|
||||
SS AX MOVsx, 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 )
|
||||
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 2 MOVri,
|
||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-3 of boot floppy )
|
||||
0x800 0 JMPf,
|
||||
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||
|
9
blk/820
9
blk/820
@ -1,4 +1,6 @@
|
||||
( native words )
|
||||
CODE EXECUTE
|
||||
DI POPx, JMPs, lblexec @ RPCs,
|
||||
CODE >R
|
||||
BP INCx, BP INCx, [BP] 0 POP[w]+,
|
||||
;CODE NOP, NOP, NOP,
|
||||
@ -8,6 +10,7 @@ CODE R>
|
||||
CODE 2R>
|
||||
[BP] -2 PUSH[w]+, [BP] 0 PUSH[w]+, BP 4 SUBxi,
|
||||
;CODE
|
||||
CODE I [BP] 0 PUSH[w]+, ;CODE
|
||||
CODE 1+ DI SP MOVxx, [DI] INC[w], ;CODE
|
||||
CODE 1- DI SP MOVxx, [DI] DEC[w], ;CODE
|
||||
CODE ROT ( a b c -- b c a )
|
||||
CX POPx, BX POPx, AX POPx,
|
||||
BX PUSHx, CX PUSHx, AX PUSHx,
|
||||
;CODE
|
||||
|
18
blk/821
18
blk/821
@ -1,6 +1,12 @@
|
||||
CODE BYE BEGIN, JMPs, AGAIN, ;CODE
|
||||
CODE EMIT
|
||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||
;CODE CODE 0 AX AX XORxx, AX PUSHx, ;CODE
|
||||
: BOOT 'Z' 1+ 'A' DO I EMIT LOOP BYE ;
|
||||
|
||||
CODE DUP AX POPx, AX PUSHx, AX PUSHx, ;CODE
|
||||
CODE ?DUP AX POPx, AX AX ORxx, IFNZ, AX PUSHx, THEN, ;CODE
|
||||
CODE DROP AX POPx, ;CODE
|
||||
CODE SWAP AX POPx, BX POPx, AX PUSHx, BX PUSHx, ;CODE
|
||||
CODE OVER ( a b -- a b a )
|
||||
DI SP MOVxx, AX [DI] 2 MOVx[]+, AX PUSHx,
|
||||
;CODE
|
||||
CODE 0 AX AX XORxx, AX PUSHx, ;CODE
|
||||
CODE 1 AX 1 MOVxI, AX PUSHx, ;CODE
|
||||
CODE I [BP] 0 PUSH[w]+, ;CODE
|
||||
CODE 1+ DI SP MOVxx, [DI] INC[w], ;CODE
|
||||
CODE 1- DI SP MOVxx, [DI] DEC[w], ;CODE
|
||||
|
6
blk/822
Normal file
6
blk/822
Normal file
@ -0,0 +1,6 @@
|
||||
CODE BYE BEGIN, JMPs, AGAIN, ;CODE
|
||||
CODE EMIT
|
||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||
;CODE
|
||||
: FOO 'A' 'B' 'C' OVER EMIT EMIT EMIT ;
|
||||
: BOOT ['] FOO EXECUTE BYE ;
|
@ -3,7 +3,7 @@
|
||||
750 LOAD ( 8086 asm )
|
||||
262 LOAD ( xcomp )
|
||||
270 LOAD ( xcomp overrides )
|
||||
812 821 LOADR
|
||||
812 822 LOADR
|
||||
(entry) _
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
|
Loading…
Reference in New Issue
Block a user