mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 05:28:06 +11:00
Add word FILL
This commit is contained in:
parent
f605e2d85c
commit
2b2ccad96c
4
blk/050
4
blk/050
@ -10,7 +10,7 @@ C! c a -- Store byte c in address a
|
||||
CURRENT -- a Set a to wordref of last added entry.
|
||||
CURRENT* -- a A pointer to active CURRENT*. Useful
|
||||
when we have multiple active dicts.
|
||||
FILL a n b -- Fill n bytes at addr a with val b.
|
||||
HERE -- a Push HERE's address
|
||||
H@ -- a HERE @
|
||||
MOVE a1 a2 u -- Copy u bytes from a1 to a2, starting
|
||||
with a1, going up.
|
||||
(cont.)
|
||||
|
2
blk/051
Normal file
2
blk/051
Normal file
@ -0,0 +1,2 @@
|
||||
MOVE a1 a2 u -- Copy u bytes from a1 to a2, starting
|
||||
with a1, going up.
|
15
blk/434
15
blk/434
@ -1,5 +1,4 @@
|
||||
( a1 a2 u -- )
|
||||
: MOVE
|
||||
: MOVE ( a1 a2 u -- )
|
||||
( u ) 0 DO
|
||||
SWAP DUP I + C@ ( a2 a1 x )
|
||||
ROT SWAP OVER I + ( a1 a2 x a2 )
|
||||
@ -7,10 +6,10 @@
|
||||
LOOP
|
||||
2DROP
|
||||
;
|
||||
|
||||
: DELW 1- 0 SWAP C! ;
|
||||
|
||||
: PREV
|
||||
3 - DUP @ ( a o )
|
||||
- ( a-o )
|
||||
: FILL ( a n b -- )
|
||||
SWAP 2 PICK + ( a b a+n ) ROT ( b a+n a ) DO ( b )
|
||||
DUP I C!
|
||||
LOOP
|
||||
;
|
||||
: DELW 1- 0 SWAP C! ;
|
||||
: PREV 3 - DUP @ - ;
|
||||
|
BIN
emul/stage0.bin
BIN
emul/stage0.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user