mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 21:58:05 +11:00
Move IMMEDIATE from z80c to core
This makes IMMEDIATE affected by memory mappings.
This commit is contained in:
parent
64e441d059
commit
a7a2f3d08b
Binary file not shown.
@ -1,5 +1,8 @@
|
|||||||
: H@ HERE @ ;
|
: H@ HERE @ ;
|
||||||
: -^ SWAP - ;
|
: IMMEDIATE
|
||||||
|
CURRENT @ 1 -
|
||||||
|
DUP C@ 128 OR SWAP C!
|
||||||
|
;
|
||||||
: [ INTERPRET 1 FLAGS ! ; IMMEDIATE
|
: [ INTERPRET 1 FLAGS ! ; IMMEDIATE
|
||||||
: ] R> DROP ;
|
: ] R> DROP ;
|
||||||
: LIT 34 , ;
|
: LIT 34 , ;
|
||||||
@ -29,6 +32,7 @@
|
|||||||
(br)) and then call LITN on it. )
|
(br)) and then call LITN on it. )
|
||||||
|
|
||||||
: +! SWAP OVER @ + SWAP ! ;
|
: +! SWAP OVER @ + SWAP ! ;
|
||||||
|
: -^ SWAP - ;
|
||||||
: ALLOT HERE +! ;
|
: ALLOT HERE +! ;
|
||||||
|
|
||||||
: IF ( -- a | a: br cell addr )
|
: IF ( -- a | a: br cell addr )
|
||||||
|
@ -53,11 +53,7 @@
|
|||||||
' ( get word )
|
' ( get word )
|
||||||
-^ ( apply offset )
|
-^ ( apply offset )
|
||||||
, ( write! )
|
, ( write! )
|
||||||
;
|
; IMMEDIATE
|
||||||
( We can't use IMMEDIATE because the one we've just compiled
|
|
||||||
in z80c target's the *target*'s RAM addr, not the host's.
|
|
||||||
manually set namelen field. )
|
|
||||||
0x82 CURRENT @ 1 - C!
|
|
||||||
|
|
||||||
: RAM+
|
: RAM+
|
||||||
[ RAMSTART LITN ] _c +
|
[ RAMSTART LITN ] _c +
|
||||||
@ -250,9 +246,7 @@
|
|||||||
|
|
||||||
( : and ; have to be defined last because it can't be
|
( : and ; have to be defined last because it can't be
|
||||||
executed now also, they can't have their real name
|
executed now also, they can't have their real name
|
||||||
right away. We also can't use IMMEDIATE because the offset
|
right away.
|
||||||
used for CURRENT is the *target*'s RAM offset. we're still
|
|
||||||
on the host.
|
|
||||||
)
|
)
|
||||||
|
|
||||||
: X
|
: X
|
||||||
@ -269,17 +263,15 @@
|
|||||||
( maybe number )
|
( maybe number )
|
||||||
ELSE _c (parse*) _c @ EXECUTE _c LITN THEN
|
ELSE _c (parse*) _c @ EXECUTE _c LITN THEN
|
||||||
AGAIN
|
AGAIN
|
||||||
;
|
; IMMEDIATE
|
||||||
|
|
||||||
: Y
|
: Y
|
||||||
['] EXIT _c ,
|
['] EXIT _c ,
|
||||||
_c R> _c DROP ( exit : )
|
_c R> _c DROP ( exit : )
|
||||||
;
|
; IMMEDIATE
|
||||||
|
|
||||||
( Give ":" and ";" their real name and make them IMMEDIATE )
|
( Give ":" and ";" their real name )
|
||||||
0x81 ' X 1 - _C!
|
|
||||||
':' ' X 4 - _C!
|
':' ' X 4 - _C!
|
||||||
0x81 ' Y 1 - _C!
|
|
||||||
';' ' Y 4 - _C!
|
';' ' Y 4 - _C!
|
||||||
|
|
||||||
( Add dummy entry. we use CREATE because (entry) is, at this
|
( Add dummy entry. we use CREATE because (entry) is, at this
|
||||||
|
@ -311,13 +311,6 @@ CODE R>
|
|||||||
HL PUSHqq,
|
HL PUSHqq,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
CODE IMMEDIATE
|
|
||||||
( CURRENT == RAM+2 )
|
|
||||||
RAMSTART 0x02 + LDHL(nn),
|
|
||||||
HL DECss,
|
|
||||||
7 (HL) SETbr,
|
|
||||||
;CODE
|
|
||||||
|
|
||||||
CODE IMMED?
|
CODE IMMED?
|
||||||
HL POPqq,
|
HL POPqq,
|
||||||
chkPS,
|
chkPS,
|
||||||
|
Loading…
Reference in New Issue
Block a user