1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 15:48:05 +11:00

Have FILL use indirect memory access

This allows SMS xcomp to use ALLOT0 instead of ZFILL,
This commit is contained in:
Virgil Dupras 2020-12-07 19:17:51 -05:00
parent e5a983ab7f
commit 55a7726f70
5 changed files with 12 additions and 17 deletions

View File

@ -13,15 +13,14 @@ SYSVARS 0x73 + CONSTANT CPORT_MEM
0xdd CONSTANT CPORT_D2
SYSVARS 0x74 + CONSTANT PAD_MEM
5 LOAD ( z80 assembler )
: ZFILL, ( u ) 0 DO 0 C,* LOOP ;
262 LOAD ( xcomp )
524 LOAD ( font compiler )
165 LOAD ( Sega ROM signer )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
DI, 0x100 JP, 0x62 ZFILL, ( 0x66 )
RETN, 0x98 ZFILL, ( 0x100 )
DI, 0x100 JP, 0x62 ALLOT0 ( 0x66 )
RETN, 0x98 ALLOT0 ( 0x100 )
( All set, carry on! )
CURRENT @ XCURRENT !
0x100 BIN( !

View File

@ -14,15 +14,14 @@ SYSVARS 0x73 + CONSTANT CPORT_MEM
0xdd CONSTANT CPORT_D2
SYSVARS 0x74 + CONSTANT PS2_MEM
5 LOAD ( z80 assembler )
: ZFILL, ( u ) 0 DO 0 C,* LOOP ;
262 LOAD ( xcomp )
524 LOAD ( font compiler )
165 LOAD ( Sega ROM signer )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
DI, 0x100 JP, 0x62 ZFILL, ( 0x66 )
RETN, 0x98 ZFILL, ( 0x100 )
DI, 0x100 JP, 0x62 ALLOT0 ( 0x66 )
RETN, 0x98 ALLOT0 ( 0x100 )
( All set, carry on! )
CURRENT @ XCURRENT !
0x100 BIN( !

View File

@ -15,15 +15,14 @@ SYSVARS 0x73 + CONSTANT CPORT_MEM
0xdd CONSTANT CPORT_D2
SYSVARS 0x74 + CONSTANT PS2_MEM
5 LOAD ( z80 assembler )
: ZFILL, ( u ) 0 DO 0 C,* LOOP ;
262 LOAD ( xcomp )
524 LOAD ( font compiler )
165 LOAD ( Sega ROM signer )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
DI, 0x100 JP, 0x62 ZFILL, ( 0x66 )
RETN, 0x98 ZFILL, ( 0x100 )
DI, 0x100 JP, 0x62 ALLOT0 ( 0x66 )
RETN, 0x98 ALLOT0 ( 0x100 )
( All set, carry on! )
CURRENT @ XCURRENT !
0x100 BIN( !

View File

@ -15,15 +15,14 @@ SYSVARS 0x73 + CONSTANT CPORT_MEM
0xdd CONSTANT CPORT_D2
SYSVARS 0x74 + CONSTANT PS2_MEM
5 LOAD ( z80 assembler )
: ZFILL, ( u ) 0 DO 0 C,* LOOP ;
262 LOAD ( xcomp )
523 LOAD ( font compiler )
165 LOAD ( Sega ROM signer )
282 LOAD ( boot.z80.decl )
270 LOAD ( xcomp overrides )
DI, 0x100 JP, 0x62 ZFILL, ( 0x66 )
RETN, 0x98 ZFILL, ( 0x100 )
DI, 0x100 JP, 0x62 ALLOT0 ( 0x66 )
RETN, 0x98 ALLOT0 ( 0x100 )
( All set, carry on! )
CURRENT @ XCURRENT !
0x100 BIN( !

9
blk.fs
View File

@ -1741,14 +1741,13 @@ with "390 LOAD"
: / /MOD NIP ;
: MOD /MOD DROP ;
: ALLOT HERE +! ;
: FILL ( a n b -- )
SWAP 2 PICK + ( a b a+n ) ROT ( b a+n a ) DO ( b )
DUP I C!
LOOP DROP ;
: ALLOT0 ( n -- ) H@ OVER 0 FILL ALLOT ;
SYSVARS 0x3e + :** C@*
SYSVARS 0x40 + :** C!*
SYSVARS 0x42 + :** C,*
: FILL ( a n b -- )
ROT> OVER ( b a n a ) + SWAP ( b a+n a ) DO ( b )
DUP I C!* LOOP DROP ;
: ALLOT0 ( n -- ) H@ OVER 0 FILL ALLOT ;
( ----- 356 )
SYSVARS 0x53 + :** EMIT
: STYPE C@+ ( a len ) 0 DO C@+ EMIT LOOP DROP ;