From 60ecab314e6dda5a8b929b1c79b1f3e5aabd8d74 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 20 Jun 2020 16:58:48 -0400 Subject: [PATCH] pcat: we have PROMPT! Not working, but we do get that sweet "CollapseOS". --- blk/811 | 6 ++++-- blk/813 | 2 +- recipes/pcat/xcomp.fs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/blk/811 b/blk/811 index 0a95b33..2ed76c5 100644 --- a/blk/811 +++ b/blk/811 @@ -4,7 +4,9 @@ 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 7 MOVri, -BX 0 MOVxI, 0x13 INT, ( read sectors 2-9 of boot floppy ) +AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 12 MOVri, +BX 0 MOVxI, 0x13 INT, ( read sectors 2-14 of boot floppy ) +( TODO: reading 12 sectors like this probably doesn't work + on real vintage PC/AT with floppy. Make this more robust. ) 0x800 0 JMPf, ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A, diff --git a/blk/813 b/blk/813 index 3f4be57..722444a 100644 --- a/blk/813 +++ b/blk/813 @@ -9,7 +9,7 @@ H@ XCURRENT ! ( set current tip of dict, 0x42 ) CODE (br) ( 0x53 ) L2 BSET ( used in br? ) DI DX MOVxx, DI [DI] MOVx[], DX DI ADDxx, ;CODE NOP, NOP, -CODE (br?) ( 0x67 ) +CODE (?br) ( 0x67 ) AX POPx, AX AX ORxx, JZ, L2 @ RPCs, ( False, branch ) ( True, skip next 2 bytes and don't branch ) L1 BSET ( loop will jump here ) DX INCx, DX INCx, diff --git a/recipes/pcat/xcomp.fs b/recipes/pcat/xcomp.fs index fdaf450..a9032d8 100644 --- a/recipes/pcat/xcomp.fs +++ b/recipes/pcat/xcomp.fs @@ -10,10 +10,10 @@ CODE (emit) AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT, ;CODE CODE (key) AH AH XORrr, 0x16 INT, AX PUSHx, ;CODE -: FOO (key) (emit) ; -: BOOT 0x08 @ LIT< FOO _find DROP EXECUTE BYE ; +380 LOAD ( xcomp core high ) (entry) _ ( Update LATEST ) PC ORG @ 8 + ! +EOT, ORG @ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!