1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 14:58:06 +11:00

trs80: add *CL< and *CL>

This commit is contained in:
Virgil Dupras 2020-05-01 14:38:31 -04:00
parent 2a578b3352
commit b8d8007a3f
7 changed files with 18 additions and 8 deletions

View File

@ -4,6 +4,7 @@
: PUSH0, BC 0 LDddnn, BC PUSHqq, ; : PUSH0, BC 0 LDddnn, BC PUSHqq, ;
: PUSH1, BC 1 LDddnn, BC PUSHqq, ; : PUSH1, BC 1 LDddnn, BC PUSHqq, ;
: PUSHZ, BC 0 LDddnn, IFZ, BC INCss, THEN, BC PUSHqq, ; : PUSHZ, BC 0 LDddnn, IFZ, BC INCss, THEN, BC PUSHqq, ;
: PUSHA, B 0 LDrn, C A LDrr, BC PUSHqq, ;
: HLZ, A H LDrr, L ORr, ; : HLZ, A H LDrr, L ORr, ;
: DEZ, A D LDrr, E ORr, ; : DEZ, A D LDrr, E ORr, ;
: LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ; : LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ;

View File

@ -1 +1 @@
493 496 LOADR 493 497 LOADR

View File

@ -1,4 +1,4 @@
CODE DCSTAT ( drv -- f ) CODE @DCSTAT ( drv -- f )
BC POPqq, BC POPqq,
chkPS, chkPS,
A 0x28 LDrn, ( @DCSTAT ) A 0x28 LDrn, ( @DCSTAT )

View File

@ -1,4 +1,4 @@
CODE RDSEC ( drv cylsec addr -- f ) CODE @RDSEC ( drv cylsec addr -- f )
HL POPqq, HL POPqq,
DE POPqq, DE POPqq,
BC POPqq, BC POPqq,

10
blk/496
View File

@ -1,4 +1,4 @@
CODE WRSEC ( drv cylsec addr -- f ) CODE @WRSEC ( drv cylsec addr -- f )
HL POPqq, HL POPqq,
DE POPqq, DE POPqq,
BC POPqq, BC POPqq,
@ -7,5 +7,11 @@ CODE WRSEC ( drv cylsec addr -- f )
0x28 RSTn, 0x28 RSTn,
PUSHZ, PUSHZ,
;CODE ;CODE
CODE @GET ( a -- c f )
DE POPqq,
chkPS,
A 0x03 LDrn, ( @GET )
0x28 RSTn,
PUSHA, PUSHZ,
;CODE

View File

@ -6,7 +6,7 @@
256 * + ( cylsec ) 256 * + ( cylsec )
; ;
: FD@! ( wref blk -- ) : FD@! ( wref blk -- )
1 DCSTAT NOT IF _err THEN 1 @DCSTAT NOT IF _err THEN
4 * ( wr sec ) 4 * ( wr sec )
4 0 DO ( wr sec ) 4 0 DO ( wr sec )
DUP I + _cylsec ( wr sec cs ) DUP I + _cylsec ( wr sec cs )

View File

@ -1,4 +1,7 @@
: FD@ ['] RDSEC SWAP FD@! ; : FD@ ['] @RDSEC SWAP FD@! ;
: FD! ['] WRSEC SWAP FD@! ; : FD! ['] @WRSEC SWAP FD@! ;
: FD$ ['] FD@ BLK@* ! ['] FD! BLK!* ! ; : FD$ ['] FD@ BLK@* ! ['] FD! BLK!* ! ;
: _err ABORT" *CLerr" ;
: *CL< 0 BEGIN DROP 0x0238 @GET UNTIL ;
: *CL> 0x0238 @PUT NOT IF _err THEN ;