1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-25 17:38:05 +11:00

pcat: implement (s)

This commit is contained in:
Virgil Dupras 2020-06-19 20:09:51 -04:00
parent 723d3c4249
commit 9d2afd200c
7 changed files with 18 additions and 10 deletions

View File

@ -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 3 MOVri,
BX 0 MOVxI, 0x13 INT, ( read sectors 2-4 of boot floppy )
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 7 MOVri,
BX 0 MOVxI, 0x13 INT, ( read sectors 2-9 of boot floppy )
0x800 0 JMPf,
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,

View File

@ -12,4 +12,4 @@ CODE 2>R ( 0xa9 )
CODE (n) ( 0xbf, number literal )
DI DX MOVxx, DI [DI] MOVx[], DI PUSHx,
DX INCx, DX INCx,
;CODE ( END OF STABLE ABI )
;CODE NOP, NOP,

6
blk/815 Normal file
View File

@ -0,0 +1,6 @@
CODE (s) ( 0xd4, string literal, see B287 )
DI DX MOVxx, ( IP )
AH AH XORrr, AL [DI] MOVr[], ( slen )
DX PUSHx, DX INCx, DX AX ADDxx,
;CODE
( END OF STABLE ABI )

View File

@ -9,8 +9,7 @@ lblfind BSET
CL AL CMPrr, IFZ, ( same len )
SI PUSHx, DI PUSHx, CX PUSHx, ( --> lvl 3 )
3 ADDALi, ( header ) AH AH XORrr, DI AX SUBxx,
REPZ, CMPSB,
CLD, REPZ, CMPSB,
CX POPx, DI POPx, SI POPx, ( <-- lvl 3 )
IFZ, AL AL XORrr, ( Z ) RETn, THEN,
IFZ, RETn, THEN,
THEN,
( cont. )

View File

@ -1,8 +1,11 @@
L3 BSET 4 A, 'B' A, 'O' A, 'O' A, 'T' A,
PC 3 - ORG @ 1+ ! ( main )
SP PS_ADDR MOVxI,
BP RS_ADDR MOVxI,
SP PS_ADDR MOVxI, BP RS_ADDR MOVxI,
DI 0x08 MOVxm, ( LATEST )
( HERE begins at CURRENT )
BX RAMSTART MOVxI,
[BX] 0x04 ( HERE ) DI MOV[]+x,
[BX] 0x02 ( CURRENT ) DI MOV[]+x,
SI L3 @ MOVxI,
CALLn, lblfind @ RPCn, ( find )
IFZ, JMPn, lblexec @ RPCn, ( execute ) THEN,

View File

@ -2,5 +2,4 @@ CODE EMIT
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
;CODE
: FOO '0' 1 3 LSHIFT + EMIT ;
L1 BSET 3 A, 'F' A, 'O' A, 'O' A,
: BOOT 0x08 @ [ L1 @ LITN ] _find DROP EXECUTE BYE ;
: BOOT 0x08 @ LIT< FOO _find DROP EXECUTE BYE ;

View File

@ -1,5 +1,6 @@
0xff00 CONSTANT RS_ADDR
0xfffa CONSTANT PS_ADDR
RS_ADDR 0x80 - CONSTANT RAMSTART
750 LOAD ( 8086 asm )
262 LOAD ( xcomp )
270 LOAD ( xcomp overrides )