~sforman/PythonOberon

1279b4a7adc809bb36ce3286246db3d6d6abd324 — Simon Forman 2 years ago eadce04 simpler
Minor cleanup, notes.
M docs/notes.txt => docs/notes.txt +82 -0
@@ 0,0 1,82 @@
Fri Apr 29 08:05:58 PDT 2022

So I spent most of the day yesterday tracking down a bug that turned out
to be a simple bone-head error: I had marked the COMMA word as IMMEDIATE.
Due to that, when the definition of IF was compiled instead of compiling
the CFA of COMMA into the definition of IF it was executed.  This left
the field of the IF def set to all 0's, so later when IF was running the
NEXT machinery would load 0x00000000 as the address of the next codefield,
which location in RAM contains the initial "jump past the reserved
storage" instruction, which is itself NOT a valid location in RAM (it's
way to high.) So when the CPU tried to jump to the "address" which was
really a Mov instruction, it "launched into the void" instead.  Boo.

The hard thing to debug was that the problem happened later than the
cause.  Also my tools are still crude.  Also I'm out of practice.  I
should have been able to locate the bug in an hour or two.  There are a
lot of distractions going on right now, but still, this system is way too
small for bugs to hide for long.

And that brings me to my main point:  only bonehead bugs like this one
could lurk in the code.  It's too simple and straight forward to hide
other classes of bugs.  Forth itself is composed of tiny little programs
each remarkably simple, and they are composed in patterns that are
themselves remarkably simple, so "if you do it right" the result is
elegant and highly reliable.

Two factors (at least) uh, factor into this:  The stack, and Forth's
simple fractal structure that facilitates refactoring.

Once you get used to it, the stack as sole (or nearly sole) interface
between small programs seems to make it very easy to analyze, factor
(there's that word again!) and compose mentally-convenient "chunks" of
program.  It favors small and simple interfaces even when dealing with
large and complex datastructures and algorithms.

The structure of Forth allows (even encourages) refacoring to a degree
that is rare in other languages.  (IIRC Forth is the origin of the formal
idea of "refactoring" in programming, but I could be wrong about that.)
This helps to keep programs simple and small both physically in terms of
LoC and conceptually.  Each refactored definition becomes a new "unit" or
"chunck" of thought, available to be plugged in where ever it would be
useful.  As an example, I've already factored out to tiny little
programs from the control-flow words, and another two just from the
defintion of '(' for nested parentheses comments.

    : H@ HERE @ ;
    : kj DUP H@ SWAP - SWAP ! ;

    : =1- = IF 1- THEN ;
    : 0? DUP $0 = ;

The first one is "HERE FETCH" which puts the value of the HERE variable
onto the stack.  It's used nearly a half-dozen times in the definitions
immediately following it.

The second one is poorly named (I just picked to letters at random) and
although it would take a whole paragraph to describe what it does in
words, mentally it's a single unit.  (It fixes up a location in a word
definition that's being compiled.)

The third one is very straightforward.  It compares two numbers and if
they are equal it subtracts 1 from a third number.

The fourth word is even simpler, it leaves a Boolean value on the stack
indicating if the item below it is zero or not.  That's it.

So there you go, there are four tiny little programs, each one is a bit
idiosyncratic, but you could imagine using them in other definitions (or,
like H@ they are already used in several definitions.)  Each is flawless,
there is no scope for bugs in them.

As I said above, when I had finally tracked down the bug (and there were
clues: the stack underflowed for one) and was musing on it later, it
struck me that only such a bone-headed "D'oh!" kind of bug could lurk in
this code base.  It's just too small.  I'm sure I have more bugs in the
asembly code, but not too many, because there just isn't that much of it,
and the things that are in there are (again) all very small and simple.
The core code right now is just over six hundred words of RAM.  It could
almost fit in the bootloader ROM!  (But I'm not going to mess with that.
Code golf for a rainy day.)



M forth/assembler.output.txt => forth/assembler.output.txt +586 -587
@@ 1,4 1,4 @@
                0x00000 T_imm(0x10)                                      line: 203 T_imm(main)
                0x00000 T_imm(0x10)                                      line: 208 T_imm(main)
     _reserved: 0x00004 0x00000000
                0x00008 0x00000000
                0x0000c 0x00000000


@@ 8,171 8,171 @@
                0x0001c 0x00000000
                0x00020 0x00000000
                0x00024 0x00000000
         DOCOL: 0x00028 Sub_imm(12, 12, 0x4, u=False, v=False)           line:  90     Sub_imm(Rstack, Rstack, 4)  # Rstack -= 4 -- (in PUSHRSP)
                0x0002c Store_word(14, 12)                               line:  91     Store_word(reg, Rstack)     # reg -> RAM[Rstack] -- (in PUSHRSP)
                0x00030 Add_imm(14, 3, 0x4, u=False, v=False)            line: 215 Add_imm(IP, next_function, 4)
                0x00034 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00038 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0003c Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00040 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
          main: 0x00044 Mov_imm(10, 0x4000, u=False, v=False)            line: 225 Mov_imm(Dstack, DATA_STACK)
                0x00048 Mov_imm(12, 0x6000, u=False, v=False)            line: 226 Mov_imm(Rstack, RETURN_STACK)
                0x0004c Mov_imm(14, 0x60, u=False, v=False)              line: 227 Mov_imm(IP, cold_start)
                0x00050 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00054 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00058 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0005c T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    cold_start: 0x00060 0x0000006c                                       line: 239 dw(REPL)
      REPL_dfa: 0x00064 0x00000000                                       line: 122     dw(LINK) -- (in def_)
                0x00068 0x50455204                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          REPL: 0x0006c 0x00000028                                       line: 144     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x00070 0x00000788                                       line: 250 dw(INTERPRET)
                0x00074 0x000006a0                                       line: 251 dw(BRANCH)
                0x00078 0xfffffff8                                       line: 252 dw(s_to_u_32(-8))
      DROP_dfa: 0x0007c 0x00000064                                       line: 122     dw(LINK) -- (in def_)
                0x00080 0x4f524404                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          DROP: 0x00084 0x00000088                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00088 Add_imm(10, 10, 0x4, u=False, v=False)           line: 256 Add_imm(Dstack, Dstack, 4)  # drop top of stack
                0x0008c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00090 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00094 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00098 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      EXIT_dfa: 0x0009c 0x0000007c                                       line: 122     dw(LINK) -- (in def_)
                0x000a0 0x49584504                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          EXIT: 0x000a4 0x000000a8                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000a8 Load_word(14, 12)                                line:  96     Load_word(reg, Rstack)      # reg <- RAM[Rstack] -- (in POPRSP)
                0x000ac Add_imm(12, 12, 0x4, u=False, v=False)           line:  97     Add_imm(Rstack, Rstack, 4)  # Rstack += 4 -- (in POPRSP)
                0x000b0 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x000b4 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x000b8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x000bc T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       LIT_dfa: 0x000c0 0x0000009c                                       line: 122     dw(LINK) -- (in def_)
                0x000c4 0x54494c03                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           LIT: 0x000c8 0x000000cc                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000cc Load_word(0, 14)                                 line: 266 Load_word(R0, IP)  # Don't run the next word, load it,
                0x000d0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x000d4 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x000d8 Add_imm(14, 14, 0x4, u=False, v=False)           line: 268 Add_imm(IP, IP, 4)  # then skip it and run the word after it (EXIT).
                0x000dc Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x000e0 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x000e4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x000e8 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      SWAP_dfa: 0x000ec 0x000000c0                                       line: 122     dw(LINK) -- (in def_)
                0x000f0 0x41575304                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          SWAP: 0x000f4 0x000000f8                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000f8 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x000fc Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00100 Load_word(1, 10)                                 line: 274 Load_word(1, 10)
                0x00104 Store_word(0, 10)                                line: 275 Store_word(0, 10)
                0x00108 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0010c Store_word(1, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00110 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00114 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00118 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0011c T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       SUB_dfa: 0x00120 0x000000ec                                       line: 122     dw(LINK) -- (in def_)
                0x00124 0x00002d01                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           SUB: 0x00128 0x0000012c                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x0012c Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00130 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00134 Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00138 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0013c Sub(1, 1, 0, u=False)                            line: 283 Sub(R1, R1, R0)
                0x00140 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00144 Store_word(1, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00148 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0014c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00150 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00154 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       EQU_dfa: 0x00158 0x00000120                                       line: 122     dw(LINK) -- (in def_)
                0x0015c 0x00003d01                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           EQU: 0x00160 0x00000164                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00164 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00168 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0016c Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00170 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00174 Sub(1, 1, 0, u=False)                            line: 291 Sub(R1, R1, R0)
                0x00178 Mov(0, 0, u=True, v=True)  # R0 <- (N,Z,C,OV, 0..01010000) line: 292 Mov(R0, 0, u=True, v=True)  # Get flags, c register is ignored.
                0x0017c Asr_imm(0, 0, 0x1e, u=False, v=False)            line: 293 Asr_imm(R0, R0, 30)  # Z is the 31st bit, penultimate from the MSB.
                0x00180 And_imm(0, 0, 0x1, u=False, v=False)             line: 294 And_imm(R0, R0, 1)  # Mask out N flag.
                0x00184 Xor_imm(0, 0, 0x1, u=False, v=False)             line: 295 Xor_imm(R0, R0, 1)  # flip the (shifted) Z bit.
                0x00188 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0018c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00190 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00194 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      INCR_dfa: 0x00198 0x00000158                                       line: 122     dw(LINK) -- (in def_)
                0x0019c 0x002b3102                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          INCR: 0x001a0 0x000001a4                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x001a4 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x001a8 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x001ac Add_imm(0, 0, 0x1, u=False, v=False)             line: 301 Add_imm(R0, R0, 1)
                0x001b0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x001b4 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x001b8 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x001bc Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x001c0 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x001c4 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      DECR_dfa: 0x001c8 0x00000198                                       line: 122     dw(LINK) -- (in def_)
                0x001cc 0x002d3102                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          DECR: 0x001d0 0x000001d4                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x001d4 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x001d8 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x001dc Sub_imm(0, 0, 0x1, u=False, v=False)             line: 308 Sub_imm(R0, R0, 1)
                0x001e0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x001e4 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x001e8 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x001ec Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x001f0 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x001f4 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       KEY_dfa: 0x001f8 0x000001c8                                       line: 122     dw(LINK) -- (in def_)
                0x001fc 0x59454b03                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           KEY: 0x00200 0x00000204                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00204 Mov_imm(1, 0x258, u=False, v=False)              line: 178     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00208 T_link(1)                                        line: 179     T_link(R1) -- (in busywait_on_serial_ready)
                0x0020c Load_word(0, 1, offset=0xffffc)                  line: 320 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00210 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00214 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00218 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0021c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00220 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00224 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      EMIT_dfa: 0x00228 0x000001f8                                       line: 122     dw(LINK) -- (in def_)
                0x0022c 0x494d4504                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          EMIT: 0x00230 0x00000234                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00234 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00238 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0023c Mov_imm(1, 0x258, u=False, v=False)              line: 178     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00240 T_link(1)                                        line: 179     T_link(R1) -- (in busywait_on_serial_ready)
                0x00244 Store_word(0, 1, offset=0xffffc)                 line: 327 Store_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00248 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0024c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00250 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00254 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
          _KEY: 0x00258 Mov_imm(1, 0xffff, u=True, v=False)              line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x0025c Ior_imm(1, 1, 0xffcc, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00260 Load_word(2, 1)                                  line: 343 Load_word(R2, R1)
                0x00264 EQ_imm(0x3fff64)                                 line: 344 EQ_imm(negative_offset_24(-8))  # if R2==0 repeat
                0x00268 T(15)                                            line: 349 T(15)  # return
        _blank: 0x0026c Sub_imm(2, 0, 0x20, u=False, v=False)            line: 359 Sub_imm(R2, R0, 32)  # Is it a space char?
                0x00270 EQ(15)                                           line: 360 EQ(15)
                0x00274 Sub_imm(2, 0, 0xa, u=False, v=False)             line: 361 Sub_imm(R2, R0, 10)  # Is it a newline char?
                0x00278 EQ(15)                                           line: 362 EQ(15)
                0x0027c Sub_imm(2, 0, 0x9, u=False, v=False)             line: 363 Sub_imm(R2, R0, 9)  # Is it a tab char?
                0x00280 EQ(15)                                           line: 364 EQ(15)
                0x00284 Sub_imm(2, 0, 0xb, u=False, v=False)             line: 365 Sub_imm(R2, R0, 11)  # Is it a '\x0b' char?
                0x00288 EQ(15)                                           line: 366 EQ(15)
                0x0028c Sub_imm(2, 0, 0xc, u=False, v=False)             line: 367 Sub_imm(R2, R0, 12)  # Is it a '\x0c' char?
                0x00290 EQ(15)                                           line: 368 EQ(15)
                0x00294 Sub_imm(2, 0, 0xd, u=False, v=False)             line: 369 Sub_imm(R2, R0, 13)  # Is it a carriage return char?
                0x00298 T(15)                                            line: 370 T(15)  # return
 _skip_comment: 0x0029c Sub_imm(2, 0, 0x5c, u=False, v=False)            line: 377 Sub_imm(R2, R0, ord('\\'))  # Is it a \ char?
                0x002a0 NE(15)                                           line: 378 NE(15)  # It's not a \ char, return.
_skip_cmt_loop: 0x002a4 Load_word(2, 1)                                  line: 381 Load_word(R2, R1)  # Get the serial port status.
                0x002a8 EQ_imm(0xfffffe)                                 line: 382 EQ_imm(_skip_cmt_loop)  # until serial port status != 0
                0x002ac Load_word(0, 1, offset=0xffffc)                  line: 383 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x002b0 Sub_imm(2, 0, 0xa, u=False, v=False)             line: 384 Sub_imm(R2, R0, ord('\n'))  # Is it a newline char?
                0x002b4 EQ(15)                                           line: 385 EQ(15)  # We have reached the end of the line, return.
                0x002b8 T_imm(0xfffffa)                                  line: 386 T_imm(_skip_cmt_loop)
         DOCOL: 0x00028 Sub_imm(12, 12, 0x4, u=False, v=False)           line:  99     Sub_imm(Rstack, Rstack, 4)  # Rstack -= 4 -- (in PUSHRSP)
                0x0002c Store_word(14, 12)                               line: 100     Store_word(reg, Rstack)     # reg -> RAM[Rstack] -- (in PUSHRSP)
                0x00030 Add_imm(14, 3, 0x4, u=False, v=False)            line: 220 Add_imm(IP, next_function, 4)
                0x00034 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00038 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0003c Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00040 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
          main: 0x00044 Mov_imm(10, 0x4000, u=False, v=False)            line: 230 Mov_imm(Dstack, DATA_STACK)
                0x00048 Mov_imm(12, 0x6000, u=False, v=False)            line: 231 Mov_imm(Rstack, RETURN_STACK)
                0x0004c Mov_imm(14, 0x60, u=False, v=False)              line: 232 Mov_imm(IP, cold_start)
                0x00050 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00054 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00058 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0005c T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    cold_start: 0x00060 0x0000006c                                       line: 242 dw(REPL)  # IP set to point here at start
      REPL_dfa: 0x00064 0x00000000                                       line: 131     dw(LINK) -- (in def_)
                0x00068 0x50455204                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          REPL: 0x0006c 0x00000028                                       line: 153     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x00070 0x00000784                                       line: 253 dw(INTERPRET)
                0x00074 0x000006a0                                       line: 254 dw(BRANCH)
                0x00078 0xfffffff8                                       line: 255 dw(s_to_u_32(-8))  # Loop back to INTERPRET.
      DROP_dfa: 0x0007c 0x00000064                                       line: 131     dw(LINK) -- (in def_)
                0x00080 0x4f524404                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          DROP: 0x00084 0x00000088                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00088 Add_imm(10, 10, 0x4, u=False, v=False)           line: 259 Add_imm(Dstack, Dstack, 4)  # drop top of stack
                0x0008c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00090 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00094 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00098 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      EXIT_dfa: 0x0009c 0x0000007c                                       line: 131     dw(LINK) -- (in def_)
                0x000a0 0x49584504                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          EXIT: 0x000a4 0x000000a8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000a8 Load_word(14, 12)                                line: 105     Load_word(reg, Rstack)      # reg <- RAM[Rstack] -- (in POPRSP)
                0x000ac Add_imm(12, 12, 0x4, u=False, v=False)           line: 106     Add_imm(Rstack, Rstack, 4)  # Rstack += 4 -- (in POPRSP)
                0x000b0 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x000b4 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x000b8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x000bc T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       LIT_dfa: 0x000c0 0x0000009c                                       line: 131     dw(LINK) -- (in def_)
                0x000c4 0x54494c03                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           LIT: 0x000c8 0x000000cc                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000cc Load_word(0, 14)                                 line: 269 Load_word(R0, IP)   # Don't run the next cell, load it,
                0x000d0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x000d4 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x000d8 Add_imm(14, 14, 0x4, u=False, v=False)           line: 271 Add_imm(IP, IP, 4)  # then skip it.
                0x000dc Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x000e0 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x000e4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x000e8 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      SWAP_dfa: 0x000ec 0x000000c0                                       line: 131     dw(LINK) -- (in def_)
                0x000f0 0x41575304                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          SWAP: 0x000f4 0x000000f8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x000f8 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x000fc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00100 Load_word(1, 10)                                 line: 277 Load_word(R1, 10)
                0x00104 Store_word(0, 10)                                line: 278 Store_word(R0, 10)
                0x00108 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0010c Store_word(1, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00110 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00114 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00118 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0011c T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       SUB_dfa: 0x00120 0x000000ec                                       line: 131     dw(LINK) -- (in def_)
                0x00124 0x00002d01                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           SUB: 0x00128 0x0000012c                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x0012c Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00130 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00134 Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00138 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0013c Sub(1, 1, 0, u=False)                            line: 286 Sub(R1, R1, R0)
                0x00140 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00144 Store_word(1, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00148 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0014c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00150 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00154 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       EQU_dfa: 0x00158 0x00000120                                       line: 131     dw(LINK) -- (in def_)
                0x0015c 0x00003d01                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           EQU: 0x00160 0x00000164                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00164 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00168 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0016c Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00170 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00174 Sub(1, 1, 0, u=False)                            line: 294 Sub(R1, R1, R0)
                0x00178 Mov(0, 0, u=True, v=True)  # R0 <- (N,Z,C,OV, 0..01010000) line: 295 Mov(R0, 0, u=True, v=True)  # Get flags, c register is ignored.
                0x0017c Asr_imm(0, 0, 0x1e, u=False, v=False)            line: 296 Asr_imm(R0, R0, 30)  # Z is the 31st bit, penultimate from the MSB.
                0x00180 And_imm(0, 0, 0x1, u=False, v=False)             line: 297 And_imm(R0, R0, 1)  # Mask out N flag.
                0x00184 Xor_imm(0, 0, 0x1, u=False, v=False)             line: 298 Xor_imm(R0, R0, 1)  # flip the (shifted) Z bit.
                0x00188 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0018c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00190 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00194 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      INCR_dfa: 0x00198 0x00000158                                       line: 131     dw(LINK) -- (in def_)
                0x0019c 0x002b3102                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          INCR: 0x001a0 0x000001a4                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x001a4 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x001a8 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x001ac Add_imm(0, 0, 0x1, u=False, v=False)             line: 304 Add_imm(R0, R0, 1)
                0x001b0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x001b4 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x001b8 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x001bc Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x001c0 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x001c4 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      DECR_dfa: 0x001c8 0x00000198                                       line: 131     dw(LINK) -- (in def_)
                0x001cc 0x002d3102                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          DECR: 0x001d0 0x000001d4                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x001d4 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x001d8 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x001dc Sub_imm(0, 0, 0x1, u=False, v=False)             line: 311 Sub_imm(R0, R0, 1)
                0x001e0 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x001e4 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x001e8 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x001ec Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x001f0 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x001f4 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       KEY_dfa: 0x001f8 0x000001c8                                       line: 131     dw(LINK) -- (in def_)
                0x001fc 0x59454b03                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           KEY: 0x00200 0x00000204                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00204 Mov_imm(1, 0x258, u=False, v=False)              line: 187     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00208 T_link(1)                                        line: 188     T_link(R1) -- (in busywait_on_serial_ready)
                0x0020c Load_word(0, 1, offset=0xffffc)                  line: 323 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00210 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00214 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00218 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0021c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00220 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00224 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      EMIT_dfa: 0x00228 0x000001f8                                       line: 131     dw(LINK) -- (in def_)
                0x0022c 0x494d4504                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          EMIT: 0x00230 0x00000234                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00234 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00238 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0023c Mov_imm(1, 0x258, u=False, v=False)              line: 187     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00240 T_link(1)                                        line: 188     T_link(R1) -- (in busywait_on_serial_ready)
                0x00244 Store_word(0, 1, offset=0xffffc)                 line: 330 Store_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00248 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0024c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00250 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00254 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
          _KEY: 0x00258 Mov_imm(1, 0xffff, u=True, v=False)              line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x0025c Ior_imm(1, 1, 0xffcc, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00260 Load_word(2, 1)                                  line: 346 Load_word(R2, R1)
                0x00264 EQ_imm(0x3fff64)                                 line: 347 EQ_imm(negative_offset_24(-8))  # if R2==0 repeat
                0x00268 T(15)                                            line: 352 T(15)  # return
        _blank: 0x0026c Sub_imm(2, 0, 0x20, u=False, v=False)            line: 370 Sub_imm(R2, R0, 32)  # Is it a space char?
                0x00270 EQ(15)                                           line: 371 EQ(15)
                0x00274 Sub_imm(2, 0, 0xa, u=False, v=False)             line: 372 Sub_imm(R2, R0, 10)  # Is it a newline char?
                0x00278 EQ(15)                                           line: 373 EQ(15)
                0x0027c Sub_imm(2, 0, 0x9, u=False, v=False)             line: 374 Sub_imm(R2, R0, 9)  # Is it a tab char?
                0x00280 EQ(15)                                           line: 375 EQ(15)
                0x00284 Sub_imm(2, 0, 0xb, u=False, v=False)             line: 376 Sub_imm(R2, R0, 11)  # Is it a '\x0b' char?
                0x00288 EQ(15)                                           line: 377 EQ(15)
                0x0028c Sub_imm(2, 0, 0xc, u=False, v=False)             line: 378 Sub_imm(R2, R0, 12)  # Is it a '\x0c' char?
                0x00290 EQ(15)                                           line: 379 EQ(15)
                0x00294 Sub_imm(2, 0, 0xd, u=False, v=False)             line: 380 Sub_imm(R2, R0, 13)  # Is it a carriage return char?
                0x00298 T(15)                                            line: 381 T(15)  # return
 _skip_comment: 0x0029c Sub_imm(2, 0, 0x5c, u=False, v=False)            line: 395 Sub_imm(R2, R0, ord('\\'))  # Is it a '\' char?
                0x002a0 NE(15)                                           line: 396 NE(15)                      # It's not a '\' char, return.
_skip_cmt_loop: 0x002a4 Load_word(2, 1)                                  line: 399 Load_word(R2, R1)           # Get the serial port status.
                0x002a8 EQ_imm(0xfffffe)                                 line: 400 EQ_imm(_skip_cmt_loop)      # until serial port status != 0
                0x002ac Load_word(0, 1, offset=0xffffc)                  line: 401 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x002b0 Sub_imm(2, 0, 0xa, u=False, v=False)             line: 402 Sub_imm(R2, R0, ord('\n'))  # Is it a newline char?
                0x002b4 EQ(15)                                           line: 403 EQ(15)  # We have reached the end of the line, return.
                0x002b8 T_imm(0xfffffa)                                  line: 404 T_imm(_skip_cmt_loop)   # ...until newline.
   WORD_BUFFER: 0x002bc 0x00000000
                0x002c0 0x00000000
                0x002c4 0x00000000


@@ 181,424 181,423 @@ _skip_cmt_loop: 0x002a4 Load_word(2, 1)                                  line: 3
                0x002d0 0x00000000
                0x002d4 0x00000000
                0x002d8 0x00000000
      WORD_dfa: 0x002dc 0x00000228                                       line: 122     dw(LINK) -- (in def_)
                0x002e0 0x524f5704                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          WORD: 0x002e4 0x000002e8                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
     _word_key: 0x002e8 Mov_imm(1, 0x258, u=False, v=False)              line: 178     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x002ec T_link(1)                                        line: 179     T_link(R1) -- (in busywait_on_serial_ready)
                0x002f0 Load_word(0, 1, offset=0xffffc)                  line: 406 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x002f4 Mov_imm(2, 0x29c, u=False, v=False)              line: 408 Mov_imm(R2, _skip_comment)
                0x002f8 T_link(2)                                        line: 409 T_link(R2)
                0x002fc Mov_imm(1, 0x26c, u=False, v=False)              line: 412 Mov_imm(R1, _blank)
                0x00300 T_link(1)                                        line: 413 T_link(R1)
                0x00304 EQ_imm(0xfffff8)                                 line: 414 EQ_imm(_word_key)  # then get another char
                0x00308 Mov_imm(6, 0x2bc, u=False, v=False)              line: 417 Mov_imm(word_pointer, WORD_BUFFER)
                0x0030c Mov_imm(5, 0x0, u=False, v=False)                line: 418 Mov_imm(word_counter, 0)
                0x00310 Store_word(5, 6)                                 line: 419 Store_word(word_counter, word_pointer)  # Zero out the first word of WORD_BUFFER.
                0x00314 Add_imm(6, 6, 0x1, u=False, v=False)             line: 422 Add_imm(word_pointer, word_pointer, 1)  # Leave a byte for the length.
  _find_length: 0x00318 Sub_imm(2, 5, 0x20, u=False, v=False)            line: 431 Sub_imm(R2, word_counter, 32)
                0x0031c EQ_imm(0xfffff2)                                 line: 432 EQ_imm(_word_key)  # try again.
                0x00320 Store_byte(0, 6)                                 line: 435 Store_byte(R0, word_pointer)
                0x00324 Add_imm(6, 6, 0x1, u=False, v=False)             line: 436 Add_imm(word_pointer, word_pointer, 1)
                0x00328 Add_imm(5, 5, 0x1, u=False, v=False)             line: 437 Add_imm(word_counter, word_counter, 1)
                0x0032c Mov_imm(1, 0x258, u=False, v=False)              line: 178     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00330 T_link(1)                                        line: 179     T_link(R1) -- (in busywait_on_serial_ready)
                0x00334 Load_word(0, 1, offset=0xffffc)                  line: 441 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00338 Mov_imm(1, 0x26c, u=False, v=False)              line: 444 Mov_imm(R1, _blank)
                0x0033c T_link(1)                                        line: 445 T_link(R1)
                0x00340 NE_imm(0xfffff5)                                 line: 446 NE_imm(_find_length)  # No, keep getting chars to the buffer
                0x00344 Mov_imm(6, 0x2bc, u=False, v=False)              line: 450 Mov_imm(word_pointer, WORD_BUFFER)
                0x00348 Store_byte(5, 6)                                 line: 451 Store_byte(word_counter, word_pointer)
                0x0034c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00350 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00354 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00358 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      FIND_dfa: 0x0035c 0x000002dc                                       line: 122     dw(LINK) -- (in def_)
                0x00360 0x4e494604                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          FIND: 0x00364 0x00000368                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00368 Mov_imm(6, 0x2bc, u=False, v=False)              line: 464 Mov_imm(word_pointer, WORD_BUFFER)
                0x0036c Load_word(5, 6)                                  line: 466 Load_word(word_counter, word_pointer)
                0x00370 Mov_imm(2, 0xffff, u=True, v=False)              line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00374 Ior_imm(2, 2, 0xff7f, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00378 Mov_imm(0, 0x4e0, u=False, v=False)              line: 471 Mov_imm(R0, LATEST_var)
                0x0037c Load_word(0, 0)                                  line: 472 Load_word(R0, R0)  # Point R0 to latest word's LFA.
       _FIND_1: 0x00380 Load_word(1, 0, offset=0x4)                      line: 474 Load_word(R1, R0, 4)  # load a word of the name field.
                0x00384 And(1, 1, 2, u=False)                            line: 475 And(R1, R1, R2)  # Clear the IMMEDIATE flag, if any.
                0x00388 Sub(1, 1, 5, u=False)                            line: 476 Sub(R1, R1, word_counter)  # Compare.
                0x0038c EQ_imm(0x2)                                      line: 477 EQ_imm(_found)  # If this is the word...
                0x00390 Load_word(0, 0)                                  line: 483 Load_word(R0, R0)  # Load the address of the next link field into R0
                0x00394 NE_imm(0xfffffa)                                 line: 484 NE_imm(_FIND_1)  # Check the next word.
        _found: 0x00398 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0039c Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x003a0 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x003a4 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x003a8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x003ac T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    NUMBER_dfa: 0x003b0 0x0000035c                                       line: 122     dw(LINK) -- (in def_)
                0x003b4 0x4d554e06                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        NUMBER: 0x003b8 0x000003bc                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x003bc Mov_imm(6, 0x2bc, u=False, v=False)              line: 522 Mov_imm(word_pointer, WORD_BUFFER)
                0x003c0 Load_byte(5, 6)                                  line: 523 Load_byte(word_counter, word_pointer)
                0x003c4 Mov_imm(2, 0x0, u=False, v=False)                line: 524 Mov_imm(R2, 0)  # use R2 as the accumulator for the number's value
                0x003c8 Add_imm(6, 6, 0x1, u=False, v=False)             line: 526 Add_imm(word_pointer, word_pointer, 1)  # Point to first char.
                0x003cc Load_byte(0, 6)                                  line: 527 Load_byte(R0, word_pointer)  # Load it.
                0x003d0 Sub_imm(0, 0, 0x24, u=False, v=False)            line: 528 Sub_imm(R0, R0, ord('$'))  # Is it a '$'?
                0x003d4 NE_imm(0xf)                                      line: 529 NE_imm(_NUM_fin)
                0x003d8 Sub_imm(5, 5, 0x1, u=False, v=False)             line: 532 Sub_imm(word_counter, word_counter, 1)  # we have parsed one '$' char.
      _NUM_hex: 0x003dc Add_imm(6, 6, 0x1, u=False, v=False)             line: 535 Add_imm(word_pointer, word_pointer, 1)  # Point to next char.
                0x003e0 Load_byte(0, 6)                                  line: 536 Load_byte(R0, word_pointer)  # Load it.
                0x003e4 Sub_imm(0, 0, 0x30, u=False, v=False)            line: 538 Sub_imm(R0, R0, ord('0'))
                0x003e8 LT_imm(0xa)                                      line: 539 LT_imm(_NUM_fin)  # Is its ASCII value lower than '0'?
                0x003ec Sub_imm(1, 0, 0x9, u=False, v=False)             line: 541 Sub_imm(R1, R0, 9)  # Is it 0-9?
                0x003f0 LE_imm(0x5)                                      line: 542 LE_imm(_NUM_add)  # It is!
                0x003f4 Sub_imm(0, 0, 0x31, u=False, v=False)            line: 548 Sub_imm(R0, R0, 49)  # so now '1'..'6' -> 0..5
                0x003f8 LT_imm(0x6)                                      line: 549 LT_imm(_NUM_fin)  # Its ASCII value is less than 'a', nope out.
                0x003fc Sub_imm(1, 0, 0x5, u=False, v=False)             line: 552 Sub_imm(R1, R0, 5)  # Is it a-f?
                0x00400 GT_imm(0x4)                                      line: 553 GT_imm(_NUM_fin)  # nope, nope out
                0x00404 Add_imm(0, 0, 0xa, u=False, v=False)             line: 555 Add_imm(R0, R0, 10)  # 0..5 -> 10..15
      _NUM_add: 0x00408 Add(2, 2, 0, u=False)                            line: 558 Add( R2, R2, R0)  # Add it to the accumulator.
                0x0040c Sub_imm(5, 5, 0x1, u=False, v=False)             line: 560 Sub_imm(word_counter, word_counter, 1)  # we have parsed a digit char.
                0x00410 NE_imm(0x8)                                      line: 561 NE_imm(_NUM_foo)  # More digits? Keep going.
      _NUM_fin: 0x00414 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00418 Store_word(2, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0041c Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00420 Store_word(5, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00424 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00428 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0042c Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00430 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      _NUM_foo: 0x00434 Lsl_imm(2, 2, 0x4, u=False, v=False)             line: 570 Lsl_imm(R2, R2, 4)  # accumulator *= 16
                0x00438 T_imm(0xffffe8)                                  line: 571 T_imm(_NUM_hex)  # Go get the next digit.
    CREATE_dfa: 0x0043c 0x000003b0                                       line: 122     dw(LINK) -- (in def_)
                0x00440 0x45524306                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        CREATE: 0x00444 0x00000448                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00448 Mov_imm(0, 0x4b4, u=False, v=False)              line: 582 Mov_imm(R0, HERE__var)  # R0 <- &HERE
                0x0044c Load_word(0, 0)                                  line: 583 Load_word(R0, R0)  # R0 <- ram[HERE]
                0x00450 Mov_imm(1, 0x4e0, u=False, v=False)              line: 585 Mov_imm(R1, LATEST_var)  # R1 <- &LATEST
                0x00454 Load_word(2, 1)                                  line: 586 Load_word(R2, R1)  # R2 <- ram[LATEST]
                0x00458 Store_word(2, 0)                                 line: 587 Store_word(R2, R0)  # value of LATEST -> ram[HERE]
                0x0045c Store_word(0, 1)                                 line: 588 Store_word(R0, R1)  # value of HERE (now dfa for new word) -> ram[LATEST_var]
                0x00460 Add_imm(0, 0, 0x4, u=False, v=False)             line: 589 Add_imm(R0, R0, 4)  # HERE += 4
                0x00464 Mov_imm(6, 0x2bc, u=False, v=False)              line: 593 Mov_imm(word_pointer, WORD_BUFFER)
                0x00468 Load_word(1, 6)                                  line: 604 Load_word(R1, word_pointer)  # Get the word from WORD_BUFFER.
                0x0046c Store_word(1, 0)                                 line: 605 Store_word(R1, R0)  # Store word to HERE.
                0x00470 Add_imm(0, 0, 0x4, u=False, v=False)             line: 606 Add_imm(R0, R0, 4)  # HERE += 4
                0x00474 Mov_imm(1, 0x4b4, u=False, v=False)              line: 615 Mov_imm(R1, HERE__var)  # R1 <- &HERE
                0x00478 Store_word(0, 1)                                 line: 616 Store_word(R0, R1)
                0x0047c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00480 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00484 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00488 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     HERE__dfa: 0x0048c 0x0000043c                                       line: 122     dw(LINK) -- (in def_)
                0x00490 0x52454804                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         HERE_: 0x00494 0x00000498                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00498 Mov_imm(0, 0x4b4, u=False, v=False)              line: 162     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x0049c Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004a0 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004a4 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x004a8 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x004ac Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x004b0 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     HERE__var: 0x004b4 0x00000970                                       line: 167     dw(initial) -- (in defvar)
    LATEST_dfa: 0x004b8 0x0000048c                                       line: 122     dw(LINK) -- (in def_)
                0x004bc 0x54414c06                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        LATEST: 0x004c0 0x000004c4                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x004c4 Mov_imm(0, 0x4e0, u=False, v=False)              line: 162     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x004c8 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004cc Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004d0 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x004d4 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x004d8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x004dc T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    LATEST_var: 0x004e0 0x0000093c                                       line: 167     dw(initial) -- (in defvar)
     STATE_dfa: 0x004e4 0x000004b8                                       line: 122     dw(LINK) -- (in def_)
                0x004e8 0x41545305                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         STATE: 0x004ec 0x000004f0                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x004f0 Mov_imm(0, 0x50c, u=False, v=False)              line: 162     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x004f4 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004f8 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004fc Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00500 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00504 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00508 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     STATE_var: 0x0050c 0x00000000                                       line: 167     dw(initial) -- (in defvar)
     COMMA_dfa: 0x00510 0x000004e4                                       line: 122     dw(LINK) -- (in def_)
                0x00514 0x00002c01                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         COMMA: 0x00518 0x0000051c                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x0051c Load_word(2, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00520 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00524 Mov_imm(1, 0x53c, u=False, v=False)              line: 641 Mov_imm(R1, _COMMA)
                0x00528 T_link(1)                                        line: 642 T_link(R1)
                0x0052c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00530 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00534 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00538 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
        _COMMA: 0x0053c Mov_imm(0, 0x4b4, u=False, v=False)              line: 646 Mov_imm(R0, HERE__var)  # R0 <- &HERE
                0x00540 Load_word(1, 0)                                  line: 647 Load_word(R1, R0)  # R1 <- ram[&HERE]
                0x00544 Store_word(2, 1)                                 line: 648 Store_word(R2, R1)  # R2 -> ram[HERE]
                0x00548 Add_imm(1, 1, 0x4, u=False, v=False)             line: 649 Add_imm(R1, R1, 4)
                0x0054c Store_word(1, 0)                                 line: 650 Store_word(R1, R0)  # R1+4 -> ram[&HERE]
                0x00550 T(15)                                            line: 651 T(15)  # return
     LBRAC_dfa: 0x00554 0x00000510                                       line: 122     dw(LINK) -- (in def_)
                0x00558 0x00005b81                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         LBRAC: 0x0055c 0x00000560                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00560 Mov_imm(0, 0x50c, u=False, v=False)              line: 661 Mov_imm(R0, STATE_var)
                0x00564 Mov_imm(1, 0x0, u=False, v=False)                line: 662 Mov_imm(R1, 0)
                0x00568 Store_word(1, 0)                                 line: 663 Store_word(R1, R0)
                0x0056c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00570 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00574 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00578 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     RBRAC_dfa: 0x0057c 0x00000554                                       line: 122     dw(LINK) -- (in def_)
                0x00580 0x00005d01                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         RBRAC: 0x00584 0x00000588                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00588 Mov_imm(0, 0x50c, u=False, v=False)              line: 667 Mov_imm(R0, STATE_var)
                0x0058c Mov_imm(1, 0x1, u=False, v=False)                line: 668 Mov_imm(R1, 1)
                0x00590 Store_word(1, 0)                                 line: 669 Store_word(R1, R0)
                0x00594 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00598 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0059c Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x005a0 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     COLON_dfa: 0x005a4 0x0000057c                                       line: 122     dw(LINK) -- (in def_)
                0x005a8 0x00003a01                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         COLON: 0x005ac 0x00000028                                       line: 144     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x005b0 0x000002e4                                       line: 683 dw(WORD)  # "Get the name of the new word"
                0x005b4 0x00000444                                       line: 684 dw(CREATE)  # "CREATE the dictionary entry / header"
                0x005b8 0x000000c8                                       line: 685 dw(LIT)  # "Append DOCOL  (the codeword)."
                0x005bc 0x00000028                                       line: 686 dw(DOCOL)
                0x005c0 0x00000518                                       line: 687 dw(COMMA)
                0x005c4 0x000004c0                                       line: 688 dw(LATEST)  # "Make the word hidden (see below for definition)."
                0x005c8 0x000006f4                                       line: 689 dw(FETCH)
                0x005cc 0x00000640                                       line: 690 dw(HIDDEN)
                0x005d0 0x00000584                                       line: 691 dw(RBRAC)  # "Go into compile mode."
                0x005d4 0x000000a4                                       line: 692 dw(EXIT)  # "Return from the function."
 SEMICOLON_dfa: 0x005d8 0x000005a4                                       line: 122     dw(LINK) -- (in def_)
                0x005dc 0x00003b81                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     SEMICOLON: 0x005e0 0x00000028                                       line: 144     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x005e4 0x000000c8                                       line: 701 dw(LIT)  # "Append EXIT (so the word will return)."
                0x005e8 0x000000a4                                       line: 702 dw(EXIT)
                0x005ec 0x00000518                                       line: 703 dw(COMMA)
                0x005f0 0x000004c0                                       line: 704 dw(LATEST)  # "Toggle hidden flag -- unhide the word (see below for definition)."
                0x005f4 0x000006f4                                       line: 705 dw(FETCH)
                0x005f8 0x00000640                                       line: 706 dw(HIDDEN)
                0x005fc 0x0000055c                                       line: 707 dw(LBRAC)  # "Go back to IMMEDIATE mode."
                0x00600 0x000000a4                                       line: 708 dw(EXIT)  # "Return from the function."
 IMMEDIATE_dfa: 0x00604 0x000005d8                                       line: 122     dw(LINK) -- (in def_)
                0x00608 0x4d4d4989                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     IMMEDIATE: 0x0060c 0x00000610                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00610 Mov_imm(0, 0x4e0, u=False, v=False)              line: 717 Mov_imm(R0, LATEST_var)  # R0 <- &LATEST
                0x00614 Load_word(1, 0)                                  line: 718 Load_word(R1, R0)  # R1 <- ram[LATEST]
                0x00618 Add_imm(1, 1, 0x4, u=False, v=False)             line: 719 Add_imm(R1, R1, 4)  # "Point to name/flags byte."
                0x0061c Load_word(0, 1)                                  line: 720 Load_word(R0, R1)
                0x00620 Xor_imm(0, 0, 0x80, u=False, v=False)            line: 721 Xor_imm(R0, R0, F_IMMED)
                0x00624 Store_word(0, 1)                                 line: 722 Store_word(R0, R1)
                0x00628 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0062c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00630 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00634 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    HIDDEN_dfa: 0x00638 0x00000604                                       line: 122     dw(LINK) -- (in def_)
                0x0063c 0x44494806                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        HIDDEN: 0x00640 0x00000644                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00644 Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00648 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0064c Add_imm(1, 1, 0x4, u=False, v=False)             line: 733 Add_imm(R1, R1, 4)  # "Point to name/flags byte."
                0x00650 Load_word(0, 1)                                  line: 734 Load_word(R0, R1)  # "Toggle the HIDDEN bit."
                0x00654 Xor_imm(0, 0, 0x20, u=False, v=False)            line: 735 Xor_imm(R0, R0, F_HIDDEN)
                0x00658 Store_word(0, 1)                                 line: 736 Store_word(R0, R1)
                0x0065c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00660 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00664 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00668 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      TICK_dfa: 0x0066c 0x00000638                                       line: 122     dw(LINK) -- (in def_)
                0x00670 0x00002701                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          TICK: 0x00674 0x00000678                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00678 Load_word(0, 14)                                 line: 753 Load_word(R0, IP)  # Get the address of the next codeword.
                0x0067c Add_imm(14, 14, 0x4, u=False, v=False)           line: 754 Add_imm(IP, IP, 4)  # Skip it.
                0x00680 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00684 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00688 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0068c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00690 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00694 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    BRANCH_dfa: 0x00698 0x0000066c                                       line: 122     dw(LINK) -- (in def_)
                0x0069c 0x41524206                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        BRANCH: 0x006a0 0x000006a4                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006a4 Load_word(0, 14)                                 line: 765 Load_word(R0, IP)  # Get the offset.
                0x006a8 Add(14, 14, 0, u=False)                          line: 767 Add(IP, IP, R0)    # IP += offset
                0x006ac Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x006b0 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x006b4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x006b8 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
   ZBRANCH_dfa: 0x006bc 0x00000698                                       line: 122     dw(LINK) -- (in def_)
                0x006c0 0x52423007                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
       ZBRANCH: 0x006c4 0x000006c8                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006c8 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x006cc Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x006d0 Add_imm(0, 0, 0x0, u=False, v=False)             line: 778 Add_imm(R0, R0, 0)  # Set condition flags.
                0x006d4 EQ_imm(0xfffff3)                                 line: 779 EQ_imm(BRANCH + 4)  # Zero? BRANCH.
                0x006d8 Add_imm(14, 14, 0x4, u=False, v=False)           line: 780 Add_imm(IP, IP, 4)  # Non-zero? Skip offset.
                0x006dc Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x006e0 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x006e4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x006e8 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     FETCH_dfa: 0x006ec 0x000006bc                                       line: 122     dw(LINK) -- (in def_)
                0x006f0 0x00004001                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         FETCH: 0x006f4 0x000006f8                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006f8 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x006fc Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00700 Load_word(0, 0)                                  line: 791 Load_word(R0, R0)
                0x00704 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00708 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0070c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00710 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00714 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00718 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     STORE_dfa: 0x0071c 0x000006ec                                       line: 122     dw(LINK) -- (in def_)
                0x00720 0x00002101                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         STORE: 0x00724 0x00000728                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00728 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x0072c Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00730 Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00734 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00738 Store_word(1, 0)                                 line: 804 Store_word(R1, R0)
                0x0073c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00740 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00744 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00748 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
 IS_NUMBER_dfa: 0x0074c 0x0000071c                                       line: 122     dw(LINK) -- (in def_)
                0x00750 0x003f2302                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     IS_NUMBER: 0x00754 0x00000758                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00758 Mov_imm(6, 0x2bc, u=False, v=False)              line: 818 Mov_imm(word_pointer, WORD_BUFFER)
                0x0075c Add_imm(6, 6, 0x1, u=False, v=False)             line: 819 Add_imm(word_pointer, word_pointer, 1)
                0x00760 Load_byte(0, 6)                                  line: 820 Load_byte(R0, word_pointer)
                0x00764 Sub_imm(0, 0, 0x24, u=False, v=False)            line: 821 Sub_imm(R0, R0, ord('$'))  # Is it a '$'?
                0x00768 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0076c Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00770 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00774 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00778 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0077c T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
 INTERPRET_dfa: 0x00780 0x0000074c                                       line: 122     dw(LINK) -- (in def_)
                0x00784 0x544e4909                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     INTERPRET: 0x00788 0x00000028                                       line: 144     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x0078c 0x000002e4                                       line: 832 dw(WORD)
                0x00790 0x00000754                                       line: 833 dw(IS_NUMBER)
                0x00794 0x000006c4                                       line: 834 dw(ZBRANCH)
                0x00798 0x0000001c                                       line: 835 dw(s_to_u_32(4 * 7))  # It could be a number...
                0x0079c 0x00000364                                       line: 838 dw(FIND)
                0x007a0 0x00000944                                       line: 839 dw(DUP)
                0x007a4 0x000006c4                                       line: 840 dw(ZBRANCH)  # Zero means it wasn't in the dictionary,
                0x007a8 0x0000001c                                       line: 841 dw(s_to_u_32(4 * 7))
                0x007ac 0x000007f8                                       line: 844 dw(_INTERP)
                0x007b0 0x000000a4                                       line: 845 dw(EXIT)
                0x007b4 0x000003b8                                       line: 848 dw(NUMBER)
                0x007b8 0x00000944                                       line: 849 dw(DUP)
                0x007bc 0x000006c4                                       line: 850 dw(ZBRANCH)  # No chars left?  It is a number!
                0x007c0 0x00000008                                       line: 851 dw(s_to_u_32(4 * 2))
                0x007c4 0x000000a4                                       line: 855 dw(EXIT)
                0x007c8 0x00000084                                       line: 858 dw(DROP)
                0x007cc 0x000004ec                                       line: 862 dw(STATE)
                0x007d0 0x000006f4                                       line: 863 dw(FETCH)
                0x007d4 0x000006c4                                       line: 864 dw(ZBRANCH)  #  STATE = 0 -> interpreting.
                0x007d8 0x00000014                                       line: 865 dw(s_to_u_32(4 * 5))  # to EXIT
                0x007dc 0x000000c8                                       line: 868 dw(LIT)
                0x007e0 0x000000c8                                       line: 869 dw(LIT)
                0x007e4 0x00000518                                       line: 870 dw(COMMA)  # write the address of the codeword of LIT
                0x007e8 0x00000518                                       line: 871 dw(COMMA)  # then the value itself.
                0x007ec 0x000000a4                                       line: 873 dw(EXIT)  # Just leave the number itself on the stack.
   _INTERP_dfa: 0x007f0 0x00000780                                       line: 122     dw(LINK) -- (in def_)
                0x007f4 0x4e495f27                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
       _INTERP: 0x007f8 0x000007fc                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x007fc Load_word(2, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00800 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00804 Mov_imm(0, 0x50c, u=False, v=False)              line: 881 Mov_imm(R0, STATE_var)  # R0 <- &STATE
                0x00808 Load_word(0, 0)                                  line: 882 Load_word(R0, R0)  # R0 <- ram[STATE]
                0x0080c EQ_imm(0xa)                                      line: 883 EQ_imm(_intrp_exe)  # STATE = 0 -> interpreting.
                0x00810 Load_word(0, 2, offset=0x4)                      line: 884 Load_word(R0, R2, 4)  # R0 <- Name field
                0x00814 And_imm(0, 0, 0x80, u=False, v=False)            line: 885 And_imm(R0, R0, F_IMMED)
                0x00818 NE_imm(0x7)                                      line: 886 NE_imm(_intrp_exe)  # word is IMMEDIATE.
                0x0081c Add_imm(2, 2, 0x8, u=False, v=False)             line: 889 Add_imm(R2, R2, 8)  # Point from LFA to codeword.
                0x00820 Mov_imm(1, 0x53c, u=False, v=False)              line: 890 Mov_imm(R1, _COMMA)  # Call comma to store it and increment HERE.
                0x00824 T_link(1)                                        line: 891 T_link(R1)
                0x00828 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0082c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00830 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00834 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    _intrp_exe: 0x00838 Add_imm(2, 2, 0x8, u=False, v=False)             line: 895 Add_imm(R2, R2, 8)  # Point to the codeword
                0x0083c Load_word(0, 2)                                  line: 896 Load_word(R0, R2)  # Get the address to which its codeword points...
                0x00840 Mov(3, 2, u=False)                               line: 897 Mov(next_function, R2)  # DOCOL depends on this.
                0x00844 T(0)                                             line: 898 T(R0)  # and jump to it.
       PAI_dfa: 0x00848 0x000007f0                                       line: 122     dw(LINK) -- (in def_)
                0x0084c 0x69617003                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           PAI: 0x00850 0x00000854                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00854 Mov_imm(0, 0xe, u=True, v=False)                 line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00858 Ior_imm(0, 0, 0x7f00, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x0085c Mov_imm(1, 0x1, u=True, v=False)                 line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00860 Ior_imm(1, 1, 0x8000, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00864 Mov_imm(8, 0xffff, u=True, v=False)              line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00868 Ior_imm(8, 8, 0xffff, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x0086c Add(1, 1, 0, u=False)                            line: 918 Add(R1, R1, R0)
                0x00870 Sub_imm(0, 0, 0x4e0, u=False, v=False)           line: 919 Sub_imm(R0, R0, 312 * 4)  # 312 words in font data.
                0x00874 Mov_imm(2, 0x138, u=False, v=False)              line: 920 Mov_imm(R2, 13 * 24)
     _pai_loop: 0x00878 Load_word(7, 0)                                  line: 923 Load_word(R7, R0)
                0x0087c Xor(7, 7, 8, u=False)                            line: 924 Xor(R7, R7, R8)  #  Reverse video.
                0x00880 Store_word(7, 1)                                 line: 925 Store_word(R7, R1)
                0x00884 Add_imm(0, 0, 0x4, u=False, v=False)             line: 926 Add_imm(R0, R0, 4)
                0x00888 Sub_imm(1, 1, 0x80, u=False, v=False)            line: 927 Sub_imm(R1, R1, 128)
                0x0088c Sub_imm(2, 2, 0x1, u=False, v=False)             line: 928 Sub_imm(R2, R2, 1)
                0x00890 EQ_imm(0x1)                                      line: 929 EQ_imm(_pai_done)
                0x00894 T_imm(0xfffff8)                                  line: 930 T_imm(_pai_loop)
     _pai_done: 0x00898 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0089c Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x008a0 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x008a4 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
PAINT_CHAR_dfa: 0x008a8 0x00000848                                       line: 122     dw(LINK) -- (in def_)
                0x008ac 0x6961700a                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
    PAINT_CHAR: 0x008b0 0x000008b4                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x008b4 Mov_imm(0, 0xe, u=True, v=False)                 line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x008b8 Ior_imm(0, 0, 0x7a20, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x008bc Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008c0 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008c4 Sub_imm(1, 1, 0x21, u=False, v=False)            line: 951 Sub_imm(R1, R1, ord('!'))  # R1 counts byte offset of char.
                0x008c8 Asr_imm(2, 1, 0x2, u=False, v=False)             line: 953 Asr_imm(R2, R1, 2)  # R2 = R1 / 4  Trim the two least bits.
                0x008cc Mul_imm(2, 2, 0x34, u=False, v=False)            line: 954 Mul_imm(R2, R2, 52)  # R2 *= 13 words/char * 4 bytes/word.
                0x008d0 Add(0, 0, 2, u=False)                            line: 955 Add(R0, R0, R2)  # Point R0 to char's first word in font.
                0x008d4 And_imm(1, 1, 0x3, u=False, v=False)             line: 956 And_imm(R1, R1, 0b11)  # Which byte in the words?
                0x008d8 Add(0, 0, 1, u=False)                            line: 957 Add(R0, R0, R1)  # Point R0 to char's first byte in font.
                0x008dc Load_word(1, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008e0 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008e4 Mov_imm(2, 0xe, u=True, v=False)                 line: 172     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x008e8 Ior_imm(2, 2, 0x7f00, u=False, v=False)          line: 173     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x008ec Add(1, 1, 2, u=False)                            line: 961 Add(R1, R1, R2)  # R1 = x + DISPLAY_START
                0x008f0 Mov_imm(7, 0x2ff, u=False, v=False)              line: 962 Mov_imm(R7, 767)  # Display width - 1 in pixels. (TODO don't hardcod3 this.)
                0x008f4 Load_word(2, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008f8 Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008fc Mul_imm(2, 2, 0xd, u=False, v=False)             line: 964 Mul_imm(R2, R2, 13) # R2 = y in px  (13px/char height)
                0x00900 Sub(2, 7, 2, u=False)                            line: 965 Sub(R2, R7, R2)     # R2 = 768 - 1 - y
                0x00904 Lsl_imm(2, 2, 0x7, u=False, v=False)             line: 966 Lsl_imm(R2, R2, 7)  # R2 = (768 - 1 - y) * 128 bytes per line.
                0x00908 Add(1, 1, 2, u=False)                            line: 967 Add(R1, R1, R2)     # R1 = (768 - 1 - y) * 128 + x + DISPLAY_START
                0x0090c Mov_imm(2, 0xd, u=False, v=False)                line: 973 Mov_imm(R2, 13)  # Counter
    _pchr_loop: 0x00910 Load_byte(7, 0)                                  line: 976 Load_byte(R7, R0)
                0x00914 Store_byte(7, 1)                                 line: 978 Store_byte(R7, R1)
                0x00918 Add_imm(0, 0, 0x4, u=False, v=False)             line: 979 Add_imm(R0, R0, 4)
                0x0091c Sub_imm(1, 1, 0x80, u=False, v=False)            line: 980 Sub_imm(R1, R1, 128)
                0x00920 Sub_imm(2, 2, 0x1, u=False, v=False)             line: 981 Sub_imm(R2, R2, 1)
                0x00924 EQ_imm(0x1)                                      line: 982 EQ_imm(_pchr_done)
                0x00928 T_imm(0xfffff9)                                  line: 983 T_imm(_pchr_loop)
    _pchr_done: 0x0092c Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00930 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00934 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00938 T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       DUP_dfa: 0x0093c 0x000008a8                                       line: 122     dw(LINK) -- (in def_)
                0x00940 0x50554403                                       line: 131         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           DUP: 0x00944 0x00000948                                       line: 152     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00948 Load_word(0, 10)                                 line: 108     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x0094c Add_imm(10, 10, 0x4, u=False, v=False)           line: 109     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00950 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00954 Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00958 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 102     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0095c Store_word(0, 10)                                line: 103     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00960 Load_word(3, 14)                                 line:  82     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00964 Load_word(4, 3)                                  line:  83     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00968 Add_imm(14, 14, 0x4, u=False, v=False)           line:  84     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x0096c T(4)                                             line:  85     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      WORD_dfa: 0x002dc 0x00000228                                       line: 131     dw(LINK) -- (in def_)
                0x002e0 0x524f5704                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          WORD: 0x002e4 0x000002e8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
     _word_key: 0x002e8 Mov_imm(1, 0x258, u=False, v=False)              line: 187     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x002ec T_link(1)                                        line: 188     T_link(R1) -- (in busywait_on_serial_ready)
                0x002f0 Load_word(0, 1, offset=0xffffc)                  line: 424 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x002f4 Mov_imm(2, 0x29c, u=False, v=False)              line: 426 Mov_imm(R2, _skip_comment)  # Skip line comments.
                0x002f8 T_link(2)                                        line: 427 T_link(R2)
                0x002fc Mov_imm(1, 0x26c, u=False, v=False)              line: 429 Mov_imm(R1, _blank)  # Is it a space char?
                0x00300 T_link(1)                                        line: 430 T_link(R1)
                0x00304 EQ_imm(0xfffff8)                                 line: 431 EQ_imm(_word_key)  # then get another char
                0x00308 Mov_imm(6, 0x2bc, u=False, v=False)              line: 434 Mov_imm(word_pointer, WORD_BUFFER)
                0x0030c Mov_imm(5, 0x0, u=False, v=False)                line: 435 Mov_imm(word_counter, 0)
                0x00310 Store_word(5, 6)                                 line: 436 Store_word(word_counter, word_pointer)  # Zero out the first word of WORD_BUFFER.
                0x00314 Add_imm(6, 6, 0x1, u=False, v=False)             line: 439 Add_imm(word_pointer, word_pointer, 1)  # Leave a byte for the length.
  _find_length: 0x00318 Sub_imm(2, 5, 0x20, u=False, v=False)            line: 443 Sub_imm(R2, word_counter, 32)
                0x0031c EQ_imm(0xfffff2)                                 line: 444 EQ_imm(_word_key)  # try again.
                0x00320 Store_byte(0, 6)                                 line: 447 Store_byte(R0, word_pointer)
                0x00324 Add_imm(6, 6, 0x1, u=False, v=False)             line: 448 Add_imm(word_pointer, word_pointer, 1)
                0x00328 Add_imm(5, 5, 0x1, u=False, v=False)             line: 449 Add_imm(word_counter, word_counter, 1)
                0x0032c Mov_imm(1, 0x258, u=False, v=False)              line: 187     Mov_imm(R1, _KEY) -- (in busywait_on_serial_ready)
                0x00330 T_link(1)                                        line: 188     T_link(R1) -- (in busywait_on_serial_ready)
                0x00334 Load_word(0, 1, offset=0xffffc)                  line: 453 Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
                0x00338 Mov_imm(1, 0x26c, u=False, v=False)              line: 456 Mov_imm(R1, _blank)
                0x0033c T_link(1)                                        line: 457 T_link(R1)
                0x00340 NE_imm(0xfffff5)                                 line: 458 NE_imm(_find_length)  # No, keep getting chars to the buffer
                0x00344 Mov_imm(6, 0x2bc, u=False, v=False)              line: 462 Mov_imm(word_pointer, WORD_BUFFER)
                0x00348 Store_byte(5, 6)                                 line: 463 Store_byte(word_counter, word_pointer)
                0x0034c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00350 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00354 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00358 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      FIND_dfa: 0x0035c 0x000002dc                                       line: 131     dw(LINK) -- (in def_)
                0x00360 0x4e494604                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          FIND: 0x00364 0x00000368                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00368 Mov_imm(6, 0x2bc, u=False, v=False)              line: 476 Mov_imm(word_pointer, WORD_BUFFER)
                0x0036c Load_word(5, 6)                                  line: 478 Load_word(word_counter, word_pointer)
                0x00370 Mov_imm(2, 0xffff, u=True, v=False)              line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00374 Ior_imm(2, 2, 0xff7f, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00378 Mov_imm(0, 0x4e0, u=False, v=False)              line: 483 Mov_imm(R0, LATEST_var)
                0x0037c Load_word(0, 0)                                  line: 484 Load_word(R0, R0)          # Point R0 to latest word's LFA.
       _FIND_1: 0x00380 Load_word(1, 0, offset=0x4)                      line: 486 Load_word(R1, R0, 4)       # load a word of the name field.
                0x00384 And(1, 1, 2, u=False)                            line: 487 And(R1, R1, R2)            # Clear the IMMEDIATE flag, if any.
                0x00388 Sub(1, 1, 5, u=False)                            line: 488 Sub(R1, R1, word_counter)  # Compare.
                0x0038c EQ_imm(0x2)                                      line: 489 EQ_imm(_found)             # If this is the word...
                0x00390 Load_word(0, 0)                                  line: 495 Load_word(R0, R0)  # Load the address of the next link field into R0
                0x00394 NE_imm(0xfffffa)                                 line: 496 NE_imm(_FIND_1)  # Check the next word.
        _found: 0x00398 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x0039c Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x003a0 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x003a4 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x003a8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x003ac T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    NUMBER_dfa: 0x003b0 0x0000035c                                       line: 131     dw(LINK) -- (in def_)
                0x003b4 0x4d554e06                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        NUMBER: 0x003b8 0x000003bc                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x003bc Mov_imm(6, 0x2bc, u=False, v=False)              line: 535 Mov_imm(word_pointer, WORD_BUFFER)
                0x003c0 Load_byte(5, 6)                                  line: 536 Load_byte(word_counter, word_pointer)
                0x003c4 Mov_imm(2, 0x0, u=False, v=False)                line: 537 Mov_imm(R2, 0)  # use R2 as the accumulator for the number's value
                0x003c8 Add_imm(6, 6, 0x1, u=False, v=False)             line: 539 Add_imm(word_pointer, word_pointer, 1)  # Point to first char.
                0x003cc Load_byte(0, 6)                                  line: 540 Load_byte(R0, word_pointer)  # Load it.
                0x003d0 Sub_imm(0, 0, 0x24, u=False, v=False)            line: 541 Sub_imm(R0, R0, ord('$'))  # Is it a '$'?
                0x003d4 NE_imm(0xf)                                      line: 542 NE_imm(_NUM_fin)
                0x003d8 Sub_imm(5, 5, 0x1, u=False, v=False)             line: 545 Sub_imm(word_counter, word_counter, 1)  # we have parsed one '$' char.
      _NUM_hex: 0x003dc Add_imm(6, 6, 0x1, u=False, v=False)             line: 548 Add_imm(word_pointer, word_pointer, 1)  # Point to next char.
                0x003e0 Load_byte(0, 6)                                  line: 549 Load_byte(R0, word_pointer)  # Load it.
                0x003e4 Sub_imm(0, 0, 0x30, u=False, v=False)            line: 551 Sub_imm(R0, R0, ord('0'))
                0x003e8 LT_imm(0xa)                                      line: 552 LT_imm(_NUM_fin)  # Is its ASCII value lower than '0'?
                0x003ec Sub_imm(1, 0, 0x9, u=False, v=False)             line: 554 Sub_imm(R1, R0, 9)  # Is it 0-9?
                0x003f0 LE_imm(0x5)                                      line: 555 LE_imm(_NUM_add)  # It is!
                0x003f4 Sub_imm(0, 0, 0x31, u=False, v=False)            line: 561 Sub_imm(R0, R0, 49)  # so now '1'..'6' -> 0..5
                0x003f8 LT_imm(0x6)                                      line: 562 LT_imm(_NUM_fin)  # Its ASCII value is less than 'a', nope out.
                0x003fc Sub_imm(1, 0, 0x5, u=False, v=False)             line: 565 Sub_imm(R1, R0, 5)  # Is it a-f?
                0x00400 GT_imm(0x4)                                      line: 566 GT_imm(_NUM_fin)  # nope, nope out
                0x00404 Add_imm(0, 0, 0xa, u=False, v=False)             line: 568 Add_imm(R0, R0, 10)  # 0..5 -> 10..15
      _NUM_add: 0x00408 Add(2, 2, 0, u=False)                            line: 571 Add( R2, R2, R0)  # Add it to the accumulator.
                0x0040c Sub_imm(5, 5, 0x1, u=False, v=False)             line: 573 Sub_imm(word_counter, word_counter, 1)  # we have parsed a digit char.
                0x00410 NE_imm(0x8)                                      line: 574 NE_imm(_NUM_foo)  # More digits? Keep going.
      _NUM_fin: 0x00414 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00418 Store_word(2, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0041c Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00420 Store_word(5, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00424 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00428 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0042c Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00430 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      _NUM_foo: 0x00434 Lsl_imm(2, 2, 0x4, u=False, v=False)             line: 583 Lsl_imm(R2, R2, 4)  # accumulator *= 16
                0x00438 T_imm(0xffffe8)                                  line: 584 T_imm(_NUM_hex)  # Go get the next digit.
    CREATE_dfa: 0x0043c 0x000003b0                                       line: 131     dw(LINK) -- (in def_)
                0x00440 0x45524306                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        CREATE: 0x00444 0x00000448                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00448 Mov_imm(0, 0x4b4, u=False, v=False)              line: 595 Mov_imm(R0, HERE__var)  # R0 <- &HERE
                0x0044c Load_word(0, 0)                                  line: 596 Load_word(R0, R0)       # R0 <- ram[HERE]
                0x00450 Mov_imm(1, 0x4e0, u=False, v=False)              line: 598 Mov_imm(R1, LATEST_var)  # R1 <- &LATEST
                0x00454 Load_word(2, 1)                                  line: 599 Load_word(R2, R1)        # R2 <- ram[LATEST]
                0x00458 Store_word(2, 0)                                 line: 601 Store_word(R2, R0)  # value of LATEST -> ram[HERE]
                0x0045c Store_word(0, 1)                                 line: 602 Store_word(R0, R1)  # value of HERE (now LFA for new word) -> ram[LATEST_var]
                0x00460 Add_imm(0, 0, 0x4, u=False, v=False)             line: 604 Add_imm(R0, R0, 4)  # HERE += 4
                0x00464 Mov_imm(6, 0x2bc, u=False, v=False)              line: 607 Mov_imm(word_pointer, WORD_BUFFER)
                0x00468 Load_word(1, 6)                                  line: 618 Load_word(R1, word_pointer)  # Get the word from WORD_BUFFER.
                0x0046c Store_word(1, 0)                                 line: 619 Store_word(R1, R0)  # Store word to HERE.
                0x00470 Add_imm(0, 0, 0x4, u=False, v=False)             line: 620 Add_imm(R0, R0, 4)  # HERE += 4
                0x00474 Mov_imm(1, 0x4b4, u=False, v=False)              line: 630 Mov_imm(R1, HERE__var)  # R1 <- &HERE
                0x00478 Store_word(0, 1)                                 line: 631 Store_word(R0, R1)      # value of HERE -> ram[HERE]
                0x0047c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00480 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00484 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00488 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     HERE__dfa: 0x0048c 0x0000043c                                       line: 131     dw(LINK) -- (in def_)
                0x00490 0x52454804                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         HERE_: 0x00494 0x00000498                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00498 Mov_imm(0, 0x4b4, u=False, v=False)              line: 171     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x0049c Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004a0 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004a4 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x004a8 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x004ac Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x004b0 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     HERE__var: 0x004b4 0x0000096c                                       line: 176     dw(initial) -- (in defvar)
    LATEST_dfa: 0x004b8 0x0000048c                                       line: 131     dw(LINK) -- (in def_)
                0x004bc 0x54414c06                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        LATEST: 0x004c0 0x000004c4                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x004c4 Mov_imm(0, 0x4e0, u=False, v=False)              line: 171     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x004c8 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004cc Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004d0 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x004d4 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x004d8 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x004dc T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    LATEST_var: 0x004e0 0x00000938                                       line: 176     dw(initial) -- (in defvar)
     STATE_dfa: 0x004e4 0x000004b8                                       line: 131     dw(LINK) -- (in def_)
                0x004e8 0x41545305                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         STATE: 0x004ec 0x000004f0                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x004f0 Mov_imm(0, 0x50c, u=False, v=False)              line: 171     Mov_imm(R0, LABEL_var) -- (in defvar)
                0x004f4 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x004f8 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x004fc Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00500 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00504 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00508 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     STATE_var: 0x0050c 0x00000000                                       line: 176     dw(initial) -- (in defvar)
     COMMA_dfa: 0x00510 0x000004e4                                       line: 131     dw(LINK) -- (in def_)
                0x00514 0x00002c01                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         COMMA: 0x00518 0x0000051c                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x0051c Load_word(2, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00520 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00524 Mov_imm(1, 0x53c, u=False, v=False)              line: 656 Mov_imm(R1, _COMMA)
                0x00528 T_link(1)                                        line: 657 T_link(R1)
                0x0052c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00530 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00534 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00538 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
        _COMMA: 0x0053c Mov_imm(0, 0x4b4, u=False, v=False)              line: 666 Mov_imm(R0, HERE__var)  # R0 <- &HERE
                0x00540 Load_word(1, 0)                                  line: 667 Load_word(R1, R0)       # R1 <- ram[HERE]
                0x00544 Store_word(2, 1)                                 line: 668 Store_word(R2, R1)      # R2 -> ram[HERE]
                0x00548 Add_imm(1, 1, 0x4, u=False, v=False)             line: 669 Add_imm(R1, R1, 4)      # HERE += 4
                0x0054c Store_word(1, 0)                                 line: 670 Store_word(R1, R0)      # HERE -> ram[HERE]
                0x00550 T(15)                                            line: 671 T(15)  # return
     LBRAC_dfa: 0x00554 0x00000510                                       line: 131     dw(LINK) -- (in def_)
                0x00558 0x00005b81                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         LBRAC: 0x0055c 0x00000560                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00560 Mov_imm(0, 0x50c, u=False, v=False)              line: 685 Mov_imm(R0, STATE_var)
                0x00564 Mov_imm(1, 0x0, u=False, v=False)                line: 686 Mov_imm(R1, 0)
                0x00568 Store_word(1, 0)                                 line: 687 Store_word(R1, R0)
                0x0056c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00570 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00574 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00578 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     RBRAC_dfa: 0x0057c 0x00000554                                       line: 131     dw(LINK) -- (in def_)
                0x00580 0x00005d01                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         RBRAC: 0x00584 0x00000588                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00588 Mov_imm(0, 0x50c, u=False, v=False)              line: 691 Mov_imm(R0, STATE_var)
                0x0058c Mov_imm(1, 0x1, u=False, v=False)                line: 692 Mov_imm(R1, 1)
                0x00590 Store_word(1, 0)                                 line: 693 Store_word(R1, R0)
                0x00594 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00598 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0059c Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x005a0 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     COLON_dfa: 0x005a4 0x0000057c                                       line: 131     dw(LINK) -- (in def_)
                0x005a8 0x00003a01                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         COLON: 0x005ac 0x00000028                                       line: 153     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x005b0 0x000002e4                                       line: 716 dw(WORD)  # "Get the name of the new word"
                0x005b4 0x00000444                                       line: 717 dw(CREATE)  # "CREATE the dictionary entry / header"
                0x005b8 0x000000c8                                       line: 718 dw(LIT)  # "Append DOCOL  (the codeword)."
                0x005bc 0x00000028                                       line: 719 dw(DOCOL)
                0x005c0 0x00000518                                       line: 720 dw(COMMA)
                0x005c4 0x000004c0                                       line: 721 dw(LATEST)  # "Make the word hidden (see below for definition)."
                0x005c8 0x000006f4                                       line: 722 dw(FETCH)
                0x005cc 0x00000640                                       line: 723 dw(HIDDEN)
                0x005d0 0x00000584                                       line: 724 dw(RBRAC)  # "Go into compile mode."
                0x005d4 0x000000a4                                       line: 725 dw(EXIT)  # "Return from the function."
 SEMICOLON_dfa: 0x005d8 0x000005a4                                       line: 131     dw(LINK) -- (in def_)
                0x005dc 0x00003b81                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     SEMICOLON: 0x005e0 0x00000028                                       line: 153     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x005e4 0x000000c8                                       line: 734 dw(LIT)  # "Append EXIT (so the word will return)."
                0x005e8 0x000000a4                                       line: 735 dw(EXIT)
                0x005ec 0x00000518                                       line: 736 dw(COMMA)
                0x005f0 0x000004c0                                       line: 737 dw(LATEST)  # "Toggle hidden flag -- unhide the word (see below for definition)."
                0x005f4 0x000006f4                                       line: 738 dw(FETCH)
                0x005f8 0x00000640                                       line: 739 dw(HIDDEN)
                0x005fc 0x0000055c                                       line: 740 dw(LBRAC)  # "Go back to IMMEDIATE mode."
                0x00600 0x000000a4                                       line: 741 dw(EXIT)  # "Return from the function."
 IMMEDIATE_dfa: 0x00604 0x000005d8                                       line: 131     dw(LINK) -- (in def_)
                0x00608 0x4d4d4989                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     IMMEDIATE: 0x0060c 0x00000610                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00610 Mov_imm(0, 0x4e0, u=False, v=False)              line: 750 Mov_imm(R0, LATEST_var)  # R0 <- &LATEST
                0x00614 Load_word(1, 0)                                  line: 751 Load_word(R1, R0)        # R1 <- ram[LATEST]
                0x00618 Add_imm(1, 1, 0x4, u=False, v=False)             line: 752 Add_imm(R1, R1, 4)       # "Point to name/flags byte."
                0x0061c Load_word(0, 1)                                  line: 753 Load_word(R0, R1)
                0x00620 Xor_imm(0, 0, 0x80, u=False, v=False)            line: 754 Xor_imm(R0, R0, F_IMMED) # Toggle IMMEDIATE bit.
                0x00624 Store_word(0, 1)                                 line: 755 Store_word(R0, R1)
                0x00628 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0062c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00630 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00634 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    HIDDEN_dfa: 0x00638 0x00000604                                       line: 131     dw(LINK) -- (in def_)
                0x0063c 0x44494806                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        HIDDEN: 0x00640 0x00000644                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00644 Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00648 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0064c Add_imm(1, 1, 0x4, u=False, v=False)             line: 766 Add_imm(R1, R1, 4)  # "Point to name/flags byte."
                0x00650 Load_word(0, 1)                                  line: 767 Load_word(R0, R1)
                0x00654 Xor_imm(0, 0, 0x20, u=False, v=False)            line: 768 Xor_imm(R0, R0, F_HIDDEN)  # "Toggle the HIDDEN bit."
                0x00658 Store_word(0, 1)                                 line: 769 Store_word(R0, R1)
                0x0065c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00660 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00664 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00668 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
      TICK_dfa: 0x0066c 0x00000638                                       line: 131     dw(LINK) -- (in def_)
                0x00670 0x00002701                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
          TICK: 0x00674 0x00000678                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00678 Load_word(0, 14)                                 line: 786 Load_word(R0, IP)   # Get the address of the next codeword.
                0x0067c Add_imm(14, 14, 0x4, u=False, v=False)           line: 787 Add_imm(IP, IP, 4)  # Skip it.
                0x00680 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00684 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00688 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0068c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00690 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00694 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    BRANCH_dfa: 0x00698 0x0000066c                                       line: 131     dw(LINK) -- (in def_)
                0x0069c 0x41524206                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
        BRANCH: 0x006a0 0x000006a4                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006a4 Load_word(0, 14)                                 line: 798 Load_word(R0, IP)  # Get the offset.
                0x006a8 Add(14, 14, 0, u=False)                          line: 800 Add(IP, IP, R0)    # IP += offset
                0x006ac Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x006b0 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x006b4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x006b8 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
   ZBRANCH_dfa: 0x006bc 0x00000698                                       line: 131     dw(LINK) -- (in def_)
                0x006c0 0x52423007                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
       ZBRANCH: 0x006c4 0x000006c8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006c8 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x006cc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x006d0 Add_imm(0, 0, 0x0, u=False, v=False)             line: 811 Add_imm(R0, R0, 0)  # Set condition flags.
                0x006d4 EQ_imm(0xfffff3)                                 line: 812 EQ_imm(BRANCH + 4)  # Zero? Delegate to BRANCH.
                0x006d8 Add_imm(14, 14, 0x4, u=False, v=False)           line: 813 Add_imm(IP, IP, 4)  # Non-zero? Skip offset.
                0x006dc Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x006e0 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x006e4 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x006e8 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     FETCH_dfa: 0x006ec 0x000006bc                                       line: 131     dw(LINK) -- (in def_)
                0x006f0 0x00004001                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         FETCH: 0x006f4 0x000006f8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x006f8 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x006fc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00700 Load_word(0, 0)                                  line: 824 Load_word(R0, R0)
                0x00704 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00708 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0070c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00710 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00714 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00718 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
     STORE_dfa: 0x0071c 0x000006ec                                       line: 131     dw(LINK) -- (in def_)
                0x00720 0x00002101                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
         STORE: 0x00724 0x00000728                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00728 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x0072c Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00730 Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00734 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00738 Store_word(1, 0)                                 line: 837 Store_word(R1, R0)
                0x0073c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00740 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00744 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00748 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
 IS_NUMBER_dfa: 0x0074c 0x0000071c                                       line: 131     dw(LINK) -- (in def_)
                0x00750 0x003f2302                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     IS_NUMBER: 0x00754 0x00000758                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00758 Mov_imm(6, 0x2bc, u=False, v=False)              line: 853 Mov_imm(word_pointer, WORD_BUFFER)
                0x0075c Load_byte(0, 6, offset=0x1)                      line: 854 Load_byte(R0, word_pointer, 1)  # Load first char of word.
                0x00760 Sub_imm(0, 0, 0x24, u=False, v=False)            line: 855 Sub_imm(R0, R0, ord('$'))  # Is it a '$'?
                0x00764 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00768 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0076c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00770 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00774 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00778 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
 INTERPRET_dfa: 0x0077c 0x0000074c                                       line: 131     dw(LINK) -- (in def_)
                0x00780 0x544e4909                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
     INTERPRET: 0x00784 0x00000028                                       line: 153     dw(DOCOL)  # codeword points to DOCOL colon word mini-interpreter. -- (in defword)
                0x00788 0x000002e4                                       line: 866 dw(WORD)
                0x0078c 0x00000754                                       line: 867 dw(IS_NUMBER)
                0x00790 0x000006c4                                       line: 868 dw(ZBRANCH)
                0x00794 0x0000001c                                       line: 869 dw(s_to_u_32(4 * 7))  # It could be a number...
                0x00798 0x00000364                                       line: 872 dw(FIND)
                0x0079c 0x00000940                                       line: 873 dw(DUP)
                0x007a0 0x000006c4                                       line: 874 dw(ZBRANCH)  # Zero means it wasn't in the dictionary,
                0x007a4 0x0000001c                                       line: 875 dw(s_to_u_32(4 * 7))
                0x007a8 0x000007f4                                       line: 878 dw(_INTERP)
                0x007ac 0x000000a4                                       line: 879 dw(EXIT)
                0x007b0 0x000003b8                                       line: 882 dw(NUMBER)
                0x007b4 0x00000940                                       line: 883 dw(DUP)
                0x007b8 0x000006c4                                       line: 884 dw(ZBRANCH)  # No chars left?  It is a number!
                0x007bc 0x00000008                                       line: 885 dw(s_to_u_32(4 * 2))
                0x007c0 0x000000a4                                       line: 889 dw(EXIT)
                0x007c4 0x00000084                                       line: 892 dw(DROP)
                0x007c8 0x000004ec                                       line: 896 dw(STATE)
                0x007cc 0x000006f4                                       line: 897 dw(FETCH)
                0x007d0 0x000006c4                                       line: 898 dw(ZBRANCH)  #  STATE = 0 -> interpreting.
                0x007d4 0x00000014                                       line: 899 dw(s_to_u_32(4 * 5))  # to EXIT
                0x007d8 0x000000c8                                       line: 902 dw(LIT)
                0x007dc 0x000000c8                                       line: 903 dw(LIT)
                0x007e0 0x00000518                                       line: 904 dw(COMMA)  # write the address of the codeword of LIT
                0x007e4 0x00000518                                       line: 905 dw(COMMA)  # then the value itself.
                0x007e8 0x000000a4                                       line: 907 dw(EXIT)  # Just leave the number itself on the stack.
   _INTERP_dfa: 0x007ec 0x0000077c                                       line: 131     dw(LINK) -- (in def_)
                0x007f0 0x4e495f27                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
       _INTERP: 0x007f4 0x000007f8                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x007f8 Load_word(2, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x007fc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x00800 Mov_imm(0, 0x50c, u=False, v=False)              line: 915 Mov_imm(R0, STATE_var)  # R0 <- &STATE
                0x00804 Load_word(0, 0)                                  line: 916 Load_word(R0, R0)  # R0 <- ram[STATE]
                0x00808 EQ_imm(0xa)                                      line: 917 EQ_imm(_intrp_exe)  # STATE = 0 -> interpreting.
                0x0080c Load_word(0, 2, offset=0x4)                      line: 918 Load_word(R0, R2, 4)  # R0 <- Name field
                0x00810 And_imm(0, 0, 0x80, u=False, v=False)            line: 919 And_imm(R0, R0, F_IMMED)
                0x00814 NE_imm(0x7)                                      line: 920 NE_imm(_intrp_exe)  # word is IMMEDIATE.
                0x00818 Add_imm(2, 2, 0x8, u=False, v=False)             line: 923 Add_imm(R2, R2, 8)  # Point from LFA to codeword.
                0x0081c Mov_imm(1, 0x53c, u=False, v=False)              line: 924 Mov_imm(R1, _COMMA)  # Call comma to store it and increment HERE.
                0x00820 T_link(1)                                        line: 925 T_link(R1)
                0x00824 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00828 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0082c Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00830 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
    _intrp_exe: 0x00834 Add_imm(2, 2, 0x8, u=False, v=False)             line: 929 Add_imm(R2, R2, 8)  # Point to the codeword
                0x00838 Load_word(0, 2)                                  line: 930 Load_word(R0, R2)  # Get the address to which its codeword points...
                0x0083c Mov(3, 2, u=False)                               line: 931 Mov(next_function, R2)  # DOCOL depends on this.
                0x00840 T(0)                                             line: 932 T(R0)  # and jump to it.
       PAI_dfa: 0x00844 0x000007ec                                       line: 131     dw(LINK) -- (in def_)
                0x00848 0x69617003                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           PAI: 0x0084c 0x00000850                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00850 Mov_imm(0, 0xe, u=True, v=False)                 line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00854 Ior_imm(0, 0, 0x7f00, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00858 Mov_imm(1, 0x1, u=True, v=False)                 line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x0085c Ior_imm(1, 1, 0x8000, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00860 Mov_imm(8, 0xffff, u=True, v=False)              line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x00864 Ior_imm(8, 8, 0xffff, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x00868 Add(1, 1, 0, u=False)                            line: 954 Add(R1, R1, R0)
                0x0086c Sub_imm(0, 0, 0x4e0, u=False, v=False)           line: 955 Sub_imm(R0, R0, 312 * 4)  # 312 words in font data.
                0x00870 Mov_imm(2, 0x138, u=False, v=False)              line: 956 Mov_imm(R2, 13 * 24)
     _pai_loop: 0x00874 Load_word(7, 0)                                  line: 959 Load_word(R7, R0)
                0x00878 Xor(7, 7, 8, u=False)                            line: 960 Xor(R7, R7, R8)  #  Reverse video.
                0x0087c Store_word(7, 1)                                 line: 961 Store_word(R7, R1)
                0x00880 Add_imm(0, 0, 0x4, u=False, v=False)             line: 962 Add_imm(R0, R0, 4)
                0x00884 Sub_imm(1, 1, 0x80, u=False, v=False)            line: 963 Sub_imm(R1, R1, 128)
                0x00888 Sub_imm(2, 2, 0x1, u=False, v=False)             line: 964 Sub_imm(R2, R2, 1)
                0x0088c EQ_imm(0x1)                                      line: 965 EQ_imm(_pai_done)
                0x00890 T_imm(0xfffff8)                                  line: 966 T_imm(_pai_loop)
     _pai_done: 0x00894 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00898 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x0089c Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x008a0 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
PAINT_CHAR_dfa: 0x008a4 0x00000844                                       line: 131     dw(LINK) -- (in def_)
                0x008a8 0x6961700a                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
    PAINT_CHAR: 0x008ac 0x000008b0                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x008b0 Mov_imm(0, 0xe, u=True, v=False)                 line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x008b4 Ior_imm(0, 0, 0x7a20, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x008b8 Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008bc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008c0 Sub_imm(1, 1, 0x21, u=False, v=False)            line: 1000 Sub_imm(R1, R1, ord('!'))  # R1 counts byte offset of char.
                0x008c4 Asr_imm(2, 1, 0x2, u=False, v=False)             line: 1002 Asr_imm(R2, R1, 2)     # R2 = R1 / 4  Trim the two least bits.
                0x008c8 Mul_imm(2, 2, 0x34, u=False, v=False)            line: 1003 Mul_imm(R2, R2, 52)    # R2 *= 13 words/char * 4 bytes/word.
                0x008cc Add(0, 0, 2, u=False)                            line: 1004 Add(R0, R0, R2)        # Point R0 to char's first word in font.
                0x008d0 And_imm(1, 1, 0x3, u=False, v=False)             line: 1005 And_imm(R1, R1, 0b11)  # Which byte in the word?
                0x008d4 Add(0, 0, 1, u=False)                            line: 1006 Add(R0, R0, R1)        # Point R0 to char's first byte in font.
                0x008d8 Load_word(1, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008dc Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008e0 Mov_imm(2, 0xe, u=True, v=False)                 line: 181     Mov_imm(reg, HIGH(word), u=1) -- (in move_immediate_word_to_register)
                0x008e4 Ior_imm(2, 2, 0x7f00, u=False, v=False)          line: 182     Ior_imm(reg, reg, LOW(word)) -- (in move_immediate_word_to_register)
                0x008e8 Add(1, 1, 2, u=False)                            line: 1010 Add(R1, R1, R2)     # R1 = x + DISPLAY_START
                0x008ec Mov_imm(7, 0x2ff, u=False, v=False)              line: 1011 Mov_imm(R7, 767)    # Display width - 1 in pixels. (TODO don't hardcod3 this.)
                0x008f0 Load_word(2, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x008f4 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x008f8 Mul_imm(2, 2, 0xd, u=False, v=False)             line: 1013 Mul_imm(R2, R2, 13) # R2 = y in px  (13px/char height)
                0x008fc Sub(2, 7, 2, u=False)                            line: 1014 Sub(R2, R7, R2)     # R2 = 768 - 1 - y
                0x00900 Lsl_imm(2, 2, 0x7, u=False, v=False)             line: 1015 Lsl_imm(R2, R2, 7)  # R2 = (768 - 1 - y) * 128 bytes per line.
                0x00904 Add(1, 1, 2, u=False)                            line: 1016 Add(R1, R1, R2)     # R1 = (768 - 1 - y) * 128 + x + DISPLAY_START
                0x00908 Mov_imm(2, 0xd, u=False, v=False)                line: 1022 Mov_imm(R2, 13)  # Counter
    _pchr_loop: 0x0090c Load_byte(7, 0)                                  line: 1025 Load_byte(R7, R0)
                0x00910 Store_byte(7, 1)                                 line: 1027 Store_byte(R7, R1)
                0x00914 Add_imm(0, 0, 0x4, u=False, v=False)             line: 1028 Add_imm(R0, R0, 4)
                0x00918 Sub_imm(1, 1, 0x80, u=False, v=False)            line: 1029 Sub_imm(R1, R1, 128)
                0x0091c Sub_imm(2, 2, 0x1, u=False, v=False)             line: 1030 Sub_imm(R2, R2, 1)
                0x00920 EQ_imm(0x1)                                      line: 1031 EQ_imm(_pchr_done)
                0x00924 T_imm(0xfffff9)                                  line: 1032 T_imm(_pchr_loop)
    _pchr_done: 0x00928 Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x0092c Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00930 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00934 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)
       DUP_dfa: 0x00938 0x000008a4                                       line: 131     dw(LINK) -- (in def_)
                0x0093c 0x50554403                                       line: 140         dw((a<<24) + (b<<16) + (c<<8) + d) -- (in def_)
           DUP: 0x00940 0x00000944                                       line: 161     dw(HERE() + 4)  # codeword points to ASM immediately following. -- (in defcode)
                0x00944 Load_word(0, 10)                                 line: 117     Load_word(reg, Dstack)      # reg <- RAM[Dstack] -- (in POP)
                0x00948 Add_imm(10, 10, 0x4, u=False, v=False)           line: 118     Add_imm(Dstack, Dstack, 4)  # Dstack += 4 -- (in POP)
                0x0094c Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00950 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x00954 Sub_imm(10, 10, 0x4, u=False, v=False)           line: 111     Sub_imm(Dstack, Dstack, 4)  # Dstack -= 4 -- (in PUSH)
                0x00958 Store_word(0, 10)                                line: 112     Store_word(reg, Dstack)     # reg -> RAM[Dstack] -- (in PUSH)
                0x0095c Load_word(3, 14)                                 line:  91     Load_word(next_function, IP)        # next_function <- RAM[IP] -- (in NEXT)
                0x00960 Load_word(4, 3)                                  line:  92     Load_word(codeword, next_function)  # codeword <- RAM[next_function] -- (in NEXT)
                0x00964 Add_imm(14, 14, 0x4, u=False, v=False)           line:  93     Add_imm(IP, IP, 4)                  # IP += 4 -- (in NEXT)
                0x00968 T(4)                                             line:  94     T(codeword)                         # PC <- RAM[codeword] -- (in NEXT)

M forth/oberonforth.bin => forth/oberonforth.bin +0 -0
M forth/oberonforth.oberonforth => forth/oberonforth.oberonforth +2 -0
@@ 35,3 35,5 @@
$2 Hi
$3 Hi
$4 Hi

pai

M forth/oberonforth.py => forth/oberonforth.py +124 -78
@@ 27,6 27,15 @@
Now that I have an emulator and assembler the obvious thing to do is
implement a Forth.  I grabbed a copy of Jonesforth and set to.
'''

# In re: the FIGlet banners, I use: http://www.patorjk.com/software/taag/

# (My eyesight is not great, I lost my glasses, and I'm using
# a TV as a monitor, so I use these FIGlet banners to help me
# navigate.  Normally code has a lot of visual structure that
# helps with that, but asm is linear.)


# The chip uses two's complement.
from oberon.util import s_to_u_32



@@ 191,10 200,6 @@ negative_offset_24 = lambda n: s_to_u_32(n) & 0xffffff
negative_offset_20 = lambda n: s_to_u_32(n) & 0x0fffff


# FIGlet SaaS:
# http://www.patorjk.com/software/taag/


##  _              _
## | |__  ___ __ _(_)_ _
## | '_ \/ -_) _` | | ' \


@@ 225,8 230,6 @@ label(main)
Mov_imm(Dstack, DATA_STACK)
Mov_imm(Rstack, RETURN_STACK)
Mov_imm(IP, cold_start)
##Mov_imm(R1, 38)  # push ASCII '&' onto stack
##PUSH(R1)
NEXT()




@@ 236,9 239,9 @@ NEXT()
## \__\___/_\__,_|_/__/\__\__,_|_|  \__|
##              |___|
label(cold_start)
dw(REPL)
#dw(QUIT)  # IP starts pointing here so this RAM address must
          # contain the address of the codeword of QUIT.
dw(REPL)  # IP set to point here at start
# so this RAM address must contain the address
# of the codeword of REPL.


##                    _


@@ 249,7 252,7 @@ dw(REPL)
defword(b'REPL', REPL)
dw(INTERPRET)
dw(BRANCH)
dw(s_to_u_32(-8))
dw(s_to_u_32(-8))  # Loop back to INTERPRET.


defcode(b'DROP', DROP)


@@ 263,16 266,16 @@ NEXT()


defcode(b'LIT', LIT)
Load_word(R0, IP)  # Don't run the next word, load it,
PUSH(R0)  # push the value,
Add_imm(IP, IP, 4)  # then skip it and run the word after it (EXIT).
Load_word(R0, IP)   # Don't run the next cell, load it,
PUSH(R0)            # push the value,
Add_imm(IP, IP, 4)  # then skip it.
NEXT()


defcode(b'SWAP', SWAP)
POP(R0)
Load_word(1, 10)
Store_word(0, 10)
Load_word(R1, 10)
Store_word(R0, 10)
PUSH(R1)
NEXT()



@@ 334,7 337,7 @@ NEXT()
##  __|_|\_\___| |_|
## |___|
#
# subroutine to busywait on serial port status.
# Subroutine to busywait on serial port status.
# Sets R1 to point to SERIAL_STATUS i/o port.
# Clobbers R2.



@@ 349,13 352,21 @@ EQ_imm(negative_offset_24(-8))  # if R2==0 repeat
T(15)  # return


##     _    _           _
##    | |__| |__ _ _ _ | |__
##    | '_ \ / _` | ' \| / /
##  __|_.__/_\__,_|_||_|_\_\
## |___|
#
# Subroutine to check for blank space.
# Expects a char in R0.
# Clobbers R2.
# Sets Z flag to indicate blank space.
#       9,   10,     11,     12,   13,  32
#    '\t', '\n', '\x0b', '\x0c', '\r', ' '
# Check for most common (' ' and '\n') first.

label(_blank)
# Expects a char in R0
# clobbers R2
# sets Z flag to indicate blank space.
#    [   9,   10,     11,     12,   13,  32]
#    ['\t', '\n', '\x0b', '\x0c', '\r', ' ']
Sub_imm(R2, R0, 32)  # Is it a space char?
EQ(15)
Sub_imm(R2, R0, 10)  # Is it a newline char?


@@ 369,21 380,28 @@ EQ(15)
Sub_imm(R2, R0, 13)  # Is it a carriage return char?
T(15)  # return


label(_skip_comment)
##        _   _                                   _
##     __| |_(_)_ __   __ ___ _ __  _ __  ___ _ _| |_
##    (_-< / / | '_ \ / _/ _ \ '  \| '  \/ -_) ' \  _|
##  __/__/_\_\_| .__/_\__\___/_|_|_|_|_|_\___|_||_\__|
## |___|       |_| |___|
#
# Subroutine to skip line ('\...') comments.
# Expects a char in R0,
# and for R1 to already be set to SERIAL_STATUS.
# clobbers R2
Sub_imm(R2, R0, ord('\\'))  # Is it a \ char?
NE(15)  # It's not a \ char, return.
# Clobbers R2.

label(_skip_comment)
Sub_imm(R2, R0, ord('\\'))  # Is it a '\' char?
NE(15)                      # It's not a '\' char, return.
# Consume chars until the next newline.
label(_skip_cmt_loop)  # repeat
Load_word(R2, R1)  # Get the serial port status.
EQ_imm(_skip_cmt_loop)  # until serial port status != 0
label(_skip_cmt_loop)   # repeat...
Load_word(R2, R1)           # Get the serial port status.
EQ_imm(_skip_cmt_loop)      # until serial port status != 0
Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.
Sub_imm(R2, R0, ord('\n'))  # Is it a newline char?
EQ(15)  # We have reached the end of the line, return.
T_imm(_skip_cmt_loop)
T_imm(_skip_cmt_loop)   # ...until newline.


## __      _____  ___ ___


@@ 405,11 423,10 @@ label(_word_key)  # <=================================( _word_key )======
busywait_on_serial_ready()
Load_word(R0, R1, negative_offset_20(-4))  # serial port is 4 bytes lower.

Mov_imm(R2, _skip_comment)
Mov_imm(R2, _skip_comment)  # Skip line comments.
T_link(R2)

# Is it a space char?
Mov_imm(R1, _blank)
Mov_imm(R1, _blank)  # Is it a space char?
T_link(R1)
EQ_imm(_word_key)  # then get another char



@@ 417,15 434,10 @@ EQ_imm(_word_key)  # then get another char
Mov_imm(word_pointer, WORD_BUFFER)
Mov_imm(word_counter, 0)
Store_word(word_counter, word_pointer)  # Zero out the first word of WORD_BUFFER.
# We use it for FIND so any leftover chars will mess up the buffer for words of
# just of length 1 or 2.
# We use it for FIND so any leftover chars will mess it up for short words (of
# length 1 or 2.)
Add_imm(word_pointer, word_pointer, 1)  # Leave a byte for the length.


# I think we're going to want to put the length in the first
# byte of the buffer to make word-by-word comparison easier?
# (For finding words in the dictionary.)

# Have we overflowed the buffer yet?
label(_find_length)  # <==============================( _find_length )===
Sub_imm(R2, word_counter, 32)


@@ 469,12 481,12 @@ Load_word(word_counter, word_pointer)
move_immediate_word_to_register(R2, FIND_MASK)

Mov_imm(R0, LATEST_var)
Load_word(R0, R0)  # Point R0 to latest word's LFA.
Load_word(R0, R0)          # Point R0 to latest word's LFA.
label(_FIND_1)  # <==============================( _FIND_1 )===
Load_word(R1, R0, 4)  # load a word of the name field.
And(R1, R1, R2)  # Clear the IMMEDIATE flag, if any.
Load_word(R1, R0, 4)       # load a word of the name field.
And(R1, R1, R2)            # Clear the IMMEDIATE flag, if any.
Sub(R1, R1, word_counter)  # Compare.
EQ_imm(_found)  # If this is the word...
EQ_imm(_found)             # If this is the word...
# The two word are the same: same count and same first three letters.
# That's plenty for now.  (I believe I've heard of Chuck Moore using
# this heuristic.)


@@ 498,6 510,7 @@ NEXT()
# To keep things simple, numbers are in hexidecimal only (no BASE)
# and must begin with a '$' and {abcdef} must be lowercase.
# No negative literals (subtract from zero to get negative numbers.)

defcode(b'NUMBER', NUMBER)

## ASCII ch


@@ 580,14 593,15 @@ defcode(b'CREATE', CREATE)

# Link field.
Mov_imm(R0, HERE__var)  # R0 <- &HERE
Load_word(R0, R0)  # R0 <- ram[HERE]
Load_word(R0, R0)       # R0 <- ram[HERE]

Mov_imm(R1, LATEST_var)  # R1 <- &LATEST
Load_word(R2, R1)  # R2 <- ram[LATEST]
Load_word(R2, R1)        # R2 <- ram[LATEST]

Store_word(R2, R0)  # value of LATEST -> ram[HERE]
Store_word(R0, R1)  # value of HERE (now dfa for new word) -> ram[LATEST_var]
Store_word(R0, R1)  # value of HERE (now LFA for new word) -> ram[LATEST_var]

Add_imm(R0, R0, 4)  # HERE += 4
# I think that's right...

# Name field.
Mov_imm(word_pointer, WORD_BUFFER)


@@ 611,9 625,10 @@ Add_imm(R0, R0, 4)  # HERE += 4
##T_imm(_CREATE_loop)
##
##label(_CREATE_fin)  # <==========================( _CREATE_fin )===

# Update HERE.
Mov_imm(R1, HERE__var)  # R1 <- &HERE
Store_word(R0, R1)
Store_word(R0, R1)      # value of HERE -> ram[HERE]
NEXT()




@@ 642,12 657,17 @@ Mov_imm(R1, _COMMA)
T_link(R1)
NEXT()

# Subroutine to store a value to HERE and
# increment HERE (by four bytes to the next word.)
# Expects the value in R2.
# Clobbers R0 and R1.
# Used in _INTERP.
label(_COMMA)
Mov_imm(R0, HERE__var)  # R0 <- &HERE
Load_word(R1, R0)  # R1 <- ram[&HERE]
Store_word(R2, R1)  # R2 -> ram[HERE]
Add_imm(R1, R1, 4)
Store_word(R1, R0)  # R1+4 -> ram[&HERE]
Load_word(R1, R0)       # R1 <- ram[HERE]
Store_word(R2, R1)      # R2 -> ram[HERE]
Add_imm(R1, R1, 4)      # HERE += 4
Store_word(R1, R0)      # HERE -> ram[HERE]
T(15)  # return




@@ 656,6 676,10 @@ T(15)  # return
## | |  > _|_ _|  | |
## | |  \_____|   | |
## |__|          |__|
#
# Switch off ('[' executing)
#     and on (']' compiling)
# the STATE variable.

defcode(b'[', LBRAC, F_IMMED)
Mov_imm(R0, STATE_var)


@@ 670,9 694,18 @@ Store_word(R1, R0)
NEXT()


#    : : WORD CREATE LIT DOCOL , LATEST @ HIDDEN ] ;
#    : ;             LIT EXIT  , LATEST @ HIDDEN [ ;

# If COLON and SEMICOLON were defined in Forth
# they might look like this:
#
# : : WORD CREATE LIT DOCOL , LATEST @ HIDDEN ] ;
# : ;             LIT EXIT  , LATEST @ HIDDEN [ ;
#                 ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^
#                      |             |        |
#                 Store a CFA        |        |
#                                    |        |
#         Toggle hidden bit on current word.  |
#                                             |
#                    Switch on/off compiling mode.

##   ___ ___  _    ___  _  _
##  / __/ _ \| |  / _ \| \| |


@@ 715,10 748,10 @@ dw(EXIT)  # "Return from the function."

defcode(b'IMMEDIATE', IMMEDIATE, F_IMMED)
Mov_imm(R0, LATEST_var)  # R0 <- &LATEST
Load_word(R1, R0)  # R1 <- ram[LATEST]
Add_imm(R1, R1, 4)  # "Point to name/flags byte."
Load_word(R1, R0)        # R1 <- ram[LATEST]
Add_imm(R1, R1, 4)       # "Point to name/flags byte."
Load_word(R0, R1)
Xor_imm(R0, R0, F_IMMED)
Xor_imm(R0, R0, F_IMMED) # Toggle IMMEDIATE bit.
Store_word(R0, R1)
NEXT()



@@ 729,10 762,10 @@ NEXT()
## |_||_|___|___/|___/|___|_|\_|

defcode(b'HIDDEN', HIDDEN)
POP(R1)  # dfa OF A WORD IS ON THE STACK
POP(R1)  # LFA is on the stack.
Add_imm(R1, R1, 4)  # "Point to name/flags byte."
Load_word(R0, R1)  # "Toggle the HIDDEN bit."
Xor_imm(R0, R0, F_HIDDEN)
Load_word(R0, R1)
Xor_imm(R0, R0, F_HIDDEN)  # "Toggle the HIDDEN bit."
Store_word(R0, R1)
NEXT()



@@ 750,7 783,7 @@ NEXT()
# > immediate mode too.

defcode(b"'", TICK)
Load_word(R0, IP)  # Get the address of the next codeword.
Load_word(R0, IP)   # Get the address of the next codeword.
Add_imm(IP, IP, 4)  # Skip it.
PUSH(R0)
NEXT()


@@ 776,7 809,7 @@ NEXT()
defcode(b'0BRANCH', ZBRANCH)
POP(R0)
Add_imm(R0, R0, 0)  # Set condition flags.
EQ_imm(BRANCH + 4)  # Zero? BRANCH.
EQ_imm(BRANCH + 4)  # Zero? Delegate to BRANCH.
Add_imm(IP, IP, 4)  # Non-zero? Skip offset.
NEXT()



@@ 811,16 844,17 @@ NEXT()
## |_  .  _|/_/
## |_     _(_)
##   |_|_|
#
# Is the most recently parsed word (probably) a numeric literal?
# (This check does not affect the word buffer, unlike NUMBER.)
# Leaves a value on the stack: 0 for true or non-0 for false.

defcode(b'#?', IS_NUMBER)
Mov_imm(word_pointer, WORD_BUFFER)
Add_imm(word_pointer, word_pointer, 1)
Load_byte(R0, word_pointer)
Load_byte(R0, word_pointer, 1)  # Load first char of word.
Sub_imm(R0, R0, ord('$'))  # Is it a '$'?
PUSH(R0)  # Let the result be the result:
NEXT()    # 0 -> true / !=0 -> false
NEXT()    # 0 -> true / != 0 -> false


##  ___ _  _ _____ ___ ___ ___ ___ ___ _____


@@ 910,6 944,8 @@ R7, R8 = 7, 8
## | '_ \/ _` | |
## | .__/\__,_|_|
## |_|
#
# "pai"nt the font data to the screen so we can see it.

defcode(b'pai', PAI)
move_immediate_word_to_register(R0, DISPLAY_START)


@@ 939,7 975,20 @@ NEXT()
## |_|                 |___|
#
# (y x chr -- )
# paint a char onto the screen
# Paint a char onto the screen.
# The coordinates are in character "space":
# 0, 0 is the upper left corner,
# there are 1024/8 = 128 characters per line
# and 768/13 ~= 59 lines.
# So 0 <= x < 128 and 0 <= y < 58 (not checked.)
# The chr value should be ASCII.  (The font I'm
# using includes Unicode characters but I
# haven't worked out how I want to use them just
# yet.
# I'm thinking about a 32-bit parallel port?
# But then how to represent things like mode keys?
# Press/release events? Maybe emulating the PS/2
# isn't such a gnarly idea?)

defcode(b'paint_char', PAINT_CHAR)



@@ 950,16 999,16 @@ move_immediate_word_to_register(R0, DISPLAY_START - 312 * 4)
POP(R1)  # chr in R1
Sub_imm(R1, R1, ord('!'))  # R1 counts byte offset of char.

Asr_imm(R2, R1, 2)  # R2 = R1 / 4  Trim the two least bits.
Mul_imm(R2, R2, 52)  # R2 *= 13 words/char * 4 bytes/word.
Add(R0, R0, R2)  # Point R0 to char's first word in font.
And_imm(R1, R1, 0b11)  # Which byte in the words?
Add(R0, R0, R1)  # Point R0 to char's first byte in font.
Asr_imm(R2, R1, 2)     # R2 = R1 / 4  Trim the two least bits.
Mul_imm(R2, R2, 52)    # R2 *= 13 words/char * 4 bytes/word.
Add(R0, R0, R2)        # Point R0 to char's first word in font.
And_imm(R1, R1, 0b11)  # Which byte in the word?
Add(R0, R0, R1)        # Point R0 to char's first byte in font.

POP(R1)  # x
move_immediate_word_to_register(R2, DISPLAY_START)
Add(R1, R1, R2)  # R1 = x + DISPLAY_START
Mov_imm(R7, 767)  # Display width - 1 in pixels. (TODO don't hardcod3 this.)
Add(R1, R1, R2)     # R1 = x + DISPLAY_START
Mov_imm(R7, 767)    # Display width - 1 in pixels. (TODO don't hardcod3 this.)
POP(R2)             # R2 = y in lines
Mul_imm(R2, R2, 13) # R2 = y in px  (13px/char height)
Sub(R2, R7, R2)     # R2 = 768 - 1 - y


@@ 996,7 1045,4 @@ PUSH(R0)
PUSH(R0)
NEXT()


label(QUIT)

label(END)

M forth/oberonforth.symbols => forth/oberonforth.symbols +0 -0