mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 19:48:06 +11:00
core: define H@ a bit sooner
This commit is contained in:
parent
bd38d80f9c
commit
863540f7c6
6
blk/353
6
blk/353
@ -3,10 +3,8 @@
|
|||||||
: HERE 0x04 RAM+ ;
|
: HERE 0x04 RAM+ ;
|
||||||
: CURRENT* 0x51 RAM+ ;
|
: CURRENT* 0x51 RAM+ ;
|
||||||
: CURRENT CURRENT* @ ;
|
: CURRENT CURRENT* @ ;
|
||||||
|
: H@ HERE @ ;
|
||||||
( w -- a f )
|
: FIND ( w -- a f ) CURRENT @ SWAP _find ;
|
||||||
: FIND CURRENT @ SWAP _find ;
|
|
||||||
|
|
||||||
: QUIT
|
: QUIT
|
||||||
(resRS)
|
(resRS)
|
||||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||||
|
4
blk/364
4
blk/364
@ -4,8 +4,8 @@
|
|||||||
DUP NOT IF DROP 0x0c RAM+ @ THEN ( 0c == C<* )
|
DUP NOT IF DROP 0x0c RAM+ @ THEN ( 0c == C<* )
|
||||||
EXECUTE
|
EXECUTE
|
||||||
;
|
;
|
||||||
: , HERE @ ! HERE @ 2+ HERE ! ;
|
: , H@ ! H@ 2+ HERE ! ;
|
||||||
: C, HERE @ C! HERE @ 1+ HERE ! ;
|
: C, H@ C! H@ 1+ HERE ! ;
|
||||||
: BIT@ ( bit addr -- f ) C@ SWAP RSHIFT 0x01 AND ;
|
: BIT@ ( bit addr -- f ) C@ SWAP RSHIFT 0x01 AND ;
|
||||||
: BIT! ( f bit addr -- )
|
: BIT! ( f bit addr -- )
|
||||||
SWAP 0x01 SWAP LSHIFT ROT ( addr mask f )
|
SWAP 0x01 SWAP LSHIFT ROT ( addr mask f )
|
||||||
|
11
blk/368
11
blk/368
@ -1,11 +1,10 @@
|
|||||||
: [entry]
|
: [entry] ( w -- )
|
||||||
HERE @ ( w h )
|
H@ SWAP SCPY ( h )
|
||||||
SWAP SCPY ( h )
|
H@ SWAP - ( sz )
|
||||||
HERE @ SWAP - ( sz )
|
|
||||||
( write prev value )
|
( write prev value )
|
||||||
HERE @ CURRENT @ - ,
|
H@ CURRENT @ - ,
|
||||||
C, ( write size )
|
C, ( write size )
|
||||||
HERE @ CURRENT !
|
H@ CURRENT !
|
||||||
;
|
;
|
||||||
|
|
||||||
: (entry) WORD [entry] ;
|
: (entry) WORD [entry] ;
|
||||||
|
1
blk/369
1
blk/369
@ -1,7 +1,6 @@
|
|||||||
( Words here until the end of the low part, unlike words
|
( Words here until the end of the low part, unlike words
|
||||||
preceeding them, aren't immediately needed for boot. But its
|
preceeding them, aren't immediately needed for boot. But its
|
||||||
better to have as many words as possible in the xcomp part. )
|
better to have as many words as possible in the xcomp part. )
|
||||||
: H@ HERE @ ;
|
|
||||||
: IMMEDIATE
|
: IMMEDIATE
|
||||||
CURRENT @ 1-
|
CURRENT @ 1-
|
||||||
DUP C@ 128 OR SWAP C! ;
|
DUP C@ 128 OR SWAP C! ;
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user