pcat: add native _find
This commit is contained in:
parent
5ebdf84e78
commit
8cc8df0446
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 2 MOVri,
|
||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-3 of boot floppy )
|
||||
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 3 MOVri,
|
||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-4 of boot floppy )
|
||||
0x800 0 JMPf,
|
||||
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||
|
2
blk/812
2
blk/812
@ -1,4 +1,4 @@
|
||||
VARIABLE lblexec VARIABLE lblfind
|
||||
VARIABLE lblexec VARIABLE lblfind VARIABLE lblnext
|
||||
H@ ORG !
|
||||
JMPn, 0 A,, ( 00, main ) 0 A, 0 A,, ( unused )
|
||||
0 A,, ( unused ) 0 A,, ( 08, LATEST )
|
||||
|
2
blk/816
2
blk/816
@ -1,4 +1,4 @@
|
||||
PC 0x1d - ORG @ 0x1b + ! ( next )
|
||||
lblnext BSET PC 0x1d - ORG @ 0x1b + ! ( next )
|
||||
DI DX MOVxx, ( <-- IP ) DX INCx, DX INCx,
|
||||
DI [DI] MOVx[], ( wordref )
|
||||
( continue to execute )
|
||||
|
15
blk/826
15
blk/826
@ -1,8 +1,9 @@
|
||||
CODE 0 AX AX XORxx, AX PUSHx, ;CODE
|
||||
CODE 1 AX 1 MOVxI, AX PUSHx, ;CODE
|
||||
CODE 1+ DI SP MOVxx, [DI] INC[w], ;CODE
|
||||
CODE 1- DI SP MOVxx, [DI] DEC[w], ;CODE
|
||||
CODE EMIT
|
||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||
CODE _find ( cur w -- a f )
|
||||
SI POPx, ( w ) DI POPx, ( cur )
|
||||
CALLn, lblfind @ RPCn,
|
||||
IFNZ, ( not found )
|
||||
SI PUSHx, AX AX XORxx, AX PUSHx,
|
||||
JMPn, lblnext @ RPCn,
|
||||
THEN, ( found )
|
||||
DI PUSHx, AX 1 MOVxI, AX PUSHx,
|
||||
;CODE
|
||||
: BOOT 4 5 CMP '=' + EMIT ;
|
||||
|
10
blk/828
Normal file
10
blk/828
Normal file
@ -0,0 +1,10 @@
|
||||
CODE 0 AX AX XORxx, AX PUSHx, ;CODE
|
||||
CODE 1 AX 1 MOVxI, AX PUSHx, ;CODE
|
||||
CODE 1+ DI SP MOVxx, [DI] INC[w], ;CODE
|
||||
CODE 1- DI SP MOVxx, [DI] DEC[w], ;CODE
|
||||
CODE EMIT
|
||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||
;CODE
|
||||
: FOO 'X' EMIT ;
|
||||
L1 BSET 3 A, 'F' A, 'O' A, 'O' A,
|
||||
: BOOT 0x08 @ [ L1 @ LITN ] _find DROP EXECUTE BYE ;
|
@ -3,7 +3,7 @@
|
||||
750 LOAD ( 8086 asm )
|
||||
262 LOAD ( xcomp )
|
||||
270 LOAD ( xcomp overrides )
|
||||
812 826 LOADR
|
||||
812 828 LOADR
|
||||
(entry) _
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
|
Loading…
Reference in New Issue
Block a user