mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-02 04:20:55 +11:00
Compare commits
No commits in common. "4146110e0d3d7cabc4294a68ac249a9bb370bab7" and "a405f771859eede7359f46923bccbc73b1a88d8d" have entirely different histories.
4146110e0d
...
a405f77185
14
blk/004
14
blk/004
@ -1,16 +1,2 @@
|
|||||||
21 How blocks are organized 22 Addressed devices
|
21 How blocks are organized 22 Addressed devices
|
||||||
23 Branching
|
23 Branching
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/005
4
blk/005
@ -10,7 +10,3 @@ binary (example "0b1010"), char literals are single characters
|
|||||||
surrounded by ' (example 'X'). Char literals can't be used for
|
surrounded by ' (example 'X'). Char literals can't be used for
|
||||||
whitespaces.
|
whitespaces.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/006
2
blk/006
@ -12,5 +12,3 @@ writes that number as a literal, followed by a reference to
|
|||||||
Example: ": foo [COMPILE] bar;" is the equivalent of ": foo bar
|
Example: ": foo [COMPILE] bar;" is the equivalent of ": foo bar
|
||||||
;" if bar is not an immediate. However, ": foo COMPILE bar ;"
|
;" if bar is not an immediate. However, ": foo COMPILE bar ;"
|
||||||
is the equivalent of ": foo ['] bar , ;". Got it?
|
is the equivalent of ": foo ['] bar , ;". Got it?
|
||||||
|
|
||||||
|
|
||||||
|
10
blk/009
10
blk/009
@ -4,13 +4,3 @@ prompt control to a RS-232 device instead of the keyboard.
|
|||||||
Interpreter output is unbuffered and only has EMIT. This
|
Interpreter output is unbuffered and only has EMIT. This
|
||||||
word can also be overriden, mostly as a companion to the
|
word can also be overriden, mostly as a companion to the
|
||||||
raison d'etre of your KEY override.
|
raison d'etre of your KEY override.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
8
blk/020
8
blk/020
@ -6,11 +6,3 @@ Although the usage of absolute LOAD calls are minimally used
|
|||||||
(relative LOADs are preferred), they are sometimes unavoidable.
|
(relative LOADs are preferred), they are sometimes unavoidable.
|
||||||
When you span Collapse OS over multiple disks, don't forget to
|
When you span Collapse OS over multiple disks, don't forget to
|
||||||
adjust those absolute LOADs.
|
adjust those absolute LOADs.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/021
3
blk/021
@ -11,6 +11,3 @@ try to strive towards a few goals:
|
|||||||
4. B200-B500 are for bootstrapping
|
4. B200-B500 are for bootstrapping
|
||||||
5. The rest is for recipes.
|
5. The rest is for recipes.
|
||||||
6. I'm not sure yet how I'll organize multiple arches.
|
6. I'm not sure yet how I'll organize multiple arches.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
blk/022
10
blk/022
@ -4,13 +4,3 @@ A@ and A! are the indirect versions of C@ and C!. Their target
|
|||||||
word is controlled through A@* and A!* and by default point to
|
word is controlled through A@* and A!* and by default point to
|
||||||
C@ and C*. There is also a AMOVE word that is the same as MOVE
|
C@ and C*. There is also a AMOVE word that is the same as MOVE
|
||||||
but using A@ and A!.
|
but using A@ and A!.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5
blk/023
5
blk/023
@ -9,8 +9,3 @@ The reasoning behind this intentional limit is that huge
|
|||||||
branches are generally a indicator that a logic ought to be
|
branches are generally a indicator that a logic ought to be
|
||||||
simplified. So here's one more constraint for you to help you
|
simplified. So here's one more constraint for you to help you
|
||||||
towards simplicity.
|
towards simplicity.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
blk/044
11
blk/044
@ -3,14 +3,3 @@ INTERPRET -- Get a line from stdin, compile it in tmp memory,
|
|||||||
then execute the compiled contents.
|
then execute the compiled contents.
|
||||||
LEAVE -- In a DO..LOOP, exit at the next LOOP call.
|
LEAVE -- In a DO..LOOP, exit at the next LOOP call.
|
||||||
QUIT -- Return to interpreter prompt immediately
|
QUIT -- Return to interpreter prompt immediately
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
8
blk/047
8
blk/047
@ -6,11 +6,3 @@ ROLL Rotate PSP over n items. "1 ROLL" = SWAP,
|
|||||||
"2 ROLL" = ROT. 0 is noop.
|
"2 ROLL" = ROT. 0 is noop.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
6
blk/051
6
blk/051
@ -8,9 +8,3 @@ MOVE a1 a2 u -- Copy u bytes from a1 to a2, starting
|
|||||||
MOVE- a1 a2 u -- Copy u bytes from a1 to a2, starting
|
MOVE- a1 a2 u -- Copy u bytes from a1 to a2, starting
|
||||||
with a1+u, going down.
|
with a1+u, going down.
|
||||||
MOVE, a u -- Copy u bytes from a to HERE.
|
MOVE, a u -- Copy u bytes from a to HERE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
blk/076
10
blk/076
@ -4,13 +4,3 @@ prohibitive in terms of costs), PS_ADDR should be set to
|
|||||||
at least 6 bytes before its actual limit. 6 bytes because we
|
at least 6 bytes before its actual limit. 6 bytes because we
|
||||||
seldom have words requiring more than 3 items from the stack.
|
seldom have words requiring more than 3 items from the stack.
|
||||||
Then, at each "exit" call we check for stack underflow.
|
Then, at each "exit" call we check for stack underflow.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/084
1
blk/084
@ -13,4 +13,3 @@ FUTURE USES section is unused for now.
|
|||||||
|
|
||||||
DRIVERS section is reserved for recipe-specific drivers.
|
DRIVERS section is reserved for recipe-specific drivers.
|
||||||
|
|
||||||
|
|
||||||
|
6
blk/090
6
blk/090
@ -8,9 +8,3 @@
|
|||||||
In RAM-only environment, we will typically have a
|
In RAM-only environment, we will typically have a
|
||||||
"CURRENT @ HERE !" line during init to have HERE begin at the
|
"CURRENT @ HERE !" line during init to have HERE begin at the
|
||||||
end of the binary instead of RAMEND.
|
end of the binary instead of RAMEND.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
14
blk/102
14
blk/102
@ -1,16 +1,2 @@
|
|||||||
X ( n -- ): Delete X chars after cursor and place in IBUF.
|
X ( n -- ): Delete X chars after cursor and place in IBUF.
|
||||||
E: Run X with n = length of FBUF.
|
E: Run X with n = length of FBUF.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/107
3
blk/107
@ -11,6 +11,3 @@ CREATE FBUF 64 ALLOT0
|
|||||||
EMIT
|
EMIT
|
||||||
LOOP ( lno ) 1+ . ;
|
LOOP ( lno ) 1+ . ;
|
||||||
: _zbuf 64 0 FILL ; ( buf -- )
|
: _zbuf 64 0 FILL ; ( buf -- )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/108
4
blk/108
@ -10,7 +10,3 @@
|
|||||||
: _mvln- ( ln -- move ln 1 line up )
|
: _mvln- ( ln -- move ln 1 line up )
|
||||||
DUP 14 > IF DROP 15 _lpos _zbuf
|
DUP 14 > IF DROP 15 _lpos _zbuf
|
||||||
ELSE 1+ _lpos DUP 64 - 64 MOVE THEN ;
|
ELSE 1+ _lpos DUP 64 - 64 MOVE THEN ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
blk/109
11
blk/109
@ -3,14 +3,3 @@
|
|||||||
14 I - _mvln+
|
14 I - _mvln+
|
||||||
LOOP ;
|
LOOP ;
|
||||||
: U _U P ;
|
: U _U P ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
6
blk/110
6
blk/110
@ -8,9 +8,3 @@
|
|||||||
UNTIL ( a1 a2 )
|
UNTIL ( a1 a2 )
|
||||||
DUP BLK) < IF BLK( - FBUF + -^ EDPOS ! ELSE DROP THEN ;
|
DUP BLK) < IF BLK( - FBUF + -^ EDPOS ! ELSE DROP THEN ;
|
||||||
: F FBUF _type _F EDPOS @ 64 / _pln ;
|
: F FBUF _type _F EDPOS @ 64 / _pln ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/111
3
blk/111
@ -11,6 +11,3 @@
|
|||||||
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN
|
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN
|
||||||
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
||||||
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5
blk/112
5
blk/112
@ -9,8 +9,3 @@
|
|||||||
EDPOS @ 64 / _pln ;
|
EDPOS @ 64 / _pln ;
|
||||||
: E FBUF _blen X ;
|
: E FBUF _blen X ;
|
||||||
: Y FBUF _blen icpy ;
|
: Y FBUF _blen icpy ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/121
4
blk/121
@ -11,6 +11,6 @@ effect.
|
|||||||
block. Any change made to the previously selected block is
|
block. Any change made to the previously selected block is
|
||||||
saved beforehand.
|
saved beforehand.
|
||||||
|
|
||||||
'[' and ']' advances the selected block by "modifier". 't' opens
|
'[' and ']' advances the selected block by "modifier".
|
||||||
the previously opened block.
|
|
||||||
(cont.)
|
(cont.)
|
||||||
|
6
blk/123
6
blk/123
@ -8,9 +8,3 @@ be sure, then press 'E'.
|
|||||||
'R' goes into replace mode at current cursor position.
|
'R' goes into replace mode at current cursor position.
|
||||||
Following keystrokes replace current character and advance
|
Following keystrokes replace current character and advance
|
||||||
cursor. Press return to return to normal mode.
|
cursor. Press return to return to normal mode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
13
blk/125
13
blk/125
@ -1,16 +1,3 @@
|
|||||||
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
||||||
-20 LOAD+ ( B105, block editor )
|
-20 LOAD+ ( B105, block editor )
|
||||||
1 6 LOADR+
|
1 6 LOADR+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
blk/126
10
blk/126
@ -1,16 +1,12 @@
|
|||||||
CREATE CMD 2 C, '$' C, 0 C,
|
CREATE CMD 2 C, '$' C, 0 C,
|
||||||
CREATE PREVPOS 0 , CREATE PREVBLK 0 ,
|
VARIABLE PREVPOS
|
||||||
: acc@ ACC @ 1 MAX ;
|
: acc@ ACC @ 1 MAX ;
|
||||||
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
||||||
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
||||||
: aty 0 SWAP AT-XY ;
|
: aty 0 SWAP AT-XY ;
|
||||||
: clrscr LINES 0 DO i aty COLS nspcs LOOP ;
|
: clrscr LINES 0 DO i aty COLS nspcs LOOP ;
|
||||||
: gutter ( ln n ) OVER + SWAP DO 67 i AT-XY '|' EMIT LOOP ;
|
|
||||||
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
|
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
|
||||||
SPC EDPOS @ 64 /MOD . ',' EMIT . 10 nspcs ;
|
SPC EDPOS @ 64 /MOD . ',' EMIT . 10 nspcs ;
|
||||||
: contents 3 aty BLK> @ LIST 3 16 gutter ;
|
: contents 3 aty BLK> @ LIST ;
|
||||||
: selblk BLK> @ PREVBLK ! BLK@ contents ;
|
: selblk BLK@ contents ;
|
||||||
: mode! ( c -- ) 63 0 AT-XY ;
|
: mode! ( c -- ) 63 0 AT-XY ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
blk/127
10
blk/127
@ -6,11 +6,5 @@
|
|||||||
: buftype ( buf ln -- )
|
: buftype ( buf ln -- )
|
||||||
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
||||||
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
||||||
SWAP DUP _zbuf C!+ DUP 63 + SWAP DO
|
SWAP DUP _zbuf BEGIN ( c a )
|
||||||
C< DUP 0x0d = IF LEAVE THEN i C! LOOP ;
|
C!+ C< TUCK 0x0d = UNTIL ( c a ) C! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/128
4
blk/128
@ -1,7 +1,6 @@
|
|||||||
: $g ACC @ selblk ;
|
: $g ACC @ selblk ;
|
||||||
: $[ BLK> @ acc@ - selblk ;
|
: $[ BLK> @ acc@ - selblk ;
|
||||||
: $] BLK> @ acc@ + selblk ;
|
: $] BLK> @ acc@ + selblk ;
|
||||||
: $t PREVBLK @ selblk ;
|
|
||||||
: $I mode! 'I' EMIT IBUF 1 buftype _I contents mode! SPC ;
|
: $I mode! 'I' EMIT IBUF 1 buftype _I contents mode! SPC ;
|
||||||
: $F mode! 'F' EMIT FBUF 2 buftype _F setpos mode! SPC ;
|
: $F mode! 'F' EMIT FBUF 2 buftype _F setpos mode! SPC ;
|
||||||
: $Y Y ;
|
: $Y Y ;
|
||||||
@ -11,6 +10,3 @@
|
|||||||
: $H EDPOS @ 0x3c0 AND pos! ;
|
: $H EDPOS @ 0x3c0 AND pos! ;
|
||||||
: $L EDPOS @ 0x3f OR pos! ;
|
: $L EDPOS @ 0x3f OR pos! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/129
4
blk/129
@ -10,7 +10,3 @@
|
|||||||
: $B EDPOS @ BLK( + acc@ 0 DO
|
: $B EDPOS @ BLK( + acc@ 0 DO
|
||||||
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
||||||
1+ BLK( - pos! ;
|
1+ BLK( - pos! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/130
1
blk/130
@ -13,4 +13,3 @@
|
|||||||
: $D $H 64 icpy
|
: $D $H 64 icpy
|
||||||
acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
|
acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
|
||||||
BLK!! contents ;
|
BLK!! contents ;
|
||||||
|
|
||||||
|
4
blk/131
4
blk/131
@ -6,11 +6,9 @@
|
|||||||
DUP 64 + SWAP DO i C@ 0x20 MAX EMIT LOOP ;
|
DUP 64 + SWAP DO i C@ 0x20 MAX EMIT LOOP ;
|
||||||
: bufs
|
: bufs
|
||||||
1 aty ." I: " IBUF bufp
|
1 aty ." I: " IBUF bufp
|
||||||
2 aty ." F: " FBUF bufp 0 3 gutter ;
|
2 aty ." F: " FBUF bufp ;
|
||||||
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
|
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
|
||||||
: VE ['] c<over 0x08 ( C< override ) RAM+ !
|
: VE ['] c<over 0x08 ( C< override ) RAM+ !
|
||||||
clrscr 0 ACC ! 0 PREVPOS ! contents
|
clrscr 0 ACC ! 0 PREVPOS ! contents
|
||||||
BEGIN status bufs setpos KEY handle UNTIL
|
BEGIN status bufs setpos KEY handle UNTIL
|
||||||
0 0x08 RAM+ ! 19 aty ;
|
0 0x08 RAM+ ! 19 aty ;
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/150
1
blk/150
@ -13,4 +13,3 @@ Some programs need them, so they will automatically LOAD them.
|
|||||||
Because more than one program can use the same extra words,
|
Because more than one program can use the same extra words,
|
||||||
conditional loaders are recommended. If you want to load all
|
conditional loaders are recommended. If you want to load all
|
||||||
words do "152 LOAD" which conditionally loads all extra words.
|
words do "152 LOAD" which conditionally loads all extra words.
|
||||||
|
|
||||||
|
13
blk/152
13
blk/152
@ -1,15 +1,4 @@
|
|||||||
'? CASE NOT [IF] 1 2 LOADR+ [THEN] DROP ( from '? )
|
'? CASE NOT [IF] 1 2 LOADR+ [THEN] DROP ( from '? )
|
||||||
'? FILL NOT [IF] 3 LOAD+ [THEN] DROP
|
'? FILL NOT [IF] 3 LOAD+ [THEN] DROP
|
||||||
|
'? EMPTY NOT [IF] 4 LOAD+ [THEN] DROP
|
||||||
'? WIPE NOT [IF] 5 LOAD+ [THEN] DROP
|
'? WIPE NOT [IF] 5 LOAD+ [THEN] DROP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5
blk/153
5
blk/153
@ -9,8 +9,3 @@
|
|||||||
: ENDOF [COMPILE] ELSE ; IMMEDIATE
|
: ENDOF [COMPILE] ELSE ; IMMEDIATE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
blk/155
11
blk/155
@ -3,14 +3,3 @@
|
|||||||
DUP I C!
|
DUP I C!
|
||||||
LOOP DROP ;
|
LOOP DROP ;
|
||||||
: ALLOT0 ( n -- ) H@ OVER 0 FILL ALLOT ;
|
: ALLOT0 ( n -- ) H@ OVER 0 FILL ALLOT ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/156
Normal file
4
blk/156
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
: EMPTY
|
||||||
|
LIT< _sys FIND NOT IF ABORT THEN
|
||||||
|
DUP HERE ! CURRENT ! ;
|
||||||
|
|
11
blk/157
11
blk/157
@ -3,14 +3,3 @@
|
|||||||
( src dst -- )
|
( src dst -- )
|
||||||
: COPY SWAP BLK@ BLK> ! BLK! ;
|
: COPY SWAP BLK@ BLK> ! BLK! ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
14
blk/158
14
blk/158
@ -1,16 +1,2 @@
|
|||||||
: LOWER DUP 'A' 'Z' =><= IF 32 + THEN ;
|
: LOWER DUP 'A' 'Z' =><= IF 32 + THEN ;
|
||||||
: UPPER DUP 'a' 'z' =><= IF 32 - THEN ;
|
: UPPER DUP 'a' 'z' =><= IF 32 - THEN ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/200
3
blk/200
@ -11,6 +11,3 @@ Z80 Assembler
|
|||||||
238 OP3ddnn 240 OP3nn
|
238 OP3ddnn 240 OP3nn
|
||||||
242 Specials 246 Flow
|
242 Specials 246 Flow
|
||||||
249 Macros
|
249 Macros
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
13
blk/206
13
blk/206
@ -1,16 +1,3 @@
|
|||||||
On top of that, you have the very nice BREAK, instruction,
|
On top of that, you have the very nice BREAK, instruction,
|
||||||
which must also be preceeded by a JRxx, and will jump to the
|
which must also be preceeded by a JRxx, and will jump to the
|
||||||
PC following the next AGAIN,
|
PC following the next AGAIN,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5
blk/209
5
blk/209
@ -9,8 +9,3 @@ JR [, Z, NZ, C, NC]
|
|||||||
|
|
||||||
DI EI EXDEHL EXX HALT
|
DI EI EXDEHL EXX HALT
|
||||||
NOP RET RETI RETN SCF
|
NOP RET RETI RETN SCF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
8
blk/213
8
blk/213
@ -6,11 +6,3 @@ VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
|
|||||||
: BC 0 ; : DE 1 ; : HL 2 ; : AF 3 ; : SP AF ;
|
: BC 0 ; : DE 1 ; : HL 2 ; : AF 3 ; : SP AF ;
|
||||||
: CNZ 0 ; : CZ 1 ; : CNC 2 ; : CC 3 ;
|
: CNZ 0 ; : CZ 1 ; : CNC 2 ; : CC 3 ;
|
||||||
: CPO 4 ; : CPE 5 ; : CP 6 ; : CM 7 ;
|
: CPO 4 ; : CPE 5 ; : CP 6 ; : CM 7 ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/216
4
blk/216
@ -10,7 +10,3 @@
|
|||||||
0x1f OP1 RRA, 0x0f OP1 RRCA,
|
0x1f OP1 RRA, 0x0f OP1 RRCA,
|
||||||
0x37 OP1 SCF,
|
0x37 OP1 SCF,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/218
4
blk/218
@ -10,7 +10,3 @@
|
|||||||
0x04 OP1r INCr, 0x05 OP1r DECr,
|
0x04 OP1r INCr, 0x05 OP1r DECr,
|
||||||
: INC(IXY+), INCr, A, ;
|
: INC(IXY+), INCr, A, ;
|
||||||
: DEC(IXY+), DECr, A, ;
|
: DEC(IXY+), DECr, A, ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/219
2
blk/219
@ -12,5 +12,3 @@
|
|||||||
0xb0 OP1r0 ORr, 0x90 OP1r0 SUBr,
|
0xb0 OP1r0 ORr, 0x90 OP1r0 SUBr,
|
||||||
0x98 OP1r0 SBCr, 0xa8 OP1r0 XORr,
|
0x98 OP1r0 SBCr, 0xa8 OP1r0 XORr,
|
||||||
: CP(IXY+), CPr, A, ;
|
: CP(IXY+), CPr, A, ;
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/220
1
blk/220
@ -13,4 +13,3 @@
|
|||||||
|
|
||||||
: ADDIXss, 0xdd A, ADDHLss, ; : ADDIXIX, HL ADDIXss, ;
|
: ADDIXss, 0xdd A, ADDHLss, ; : ADDIXIX, HL ADDIXss, ;
|
||||||
: ADDIYss, 0xfd A, ADDHLss, ; : ADDIYIY, HL ADDIYss, ;
|
: ADDIYss, 0xfd A, ADDHLss, ; : ADDIYIY, HL ADDIYss, ;
|
||||||
|
|
||||||
|
7
blk/224
7
blk/224
@ -7,10 +7,3 @@
|
|||||||
0xeda8 OP2 LDD, 0xedb8 OP2 LDDR,
|
0xeda8 OP2 LDD, 0xedb8 OP2 LDDR,
|
||||||
0xed44 OP2 NEG,
|
0xed44 OP2 NEG,
|
||||||
0xed4d OP2 RETI, 0xed45 OP2 RETN,
|
0xed4d OP2 RETI, 0xed45 OP2 RETN,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/230
2
blk/230
@ -12,5 +12,3 @@
|
|||||||
0x80 OP2br RESbr,
|
0x80 OP2br RESbr,
|
||||||
0x40 OP2br BITbr,
|
0x40 OP2br BITbr,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/234
2
blk/234
@ -12,5 +12,3 @@
|
|||||||
0xed41 OP2r OUT(C)r,
|
0xed41 OP2r OUT(C)r,
|
||||||
0xed40 OP2r INr(C),
|
0xed40 OP2r INr(C),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/236
4
blk/236
@ -10,7 +10,3 @@
|
|||||||
0x4a OP2ss ADCHLss,
|
0x4a OP2ss ADCHLss,
|
||||||
0x42 OP2ss SBCHLss,
|
0x42 OP2ss SBCHLss,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
5
blk/240
5
blk/240
@ -9,8 +9,3 @@
|
|||||||
0xc3 OP3nn JPnn,
|
0xc3 OP3nn JPnn,
|
||||||
0x22 OP3nn LD(nn)HL,
|
0x22 OP3nn LD(nn)HL,
|
||||||
0x2a OP3nn LDHL(nn),
|
0x2a OP3nn LDHL(nn),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/242
2
blk/242
@ -12,5 +12,3 @@
|
|||||||
|
|
||||||
: JP(IX), IX DROP JP(HL), ;
|
: JP(IX), IX DROP JP(HL), ;
|
||||||
: JP(IY), IY DROP JP(HL), ;
|
: JP(IY), IY DROP JP(HL), ;
|
||||||
|
|
||||||
|
|
||||||
|
8
blk/247
8
blk/247
@ -6,11 +6,3 @@
|
|||||||
THEN ;
|
THEN ;
|
||||||
: AGAIN, BREAK?, PC - 1- A, ;
|
: AGAIN, BREAK?, PC - 1- A, ;
|
||||||
: BWR @ AGAIN, ;
|
: BWR @ AGAIN, ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/249
4
blk/249
@ -10,7 +10,3 @@
|
|||||||
: LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ;
|
: LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ;
|
||||||
: OUTHL, DUP A H LDrr, OUTnA, A L LDrr, OUTnA, ;
|
: OUTHL, DUP A H LDrr, OUTnA, A L LDrr, OUTnA, ;
|
||||||
: OUTDE, DUP A D LDrr, OUTnA, A E LDrr, OUTnA, ;
|
: OUTDE, DUP A D LDrr, OUTnA, A E LDrr, OUTnA, ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
7
blk/261
7
blk/261
@ -7,10 +7,3 @@ See example in /emul/xcomp.fs
|
|||||||
|
|
||||||
Why limit ourselves to icore? Oh, I've tried cross-compiling
|
Why limit ourselves to icore? Oh, I've tried cross-compiling
|
||||||
the whole shebang. I tried. And failed. Too dynamic.
|
the whole shebang. I tried. And failed. Too dynamic.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/263
1
blk/263
@ -13,4 +13,3 @@ VARIABLE XCURRENT
|
|||||||
XCON ' _xapply LITA
|
XCON ' _xapply LITA
|
||||||
LIT< , FIND DROP _xapply , XCOFF ;
|
LIT< , FIND DROP _xapply , XCOFF ;
|
||||||
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
||||||
|
|
||||||
|
2
blk/264
2
blk/264
@ -12,5 +12,3 @@ never supposed to encounter an immediate at this point.
|
|||||||
If not found, we try the same word on system dict (RAM+02).
|
If not found, we try the same word on system dict (RAM+02).
|
||||||
If found and is immediate, execute. If founf and not immediate,
|
If found and is immediate, execute. If founf and not immediate,
|
||||||
error. If not found, try number.
|
error. If not found, try number.
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/281
4
blk/281
@ -10,7 +10,3 @@ up until 0x67, the (?br) wordref, pretty much everything has
|
|||||||
to stay put.
|
to stay put.
|
||||||
|
|
||||||
To assemble, run "282 LOAD".
|
To assemble, run "282 LOAD".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/283
1
blk/283
@ -13,4 +13,3 @@ NOP, NOP, ( 24, addrWord ) NOP, NOP, ( 26, unused )
|
|||||||
0 JPnn, ( RST 30 )
|
0 JPnn, ( RST 30 )
|
||||||
0 JPnn, ( 33, execute ) NOP, NOP, ( unused )
|
0 JPnn, ( 33, execute ) NOP, NOP, ( unused )
|
||||||
0 JPnn, ( RST 38 )
|
0 JPnn, ( RST 38 )
|
||||||
|
|
||||||
|
1
blk/285
1
blk/285
@ -13,4 +13,3 @@ CODE (loop) ( 0x77 )
|
|||||||
A 1 IX+ LDrIXY, 1 IX- CP(IXY+), JRNZ, L2 BWR ( branch )
|
A 1 IX+ LDrIXY, 1 IX- CP(IXY+), JRNZ, L2 BWR ( branch )
|
||||||
( don't branch )
|
( don't branch )
|
||||||
IX DECss, IX DECss, IX DECss, IX DECss, JR, L1 BWR
|
IX DECss, IX DECss, IX DECss, IX DECss, JR, L1 BWR
|
||||||
|
|
||||||
|
2
blk/287
2
blk/287
@ -12,5 +12,3 @@ PC ORG @ 0x24 + ! ( addrWord )
|
|||||||
IY INCss,
|
IY INCss,
|
||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
JPNEXT,
|
JPNEXT,
|
||||||
|
|
||||||
|
|
||||||
|
6
blk/288
6
blk/288
@ -8,9 +8,3 @@ PC ORG @ 0x22 + ! ( litWord, 0xf7, tight on the 0x100 limit )
|
|||||||
DE ADDIYss,
|
DE ADDIYss,
|
||||||
HL PUSHqq,
|
HL PUSHqq,
|
||||||
JPNEXT,
|
JPNEXT,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/289
1
blk/289
@ -13,4 +13,3 @@ PC ORG @ 1 + ! ( main )
|
|||||||
Forth. )
|
Forth. )
|
||||||
BIN( @ 0x08 + LDHL(nn),
|
BIN( @ 0x08 + LDHL(nn),
|
||||||
RAMSTART 0x02 + LD(nn)HL, ( RAM+02 == CURRENT cont. )
|
RAMSTART 0x02 + LD(nn)HL, ( RAM+02 == CURRENT cont. )
|
||||||
|
|
||||||
|
12
blk/290
12
blk/290
@ -2,15 +2,3 @@
|
|||||||
HL L1 @ LDddnn,
|
HL L1 @ LDddnn,
|
||||||
0x03 BCALL, ( 03 == find )
|
0x03 BCALL, ( 03 == find )
|
||||||
0x33 BJP, ( 33 == execute )
|
0x33 BJP, ( 33 == execute )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/291
1
blk/291
@ -13,4 +13,3 @@ PC ORG @ 4 + ! ( find )
|
|||||||
C A LDrr, B 0 LDrn, ( C holds our length )
|
C A LDrr, B 0 LDrn, ( C holds our length )
|
||||||
BC ADDHLss, HL INCss, ( HL points to after-last-char )
|
BC ADDHLss, HL INCss, ( HL points to after-last-char )
|
||||||
( cont . )
|
( cont . )
|
||||||
|
|
||||||
|
8
blk/292
8
blk/292
@ -6,11 +6,3 @@
|
|||||||
LDA(DE),
|
LDA(DE),
|
||||||
0x7f ANDn, ( remove IMMEDIATE flag )
|
0x7f ANDn, ( remove IMMEDIATE flag )
|
||||||
C CPr, ( cont. )
|
C CPr, ( cont. )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/297
3
blk/297
@ -11,6 +11,3 @@ PC ORG @ 0x15 + ! ( popRS )
|
|||||||
IX DECss,
|
IX DECss,
|
||||||
IX DECss,
|
IX DECss,
|
||||||
RET,
|
RET,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
9
blk/298
9
blk/298
@ -5,12 +5,3 @@ L2 BSET ( abortUnderflow )
|
|||||||
0x03 BCALL, ( find )
|
0x03 BCALL, ( find )
|
||||||
0x33 BJP, ( 33 == execute )
|
0x33 BJP, ( 33 == execute )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
blk/299
3
blk/299
@ -11,6 +11,3 @@ PC ORG @ 0x1e + ! ( chkPS )
|
|||||||
CNC RETcc, ( PS_ADDR >= SP? good )
|
CNC RETcc, ( PS_ADDR >= SP? good )
|
||||||
JR, L2 BWR ( abortUnderflow-B298 )
|
JR, L2 BWR ( abortUnderflow-B298 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/301
1
blk/301
@ -13,4 +13,3 @@ L3 BSET PC ORG @ 0x34 + ! ( execute )
|
|||||||
( DE points to PFA )
|
( DE points to PFA )
|
||||||
JP(HL),
|
JP(HL),
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/302
4
blk/302
@ -10,7 +10,3 @@ L1 BSET PC ORG @ 0x0f + ! ( compiledWord )
|
|||||||
HL INCss,
|
HL INCss,
|
||||||
HL PUSHqq, IY POPqq, ( --> IP )
|
HL PUSHqq, IY POPqq, ( --> IP )
|
||||||
JR, L3 BWR ( execute-B301 )
|
JR, L3 BWR ( execute-B301 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
blk/303
11
blk/303
@ -3,14 +3,3 @@ PC ORG @ 0x0c + ! ( cellWord )
|
|||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
JPNEXT,
|
JPNEXT,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
7
blk/305
7
blk/305
@ -7,10 +7,3 @@ CODE EXECUTE
|
|||||||
DE POPqq,
|
DE POPqq,
|
||||||
chkPS,
|
chkPS,
|
||||||
JR, L3 BWR ( execute-B301 )
|
JR, L3 BWR ( execute-B301 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
blk/310
1
blk/310
@ -13,4 +13,3 @@ CODE PICK
|
|||||||
CC L2 @ JPccnn, ( abortUnderflow-B298 )
|
CC L2 @ JPccnn, ( abortUnderflow-B298 )
|
||||||
BC PUSHqq,
|
BC PUSHqq,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
|
2
blk/312
2
blk/312
@ -12,5 +12,3 @@ CODE 2DUP
|
|||||||
DE PUSHqq, HL PUSHqq,
|
DE PUSHqq, HL PUSHqq,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user