2020-06-16 20:41:53 -04:00
|
|
|
0xff00 CONSTANT RS_ADDR
|
|
|
|
0xfffa CONSTANT PS_ADDR
|
2020-06-19 20:09:51 -04:00
|
|
|
RS_ADDR 0x80 - CONSTANT RAMSTART
|
2020-06-14 14:15:44 -04:00
|
|
|
750 LOAD ( 8086 asm )
|
|
|
|
262 LOAD ( xcomp )
|
|
|
|
270 LOAD ( xcomp overrides )
|
2020-06-21 10:40:09 -04:00
|
|
|
812 829 LOADR
|
2020-06-20 13:50:01 -04:00
|
|
|
353 LOAD ( xcomp core low )
|
2020-06-21 14:07:02 -04:00
|
|
|
CODE (emit) 1 chkPS,
|
2020-06-20 13:50:01 -04:00
|
|
|
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
|
|
|
;CODE
|
2020-06-20 20:06:42 -04:00
|
|
|
CODE (key)
|
2020-06-21 22:07:12 -04:00
|
|
|
AH AH XORrr, 0x16 INT, AH AH XORrr, AX PUSHx,
|
|
|
|
;CODE
|
2020-06-22 05:59:26 -04:00
|
|
|
CODE 13H08H ( driveno -- cx dx )
|
2020-06-21 22:07:12 -04:00
|
|
|
DI POPx, DX PUSHx, ( protect ) DX DI MOVxx, AX 0x800 MOVxI,
|
2020-06-22 13:54:33 -04:00
|
|
|
ES PUSHs, DI DI XORxx, ES DI MOVsx,
|
|
|
|
0x13 INT, DI DX MOVxx, ES POPs, DX POPx, ( unprotect )
|
2020-06-22 05:59:26 -04:00
|
|
|
CX PUSHx, DI PUSHx,
|
2020-06-21 22:07:12 -04:00
|
|
|
;CODE
|
|
|
|
CODE 13H ( ax bx cx dx -- ax bx cx dx )
|
|
|
|
SI POPx, ( DX ) CX POPx, BX POPx, AX POPx,
|
|
|
|
DX PUSHx, ( protect ) DX SI MOVxx, DI DI XORxx,
|
|
|
|
0x13 INT, SI DX MOVxx, DX POPx, ( unprotect )
|
|
|
|
AX PUSHx, BX PUSHx, CX PUSHx, SI PUSHx,
|
|
|
|
;CODE
|
|
|
|
: FDSPT 0x70 RAM+ ;
|
2020-06-22 05:59:26 -04:00
|
|
|
: FDHEADS 0x71 RAM+ ;
|
2020-06-22 06:44:52 -04:00
|
|
|
: _ ( AX BX sec )
|
2020-06-21 22:07:12 -04:00
|
|
|
( AH=read sectors, AL=1 sector, BX=dest,
|
2020-06-21 22:53:11 -04:00
|
|
|
CH=trackno CL=secno DH=head DL=drive )
|
2020-06-22 05:59:26 -04:00
|
|
|
FDSPT C@ /MOD ( AX BX sec trk )
|
|
|
|
FDHEADS C@ /MOD ( AX BX sec head trk )
|
2020-06-21 22:07:12 -04:00
|
|
|
8 LSHIFT ROT OR 1+ ( AX BX head CX )
|
2020-06-21 22:53:11 -04:00
|
|
|
SWAP 8 LSHIFT 0x03 C@ ( boot drive ) OR ( AX BX CX DX )
|
2020-06-21 22:07:12 -04:00
|
|
|
13H 2DROP 2DROP
|
|
|
|
;
|
|
|
|
: FD@
|
|
|
|
2 * 16 + ( blkfs starts at sector 16 )
|
2020-06-22 06:44:52 -04:00
|
|
|
0x0201 BLK( 2 PICK _
|
|
|
|
0x0201 BLK( 0x200 + ROT 1+ _ ;
|
|
|
|
: FD!
|
|
|
|
2 * 16 + ( blkfs starts at sector 16 )
|
|
|
|
0x0301 BLK( 2 PICK _
|
|
|
|
0x0301 BLK( 0x200 + ROT 1+ _ ;
|
2020-06-21 22:07:12 -04:00
|
|
|
: FD$
|
|
|
|
( get number of sectors per track with command 08H. )
|
2020-06-22 05:59:26 -04:00
|
|
|
0x03 ( boot drive ) C@ 13H08H
|
|
|
|
8 RSHIFT 1+ FDHEADS C!
|
|
|
|
0x3f AND FDSPT C!
|
2020-06-21 22:07:12 -04:00
|
|
|
;
|
2020-06-22 06:53:30 -04:00
|
|
|
: COLS 80 ; : LINES 25 ;
|
|
|
|
CODE AT-XY ( x y )
|
|
|
|
( DH=row DL=col BH=page )
|
|
|
|
AX POPx, BX POPx, DX PUSHx, ( protect )
|
|
|
|
DH AL MOVrr, DL BL MOVrr, BX BX XORxx, AH 2 MOVri,
|
|
|
|
0x10 INT, DX POPx, ( unprotect )
|
|
|
|
;CODE
|
2020-06-20 16:58:48 -04:00
|
|
|
380 LOAD ( xcomp core high )
|
2020-06-14 21:52:58 -04:00
|
|
|
(entry) _
|
|
|
|
( Update LATEST )
|
|
|
|
PC ORG @ 8 + !
|
2020-06-21 22:07:12 -04:00
|
|
|
," BLK$ FD$ "
|
|
|
|
," ' FD@ BLK@* ! "
|
|
|
|
," ' FD! BLK!* ! "
|
2020-06-20 16:58:48 -04:00
|
|
|
EOT,
|
2020-06-12 14:01:24 -04:00
|
|
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
|
|
|
H@ 256 /MOD 2 PC! 2 PC!
|