Compare commits
No commits in common. "7eeec67ff5ab5122ce53aeda1ae6195cbfb80f18" and "49d7a7f43544a7c6aa5b77034576896f1059fa58" have entirely different histories.
7eeec67ff5
...
49d7a7f435
3
blk/001
3
blk/001
@ -11,3 +11,6 @@ MASTER INDEX
|
||||
620 Sega Master System Recipe
|
||||
650 AVR assembler 730 8086 assembler
|
||||
800 8086 boot code 830 PC/AT recipe
|
||||
|
||||
|
||||
|
||||
|
5
blk/005
5
blk/005
@ -9,3 +9,8 @@ are hexadecimals (example "0x12ef"), "0b" prefixes indicate
|
||||
binary (example "0b1010"), char literals are single characters
|
||||
surrounded by ' (example 'X'). Char literals can't be used for
|
||||
whitespaces.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/006
2
blk/006
@ -12,3 +12,5 @@ writes that number as a literal, followed by a reference to
|
||||
Example: ": foo [COMPILE] bar;" is the equivalent of ": foo bar
|
||||
;" if bar is not an immediate. However, ": foo COMPILE bar ;"
|
||||
is the equivalent of ": foo ['] bar , ;". Got it?
|
||||
|
||||
|
||||
|
10
blk/009
10
blk/009
@ -4,3 +4,13 @@ prompt control to a RS-232 device instead of the keyboard.
|
||||
Interpreter output is unbuffered and only has EMIT. This
|
||||
word can also be overriden, mostly as a companion to the
|
||||
raison d'etre of your KEY override.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/011
7
blk/011
@ -7,3 +7,10 @@ support the "-" prefix, but under the hood, it's all unsigned.
|
||||
This leads to some oddities. For example, "-1 0 <" is false.
|
||||
To compare whether something is negative, use the "0<" word
|
||||
which is the equivalent to "0x7fff >".
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
blk/017
1
blk/017
@ -13,3 +13,4 @@ At compile time, colon definition stops processing words when
|
||||
reaching the DOES>.
|
||||
|
||||
Example: ": CONSTANT CREATE HERE @ ! DOES> @ ;"
|
||||
|
||||
|
8
blk/020
8
blk/020
@ -6,3 +6,11 @@ Although the usage of absolute LOAD calls are minimally used
|
||||
(relative LOADs are preferred), they are sometimes unavoidable.
|
||||
When you span Collapse OS over multiple disks, don't forget to
|
||||
adjust those absolute LOADs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
blk/021
3
blk/021
@ -11,3 +11,6 @@ try to strive towards a few goals:
|
||||
4. B200-B500 are for bootstrapping
|
||||
5. The rest is for recipes.
|
||||
6. I'm not sure yet how I'll organize multiple arches.
|
||||
|
||||
|
||||
|
||||
|
10
blk/022
10
blk/022
@ -4,3 +4,13 @@ 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
|
||||
C@ and C*. There is also a AMOVE word that is the same as MOVE
|
||||
but using A@ and A!.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
blk/023
5
blk/023
@ -9,3 +9,8 @@ The reasoning behind this intentional limit is that huge
|
||||
branches are generally a indicator that a logic ought to be
|
||||
simplified. So here's one more constraint for you to help you
|
||||
towards simplicity.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/030
4
blk/030
@ -10,3 +10,7 @@ and Extra words (B150).
|
||||
52 Addressed devices 54 Arithmetic / Bits
|
||||
56 Logic 58 Strings
|
||||
60 I/O 64 Disk
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/032
7
blk/032
@ -7,3 +7,10 @@ Words between "()" are "support words" that aren't really meant
|
||||
to be used directly, but as part of another word.
|
||||
|
||||
"*I*" in description indicates an IMMEDIATE word.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
blk/035
13
blk/035
@ -1,3 +1,16 @@
|
||||
(cont.)
|
||||
~ - Container for native code. Usually not an executable word.
|
||||
? - Is it ...? (example: IMMED?)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
blk/038
11
blk/038
@ -3,3 +3,14 @@ FORGET x -- Rewind the dictionary (both CURRENT and HERE)
|
||||
up to x's previous entry.
|
||||
PREV a -- a Return a wordref's previous entry.
|
||||
WORD( a -- a Get wordref's beginning addr.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
blk/044
11
blk/044
@ -3,3 +3,14 @@ INTERPRET -- Get a line from stdin, compile it in tmp memory,
|
||||
then execute the compiled contents.
|
||||
LEAVE -- In a DO..LOOP, exit at the next LOOP call.
|
||||
QUIT -- Return to interpreter prompt immediately
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
blk/047
10
blk/047
@ -4,3 +4,13 @@ PICK Pick nth item from stack. "0 PICK" = DUP,
|
||||
"1 PICK" = OVER.
|
||||
ROLL Rotate PSP over n items. "1 ROLL" = SWAP,
|
||||
"2 ROLL" = ROT. 0 is noop.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/048
7
blk/048
@ -7,3 +7,10 @@ R> R:n -- n Pops RS and push to PS
|
||||
I -- n Copy RS TOS to PS
|
||||
I' -- n Copy RS second item to PS
|
||||
J -- n Copy RS third item to PS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/051
6
blk/051
@ -8,3 +8,9 @@ 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.
|
||||
MOVE, a u -- Copy u bytes from a to HERE.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/052
6
blk/052
@ -8,3 +8,9 @@ A! c a -- Indirect C!
|
||||
A@* -- a Address for A@ word
|
||||
A!* -- a Address for A! word
|
||||
AMOVE src dst u -- Same as MOVE, but with A@ and A!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/056
4
blk/056
@ -10,3 +10,7 @@ CMP n1 n2 -- n Compare n1 and n2 and set n to -1, 0, or 1.
|
||||
MIN a b -- n Returns the lowest of a and b
|
||||
MAX a b -- n Returns the highest of a and b
|
||||
NOT f -- f Push the logical opposite of f
|
||||
|
||||
|
||||
|
||||
|
||||
|
9
blk/058
9
blk/058
@ -5,3 +5,12 @@ LIT -- Write a LIT entry. You're expected to write
|
||||
LIT< x -- Read following word and write to HERE as a
|
||||
string literal.
|
||||
S= a1 a2 -- f Returns whether string a1 == a2.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/062
7
blk/062
@ -7,3 +7,10 @@ BS CR LF SPC CRLF
|
||||
NL is an indirect word (see B80) that aliases to CRLF by
|
||||
default and that should generally be used when we want to emit
|
||||
a newline.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/064
4
blk/064
@ -5,7 +5,6 @@ BLK( -- a Beginning addr of blk buf.
|
||||
BLK) -- a Ending addr of blk buf.
|
||||
COPY s d -- Copy contents of s block to d block.
|
||||
FLUSH -- Write current block to disk if dirty.
|
||||
FREEBLKS? a b -- List free blocks between blocks a and b.
|
||||
LIST n -- Prints the contents of the block n on screen
|
||||
in the form of 16 lines of 64 columns.
|
||||
LOAD n -- Interprets Forth code from block n
|
||||
@ -13,4 +12,5 @@ LOAD+ n -- Relative load. Loads active block + n.
|
||||
LOADR n1 n2 -- Load block range between n1 and n2, inclusive.
|
||||
LOADR+ n1 n2 -- Relative ranged load.
|
||||
WIPE -- Empties current block
|
||||
WIPED? -- f Whether current block is empty
|
||||
|
||||
|
||||
|
10
blk/070
10
blk/070
@ -4,3 +4,13 @@ Implementation notes
|
||||
75 Stack management 77 Dictionary
|
||||
80 System variables 85 Word types
|
||||
89 Initialization sequence
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
blk/071
5
blk/071
@ -9,3 +9,8 @@ it. As a general rule, we go like this:
|
||||
4. Is it a number?
|
||||
5. If yes, push that number to PS, goto 1
|
||||
6. Error: undefined word.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
blk/076
10
blk/076
@ -4,3 +4,13 @@ prohibitive in terms of costs), PS_ADDR should be set to
|
||||
at least 6 bytes before its actual limit. 6 bytes because we
|
||||
seldom have words requiring more than 3 items from the stack.
|
||||
Then, at each "exit" call we check for stack underflow.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/078
4
blk/078
@ -10,3 +10,7 @@ chain). There are also "special words", for example NUMBER,
|
||||
LIT, FBR, that have a slightly different structure. They're
|
||||
also a pointer to an executable, but as for the other fields,
|
||||
the only one they have is the "flags" field.
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/084
2
blk/084
@ -12,3 +12,5 @@ BLK* see B416.
|
||||
FUTURE USES section is unused for now.
|
||||
|
||||
DRIVERS section is reserved for recipe-specific drivers.
|
||||
|
||||
|
||||
|
10
blk/086
10
blk/086
@ -4,3 +4,13 @@ compiled. At that address is an atom list exactly like in a
|
||||
compiled word. Upon execution, after having pushed its cell
|
||||
addr to PSP, it executes its reference exactly like a
|
||||
compiled word.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/090
6
blk/090
@ -8,3 +8,9 @@
|
||||
In RAM-only environment, we will typically have a
|
||||
"CURRENT @ HERE !" line during init to have HERE begin at the
|
||||
end of the binary instead of RAMEND.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/101
4
blk/101
@ -10,7 +10,7 @@ P xxx: put typed IBUF on selected line.
|
||||
U xxx: insert typed IBUF on selected line.
|
||||
F xxx: find typed FBUF in block, starting from current
|
||||
position+1. If not found, don't move.
|
||||
i xxx: insert typed IBUF at cursor. "i" is to avoid shadowing
|
||||
core word "I".
|
||||
I xxx: insert typed IBUF at cursor. "I" shadows core word. Use
|
||||
"i" to access it.
|
||||
Y: Copy n characters after cursor into IBUF, n being length of
|
||||
FBUF. (cont.)
|
||||
|
14
blk/102
14
blk/102
@ -1,2 +1,16 @@
|
||||
X ( n -- ): Delete X chars after cursor and place in IBUF.
|
||||
E: Run X with n = length of FBUF.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/106
6
blk/106
@ -8,3 +8,9 @@ CREATE ACC 0 ,
|
||||
: L BLK> @ _LIST ;
|
||||
: B BLK> @ 1- BLK@ L ;
|
||||
: N BLK> @ 1+ BLK@ L ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
blk/107
3
blk/107
@ -11,3 +11,6 @@ CREATE FBUF 64 ALLOT0
|
||||
EMIT
|
||||
LOOP ( lno ) 1+ . ;
|
||||
: _zbuf 64 0 FILL ; ( buf -- )
|
||||
|
||||
|
||||
|
||||
|
4
blk/108
4
blk/108
@ -10,3 +10,7 @@
|
||||
: _mvln- ( ln -- move ln 1 line up )
|
||||
DUP 14 > IF DROP 15 _lpos _zbuf
|
||||
ELSE 1+ _lpos DUP 64 - 64 MOVE THEN ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/110
6
blk/110
@ -8,3 +8,9 @@
|
||||
UNTIL ( a1 a2 )
|
||||
DUP BLK) < IF BLK( - FBUF + -^ EDPOS ! ELSE DROP THEN ;
|
||||
: F FBUF _type _F EDPOS @ 64 / _pln ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
blk/111
8
blk/111
@ -2,11 +2,15 @@
|
||||
DUP BEGIN C@+ 0x20 < UNTIL -^ 1- ;
|
||||
: _rbufsz ( size of linebuf to the right of curpos )
|
||||
EDPOS @ 64 MOD 63 -^ ;
|
||||
: _i ( i without _pln and _type. used in VE )
|
||||
: i COMPILE I ; IMMEDIATE ( save overshadowed )
|
||||
: _I ( I without _pln and _type. used in VE )
|
||||
_rbufsz IBUF _blen 2DUP > IF
|
||||
TUCK - ( ilen chars-to-move )
|
||||
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
|
||||
3 PICK MOVE- ( ctm ilen ) NIP ( ilen )
|
||||
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN
|
||||
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
||||
: i IBUF _type _i EDPOS @ 64 / _pln ;
|
||||
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
||||
|
||||
|
||||
|
||||
|
7
blk/112
7
blk/112
@ -5,7 +5,12 @@
|
||||
SWAP _rbufsz MOVE ( n )
|
||||
( get to next line - n )
|
||||
DUP EDPOS @ 0xffc0 AND 0x40 + -^ _cpos ( n a )
|
||||
SWAP 0 FILL BLK!!
|
||||
SWAP 0 FILL
|
||||
EDPOS @ 64 / _pln ;
|
||||
: E FBUF _blen X ;
|
||||
: Y FBUF _blen icpy ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
blk/123
1
blk/123
@ -13,3 +13,4 @@
|
||||
'D' deletes "modifier" lines at the cursor. The first of those
|
||||
lines is copied to IBUF.
|
||||
(cont.)
|
||||
|
||||
|
6
blk/124
6
blk/124
@ -8,3 +8,9 @@ be sure, then press 'E'.
|
||||
'R' goes into replace mode at current cursor position.
|
||||
Following keystrokes replace current character and advance
|
||||
cursor. Press return to return to normal mode.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
blk/125
13
blk/125
@ -1,3 +1,16 @@
|
||||
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
||||
-20 LOAD+ ( B105, block editor )
|
||||
1 6 LOADR+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
blk/126
8
blk/126
@ -4,11 +4,13 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 ,
|
||||
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
||||
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
||||
: aty 0 SWAP AT-XY ;
|
||||
: clrscr LINES 0 DO I aty COLS nspcs LOOP ;
|
||||
: gutter ( ln n ) OVER + SWAP DO 67 I AT-XY '|' EMIT 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 ?
|
||||
SPC EDPOS @ 64 /MOD . ',' EMIT . SPC
|
||||
SPC EDPOS @ 64 /MOD . ',' EMIT . SPC
|
||||
BLKDTY @ IF '*' EMIT THEN 10 nspcs ;
|
||||
: contents 3 aty BLK> @ LIST 3 16 gutter ;
|
||||
: selblk BLK> @ PREVBLK ! BLK@ contents ;
|
||||
: mode! ( c -- ) 63 0 AT-XY ;
|
||||
|
||||
|
||||
|
6
blk/127
6
blk/127
@ -8,3 +8,9 @@
|
||||
DUP 0x20 < IF 2DROP DROP EXIT THEN
|
||||
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c ) SWAP C!+
|
||||
IN( _zbuf (rdln) IN( SWAP 63 MOVE ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
blk/128
6
blk/128
@ -2,7 +2,7 @@
|
||||
: $[ 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 ;
|
||||
: $Y Y ;
|
||||
: $E E contents ;
|
||||
@ -10,3 +10,7 @@
|
||||
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
||||
: $H EDPOS @ 0x3c0 AND pos! ;
|
||||
: $L EDPOS @ 0x3f OR pos! ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/129
4
blk/129
@ -10,3 +10,7 @@
|
||||
: $B EDPOS @ BLK( + acc@ 0 DO
|
||||
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
||||
1+ BLK( - pos! ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/130
2
blk/130
@ -12,5 +12,5 @@
|
||||
_U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
|
||||
: $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ;
|
||||
: $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 ;
|
||||
|
5
blk/131
5
blk/131
@ -3,7 +3,7 @@
|
||||
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
||||
0 ACC ! UPPER 'Q' = ;
|
||||
: bufp ( buf -- )
|
||||
DUP 64 + SWAP DO I C@ 0x20 MAX EMIT LOOP ;
|
||||
DUP 64 + SWAP DO i C@ 0x20 MAX EMIT LOOP ;
|
||||
: bufs
|
||||
1 aty ." I: " IBUF bufp
|
||||
2 aty ." F: " FBUF bufp 0 3 gutter ;
|
||||
@ -11,3 +11,6 @@
|
||||
clrscr 0 ACC ! 0 PREVPOS ! contents
|
||||
BEGIN status bufs setpos KEY handle UNTIL
|
||||
19 aty (infl) ;
|
||||
|
||||
|
||||
|
||||
|
1
blk/150
1
blk/150
@ -13,3 +13,4 @@ Some programs need them, so they will automatically LOAD them.
|
||||
Because more than one program can use the same extra words,
|
||||
conditional loaders are recommended. If you want to load all
|
||||
words do "152 LOAD" which conditionally loads all extra words.
|
||||
|
||||
|
13
blk/152
13
blk/152
@ -1,3 +1,16 @@
|
||||
'? CASE NOT [IF] 1 2 LOADR+ [THEN] DROP ( from '? )
|
||||
'? FILL NOT [IF] 3 LOAD+ [THEN] DROP
|
||||
'? WIPE NOT [IF] 5 LOAD+ [THEN] DROP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/153
7
blk/153
@ -7,3 +7,10 @@
|
||||
[COMPILE] IF COMPILE DROP
|
||||
; IMMEDIATE
|
||||
: ENDOF [COMPILE] ELSE ; IMMEDIATE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
22
blk/157
22
blk/157
@ -1,8 +1,16 @@
|
||||
: WIPE BLK( 1024 0 FILL BLK!! ;
|
||||
: WIPED? ( -- f )
|
||||
1 ( f ) BLK) BLK( DO
|
||||
I C@ IF DROP 0 ( f ) LEAVE THEN LOOP ;
|
||||
: COPY ( src dst -- )
|
||||
FLUSH SWAP BLK@ BLK> ! BLK! ;
|
||||
: FREEBLKS? ( b1 b2 -- )
|
||||
1+ SWAP DO I BLK@ WIPED? IF I . SPC THEN LOOP ;
|
||||
|
||||
( src dst -- )
|
||||
: COPY FLUSH SWAP BLK@ BLK> ! BLK! ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
14
blk/158
14
blk/158
@ -1,2 +1,16 @@
|
||||
: LOWER DUP 'A' 'Z' =><= IF 32 + THEN ;
|
||||
: UPPER DUP 'a' 'z' =><= IF 32 - THEN ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
blk/200
3
blk/200
@ -11,3 +11,6 @@ Z80 Assembler
|
||||
238 OP3ddnn 240 OP3nn
|
||||
242 Specials 246 Flow
|
||||
249 Macros
|
||||
|
||||
|
||||
|
||||
|
13
blk/206
13
blk/206
@ -1,3 +1,16 @@
|
||||
On top of that, you have the very nice BREAK, instruction,
|
||||
which must also be preceded by a JRxx, and will jump to the
|
||||
PC following the next AGAIN,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
blk/213
8
blk/213
@ -6,3 +6,11 @@ VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
|
||||
: BC 0 ; : DE 1 ; : HL 2 ; : AF 3 ; : SP AF ;
|
||||
: CNZ 0 ; : CZ 1 ; : CNC 2 ; : CC 3 ;
|
||||
: CPO 4 ; : CPE 5 ; : CP 6 ; : CM 7 ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
blk/216
5
blk/216
@ -9,3 +9,8 @@
|
||||
0x17 OP1 RLA, 0x07 OP1 RLCA,
|
||||
0x1f OP1 RRA, 0x0f OP1 RRCA,
|
||||
0x37 OP1 SCF,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/217
7
blk/217
@ -7,3 +7,10 @@
|
||||
0x18 OP1 JR, 0x10 OP1 DJNZ,
|
||||
0x38 OP1 JRC, 0x30 OP1 JRNC,
|
||||
0x28 OP1 JRZ, 0x20 OP1 JRNZ,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/218
4
blk/218
@ -10,3 +10,7 @@
|
||||
0x04 OP1r INCr, 0x05 OP1r DECr,
|
||||
: INC(IXY+), INCr, A, ;
|
||||
: DEC(IXY+), DECr, A, ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/219
2
blk/219
@ -12,3 +12,5 @@
|
||||
0xb0 OP1r0 ORr, 0x90 OP1r0 SUBr,
|
||||
0x98 OP1r0 SBCr, 0xa8 OP1r0 XORr,
|
||||
: CP(IXY+), CPr, A, ;
|
||||
|
||||
|
||||
|
1
blk/220
1
blk/220
@ -13,3 +13,4 @@
|
||||
|
||||
: ADDIXss, 0xdd A, ADDHLss, ; : ADDIXIX, HL ADDIXss, ;
|
||||
: ADDIYss, 0xfd A, ADDHLss, ; : ADDIYIY, HL ADDIYss, ;
|
||||
|
||||
|
7
blk/224
7
blk/224
@ -7,3 +7,10 @@
|
||||
0xeda8 OP2 LDD, 0xedb8 OP2 LDDR,
|
||||
0xed44 OP2 NEG,
|
||||
0xed4d OP2 RETI, 0xed45 OP2 RETN,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/243
2
blk/243
@ -10,3 +10,5 @@ CREATE lblnext 0x1a , ( stable ABI until set in B300 )
|
||||
: CODE ( same as CREATE, but with native word )
|
||||
(entry) 0 C, ( 0 == native ) ;
|
||||
: ;CODE JPNEXT, ;
|
||||
|
||||
|
||||
|
4
blk/249
4
blk/249
@ -10,3 +10,7 @@
|
||||
: LDDE(HL), E (HL) LDrr, HL INCss, D (HL) LDrr, ;
|
||||
: OUTHL, DUP A H LDrr, OUTnA, A L LDrr, OUTnA, ;
|
||||
: OUTDE, DUP A D LDrr, OUTnA, A E LDrr, OUTnA, ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
blk/261
7
blk/261
@ -7,3 +7,10 @@ See example in /emul/xcomp.fs
|
||||
|
||||
Why limit ourselves to icore? Oh, I've tried cross-compiling
|
||||
the whole shebang. I tried. And failed. Too dynamic.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
blk/263
1
blk/263
@ -13,3 +13,4 @@ VARIABLE XCURRENT
|
||||
XCON ' _xapply LITN
|
||||
LIT< , FIND DROP _xapply , XCOFF ;
|
||||
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
||||
|
||||
|
2
blk/264
2
blk/264
@ -12,3 +12,5 @@ never supposed to encounter an immediate at this point.
|
||||
If not found, we try the same word on system dict (RAM+02).
|
||||
If found and is immediate, execute. If found and not immediate,
|
||||
error. If not found, try number.
|
||||
|
||||
|
||||
|
4
blk/281
4
blk/281
@ -10,3 +10,7 @@ up until 0x67, the (?br) wordref, pretty much everything has
|
||||
to stay put.
|
||||
|
||||
To assemble, run "282 LOAD".
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
blk/282
10
blk/282
@ -1,3 +1,13 @@
|
||||
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblexec
|
||||
VARIABLE lblfind
|
||||
1 53 LOADR+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
blk/285
1
blk/285
@ -13,3 +13,4 @@ CODE (loop) ( 0x80 )
|
||||
A 1 IX+ LDrIXY, 1 IX- CP(IXY+), JRNZ, L2 BWR ( branch )
|
||||
( don't branch )
|
||||
IX DECss, IX DECss, IX DECss, IX DECss, JR, L1 BWR
|
||||
|
||||
|
4
blk/288
4
blk/288
@ -10,3 +10,7 @@ CODE 2R>
|
||||
20 BCALL, ( 20 == popRS ) EXDEHL, 20 BCALL,
|
||||
HL PUSHqq, DE PUSHqq,
|
||||
;CODE
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
blk/291
1
blk/291
@ -13,3 +13,4 @@ lblfind BSET
|
||||
C A LDrr, B 0 LDrn, ( C holds our length )
|
||||
BC ADDHLss, HL INCss, ( HL points to after-last-char )
|
||||
( cont . )
|
||||
|
||||
|
10
blk/298
10
blk/298
@ -1,3 +1,13 @@
|
||||
lblofl BSET ( abortUnderflow )
|
||||
DE BIN( @ 0x06 ( uflw ) + LDdd(nn),
|
||||
JR, L2 FWR ( execute, B301 )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
blk/303
3
blk/303
@ -10,3 +10,6 @@
|
||||
HL INCss,
|
||||
HL PUSHqq, IY POPqq, ( --> IP )
|
||||
JR, lblexec BWR ( execute-B301 )
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user