#define traceBEGIN cfa("COLD") #define traceLIMIT cfa("QUIT") #define traceDEPTH 10 #define traceSTEPS -1 /******************************************************************************/ /* esp32eForth_14.ino for wifiboy ESP32 */ /******************************************************************************/ // 18Nov17 _14 ------------------------------------------------ Sam Suan Chen // // 1. modified cold message as esp32eForth 1.4 // // 2. refine debugger and tracing mechanism // // 3. esp32eForth.ppt (slide show) and esp32eForth_14.txt (verbatim) // // 09Nov17 _13 ------------------------------------------------ Sam Suan Chen // // 1. modified cold message as esp32eForth 1.3 // // 2. WP points to PFA of forth word and X is used for computation instead // // 3. byte codes call (16-bite addressing) and ret // // 4. subroutines, "0" and "led", both end with ret, called by // // 5. primitive word ledLow (set led pin 0x10 level low 0x0) // // 6. byte codes dobcon and dohcon, for 8 and 16-bit values, to define // // 7. primitive words ledSet, ledOn, ledOff and "," (the word comma) // // 8. byte code dotcon, for 24-bit value, to define // // 9. primitive word BLINK (blink led for specified number of times) // //10. byte code debugger, check/modify memory, see forth word ..., to define // //11. primitive word DEBUGGER // //12. fixed stasl and ssmod for */ and */MOD // //13. rename uplus and ummod as umplus and umsmod for UM+ and UM/MOD // //14. new byte code cmove used to optimize the word CMOVE // //15. much more comments to data array (the core memory) // //16. updated system variables CP, CONTEXT, and LAST // //17. new tracing mechanism // //18. resize data for 16-bit addressing space from 0 to 0xffff // // where 0xff00 to 0xffff is used as debugger command input buffer // /* 28sep17 _12 ------------------------------------------------ Sam Suan Chen */ /* 1. modified cold message as esp32eForth 1.2 */ /* 2. rename primitives sendPacket to sndpck, pinSel to pinsel, */ /* pinOut to pinout, pinIn to pinin, */ /* so that all primitive names will be used in disassembler */ /* 3. new byte codes, dobcon (1-byte constant), dohcon (2-byte constant) */ /* 4. redefine COMPILE-ONLY ane IMMEDIATE as primitive words */ /* 5. add 3 new primitive words for wifiboy led control */ /* ledSet (set pin 0x10 as output), ledOff (set pin 0x10 level high), */ /* ledOn (set pin 0x10 level low) */ /* 6. update system variable CP, CONTEXT, and LAST */ /* 23sep17 _11 ------------------------------ Sam Suan Chen, Chen-Hanson Ting */ /* modified cold message as esp32eForth 1.1 */ /* changed end of cold as .ok stead of CR */ /* 22sep17 _10 ------------------- Albert Lu, Sam Suan Chen, Chen-Hanson Ting */ /* 1. derived from espForth_44 on esp8266 for ESP32 */ /* 2. ignored WIFI and UDP */ /* 3. added input line echoing */ /* 4. ignored tone() since not yet implemented for ESP32. */ /* 5. tried wifiboy led control as follows: */ /* "2 ( output ) 10 ( led pin in hex ) pinSel" sets wifiboy led pin direction */ /* "1 ( high ) decimal 16 pinOut" turns off wifiboy led */ /* "0 ( low ) 16 pinOut" to turn on led */ /* "hex" to change base to hexadecimal */ /* ": W FFFFF for next ; : H 1 10 pinOut W ; : L 0 10 pinOut W ;" 3 new words */ /* ": blinks for aft H L then next ; 5 blinks" to blink led 5 times */ /******************************************************************************/ #define AVAILABLE Serial.available #define PRINT Serial.print #define PRINTF Serial.printf #define PRINTLN Serial.println #define READ Serial.read #define READBYTES Serial.readBytes #define WRITE Serial.write #define CP data[0x1ac/4] //#include // no wifi so far /* #include #include const char* ssid = "SVFIG";//type your ssid const char* pass = "12345678";//type your password unsigned int localPort = 10009; // local port to listen on WiFiUDP Udp; */ # define FALSE 0 # define TRUE -1 # define LOGICAL ? TRUE : FALSE # define LOWER(x,y) ((unsigned long)(x)<(unsigned long)(y)) # define pop top = stack[(unsigned char)(S--)] # define push stack[(unsigned char)(++S)] = top; top = long rack[256] = {0}; long stack[256] = {0}; unsigned char R, S, bytecode; long* Pointer; long P, IP, top, WP, X; char* cData; long long d, n, m; /* #include "rom_43.h" /* load dictionary */ long data[0x4000] = { 0x00000000, // system TIB 0000 00000000 // terminal input buffer 0x00000000, // 0004 00000000 0x00000000, // 0008 00000000 0x00000000, // 000c 00000000 0x00000000, // 0010 00000000 0x00000000, // 0014 00000000 0x00000000, // 0018 00000000 0x00000000, // 001c 00000000 0x00000000, // 0020 00000000 0x00000000, // 0024 00000000 0x00000000, // 0028 00000000 0x00000000, // 002c 00000000 0x00000000, // 0030 00000000 0x00000000, // 0034 00000000 0x00000000, // 0038 00000000 0x00000000, // 003c 00000000 0x00000000, // 0040 00000000 0x00000000, // 0044 00000000 0x00000000, // 0048 00000000 0x00000000, // 004c 00000000 0x00000000, // 0050 00000000 0x00000000, // 0054 00000000 0x00000000, // 0058 00000000 0x00000000, // 005c 00000000 0x00000000, // 0060 00000000 0x00000000, // 0064 00000000 0x00000000, // 0068 00000000 0x00000000, // 006c 00000000 0x00000000, // 0070 00000000 0x00000000, // 0074 00000000 0x00000000, // 0078 00000000 0x00000000, // 007c 00000000 0x00000000, // 0080 00000000 0x00000000, // 0084 00000000 0x00000000, // 0088 00000000 0x00000000, // 008c 00000000 0x00000000, // 0090 00000000 0x00000000, // 0094 00000000 0x00000000, // 0098 00000000 0x00000000, // 009c 00000000 0x00000000, // 00a0 00000000 0x00000000, // 00a4 00000000 0x00000000, // 00a8 00000000 0x00000000, // 00ac 00000000 0x00000000, // 00b0 00000000 0x00000000, // 00b4 00000000 0x00000000, // 00b8 00000000 0x00000000, // 00bc 00000000 0x00000000, // 00c0 00000000 0x00000000, // 00c4 00000000 0x00000000, // 00c8 00000000 0x00000000, // 00cc 00000000 0x00000000, // 00d0 00000000 0x00000000, // 00d4 00000000 0x00000000, // 00d8 00000000 0x00000000, // 00dc 00000000 0x00000000, // 00e0 00000000 0x00000000, // 00e4 00000000 0x00000000, // 00e8 00000000 0x00000000, // 00ec 00000000 0x00000000, // 00f0 00000000 0x00000000, // 00f4 00000000 0x00000000, // 00f8 00000000 0x00000000, // 00fc 00000000 0x00000000, // 0100 00000000 0x00000000, // 0104 00000000 0x00000000, // 0108 00000000 0x00000000, // 010c 00000000 0x00000000, // 0110 00000000 0x00000000, // 0114 00000000 0x00000000, // 0118 00000000 0x00000000, // 011c 00000000 0x00000000, // 0120 00000000 0x00000000, // 0124 00000000 0x00000000, // 0128 00000000 0x00000000, // 012c 00000000 0x00000000, // 0130 00000000 0x00000000, // 0134 00000000 0x00000000, // 0138 00000000 0x00000000, // 013c 00000000 0x00000000, // 0140 00000000 0x00000000, // 0144 00000000 0x00000000, // 0148 00000000 0x00000000, // 014c 00000000 0x00000000, // 0150 00000000 0x00000000, // 0154 00000000 0x00000000, // 0158 00000000 0x00000000, // 015c 00000000 0x00000000, // 0160 00000000 0x00000000, // 0164 00000000 0x00000000, // 0168 00000000 0x00000000, // 016c 00000000 0x00000000, // 0170 00000000 0x00000000, // 0174 00000000 0x00000000, // 0178 00000000 0x00000000, // 017c 00000000 0x00000006, // system ENTRY 0180 00000006 0x00001a38, // system 'BOOT 0184 00001a38 COLD // 00000006 dolist 0x1a3c, next, 0x00000000, // 0188 00000000 0x00000000, // 018c 00000000 0x00000000, // system HLD 0190 00000000 0x00000000, // system SPAN 0194 00000000 0x00000000, // system >IN 0198 00000000 0x00000000, // system #TIB 019c 00000000 0x00000000, // system 'TIB 01a0 00000000 0x00000010, // system BASE 01a4 00000010 0x00001e50, // system CONTEXT 01a8 00001e50 ( link to DEBUGGER ) 0x00001e60, // system CP 01ac 00001e60 0x00001e50, // system LAST 01b0 00001e50 ( link to DEBUGGER ) 0x000013d4, // system 'EVAL 01b4 000013d4 $INTERPRET // 00000006 dolist 0x13d8, next, 0x00001514, // system 'ABORT 01b8 00001514 QUIT // 00000006 dolist 0x1518, next, 0x00000000, // system tmp 01bc 00000000 0x00000000, // 01c0 00000000 0x00000000, // 01c4 00000000 0x00000000, // 01c8 00000000 0x00000000, // 01cc 00000000 0x00000000, // 01d0 00000000 0x00000000, // 01d4 00000000 0x00000000, // 01d8 00000000 0x00000000, // 01dc 00000000 0x00000000, // 01e0 00000000 0x00000000, // 01e4 00000000 0x00000000, // 01e8 00000000 0x00000000, // 01ec 00000000 0x00000000, // 01f0 00000000 0x00000000, // 01f4 00000000 0x00000000, // 01f8 00000000 0x00000000, // 01fc 00000000 /////////////////// // system variable words // 000 /////// $190 CONSTANT HLD 0x00000000, // 0200 00000000 0x444c4803, // 0204 444c4803 0x3 "HLD" 0x00002004, // HLD 0208 00002004 docon 0x190, next, 0x00000190, // 020c 00000190 // 001 /////// $194 CONSTANT SPAN 0x00000204, // 0210 00000204 ( link to HLD ) 0x41505304, // 0214 41505304 0x4 "SPAN" 0x0000004e, // 0218 0000004e 0x00002004, // SPAN 021c 00002004 docon 0x194, next, 0x00000194, // 0220 00000194 // 002 /////// $198 CONSTANT >IN 0x00000214, // 0224 00000214 ( link to SPAN ) 0x4e493e03, // 0228 4e493e03 0x3 ">IN" 0x00002004, // >IN 022c 00002004 docon 0x198, next, 0x00000198, // 0230 00000198 // 003 /////// $19c CONSTANT #TIB 0x00000228, // 0234 00000228 ( link to >IN ) 0x49542304, // 0238 49542304 0x4 "#TIB" 0x00000042, // 023c 00000042 0x00002004, // #TIB 0240 00002004 docon 0x19c, next, 0x0000019c, // 0244 0000019c // 004 /////// $1a0 CONSTANT 'TIB 0x00000238, // 0248 00000238 ( link to #TIB ) 0x49542704, // 024c 49542704 0x4 "'TIB" 0x00000042, // 0250 00000042 0x00002004, // 'TIB 0254 00002004 docon 0x1a0, next, 0x000001a0, // 0258 000001a0 // 005 /////// $1a4 CONSTANT BASE 0x0000024c, // 025c 0000024c ( link to 'TIB ) 0x53414204, // 0260 53414204 0x4 "BASE" 0x00000045, // 0264 00000045 0x00002004, // BASE 0268 00002004 docon 0x1a4, next, 0x000001a4, // 026c 000001a4 // 006 /////// $1a8 CONSTANT CONTEXT 0x00000260, // 0270 00000260 ( link to BASE ) 0x4e4f4307, // 0274 4e4f4307 0x7 "CONTEXT" 0x54584554, // 0278 54584554 0x00002004, // CONTEXT 027c 00002004 docon 0x1a8, next, 0x000001a8, // 0280 000001a8 // 007 /////// $1ac CONSTANT CP 0x00000274, // 0284 00000274 ( link to CONTEXT ) 0x00504302, // 0288 00504302 0x2 "CP" 0x00002004, // CP 028c 00002004 docon 0x1ac, next, 0x000001ac, // 0290 000001ac // 008 /////// $1b0 CONSTANT LAST 0x00000288, // 0294 00000288 ( link to CP ) 0x53414c04, // 0298 53414c04 0x4 "LAST" 0x00000054, // 029c 00000054 0x00002004, // LAST 02a0 00002004 docon 0x1b0, next, 0x000001b0, // 02a4 000001b0 // 009 /////// $1b4 CONSTANT 'EVAL 0x00000298, // 02a8 00000298 ( link to LAST ) 0x56452705, // 02ac 56452705 0x5 "'EVAL" 0x00004c41, // 02b0 00004c41 0x00002004, // 'EVAL 02b4 00002004 docon 0x1b4, next, 0x000001b4, // 02b8 000001b4 // 010 /////// $1b8 CONSTANT 'ABORT 0x000002ac, // 02bc 000002ac ( link to 'EVAL ) 0x42412706, // 02c0 42412706 0x6 "'ABORT" 0x0054524f, // 02c4 0054524f 0x00002004, // 'ABORT 02c8 00002004 docon 0x1b8, next, 0x000001b8, // 02cc 000001b8 // 011 /////// $1bc CONSTANT tmp 0x000002c0, // 02d0 000002c0 ( link to 'ABORT ) 0x706d7403, // 02d4 706d7403 0x3 "tmp" 0x00002004, // tmp 02d8 00002004 docon 0x1bc, next, 0x000001bc, // 02dc 000001bc /////////////////// // primitive words // 012 /////// CODE NOP next, END-CODE 0x000002d4, // 02e0 000002d4 ( link to tmp ) 0x504f4e03, // 02e4 504f4e03 0x3 "NOP" 0x00000020, // NOP 02e8 00000020 next, // 013 /////// CODE ACCEPT accep, next, END-CODE 0x000002e4, // 02ec 000002e4 ( link to NOP ) 0x43434106, // 02f0 43434106 0x6 "ACCEPT" 0x00545045, // 02f4 00545045 0x00002001, // ACCEPT 02f8 00002001 accep, next, // 014 /////// CODE EMIT txsto, next, END-CODE 0x000002f0, // 02fc 000002f0 ( link to ACCEPT ) 0x494d4504, // 0300 494d4504 0x4 "EMIT" 0x00000054, // 0304 00000054 0x00002003, // EMIT 0308 00002003 txsto, next, // 015 /////// CODE DOLIT dolit, END-CODE 0x00000300, // 030c 00000300 ( link to EMIT ) 0x4c4f4405, // 0310 4c4f4405 0x5 "DOLIT" 0x00005449, // 0314 00005449 0x00000005, // DOLIT 0318 00000005 dolit, next, // 016 /////// CODE DOLIST dolist, END-CODE 0x00000310, // 031c 00000310 ( link to DOLIT ) 0x4c4f4406, // 0320 4c4f4406 0x6 "DOLIST" 0x00545349, // 0324 00545349 0x00000006, // DOLIST 0328 00000006 dolist, next, // 017 /////// CODE EXIT exitt, END-CODE 0x00000320, // 032c 00000320 ( link to DOLIST ) 0x49584504, // 0330 49584504 0x4 "EXIT" 0x00000054, // 0334 00000054 0x00000007, // EXIT 0338 00000007 exitt, next, // 018 /////// CODE EXECUTE execu, next, END-CODE 0x00000330, // 033c 00000330 ( link to EXIT ) 0x45584507, // 0340 45584507 0x7 "EXECUTE" 0x45545543, // 0344 45545543 0x00002008, // EXECUTE 0348 00002008 execu, next, // 019 /////// CODE DONEXT donext, END-CODE 0x00000340, // 034c 00000340 ( link to EXECUTE ) 0x4e4f4406, // 0350 4e4f4406 0x6 "DONEXT" 0x00545845, // 0354 00545845 0x00000009, // DONEXT 0358 00000009 donext, next, // 020 /////// CODE QBRANCH qbran, END-CODE 0x00000350, // 035c 00000350 ( link to DONEXT ) 0x52425107, // 0360 52425107 0x7 "QBRANCH" 0x48434e41, // 0364 48434e41 0x0000000a, // QBRANCH 0368 0000000a qbran, next, // 021 /////// CODE BRANCH bran, END-CODE 0x00000360, // 036c 00000360 ( link to QBRANCH ) 0x41524206, // 0370 41524206 0x6 "BRANCH" 0x0048434e, // 0374 0048434e 0x0000000b, // BRANCH 0378 0000000b bran, next, // 022 /////// CODE ! store, next, END-CODE 0x00000370, // 037c 00000370 ( link to BRANCH ) 0x00002101, // 0380 00002101 0x1 "!" 0x0000200c, // ! 0384 0000200c store, next, // 023 /////// CODE @ at, next, END-CODE 0x00000380, // 0388 00000380 ( link to ! ) 0x00004001, // 038c 00004001 0x1 "@" 0x0000200d, // @ 0390 0000200d at, next, // 024 /////// CODE C! cstor, next, END-CODE 0x0000038c, // 0394 0000038c ( link to @ ) 0x00214302, // 0398 00214302 0x2 "C!" 0x0000200e, // C! 039c 0000200e cstor, next, // 025 /////// CODE C@ cat, next, END-CODE 0x00000398, // 03a0 00000398 ( link to C! ) 0x00404302, // 03a4 00404302 0x2 "C@" 0x0000200f, // C@ 03a8 0000200f cat, next, // 026 /////// CODE sendPacket sndpck, next, END-CODE 0x000003a4, // 03ac 000003a4 ( link to C@ ) 0x6e65730a, // 03b0 6e65730a 0xa "sendPacket" 0x63615064, // 03b4 63615064 0x0074656b, // 03b8 0074656b 0x00002010, // sendPacket 03bc 00002010 sndpck, next, // 027 /////// CODE pinSel pinsel, next, END-CODE 0x000003b0, // 03c0 000003b0 ( link to sendPacket ) 0x6e697006, // 03c4 6e697006 0x6 "pinSel" 0x006c6553, // 03c8 006c6553 0x00002011, // pinSel 03cc 00002011 pinsel, next, // 028 /////// CODE R> rfrom, next, END-CODE 0x000003c4, // 03d0 000003c4 ( link to pinSel ) 0x003e5202, // 03d4 003e5202 0x2 "R>" 0x00002012, // R> 03d8 00002012 rfrom, next, // 029 /////// CODE R@ rat, next, END-CODE 0x000003d4, // 03dc 000003d4 ( link to R> ) 0x00405202, // 03e0 00405202 0x2 "R@" 0x00002013, // R@ 03e4 00002013 rat, next, // 030 /////// CODE >R tor, next, END-CODE 0x000003e0, // 03e8 000003e0 ( link to R@ ) 0x00523e02, // 03ec 00523e02 0x2 ">R" 0x00002014, // >R 03f0 00002014 tor, next, // 031 /////// CODE pinOut pinout, next, END-CODE 0x000003ec, // 03f4 000003ec ( link to >R ) 0x6e697006, // 03f8 6e697006 0x6 "pinOut" 0x0074754f, // 03fc 0074754f 0x00002015, // pinOut 0400 00002015 pinout, next, // 032 /////// CODE pinIn pinin, next, END-CODE 0x000003f8, // 0404 000003f8 ( link to pinOut ) 0x6e697005, // 0408 6e697005 0x5 "pinIn" 0x00006e49, // 040c 00006e49 0x00002016, // pinIn 0410 00002016 pinin, next, // 033 /////// CODE DROP drop, next, END-CODE 0x00000408, // 0414 00000408 ( link to pinIn ) 0x4f524404, // 0418 4f524404 0x4 "DROP" 0x00000050, // 041c 00000050 0x00002017, // DROP 0420 00002017 drop, next, // 034 /////// CODE DUP dup, next, END-CODE 0x00000418, // 0424 00000418 ( link to DROP ) 0x50554403, // 0428 50554403 0x3 "DUP" 0x00002018, // DUP 042c 00002018 dup, next, // 035 /////// CODE SWAP swap, next, END-CODE 0x00000428, // 0430 00000428 ( link to DUP ) 0x41575304, // 0434 41575304 0x4 "SWAP" 0x00000050, // 0438 00000050 0x00002019, // SWAP 043c 00002019 swap, next, // 036 /////// CODE OVER over, next, END-CODE 0x00000434, // 0440 00000434 ( link to SWAP ) 0x45564f04, // 0444 45564f04 0x4 "OVER" 0x00000052, // 0448 00000052 0x0000201a, // OVER 044c 0000201a over, next, // 037 /////// CODE 0< zless, next, END-CODE 0x00000444, // 0450 00000444 ( link to OVER ) 0x003c3002, // 0454 003c3002 0x2 "0<" 0x0000201b, // 0< 0458 0000201b zless, next, // 038 /////// CODE AND andd, next, END-CODE 0x00000454, // 045c 00000454 ( link to 0< ) 0x444e4103, // 0460 444e4103 0x3 "AND" 0x0000201c, // AND 0464 0000201c andd, next, // 039 /////// CODE OR orr, next, END-CODE 0x00000460, // 0468 00000460 ( link to AND ) 0x00524f02, // 046c 00524f02 0x2 "OR" 0x0000201d, // OR 0470 0000201d orr, next, // 040 /////// CODE XOR xorr, next, END-CODE 0x0000046c, // 0474 0000046c ( link to OR ) 0x524f5803, // 0478 524f5803 0x3 "XOR" 0x0000201e, // XOR 047c 0000201e xorr, next, // 041 /////// CODE UM+ umplus, next, END-CODE 0x00000478, // 0480 00000478 ( link to XOR ) 0x2b4d5503, // 0484 2b4d5503 0x3 "UM+" 0x0000201f, // UM+ 0488 0000201f umplus, next, // 042 /////// CODE ?DUP qdup, next, END-CODE 0x00000484, // 048c 00000484 ( link to UM+ ) 0x55443f04, // 0490 55443f04 0x4 "?DUP" 0x00000050, // 0494 00000050 0x00002021, // ?DUP 0498 00002021 qdup, next, // 043 /////// CODE ROT rot, next, END-CODE 0x00000490, // 049c 00000490 ( link to ?DUP ) 0x544f5203, // 04a0 544f5203 0x3 "ROT" 0x00002022, // ROT 04a4 00002022 rot, next, // 044 /////// CODE 2DROP ddrop, next, END-CODE 0x000004a0, // 04a8 000004a0 ( link to ROT ) 0x52443205, // 04ac 52443205 0x5 "2DROP" 0x0000504f, // 04b0 0000504f 0x00002023, // 2DROP 04b4 00002023 ddrop, next, // 045 /////// CODE 2DUP ddup, next, END-CODE 0x000004ac, // 04b8 000004ac ( link to 2DROP ) 0x55443204, // 04bc 55443204 0x4 "2DUP" 0x00000050, // 04c0 00000050 0x00002024, // 2DUP 04c4 00002024 ddup, next, // 046 /////// CODE + plus, next, END-CODE 0x000004bc, // 04c8 000004bc ( link to 2DUP ) 0x00002b01, // 04cc 00002b01 0x1 "+" 0x00002025, // + 04d0 00002025 plus, next, // 047 /////// CODE NOT inver, next, END-CODE 0x000004cc, // 04d4 000004cc ( link to + ) 0x544f4e03, // 04d8 544f4e03 0x3 "NOT" 0x00002026, // NOT 04dc 00002026 inver, next, // 048 /////// CODE NEGATE negat, next, END-CODE 0x000004d8, // 04e0 000004d8 ( link to NOT ) 0x47454e06, // 04e4 47454e06 0x6 "NEGATE" 0x00455441, // 04e8 00455441 0x00002027, // NEGATE 04ec 00002027 negat, next, // 049 /////// CODE DNEGATE dnega, next, END-CODE 0x000004e4, // 04f0 000004e4 ( link to NEGATE ) 0x454e4407, // 04f4 454e4407 0x7 "DNEGATE" 0x45544147, // 04f8 45544147 0x00002028, // DNEGATE 04fc 00002028 dnega, next, // 050 /////// CODE - subb, next, END-CODE 0x000004f4, // 0500 000004f4 ( link to DNEGATE ) 0x00002d01, // 0504 00002d01 0x1 "-" 0x00002029, // - 0508 00002029 subb, next, // 051 /////// CODE ABS abss, next, END-CODE 0x00000504, // 050c 00000504 ( link to - ) 0x53424103, // 0510 53424103 0x3 "ABS" 0x0000202a, // ABS 0514 0000202a abss, next, // 052 /////// CODE = equal, next, END-CODE 0x00000510, // 0518 00000510 ( link to ABS ) 0x00003d01, // 051c 00003d01 0x1 "=" 0x0000202b, // = 0520 0000202b equal, next, // 053 /////// CODE U< uless, next, END-CODE 0x0000051c, // 0524 0000051c ( link to = ) 0x003c5502, // 0528 003c5502 0x2 "U<" 0x0000202c, // U< 052c 0000202c uless, next, // 054 /////// CODE < less, next, END-CODE 0x00000528, // 0530 00000528 ( link to U< ) 0x00003c01, // 0534 00003c01 0x1 "<" 0x0000202d, // < 0538 0000202d less, next, // 055 /////// CODE UM/MOD umsmod, next, END-CODE 0x00000534, // 053c 00000534 ( link to < ) 0x2f4d5506, // 0540 2f4d5506 0x6 "UM/MOD" 0x00444f4d, // 0544 00444f4d 0x0000202e, // UM/MOD 0548 0000202e umsmod, next, // 056 /////// CODE M/MOD msmod, next, END-CODE 0x00000540, // 054c 00000540 ( link to UM/MOD ) 0x4d2f4d05, // 0550 4d2f4d05 0x5 "M/MOD" 0x0000444f, // 0554 0000444f 0x0000202f, // M/MOD 0558 0000202f msmod, next, // 057 /////// CODE /MOD slmod, next, END-CODE 0x00000550, // 055c 00000550 ( link to M/MOD ) 0x4f4d2f04, // 0560 4f4d2f04 0x4 "/MOD" 0x00000044, // 0564 00000044 0x00002030, // /MOD 0568 00002030 slmod, next, // 058 /////// CODE MOD mod, next, END-CODE 0x00000560, // 056c 00000560 ( link to /MOD ) 0x444f4d03, // 0570 444f4d03 0x3 "MOD" 0x00002031, // MOD 0574 00002031 mod, next, // 059 /////// CODE / slash, next, END-CODE 0x00000570, // 0578 00000570 ( link to MOD ) 0x00002f01, // 057c 00002f01 0x1 "/" 0x00002032, // / 0580 00002032 slash, next, // 060 /////// CODE UM* umsta, next, END-CODE 0x0000057c, // 0584 0000057c ( link to / ) 0x2a4d5503, // 0588 2a4d5503 0x3 "UM*" 0x00002033, // UM* 058c 00002033 umsta, next, // 061 /////// CODE * star, next, END-CODE 0x00000588, // 0590 00000588 ( link to UM* ) 0x00002a01, // 0594 00002a01 0x1 "*" 0x00002034, // * 0598 00002034 star, next, // 062 /////// CODE M* mstar, next, END-CODE 0x00000594, // 059c 00000594 ( link to * ) 0x002a4d02, // 05a0 002a4d02 0x2 "M*" 0x00002035, // M* 05a4 00002035 mstar, next, // 063 /////// CODE */MOD ssmod, next, END-CODE 0x000005a0, // 05a8 000005a0 ( link to M* ) 0x4d2f2a05, // 05ac 4d2f2a05 0x5 "*/MOD" 0x0000444f, // 05b0 0000444f 0x00002036, // */MOD 05b4 00002036 ssmod, next, // 064 /////// CODE */ stasl, next, END-CODE 0x000005ac, // 05b8 000005ac ( link to */MOD ) 0x002f2a02, // 05bc 002f2a02 0x2 "*/" 0x00002037, // */ 05c0 00002037 stasl, next, // 065 /////// CODE PICK pick, next, END-CODE 0x000005bc, // 05c4 000005bc ( link to */ ) 0x43495004, // 05c8 43495004 0x4 "PICK" 0x0000004b, // 05cc 0000004b 0x00002038, // PICK 05d0 00002038 pick, next, // 066 /////// CODE +! pstor, next, END-CODE 0x000005c8, // 05d4 000005c8 ( link to PICK ) 0x00212b02, // 05d8 00212b02 0x2 "+!" 0x00002039, // +! 05dc 00002039 pstor, next, // 067 /////// CODE 2! dstor, next, END-CODE 0x000005d8, // 05e0 000005d8 ( link to +! ) 0x00213202, // 05e4 00213202 0x2 "2!" 0x0000203a, // 2! 05e8 0000203a dstor, next, // 068 /////// CODE 2@ dat, next, END-CODE 0x000005e4, // 05ec 000005e4 ( link to 2! ) 0x00403202, // 05f0 00403202 0x2 "2@" 0x0000203b, // 2@ 05f4 0000203b dat, next, // 069 /////// CODE COUNT count, next, END-CODE 0x000005f0, // 05f8 000005f0 ( link to 2@ ) 0x554f4305, // 05fc 554f4305 0x5 "COUNT" 0x0000544e, // 0600 0000544e 0x0000203c, // COUNT 0604 0000203c count, next, // 070 /////// CODE MAX maxx, next, END-CODE 0x000005fc, // 0608 000005fc ( link to COUNT ) 0x58414d03, // 060c 58414d03 0x3 "MAX" 0x0000203e, // MAX 0610 0000203e maxx, next, // 071 /////// CODE MIN minn, next, END-CODE 0x0000060c, // 0614 0000060c ( link to MAX ) 0x4e494d03, // 0618 4e494d03 0x3 "MIN" 0x0000203f, // MIN 061c 0000203f minn, next, // 072 /////// $20 CONSTANT BL 0x00000618, // 0620 00000618 ( link to MIN ) 0x004c4202, // 0624 004c4202 0x2 "BL" 0x00002004, // BL 0628 00002004 docon 0x20, next, 0x00000020, // 062c 00000020 // 073 /////// 4 CONSTANT CELL 0x00000624, // 0630 00000624 ( link to BL ) 0x4c454304, // 0634 4c454304 0x4 "CELL" 0x0000004c, // 0638 0000004c 0x00002004, // CELL 063c 00002004 docon 0x4, next, 0x00000004, // 0640 00000004 // 074 /////// CODE CELL+ docon 0x4, plus, next, END-CODE 0x00000634, // 0644 00000634 ( link to CELL ) 0x4c454305, // 0648 4c454305 0x5 "CELL+" 0x00002b4c, // 064c 00002b4c 0x00202504, // CELL+ 0650 00202504 docon 0x4, plus, next, 0x00000004, // 0654 00000004 // 075 /////// CODE CELL- docon 0x4, subb, next, END-CODE 0x00000648, // 0658 00000648 ( link to CELL+ ) 0x4c454305, // 065c 4c454305 0x5 "CELL-" 0x00002d4c, // 0660 00002d4c 0x00202904, // CELL- 0664 00202904 docon 0x4, subb, next, 0x00000004, // 0668 00000004 // 076 /////// CODE CELLS docon 0x4, star, next, END-CODE 0x0000065c, // 066c 0000065c ( link to CELL- ) 0x4c454305, // 0670 4c454305 0x5 "CELLS" 0x0000534c, // 0674 0000534c 0x00203404, // CELLS 0678 00203404 docon 0x4, star, next, 0x00000004, // 067c 00000004 // 077 /////// CODE CELL/ docon 0x4, slash, next, END-CODE 0x00000670, // 0680 00000670 ( link to CELLS ) 0x4c454305, // 0684 4c454305 0x5 "CELL/" 0x00002f4c, // 0688 00002f4c 0x00203204, // CELL/ 068c 00203204 docon 0x4, slash, next, 0x00000004, // 0690 00000004 // 078 /////// CODE 1+ docon 0x1, plus, next, END-CODE 0x00000684, // 0694 00000684 ( link to CELL/ ) 0x002b3102, // 0698 002b3102 0x2 "1+" 0x00202504, // 1+ 069c 00202504 docon 0x1, plus, next, 0x00000001, // 06a0 00000001 // 079 /////// CODE 1- docon 0x1, subb, next, END-CODE 0x00000698, // 06a4 00000698 ( link to 1+ ) 0x002d3102, // 06a8 002d3102 0x2 "1-" 0x00202904, // 1- 06ac 00202904 docon 0x1, subb, next, 0x00000001, // 06b0 00000001 // 080 /////// CODE TONE audio, next, END-CODE 0x000006a8, // 06b4 000006a8 ( link to 1- ) 0x4e4f5404, // 06b8 4e4f5404 0x4 "TONE" 0x00000045, // 06bc 00000045 0x00002040, // TONE 06c0 00002040 audio, next, // 081 /////// CODE POKE poke, next, END-CODE 0x000006b8, // 06c4 000006b8 ( link to TONE ) 0x4b4f5004, // 06c8 4b4f5004 0x4 "POKE" 0x00000045, // 06cc 00000045 0x00002041, // POKE 06d0 00002041 poke, next, // 082 /////// CODE PEEK peeek, next, END-CODE 0x000006c8, // 06d4 000006c8 ( link to POKE ) 0x45455004, // 06d8 45455004 0x4 "PEEK" 0x0000004b, // 06dc 0000004b 0x00002042, // PEEK 06e0 00002042 peeek, next, /////////////////// // colon words // 083 /////// : WITHIN OVER - >R - R> U< ; // CODE WITHIN over, subb, tor, subb, rfrom, uless, next, END-CODE 0x000006d8, // 06e4 000006d8 ( link to PEEK ) 0x54495706, // 06e8 54495706 0x6 "WITHIN" 0x004e4948, // 06ec 004e4948 0x00000006, // WITHIN 06f0 00000006 dolist 0x06f4, next, 0x0000044c, // 06f4 0000044c OVER // 0000201a over, next, ( c a b a ) 0x00000508, // 06f8 00000508 - // 00002029 subb, next, ( c a width ) 0x000003f0, // 06fc 000003f0 >R // 00002014 tor, next, ( c a ) 0x00000508, // 0700 00000508 - // 00002029 subb, next, ( distance ) 0x000003d8, // 0704 000003d8 R> // 00002012 rfrom, next, ( distance width ) 0x0000052c, // 0708 0000052c U< // 0000202c uless, next, ( distanceCHAR $7f AND DUP $7f BL WITHIN IF DROP $5f THEN ; 0x000006e8, // 0710 000006e8 ( link to WITHIN ) 0x48433e05, // 0714 48433e05 0x5 ">CHAR" 0x00005241, // 0718 00005241 0x00000006, // >CHAR 071c 00000006 dolist 0x0720, next, 0x00000318, // 0720 00000318 DOLIT // 00000005 dolit 0x7f, next, 0x0000007f, // 0724 0000007f 0x00000464, // 0728 00000464 AND // 0000201c andd, next, 0x0000042c, // 072c 0000042c DUP // 00002018 dup, next, 0x00000318, // 0730 00000318 DOLIT // 00000005 dolit 0x7f, next, 0x0000007f, // 0734 0000007f 0x00000628, // 0738 00000628 BL // 00002004 docon 0x20, next, 0x000006f0, // 073c 000006f0 WITHIN // 00000006 dolist 0x6f4, next, 0x00000368, // 0740 00000368 QBRANCH // 0000000a qbran 0x0754, next, 0x00000754, // 0744 00000754 0x00000420, // 0748 00000420 DROP // 00002017 drop, next, 0x00000318, // 074c 00000318 DOLIT // 00000005 dolit 0x5f, next, 0x0000005f, // 0750 0000005f 0x00000338, // 0754 00000338 EXIT // 00000007 exitt, next, // 085 /////// : ALIGNED 3 + -4 AND ; // CODE ALIGNED dobcon 0x3, plus, dobcon -0x4, andd, next, END-CODE 0x00000714, // 0758 00000714 ( link to >CHAR ) 0x494c4107, // 075c 494c4107 0x7 "ALIGNED" 0x44454e47, // 0760 44454e47 0x00000006, // ALIGNED 0764 00000006 dolist 0x0768, next, 0x00000318, // 0768 00000318 DOLIT // 00000005 dolit 0x3, next, 0x00000003, // 076c 00000003 0x000004d0, // 0770 000004d0 + // 00002025 plus, next, 0x00000318, // 0774 00000318 DOLIT // 00000005 dolit 0xfffffffc, next, 0xfffffffc, // 0778 fffffffc 0x00000464, // 077c 00000464 AND // 0000201c andd, next, 0x00000338, // 0780 00000338 EXIT // 00000007 exitt, next, // 086 /////// : HERE CP @ ; // CODE HERE dohcon 0x1ac, at, next, END-CODE 0x0000075c, // 0784 0000075c ( link to ALIGNED ) 0x52454804, // 0788 52454804 0x4 "HERE" 0x00000045, // 078c 00000045 0x00000006, // HERE 0790 00000006 dolist 0x0794, next, 0x0000028c, // 0794 0000028c CP // 00002004 docon 0x1ac, next, 0x00000390, // 0798 00000390 @ // 0000200d at, next, 0x00000338, // 079c 00000338 EXIT // 00000007 exitt, next, // 087 /////// : PAD HERE 0x50 + ; // CODE PAD dohcon 0x1ac, at, dobcon 0x50, plus, next, END-CODE 0x00000788, // 07a0 00000788 ( link to HERE ) 0x44415003, // 07a4 44415003 0x3 "PAD" 0x00000006, // PAD 07a8 00000006 dolist 0x07ac, next, 0x00000790, // 07ac 00000790 HERE // 00000006 dolist 0x794, next, 0x00000318, // 07b0 00000318 DOLIT // 00000005 dolit 0x50, next, 0x00000050, // 07b4 00000050 0x000004d0, // 07b8 000004d0 + // 00002025 plus, next, 0x00000338, // 07bc 00000338 EXIT // 00000007 exitt, next, // 088 /////// : TIB 'TIB @ ; // CODE dohcon 0x1a0, at, next, END-CODE 0x000007a4, // 07c0 000007a4 ( link to PAD ) 0x42495403, // 07c4 42495403 0x3 "TIB" 0x00000006, // TIB 07c8 00000006 dolist 0x07cc, next, 0x00000254, // 07cc 00000254 'TIB // 00002004 docon 0x1a0, next, 0x00000390, // 07d0 00000390 @ // 0000200d at, next, 0x00000338, // 07d4 00000338 EXIT // 00000007 exitt, next, // 089 /////// : @EXECUTE @ ?DUP IF EXECUTE ; // CODE at, qdup, if, execu, then, next, END-CODE 0x000007c4, // 07d8 000007c4 ( link to TIB ) 0x58454008, // 07dc 58454008 0x8 "@EXECUTE" 0x54554345, // 07e0 54554345 0x00000045, // 07e4 00000045 0x00000006, // @EXECUTE 07e8 00000006 dolist 0x07ec, next, 0x00000390, // 07ec 00000390 @ // 0000200d at, next, 0x00000498, // 07f0 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 07f4 00000368 QBRANCH // 0000000a qbran 0x0800, next, 0x00000800, // 07f8 00000800 0x00000348, // 07fc 00000348 EXECUTE // 00002008 execu, next, 0x00000338, // 0800 00000338 EXIT // 00000007 exitt, next, // 090 /////// : CMOVE FOR AFT OVER C@ OVER C! >R 1+ R> 1+ THEN NEXT 2DROP ; // CODE CMOVE cmove, next, END-CODE 0x000007dc, // 0804 000007dc ( link to @EXECUTE ) 0x4f4d4305, // 0808 4f4d4305 0x5 "CMOVE" 0x00004556, // 080c 00004556 0x00002047, // CMOVE 0810 00002047 cmove, next, 0x000003f0, // 0814 000003f0 >R // 00002014 tor, next, 0x00000378, // 0818 00000378 BRANCH // 0000000b bran 0x0840, next, 0x00000840, // 081c 00000840 0x0000044c, // 0820 0000044c OVER // 0000201a over, next, 0x000003a8, // 0824 000003a8 C@ // 0000200f cat, next, 0x0000044c, // 0828 0000044c OVER // 0000201a over, next, 0x0000039c, // 082c 0000039c C! // 0000200e cstor, next, 0x000003f0, // 0830 000003f0 >R // 00002014 tor, next, 0x0000069c, // 0834 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x000003d8, // 0838 000003d8 R> // 00002012 rfrom, next, 0x0000069c, // 083c 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 0840 00000358 DONEXT // 00000009 donext 0x0820, next, 0x00000820, // 0844 00000820 0x000004b4, // 0848 000004b4 2DROP // 00002023 ddrop, next, 0x00000338, // 084c 00000338 EXIT // 00000007 exitt, next, // 091 /////// : MOVE CELL/ FOR AFT OVER @ OVER ! >R CELL+ R> CELL+ THEN NEXT 2DROP THEN ; 0x00000808, // 0850 00000808 ( link to CMOVE ) 0x564f4d04, // 0854 564f4d04 0x4 "MOVE" 0x00000045, // 0858 00000045 0x00000006, // MOVE 085c 00000006 dolist 0x0860, next, 0x0000068c, // 0860 0000068c CELL/ // 00203204 docon 0x4, slash, next, 0x000003f0, // 0864 000003f0 >R // 00002014 tor, next, 0x00000378, // 0868 00000378 BRANCH // 0000000b bran 0x0890, next, 0x00000890, // 086c 00000890 0x0000044c, // 0870 0000044c OVER // 0000201a over, next, 0x00000390, // 0874 00000390 @ // 0000200d at, next, 0x0000044c, // 0878 0000044c OVER // 0000201a over, next, 0x00000384, // 087c 00000384 ! // 0000200c store, next, 0x000003f0, // 0880 000003f0 >R // 00002014 tor, next, 0x00000650, // 0884 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x000003d8, // 0888 000003d8 R> // 00002012 rfrom, next, 0x00000650, // 088c 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x00000358, // 0890 00000358 DONEXT // 00000009 donext 0x0870, next, 0x00000870, // 0894 00000870 0x000004b4, // 0898 000004b4 2DROP // 00002023 ddrop, next, 0x00000338, // 089c 00000338 EXIT // 00000007 exitt, next, // 092 /////// : FILL SWAP FOR SWAP AFT 2DUP C! 1+ THEN NEXT 2DROP ; 0x00000854, // 08a0 00000854 ( link to MOVE ) 0x4c494604, // 08a4 4c494604 0x4 "FILL" 0x0000004c, // 08a8 0000004c 0x00000006, // FILL 08ac 00000006 dolist 0x08b0, next, 0x0000043c, // 08b0 0000043c SWAP // 00002019 swap, next, 0x000003f0, // 08b4 000003f0 >R // 00002014 tor, next, 0x0000043c, // 08b8 0000043c SWAP // 00002019 swap, next, 0x00000378, // 08bc 00000378 BRANCH // 0000000b bran 0x08d0, next, 0x000008d0, // 08c0 000008d0 0x000004c4, // 08c4 000004c4 2DUP // 00002024 ddup, next, 0x0000039c, // 08c8 0000039c C! // 0000200e cstor, next, 0x0000069c, // 08cc 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 08d0 00000358 DONEXT // 00000009 donext 0x08c4, next, 0x000008c4, // 08d4 000008c4 0x000004b4, // 08d8 000004b4 2DROP // 00002023 ddrop, next, 0x00000338, // 08dc 00000338 EXIT // 00000007 exitt, next, // 093 /////// : DIGIT 0x9 OVER < 0x7 AND + 0x30 + ; // CODE DIGIT dobcon 0x9, over, less, dobcon 0x7, andd, plus, dobcon 0x30, plus, next, END-CODE 0x000008a4, // 08e0 000008a4 ( link to FILL ) 0x47494405, // 08e4 47494405 0x5 "DIGIT" 0x00005449, // 08e8 00005449 0x00000006, // DIGIT 08ec 00000006 dolist 0x08f0, next, 0x00000318, // 08f0 00000318 DOLIT // 00000005 dolit 0x9, next, 0x00000009, // 08f4 00000009 0x0000044c, // 08f8 0000044c OVER // 0000201a over, next, 0x00000538, // 08fc 00000538 < // 0000202d less, next, 0x00000318, // 0900 00000318 DOLIT // 00000005 dolit 0x7, next, 0x00000007, // 0904 00000007 0x00000464, // 0908 00000464 AND // 0000201c andd, next, 0x000004d0, // 090c 000004d0 + // 00002025 plus, next, 0x00000318, // 0910 00000318 DOLIT // 00000005 dolit 0x30, next, 0x00000030, // 0914 00000030 0x000004d0, // 0918 000004d0 + // 00002025 plus, next, 0x00000338, // 091c 00000338 EXIT // 00000007 exitt, next, // 094 /////// : EXTRACT 0x0 SWAP UM/MOD SWAP DIGIT ; // CODE EXTRACT dobcon 0x0, swap, umsmod, swap, pbran 0x8ec-P, next, END-CODE 0x000008e4, // 0920 000008e4 ( link to DIGIT ) 0x54584507, // 0924 54584507 0x7 "EXTRACT" 0x54434152, // 0928 54434152 0x00000006, // EXTRACT 092c 00000006 dolist 0x0930, next, 0x00000318, // 0930 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 0934 00000000 0x0000043c, // 0938 0000043c SWAP // 00002019 swap, next, 0x00000548, // 093c 00000548 UM/MOD // 0000202e umsmod, next, 0x0000043c, // 0940 0000043c SWAP // 00002019 swap, next, 0x000008ec, // 0944 000008ec DIGIT // 00000006 dolist 0x8f0, next, 0x00000338, // 0948 00000338 EXIT // 00000007 exitt, next, // 095 /////// : <# PAD HLD ! ; // CODE <# dohcon 0x190, store, next, END-CODE 0x00000924, // 094c 00000924 ( link to EXTRACT ) 0x00233c02, // 0950 00233c02 0x2 "<#" 0x00000006, // <# 0954 00000006 dolist 0x0958, next, 0x000007a8, // 0958 000007a8 PAD // 00000006 dolist 0x7ac, next, 0x00000208, // 095c 00000208 HLD // 00002004 docon 0x190, next, 0x00000384, // 0960 00000384 ! // 0000200c store, next, 0x00000338, // 0964 00000338 EXIT // 00000007 exitt, next, // 096 /////// : HOLD HLD @ 1- DUP HLD ! C! ; // CODE HOLD dohcon 0x190, at, dobcon 0x1, subb, dup, dohcon 0x190, store, cstor, next, END-CODE 0x00000950, // 0968 00000950 ( link to <# ) 0x4c4f4804, // 096c 4c4f4804 0x4 "HOLD" 0x00000044, // 0970 00000044 0x00000006, // HOLD 0974 00000006 dolist 0x0978, next, 0x00000208, // 0978 00000208 HLD // 00002004 docon 0x190, next, 0x00000390, // 097c 00000390 @ // 0000200d at, next, 0x000006ac, // 0980 000006ac 1- // 00202904 docon 0x1, subb, next, 0x0000042c, // 0984 0000042c DUP // 00002018 dup, next, 0x00000208, // 0988 00000208 HLD // 00002004 docon 0x190, next, 0x00000384, // 098c 00000384 ! // 0000200c store, next, 0x0000039c, // 0990 0000039c C! // 0000200e cstor, next, 0x00000338, // 0994 00000338 EXIT // 00000007 exitt, next, // 097 /////// : # BASE @ EXTRACT HOLD ; 0x0000096c, // 0998 0000096c ( link to HOLD ) 0x00002301, // 099c 00002301 0x1 "#" 0x00000006, // # 09a0 00000006 dolist 0x09a4, next, 0x00000268, // 09a4 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 09a8 00000390 @ // 0000200d at, next, 0x0000092c, // 09ac 0000092c EXTRACT // 00000006 dolist 0x930, next, 0x00000974, // 09b0 00000974 HOLD // 00000006 dolist 0x978, next, 0x00000338, // 09b4 00000338 EXIT // 00000007 exitt, next, // 098 /////// : #S BEGIN # DUP WHILE REPEAT ; 0x0000099c, // 09b8 0000099c ( link to # ) 0x00532302, // 09bc 00532302 0x2 "#S" 0x00000006, // #S 09c0 00000006 dolist 0x09c4, next, 0x000009a0, // 09c4 000009a0 # // 00000006 dolist 0x9a4, next, 0x0000042c, // 09c8 0000042c DUP // 00002018 dup, next, 0x00000368, // 09cc 00000368 QBRANCH // 0000000a qbran 0x09dc, next, 0x000009dc, // 09d0 000009dc 0x00000378, // 09d4 00000378 BRANCH // 0000000b bran 0x09c4, next, 0x000009c4, // 09d8 000009c4 0x00000338, // 09dc 00000338 EXIT // 00000007 exitt, next, // 099 /////// : SIGN 0< IF 0x2d HOLD THEN ; // CODE SIGN zless, if, dobcon 0x2d, pbran 0x974-P, then, next, END-CODE 0x000009bc, // 09e0 000009bc ( link to #S ) 0x47495304, // 09e4 47495304 0x4 "SIGN" 0x0000004e, // 09e8 0000004e 0x00000006, // SIGN 09ec 00000006 dolist 0x09f0, next, 0x00000458, // 09f0 00000458 0< // 0000201b zless, next, 0x00000368, // 09f4 00000368 QBRANCH // 0000000a qbran 0x0a08, next, 0x00000a08, // 09f8 00000a08 0x00000318, // 09fc 00000318 DOLIT // 00000005 dolit 0x2d, next, 0x0000002d, // 0a00 0000002d 0x00000974, // 0a04 00000974 HOLD // 00000006 dolist 0x978, next, 0x00000338, // 0a08 00000338 EXIT // 00000007 exitt, next, // 100 /////// : #> DROP HLD @ PAD OVER - ; // CODE drop, dohcon 0x190, at, dohcon 0x1ac, at, dobcon 0x50, plus, over, subb, next, END-CODE 0x000009e4, // 0a0c 000009e4 ( link to SIGN ) 0x003e2302, // 0a10 003e2302 0x2 "#>" 0x00000006, // #> 0a14 00000006 dolist 0x0a18, next, 0x00000420, // 0a18 00000420 DROP // 00002017 drop, next, 0x00000208, // 0a1c 00000208 HLD // 00002004 docon 0x190, next, 0x00000390, // 0a20 00000390 @ // 0000200d at, next, 0x000007a8, // 0a24 000007a8 PAD // 00000006 dolist 0x7ac, next, 0x0000044c, // 0a28 0000044c OVER // 0000201a over, next, 0x00000508, // 0a2c 00000508 - // 00002029 subb, next, 0x00000338, // 0a30 00000338 EXIT // 00000007 exitt, next, // 101 /////// : str DUP >R ABS <# #S R> SIGN #> ; 0x00000a10, // 0a34 00000a10 ( link to #> ) 0x72747303, // 0a38 72747303 0x3 "str" 0x00000006, // str 0a3c 00000006 dolist 0x0a40, next, 0x0000042c, // 0a40 0000042c DUP // 00002018 dup, next, 0x000003f0, // 0a44 000003f0 >R // 00002014 tor, next, 0x00000514, // 0a48 00000514 ABS // 0000202a abss, next, 0x00000954, // 0a4c 00000954 <# // 00000006 dolist 0x958, next, 0x000009c0, // 0a50 000009c0 #S // 00000006 dolist 0x9c4, next, 0x000003d8, // 0a54 000003d8 R> // 00002012 rfrom, next, 0x000009ec, // 0a58 000009ec SIGN // 00000006 dolist 0x9f0, next, 0x00000a14, // 0a5c 00000a14 #> // 00000006 dolist 0xa18, next, 0x00000338, // 0a60 00000338 EXIT // 00000007 exitt, next, // 102 /////// : HEX 0x10 BASE ! ; // CODE HEX dobcon 0x10, dohcon 0x1a4, store, next, END-CODE 0x00000a38, // 0a64 00000a38 ( link to str ) 0x58454803, // 0a68 58454803 0x3 "HEX" 0x00000006, // HEX 0a6c 00000006 dolist 0x0a70, next, 0x00000318, // 0a70 00000318 DOLIT // 00000005 dolit 0x10, next, 0x00000010, // 0a74 00000010 0x00000268, // 0a78 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000384, // 0a7c 00000384 ! // 0000200c store, next, 0x00000338, // 0a80 00000338 EXIT // 00000007 exitt, next, // 103 /////// : DECIMAL 0xa BASE ! ; // CODE DECIMAL dobcon 0xa, dohcon 0x1a4, store, next, END-CODE 0x00000a68, // 0a84 00000a68 ( link to HEX ) 0x43454407, // 0a88 43454407 0x7 "DECIMAL" 0x4c414d49, // 0a8c 4c414d49 0x00000006, // DECIMAL 0a90 00000006 dolist 0x0a94, next, 0x00000318, // 0a94 00000318 DOLIT // 00000005 dolit 0xa, next, 0x0000000a, // 0a98 0000000a 0x00000268, // 0a9c 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000384, // 0aa0 00000384 ! // 0000200c store, next, 0x00000338, // 0aa4 00000338 EXIT // 00000007 exitt, next, // 104 /////// : wupper 0x5f5f5f5f AND ; CODE docon 0x5f5f5f5f, andd, next, END-CODE 0x00000a88, // 0aa8 00000a88 ( link to DECIMAL ) 0x70757706, // 0aac 70757706 0x6 "wupper" 0x00726570, // 0ab0 00726570 0x00000006, // wupper 0ab4 00000006 dolist 0x0ab8, next, 0x00000318, // 0ab8 00000318 DOLIT // 00000005 dolit 0x5f5f5f5f, next, 0x5f5f5f5f, // 0abc 5f5f5f5f 0x00000464, // 0ac0 00000464 AND // 0000201c andd, next, 0x00000338, // 0ac4 00000338 EXIT // 00000007 exitt, next, // 105 /////// : >upper DUP 0x61 0x7b WITHIN IF 0x5f AND THEN ; // CODE >upper dup, dobcon 0x61, dobcon 0x7b, over, subb, tor, subb, rfrom, uless, if, dobcon 0x5f, andd, then, next, END-CODE 0x00000aac, // 0ac8 00000aac ( link to wupper ) 0x70753e06, // 0acc 70753e06 0x6 ">upper" 0x00726570, // 0ad0 00726570 0x00000006, // >upper 0ad4 00000006 dolist 0x0ad8, next, 0x0000042c, // 0ad8 0000042c DUP // 00002018 dup, next, 0x00000318, // 0adc 00000318 DOLIT // 00000005 dolit 0x61, next, 0x00000061, // 0ae0 00000061 0x00000318, // 0ae4 00000318 DOLIT // 00000005 dolit 0x7b, next, 0x0000007b, // 0ae8 0000007b 0x000006f0, // 0aec 000006f0 WITHIN // 00000006 dolist 0x6f4, next, 0x00000368, // 0af0 00000368 QBRANCH // 0000000a qbran 0x0b04, next, 0x00000b04, // 0af4 00000b04 0x00000318, // 0af8 00000318 DOLIT // 00000005 dolit 0x5f, next, 0x0000005f, // 0afc 0000005f 0x00000464, // 0b00 00000464 AND // 0000201c andd, next, 0x00000338, // 0b04 00000338 EXIT // 00000007 exitt, next, // 106 /////// : DIGIT? >R >upper 0x30 - 0x 9 OVER < IF 0x7 - DUP 0xa < OR THEN R> U< ; 0x00000acc, // 0b08 00000acc ( link to >upper ) 0x47494406, // 0b0c 47494406 0x6 "DIGIT?" 0x003f5449, // 0b10 003f5449 0x00000006, // DIGIT? 0b14 00000006 dolist 0x0b18, next, 0x000003f0, // 0b18 000003f0 >R // 00002014 tor, next, 0x00000ad4, // 0b1c 00000ad4 >upper // 00000006 dolist 0xad8, next, 0x00000318, // 0b20 00000318 DOLIT // 00000005 dolit 0x30, next, 0x00000030, // 0b24 00000030 0x00000508, // 0b28 00000508 - // 00002029 subb, next, 0x00000318, // 0b2c 00000318 DOLIT // 00000005 dolit 0x9, next, 0x00000009, // 0b30 00000009 0x0000044c, // 0b34 0000044c OVER // 0000201a over, next, 0x00000538, // 0b38 00000538 < // 0000202d less, next, 0x00000368, // 0b3c 00000368 QBRANCH // 0000000a qbran 0x0b64, next, 0x00000b64, // 0b40 00000b64 0x00000318, // 0b44 00000318 DOLIT // 00000005 dolit 0x7, next, 0x00000007, // 0b48 00000007 0x00000508, // 0b4c 00000508 - // 00002029 subb, next, 0x0000042c, // 0b50 0000042c DUP // 00002018 dup, next, 0x00000318, // 0b54 00000318 DOLIT // 00000005 dolit 0xa, next, 0x0000000a, // 0b58 0000000a 0x00000538, // 0b5c 00000538 < // 0000202d less, next, 0x00000470, // 0b60 00000470 OR // 0000201d orr, next, 0x0000042c, // 0b64 0000042c DUP // 00002018 dup, next, 0x000003d8, // 0b68 000003d8 R> // 00002012 rfrom, next, 0x0000052c, // 0b6c 0000052c U< // 0000202c uless, next, 0x00000338, // 0b70 00000338 EXIT // 00000007 exitt, next, // 107 /////// : NUMBER? BASE @ >R 0x0 OVER COUNT OVER C@ 0x24 = // 0bb4 // IF ( QBRANCH bd0 ) // 0bbc // HEX SWAP 1+ SWAP 1- // 0bd0 // THEN OVER C@ 0x2d = >R SWAP R@ - SWAP R@ + ?DUP // 0c04 // IF ( QBRANCH c94 ) // 0c0c // 1- // 0c10 // FOR // 0c14 // DUP >R C@ BASE @ DIGIT? // 0c2c // IF ( QBRANCH c78 ) // 0c34 // SWAP BASE # * + R> 1+ // 0c50 // NEXT ( DONEXT c14 ) // 0c58 // DROP R@ // 0c60 // IF ( QBRANCH c6c ) // 0c68 // NEGATE // 0c6c // THEN SWAP // 0c70 // IF ( QBRANCH c90 ) // 0c78 // R> R> 2DROP 2DROP 0 // 0c90 // THEN DUP // 0c94 // THEN R> 2DROP R> BASE ! ; 0x00000b0c, // 0b74 00000b0c ( link to DIGIT? ) 0x4d554e07, // 0b78 4d554e07 0x7 "NUMBER?" 0x3f524542, // 0b7c 3f524542 0x00000006, // NUMBER? 0b80 00000006 dolist 0x0b84, next, 0x00000268, // 0b84 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 0b88 00000390 @ // 0000200d at, next, 0x000003f0, // 0b8c 000003f0 >R // 00002014 tor, next, 0x00000318, // 0b90 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 0b94 00000000 0x0000044c, // 0b98 0000044c OVER // 0000201a over, next, 0x00000604, // 0b9c 00000604 COUNT // 0000203c count, next, 0x0000044c, // 0ba0 0000044c OVER // 0000201a over, next, 0x000003a8, // 0ba4 000003a8 C@ // 0000200f cat, next, 0x00000318, // 0ba8 00000318 DOLIT // 00000005 dolit 0x24, next, 0x00000024, // 0bac 00000024 0x00000520, // 0bb0 00000520 = // 0000202b equal, next, 0x00000368, // 0bb4 00000368 QBRANCH // 0000000a qbran 0x0bd0, next, 0x00000bd0, // 0bb8 00000bd0 0x00000a6c, // 0bbc 00000a6c HEX // 00000006 dolist 0xa70, next, 0x0000043c, // 0bc0 0000043c SWAP // 00002019 swap, next, 0x0000069c, // 0bc4 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x0000043c, // 0bc8 0000043c SWAP // 00002019 swap, next, 0x000006ac, // 0bcc 000006ac 1- // 00202904 docon 0x1, subb, next, 0x0000044c, // 0bd0 0000044c OVER // 0000201a over, next, 0x000003a8, // 0bd4 000003a8 C@ // 0000200f cat, next, 0x00000318, // 0bd8 00000318 DOLIT // 00000005 dolit 0x2d, next, 0x0000002d, // 0bdc 0000002d 0x00000520, // 0be0 00000520 = // 0000202b equal, next, 0x000003f0, // 0be4 000003f0 >R // 00002014 tor, next, 0x0000043c, // 0be8 0000043c SWAP // 00002019 swap, next, 0x000003e4, // 0bec 000003e4 R@ // 00002013 rat, next, 0x00000508, // 0bf0 00000508 - // 00002029 subb, next, 0x0000043c, // 0bf4 0000043c SWAP // 00002019 swap, next, 0x000003e4, // 0bf8 000003e4 R@ // 00002013 rat, next, 0x000004d0, // 0bfc 000004d0 + // 00002025 plus, next, 0x00000498, // 0c00 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 0c04 00000368 QBRANCH // 0000000a qbran 0x0c94, next, 0x00000c94, // 0c08 00000c94 0x000006ac, // 0c0c 000006ac 1- // 00202904 docon 0x1, subb, next, 0x000003f0, // 0c10 000003f0 >R // 00002014 tor, next, 0x0000042c, // 0c14 0000042c DUP // 00002018 dup, next, 0x000003f0, // 0c18 000003f0 >R // 00002014 tor, next, 0x000003a8, // 0c1c 000003a8 C@ // 0000200f cat, next, 0x00000268, // 0c20 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 0c24 00000390 @ // 0000200d at, next, 0x00000b14, // 0c28 00000b14 DIGIT? // 00000006 dolist 0xb18, next, 0x00000368, // 0c2c 00000368 QBRANCH // 0000000a qbran 0x0c78, next, 0x00000c78, // 0c30 00000c78 0x0000043c, // 0c34 0000043c SWAP // 00002019 swap, next, 0x00000268, // 0c38 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 0c3c 00000390 @ // 0000200d at, next, 0x00000598, // 0c40 00000598 * // 00002034 star, next, 0x000004d0, // 0c44 000004d0 + // 00002025 plus, next, 0x000003d8, // 0c48 000003d8 R> // 00002012 rfrom, next, 0x0000069c, // 0c4c 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 0c50 00000358 DONEXT // 00000009 donext 0x0c14, next, 0x00000c14, // 0c54 00000c14 0x00000420, // 0c58 00000420 DROP // 00002017 drop, next, 0x000003e4, // 0c5c 000003e4 R@ // 00002013 rat, next, 0x00000368, // 0c60 00000368 QBRANCH // 0000000a qbran 0x0c6c, next, 0x00000c6c, // 0c64 00000c6c 0x000004ec, // 0c68 000004ec NEGATE // 00002027 negat, next, 0x0000043c, // 0c6c 0000043c SWAP // 00002019 swap, next, 0x00000378, // 0c70 00000378 BRANCH // 0000000b bran 0x0c90, next, 0x00000c90, // 0c74 00000c90 0x000003d8, // 0c78 000003d8 R> // 00002012 rfrom, next, 0x000003d8, // 0c7c 000003d8 R> // 00002012 rfrom, next, 0x000004b4, // 0c80 000004b4 2DROP // 00002023 ddrop, next, 0x000004b4, // 0c84 000004b4 2DROP // 00002023 ddrop, next, 0x00000318, // 0c88 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 0c8c 00000000 0x0000042c, // 0c90 0000042c DUP // 00002018 dup, next, 0x000003d8, // 0c94 000003d8 R> // 00002012 rfrom, next, 0x000004b4, // 0c98 000004b4 2DROP // 00002023 ddrop, next, 0x000003d8, // 0c9c 000003d8 R> // 00002012 rfrom, next, 0x00000268, // 0ca0 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000384, // 0ca4 00000384 ! // 0000200c store, next, 0x00000338, // 0ca8 00000338 EXIT // 00000007 exitt, next, // 108 /////// : SPACE BL EMIT ; // CODE SPACE dobcon 0x20, txsto, next, END-CODE 0x00000b78, // 0cac 00000b78 ( link to NUMBER? ) 0x41505305, // 0cb0 41505305 0x5 "SPACE" 0x00004543, // 0cb4 00004543 0x00000006, // SPACE 0cb8 00000006 dolist 0x0cbc, next, 0x00000628, // 0cbc 00000628 BL // 00002004 docon 0x20, next, 0x00000308, // 0cc0 00000308 EMIT // 00002003 txsto, next, 0x00000338, // 0cc4 00000338 EXIT // 00000007 exitt, next, // 109 /////// : CHARS SWAP 0x0 MAX FOR AFT DUP EMIT NEXT DROP ; // CODE CHARS swap, dobcon 0x0, maxx, tor, pbran 0x3, dup, txsto, pdonext 0xfd, drop, next, END-CODE 0x00000cb0, // 0cc8 00000cb0 ( link to SPACE ) 0x41484305, // 0ccc 41484305 0x5 "CHARS" 0x00005352, // 0cd0 00005352 0x00000006, // CHARS 0cd4 00000006 dolist 0x0cd8, next, 0x0000043c, // 0cd8 0000043c SWAP // 00002019 swap, next, 0x00000318, // 0cdc 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 0ce0 00000000 0x00000610, // 0ce4 00000610 MAX // 0000203e maxx, next, 0x000003f0, // 0ce8 000003f0 >R // 00002014 tor, next, 0x00000378, // 0cec 00000378 BRANCH // 0000000b bran 0x0cfc, next, 0x00000cfc, // 0cf0 00000cfc 0x0000042c, // 0cf4 0000042c DUP // 00002018 dup, next, 0x00000308, // 0cf8 00000308 EMIT // 00002003 txsto, next, 0x00000358, // 0cfc 00000358 DONEXT // 00000009 donext 0x0cf4, next, 0x00000cf4, // 0d00 00000cf4 0x00000420, // 0d04 00000420 DROP // 00002017 drop, next, 0x00000338, // 0d08 00000338 EXIT // 00000007 exitt, next, // 110 /////// : SPACES BL CHARS ; // CODE SPACES dobcon 0x20, pbran 0xcd4-P, next, END-CODE 0x00000ccc, // 0d0c 00000ccc ( link to CHARS ) 0x41505306, // 0d10 41505306 0x6 "SPACES" 0x00534543, // 0d14 00534543 0x00000006, // SPACES 0d18 00000006 dolist 0x0d1c, next, 0x00000628, // 0d1c 00000628 BL // 00002004 docon 0x20, next, 0x00000cd4, // 0d20 00000cd4 CHARS // 00000006 dolist 0xcd8, next, 0x00000338, // 0d24 00000338 EXIT // 00000007 exitt, next, // 111 /////// : TYPE FOR ATF DUP C@ >CHAR EMIT 1+ THEN NEXT DROP ; 0x00000d10, // 0d28 00000d10 ( link to SPACES ) 0x50595404, // 0d2c 50595404 0x4 "TYPE" 0x00000045, // 0d30 00000045 0x00000006, // TYPE 0d34 00000006 dolist 0x0d38, next, 0x000003f0, // 0d38 000003f0 >R // 00002014 tor, next, 0x00000378, // 0d3c 00000378 BRANCH // 0000000b bran 0x0d58, next, 0x00000d58, // 0d40 00000d58 0x0000042c, // 0d44 0000042c DUP // 00002018 dup, next, 0x000003a8, // 0d48 000003a8 C@ // 0000200f cat, next, 0x0000071c, // 0d4c 0000071c >CHAR // 00000006 dolist 0x720, next, 0x00000308, // 0d50 00000308 EMIT // 00002003 txsto, next, 0x0000069c, // 0d54 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 0d58 00000358 DONEXT // 00000009 donext 0x0d44, next, 0x00000d44, // 0d5c 00000d44 0x00000420, // 0d60 00000420 DROP // 00002017 drop, next, 0x00000338, // 0d64 00000338 EXIT // 00000007 exitt, next, // 112 /////// : CR 0xa 0xd EMIT EMIT ; // CODE CR dobcon 0xa, dobcon 0xd, txsto, txsto, next, END-CODE 0x00000d2c, // 0d68 00000d2c ( link to TYPE ) 0x00524302, // 0d6c 00524302 0x2 "CR" 0x00000006, // CR 0d70 00000006 dolist 0x0d74, next, 0x00000318, // 0d74 00000318 DOLIT // 00000005 dolit 0xa, next, 0x0000000a, // 0d78 0000000a 0x00000318, // 0d7c 00000318 DOLIT // 00000005 dolit 0xd, next, 0x0000000d, // 0d80 0000000d 0x00000308, // 0d84 00000308 EMIT // 00002003 txsto, next, 0x00000308, // 0d88 00000308 EMIT // 00002003 txsto, next, 0x000003bc, // 0d8c 000003bc sendPacket // 00002010 sndpck, next, 0x00000338, // 0d90 00000338 EXIT // 00000007 exitt, next, // 113 /////// : do$ R> R@ R> COUNT + ALIGNED >R SWAP >R ; // CODE do$ rfrom, rat, rfrom, count, plus, plus, dobcon 0x3, plus, dobcon -0x4, andd, tor, swap, tor, next, END-CODE 0x00000d6c, // 0d94 00000d6c ( link to CR ) 0x246f6403, // 0d98 246f6403 0x3 "do$" 0x00000006, // do$ 0d9c 00000006 dolist 0x0da0, next, 0x000003d8, // 0da0 000003d8 R> // 00002012 rfrom, next, 0x000003e4, // 0da4 000003e4 R@ // 00002013 rat, next, 0x000003d8, // 0da8 000003d8 R> // 00002012 rfrom, next, 0x00000604, // 0dac 00000604 COUNT // 0000203c count, next, 0x000004d0, // 0db0 000004d0 + // 00002025 plus, next, 0x00000764, // 0db4 00000764 ALIGNED // 00000006 dolist 0x768, next, 0x000003f0, // 0db8 000003f0 >R // 00002014 tor, next, 0x0000043c, // 0dbc 0000043c SWAP // 00002019 swap, next, 0x000003f0, // 0dc0 000003f0 >R // 00002014 tor, next, 0x00000338, // 0dc4 00000338 EXIT // 00000007 exitt, next, // 114 /////// : $"| do$ ; 0x00000d98, // 0dc8 00000d98 ( link to do$ ) 0x7c222403, // 0dcc 7c222403 0x3 "$\"|" 0x00000006, // $"| 0dd0 00000006 dolist 0x0dd4, next, 0x00000d9c, // 0dd4 00000d9c do$ // 00000006 dolist 0xda0, next, 0x00000338, // 0dd8 00000338 EXIT // 00000007 exitt, next, // 115 /////// : ."| do$ COUNT TYPE ; 0x00000dcc, // 0ddc 00000dcc ( link to $"| ) 0x7c222e03, // 0de0 7c222e03 0x3 ".\"|" 0x00000006, // ."| 0de4 00000006 dolist 0x0de8, next, 0x00000d9c, // 0de8 00000d9c do$ // 00000006 dolist 0xda0, next, 0x00000604, // 0dec 00000604 COUNT // 0000203c count, next, 0x00000d34, // 0df0 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000338, // 0df4 00000338 EXIT // 00000007 exitt, next, // 116 /////// : .R >R str R> OVER - SPACES TYPE ; 0x00000de0, // 0df8 00000de0 ( link to ."| ) 0x00522e02, // 0dfc 00522e02 0x2 ".R" 0x00000006, // .R 0e00 00000006 dolist 0x0e04, next, 0x000003f0, // 0e04 000003f0 >R // 00002014 tor, next, 0x00000a3c, // 0e08 00000a3c str // 00000006 dolist 0xa40, next, 0x000003d8, // 0e0c 000003d8 R> // 00002012 rfrom, next, 0x0000044c, // 0e10 0000044c OVER // 0000201a over, next, 0x00000508, // 0e14 00000508 - // 00002029 subb, next, 0x00000d18, // 0e18 00000d18 SPACES // 00000006 dolist 0xd1c, next, 0x00000d34, // 0e1c 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000338, // 0e20 00000338 EXIT // 00000007 exitt, next, // 117 /////// : U.R >R <# #S #> OVER - SPACES TYPE ; 0x00000dfc, // 0e24 00000dfc ( link to .R ) 0x522e5503, // 0e28 522e5503 0x3 "U.R" 0x00000006, // U.R 0e2c 00000006 dolist 0x0e30, next, 0x000003f0, // 0e30 000003f0 >R // 00002014 tor, next, 0x00000954, // 0e34 00000954 <# // 00000006 dolist 0x958, next, 0x000009c0, // 0e38 000009c0 #S // 00000006 dolist 0x9c4, next, 0x00000a14, // 0e3c 00000a14 #> // 00000006 dolist 0xa18, next, 0x000003d8, // 0e40 000003d8 R> // 00002012 rfrom, next, 0x0000044c, // 0e44 0000044c OVER // 0000201a over, next, 0x00000508, // 0e48 00000508 - // 00002029 subb, next, 0x00000d18, // 0e4c 00000d18 SPACES // 00000006 dolist 0xd1c, next, 0x00000d34, // 0e50 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000338, // 0e54 00000338 EXIT // 00000007 exitt, next, // 118 /////// : U. <# #S #> SPACE TYPE ; 0x00000e28, // 0e58 00000e28 ( link to U.R ) 0x002e5502, // 0e5c 002e5502 0x2 "U." 0x00000006, // U. 0e60 00000006 dolist 0x0e64, next, 0x00000954, // 0e64 00000954 <# // 00000006 dolist 0x958, next, 0x000009c0, // 0e68 000009c0 #S // 00000006 dolist 0x9c4, next, 0x00000a14, // 0e6c 00000a14 #> // 00000006 dolist 0xa18, next, 0x00000cb8, // 0e70 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000d34, // 0e74 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000338, // 0e78 00000338 EXIT // 00000007 exitt, next, // 119 /////// : . BASE @ 0xa XOR IF U. EXIT THEN str SPACE TYPE ; 0x00000e5c, // 0e7c 00000e5c ( link to U. ) 0x00002e01, // 0e80 00002e01 0x1 "." 0x00000006, // . 0e84 00000006 dolist 0x0e88, next, 0x00000268, // 0e88 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 0e8c 00000390 @ // 0000200d at, next, 0x00000318, // 0e90 00000318 DOLIT // 00000005 dolit 0xa, next, 0x0000000a, // 0e94 0000000a 0x0000047c, // 0e98 0000047c XOR // 0000201e xorr, next, 0x00000368, // 0e9c 00000368 QBRANCH // 0000000a qbran 0x0eac, next, 0x00000eac, // 0ea0 00000eac 0x00000e60, // 0ea4 00000e60 U. // 00000006 dolist 0xe64, next, 0x00000338, // 0ea8 00000338 EXIT // 00000007 exitt, next, 0x00000a3c, // 0eac 00000a3c str // 00000006 dolist 0xa40, next, 0x00000cb8, // 0eb0 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000d34, // 0eb4 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000338, // 0eb8 00000338 EXIT // 00000007 exitt, next, // 120 /////// : ? @ . ; 0x00000e80, // 0ebc 00000e80 ( link to . ) 0x00003f01, // 0ec0 00003f01 0x1 "?" 0x00000006, // ? 0ec4 00000006 dolist 0x0ec8, next, 0x00000390, // 0ec8 00000390 @ // 0000200d at, next, 0x00000e84, // 0ecc 00000e84 . // 00000006 dolist 0xe88, next, 0x00000338, // 0ed0 00000338 EXIT // 00000007 exitt, next, // 121 /////// : (parse) tmp C! OVER >R DUP // 0ef8 // IF ( QBRANCH ff4 ) // 0f00 // 1- tmp C@ BL = // 0f14 // IF ( QBRANCH f68 ) // 0f1c // FOR // 0f20 // BL OVER C@ - 0< NOT // 0f38 // IF ( QBRANCH f64 ) // 0f40 // 1+ // 0f44 // NEXT ( DONEXT f20 ) // 0f4c // R> DROP 0x0 DUP EXIT // 0f64 // THEN R> // 0f68 // THEN OVER SWAP // 0f70 // FOR // 0f74 // tmp C@ = tmp C@ BL = // 0f98 // IF ( QBRANCH fa4 ) // 0fa0 // 0< // 0fa4 // THEN // 0fa4 // IF ( QBRANCH fc8 ) // 0fac // 1+ // 0fb0 // NEXT ( DONEXT f74 ) // 0fb8 // DUP >R // 0fc0 // ELSE ( BRANCH fdc ) // 0fc8 // R> DROP DUP // 0fdc // THEN 1+ >R // 0ff4 // THEN OVER - R> R> - ; 0x00000ec0, // 0ed4 00000ec0 ( link to ? ) 0x61702807, // 0ed8 61702807 0x7 "(parse)" 0x29657372, // 0edc 29657372 0x00000006, // (parse) 0ee0 00000006 dolist 0x0ee4, next, 0x000002d8, // 0ee4 000002d8 tmp // 00002004 docon 0x1bc, next, 0x0000039c, // 0ee8 0000039c C! // 0000200e cstor, next, 0x0000044c, // 0eec 0000044c OVER // 0000201a over, next, 0x000003f0, // 0ef0 000003f0 >R // 00002014 tor, next, 0x0000042c, // 0ef4 0000042c DUP // 00002018 dup, next, 0x00000368, // 0ef8 00000368 QBRANCH // 0000000a qbran 0x0ff4, next, 0x00000ff4, // 0efc 00000ff4 0x000006ac, // 0f00 000006ac 1- // 00202904 docon 0x1, subb, next, 0x000002d8, // 0f04 000002d8 tmp // 00002004 docon 0x1bc, next, 0x000003a8, // 0f08 000003a8 C@ // 0000200f cat, next, 0x00000628, // 0f0c 00000628 BL // 00002004 docon 0x20, next, 0x00000520, // 0f10 00000520 = // 0000202b equal, next, 0x00000368, // 0f14 00000368 QBRANCH // 0000000a qbran 0x0f68, next, 0x00000f68, // 0f18 00000f68 0x000003f0, // 0f1c 000003f0 >R // 00002014 tor, next, 0x00000628, // 0f20 00000628 BL // 00002004 docon 0x20, next, 0x0000044c, // 0f24 0000044c OVER // 0000201a over, next, 0x000003a8, // 0f28 000003a8 C@ // 0000200f cat, next, 0x00000508, // 0f2c 00000508 - // 00002029 subb, next, 0x00000458, // 0f30 00000458 0< // 0000201b zless, next, 0x000004dc, // 0f34 000004dc NOT // 00002026 inver, next, 0x00000368, // 0f38 00000368 QBRANCH // 0000000a qbran 0x0f64, next, 0x00000f64, // 0f3c 00000f64 0x0000069c, // 0f40 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 0f44 00000358 DONEXT // 00000009 donext 0x0f20, next, 0x00000f20, // 0f48 00000f20 0x000003d8, // 0f4c 000003d8 R> // 00002012 rfrom, next, 0x00000420, // 0f50 00000420 DROP // 00002017 drop, next, 0x00000318, // 0f54 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 0f58 00000000 0x0000042c, // 0f5c 0000042c DUP // 00002018 dup, next, 0x00000338, // 0f60 00000338 EXIT // 00000007 exitt, next, 0x000003d8, // 0f64 000003d8 R> // 00002012 rfrom, next, 0x0000044c, // 0f68 0000044c OVER // 0000201a over, next, 0x0000043c, // 0f6c 0000043c SWAP // 00002019 swap, next, 0x000003f0, // 0f70 000003f0 >R // 00002014 tor, next, 0x000002d8, // 0f74 000002d8 tmp // 00002004 docon 0x1bc, next, 0x000003a8, // 0f78 000003a8 C@ // 0000200f cat, next, 0x0000044c, // 0f7c 0000044c OVER // 0000201a over, next, 0x000003a8, // 0f80 000003a8 C@ // 0000200f cat, next, 0x00000508, // 0f84 00000508 - // 00002029 subb, next, 0x000002d8, // 0f88 000002d8 tmp // 00002004 docon 0x1bc, next, 0x000003a8, // 0f8c 000003a8 C@ // 0000200f cat, next, 0x00000628, // 0f90 00000628 BL // 00002004 docon 0x20, next, 0x00000520, // 0f94 00000520 = // 0000202b equal, next, 0x00000368, // 0f98 00000368 QBRANCH // 0000000a qbran 0x0fa4, next, 0x00000fa4, // 0f9c 00000fa4 0x00000458, // 0fa0 00000458 0< // 0000201b zless, next, 0x00000368, // 0fa4 00000368 QBRANCH // 0000000a qbran 0x0fc8, next, 0x00000fc8, // 0fa8 00000fc8 0x0000069c, // 0fac 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x00000358, // 0fb0 00000358 DONEXT // 00000009 donext 0x0f74, next, 0x00000f74, // 0fb4 00000f74 0x0000042c, // 0fb8 0000042c DUP // 00002018 dup, next, 0x000003f0, // 0fbc 000003f0 >R // 00002014 tor, next, 0x00000378, // 0fc0 00000378 BRANCH // 0000000b bran 0x0fdc, next, 0x00000fdc, // 0fc4 00000fdc 0x000003d8, // 0fc8 000003d8 R> // 00002012 rfrom, next, 0x00000420, // 0fcc 00000420 DROP // 00002017 drop, next, 0x0000042c, // 0fd0 0000042c DUP // 00002018 dup, next, 0x0000069c, // 0fd4 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x000003f0, // 0fd8 000003f0 >R // 00002014 tor, next, 0x0000044c, // 0fdc 0000044c OVER // 0000201a over, next, 0x00000508, // 0fe0 00000508 - // 00002029 subb, next, 0x000003d8, // 0fe4 000003d8 R> // 00002012 rfrom, next, 0x000003d8, // 0fe8 000003d8 R> // 00002012 rfrom, next, 0x00000508, // 0fec 00000508 - // 00002029 subb, next, 0x00000338, // 0ff0 00000338 EXIT // 00000007 exitt, next, 0x0000044c, // 0ff4 0000044c OVER // 0000201a over, next, 0x000003d8, // 0ff8 000003d8 R> // 00002012 rfrom, next, 0x00000508, // 0ffc 00000508 - // 00002029 subb, next, 0x00000338, // 1000 00000338 EXIT // 00000007 exitt, next, // 122 /////// : PACK$ DUP >R 2DUP + -4 AND 0 SWAP ! 2DUP C! 1+ SWAP CMOVE R> ; 0x00000ed8, // 1004 00000ed8 ( link to (parse) ) 0x43415005, // 1008 43415005 0x5 "PACK$" 0x0000244b, // 100c 0000244b 0x00000006, // PACK$ 1010 00000006 dolist 0x1014, next, 0x0000042c, // 1014 0000042c DUP // 00002018 dup, next, 0x000003f0, // 1018 000003f0 >R // 00002014 tor, next, 0x000004c4, // 101c 000004c4 2DUP // 00002024 ddup, next, 0x000004d0, // 1020 000004d0 + // 00002025 plus, next, 0x00000318, // 1024 00000318 DOLIT // 00000005 dolit 0xfffffffc, next, 0xfffffffc, // 1028 fffffffc 0x00000464, // 102c 00000464 AND // 0000201c andd, next, 0x00000318, // 1030 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1034 00000000 0x0000043c, // 1038 0000043c SWAP // 00002019 swap, next, 0x00000384, // 103c 00000384 ! // 0000200c store, next, 0x000004c4, // 1040 000004c4 2DUP // 00002024 ddup, next, 0x0000039c, // 1044 0000039c C! // 0000200e cstor, next, 0x0000069c, // 1048 0000069c 1+ // 00202504 docon 0x1, plus, next, 0x0000043c, // 104c 0000043c SWAP // 00002019 swap, next, 0x00000810, // 1050 00000810 CMOVE // 00002047 cmove, next, 0x000003d8, // 1054 000003d8 R> // 00002012 rfrom, next, 0x00000338, // 1058 00000338 EXIT // 00000007 exitt, next, // 123 /////// : PARSE >R TIB >IN @ + #TIB @ >IN @ - R> (parse) >IN +! ; 0x00001008, // 105c 00001008 ( link to PACK$ ) 0x52415005, // 1060 52415005 0x5 "PARSE" 0x00004553, // 1064 00004553 0x00000006, // PARSE 1068 00000006 dolist 0x106c, next, 0x000003f0, // 106c 000003f0 >R // 00002014 tor, next, 0x000007c8, // 1070 000007c8 TIB // 00000006 dolist 0x7cc, next, 0x0000022c, // 1074 0000022c >IN // 00002004 docon 0x198, next, 0x00000390, // 1078 00000390 @ // 0000200d at, next, 0x000004d0, // 107c 000004d0 + // 00002025 plus, next, 0x00000240, // 1080 00000240 #TIB // 00002004 docon 0x19c, next, 0x00000390, // 1084 00000390 @ // 0000200d at, next, 0x0000022c, // 1088 0000022c >IN // 00002004 docon 0x198, next, 0x00000390, // 108c 00000390 @ // 0000200d at, next, 0x00000508, // 1090 00000508 - // 00002029 subb, next, 0x000003d8, // 1094 000003d8 R> // 00002012 rfrom, next, 0x00000ee0, // 1098 00000ee0 (parse) // 00000006 dolist 0xee4, next, 0x0000022c, // 109c 0000022c >IN // 00002004 docon 0x198, next, 0x000005dc, // 10a0 000005dc +! // 00002039 pstor, next, 0x00000338, // 10a4 00000338 EXIT // 00000007 exitt, next, // 124 /////// : TOKEN BL PARSE 0x1f MIN HERE CELL+ PACK$ ; 0x00001060, // 10a8 00001060 ( link to PARSE ) 0x4b4f5405, // 10ac 4b4f5405 0x5 "TOKEN" 0x00004e45, // 10b0 00004e45 0x00000006, // TOKEN 10b4 00000006 dolist 0x10b8, next, 0x00000628, // 10b8 00000628 BL // 00002004 docon 0x20, next, 0x00001068, // 10bc 00001068 PARSE // 00000006 dolist 0x106c, next, 0x00000318, // 10c0 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 10c4 0000001f 0x0000061c, // 10c8 0000061c MIN // 0000203f minn, next, 0x00000790, // 10cc 00000790 HERE // 00000006 dolist 0x794, next, 0x00000650, // 10d0 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x00001010, // 10d4 00001010 PACK$ // 00000006 dolist 0x1014, next, 0x00000338, // 10d8 00000338 EXIT // 00000007 exitt, next, // 125 /////// : WORD PARSE HERE CELL+ PACK$ ; 0x000010ac, // 10dc 000010ac ( link to TOKEN ) 0x524f5704, // 10e0 524f5704 0x4 "WORD" 0x00000044, // 10e4 00000044 0x00000006, // WORD 10e8 00000006 dolist 0x10ec, next, 0x00001068, // 10ec 00001068 PARSE // 00000006 dolist 0x106c, next, 0x00000790, // 10f0 00000790 HERE // 00000006 dolist 0x794, next, 0x00000650, // 10f4 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x00001010, // 10f8 00001010 PACK$ // 00000006 dolist 0x1014, next, 0x00000338, // 10fc 00000338 EXIT // 00000007 exitt, next, // 126 /////// : NAME> COUNT 0x1f AND + ALIGNED ; 0x000010e0, // 1100 000010e0 ( link to WORD ) 0x4d414e05, // 1104 4d414e05 0x5 "NAME>" 0x00003e45, // 1108 00003e45 0x00000006, // NAME> 110c 00000006 dolist 0x1110, next, 0x00000604, // 1110 00000604 COUNT // 0000203c count, next, 0x00000318, // 1114 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 1118 0000001f 0x00000464, // 111c 00000464 AND // 0000201c andd, next, 0x000004d0, // 1120 000004d0 + // 00002025 plus, next, 0x00000764, // 1124 00000764 ALIGNED // 00000006 dolist 0x768, next, 0x00000338, // 1128 00000338 EXIT // 00000007 exitt, next, // 127 /////// : SAME? 0x1f AND CELL/ // 114c // FOR AFT ( BRANCH 0x11b4 ) // 1158 // OVER R@ 0x4 * + @ wupper OVER R@ 0x4 * + @ wupper - ?DUP // 11a0 // IF ( QBRANCH 11b4 ) // 11a8 // R> DROP EXIT // 11b4 // THEN // 11b4 // NEXT ( DONEXT 1158 ) // 11bc // 0x0 ; 0x00001104, // 112c 00001104 ( link to NAME> ) 0x4d415305, // 1130 4d415305 0x5 "SAME?" 0x00003f45, // 1134 00003f45 0x00000006, // SAME? 1138 00000006 dolist 0x113c, next, 0x00000318, // 113c 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 1140 0000001f 0x00000464, // 1144 00000464 AND // 0000201c andd, next, 0x0000068c, // 1148 0000068c CELL/ // 00203204 docon 0x4, slash, next, 0x000003f0, // 114c 000003f0 >R // 00002014 tor, next, 0x00000378, // 1150 00000378 BRANCH // 0000000b bran 0x11b4, next, 0x000011b4, // 1154 000011b4 0x0000044c, // 1158 0000044c OVER // 0000201a over, next, 0x000003e4, // 115c 000003e4 R@ // 00002013 rat, next, 0x00000318, // 1160 00000318 DOLIT // 00000005 dolit 0x4, next, 0x00000004, // 1164 00000004 0x00000598, // 1168 00000598 * // 00002034 star, next, 0x000004d0, // 116c 000004d0 + // 00002025 plus, next, 0x00000390, // 1170 00000390 @ // 0000200d at, next, 0x00000ab4, // 1174 00000ab4 wupper // 00000006 dolist 0xab8, next, 0x0000044c, // 1178 0000044c OVER // 0000201a over, next, 0x000003e4, // 117c 000003e4 R@ // 00002013 rat, next, 0x00000318, // 1180 00000318 DOLIT // 00000005 dolit 0x4, next, 0x00000004, // 1184 00000004 0x00000598, // 1188 00000598 * // 00002034 star, next, 0x000004d0, // 118c 000004d0 + // 00002025 plus, next, 0x00000390, // 1190 00000390 @ // 0000200d at, next, 0x00000ab4, // 1194 00000ab4 wupper // 00000006 dolist 0xab8, next, 0x00000508, // 1198 00000508 - // 00002029 subb, next, 0x00000498, // 119c 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 11a0 00000368 QBRANCH // 0000000a qbran 0x11b4, next, 0x000011b4, // 11a4 000011b4 0x000003d8, // 11a8 000003d8 R> // 00002012 rfrom, next, 0x00000420, // 11ac 00000420 DROP // 00002017 drop, next, 0x00000338, // 11b0 00000338 EXIT // 00000007 exitt, next, 0x00000358, // 11b4 00000358 DONEXT // 00000009 donext 0x1158, next, 0x00001158, // 11b8 00001158 0x00000318, // 11bc 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 11c0 00000000 0x00000338, // 11c4 00000338 EXIT // 00000007 exitt, next, // 128 /////// : find SWAP DUP @ tmp ! DUP @ >R CELL+ SWAP // 1200 // BEGIN @ DUP // 1208 // IF ( QBRANCH 1268 ) // 1210 // DUP @ 0xffffff3f AND wupper R@ wupper XOR // 1234 // IF ( QBRANCH 1250 ) // 123c // CELL+ -1 // 1248 // ELSE ( BRANCH 1260 ) // 1250 // CELL+ tmp @ SAME? // 1260 // THEN // 1260 // ELSE ( BRANCH 1280 ) // 1268 // R> DROP SWAP CELL- SWAP EXIT // 1280 // THEN // 1280 // WHILE ( QBRANCH 1298 ) // 1288 // CELL- CELL- // 1290 // REPEAT ( BRANCH 1200 ) // 1298 // R> DROP SWAP DROP CELL- DUP NAME> SWAP ; 0x00001130, // 11c8 00001130 ( link to SAME? ) 0x6e696604, // 11cc 6e696604 0x4 "find" 0x00000064, // 11d0 00000064 0x00000006, // find 11d4 00000006 dolist 0x11d8, next, 0x0000043c, // 11d8 0000043c SWAP // 00002019 swap, next, 0x0000042c, // 11dc 0000042c DUP // 00002018 dup, next, 0x00000390, // 11e0 00000390 @ // 0000200d at, next, 0x000002d8, // 11e4 000002d8 tmp // 00002004 docon 0x1bc, next, 0x00000384, // 11e8 00000384 ! // 0000200c store, next, 0x0000042c, // 11ec 0000042c DUP // 00002018 dup, next, 0x00000390, // 11f0 00000390 @ // 0000200d at, next, 0x000003f0, // 11f4 000003f0 >R // 00002014 tor, next, 0x00000650, // 11f8 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x0000043c, // 11fc 0000043c SWAP // 00002019 swap, next, 0x00000390, // 1200 00000390 @ // 0000200d at, next, 0x0000042c, // 1204 0000042c DUP // 00002018 dup, next, 0x00000368, // 1208 00000368 QBRANCH // 0000000a qbran 0x1268, next, 0x00001268, // 120c 00001268 0x0000042c, // 1210 0000042c DUP // 00002018 dup, next, 0x00000390, // 1214 00000390 @ // 0000200d at, next, 0x00000318, // 1218 00000318 DOLIT // 00000005 dolit 0xffffff3f, next, 0xffffff3f, // 121c ffffff3f 0x00000464, // 1220 00000464 AND // 0000201c andd, next, 0x00000ab4, // 1224 00000ab4 wupper // 00000006 dolist 0xab8, next, 0x000003e4, // 1228 000003e4 R@ // 00002013 rat, next, 0x00000ab4, // 122c 00000ab4 wupper // 00000006 dolist 0xab8, next, 0x0000047c, // 1230 0000047c XOR // 0000201e xorr, next, 0x00000368, // 1234 00000368 QBRANCH // 0000000a qbran 0x1250, next, 0x00001250, // 1238 00001250 0x00000650, // 123c 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x00000318, // 1240 00000318 DOLIT // 00000005 dolit 0xffffffff, next, 0xffffffff, // 1244 ffffffff 0x00000378, // 1248 00000378 BRANCH // 0000000b bran 0x1260, next, 0x00001260, // 124c 00001260 0x00000650, // 1250 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x000002d8, // 1254 000002d8 tmp // 00002004 docon 0x1bc, next, 0x00000390, // 1258 00000390 @ // 0000200d at, next, 0x00001138, // 125c 00001138 SAME? // 00000006 dolist 0x113c, next, 0x00000378, // 1260 00000378 BRANCH // 0000000b bran 0x1280, next, 0x00001280, // 1264 00001280 0x000003d8, // 1268 000003d8 R> // 00002012 rfrom, next, 0x00000420, // 126c 00000420 DROP // 00002017 drop, next, 0x0000043c, // 1270 0000043c SWAP // 00002019 swap, next, 0x00000664, // 1274 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x0000043c, // 1278 0000043c SWAP // 00002019 swap, next, 0x00000338, // 127c 00000338 EXIT // 00000007 exitt, next, 0x00000368, // 1280 00000368 QBRANCH // 0000000a qbran 0x1298, next, 0x00001298, // 1284 00001298 0x00000664, // 1288 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x00000664, // 128c 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x00000378, // 1290 00000378 BRANCH // 0000000b bran 0x1200, next, 0x00001200, // 1294 00001200 0x000003d8, // 1298 000003d8 R> // 00002012 rfrom, next, 0x00000420, // 129c 00000420 DROP // 00002017 drop, next, 0x0000043c, // 12a0 0000043c SWAP // 00002019 swap, next, 0x00000420, // 12a4 00000420 DROP // 00002017 drop, next, 0x00000664, // 12a8 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x0000042c, // 12ac 0000042c DUP // 00002018 dup, next, 0x0000110c, // 12b0 0000110c NAME> // 00000006 dolist 0x1110, next, 0x0000043c, // 12b4 0000043c SWAP // 00002019 swap, next, 0x00000338, // 12b8 00000338 EXIT // 00000007 exitt, next, // 129 /////// : NAME? CONTEXT find ; 0x000011cc, // 12bc 000011cc ( link to find ) 0x4d414e05, // 12c0 4d414e05 0x5 "NAME?" 0x00003f45, // 12c4 00003f45 0x00000006, // NAME? 12c8 00000006 dolist 0x12cc, next, 0x0000027c, // 12cc 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x000011d4, // 12d0 000011d4 find // 00000006 dolist 0x11d8, next, 0x00000338, // 12d4 00000338 EXIT // 00000007 exitt, next, // 130 /////// : EXPECT SPAN ! DROP ; 0x000012c0, // 12d8 000012c0 ( link to NAME? ) 0x50584506, // 12dc 50584506 0x6 "EXPECT" 0x00544345, // 12e0 00544345 0x00000006, // EXPECT 12e4 00000006 dolist 0x12e8, next, 0x0000021c, // 12e8 0000021c SPAN // 00002004 docon 0x194, next, 0x00000384, // 12ec 00000384 ! // 0000200c store, next, 0x00000420, // 12f0 00000420 DROP // 00002017 drop, next, 0x00000338, // 12f4 00000338 EXIT // 00000007 exitt, next, // 131 /////// : QUERY TIB 0x50 ACCEPT #TIB ! DROP 0x0 >IN ! ; 0x000012dc, // 12f8 000012dc ( link to EXPECT ) 0x45555105, // 12fc 45555105 0x5 "QUERY" 0x00005952, // 1300 00005952 0x00000006, // QUERY 1304 00000006 dolist 0x1308, next, 0x000007c8, // 1308 000007c8 TIB // 00000006 dolist 0x7cc, next, 0x00000318, // 130c 00000318 DOLIT // 00000005 dolit 0x50, next, 0x00000050, // 1310 00000050 0x000002f8, // 1314 000002f8 ACCEPT // 00002001 accep, next, 0x00000240, // 1318 00000240 #TIB // 00002004 docon 0x19c, next, 0x00000384, // 131c 00000384 ! // 0000200c store, next, 0x00000420, // 1320 00000420 DROP // 00002017 drop, next, 0x00000318, // 1324 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1328 00000000 0x0000022c, // 132c 0000022c >IN // 00002004 docon 0x198, next, 0x00000384, // 1330 00000384 ! // 0000200c store, next, 0x00000338, // 1334 00000338 EXIT // 00000007 exitt, next, // 132 /////// : ABORT 'ABORT @EXECUTE ; 0x000012fc, // 1338 000012fc ( link to QUERY ) 0x4f424105, // 133c 4f424105 0x5 "ABORT" 0x00005452, // 1340 00005452 0x00000006, // ABORT 1344 00000006 dolist 0x1348, next, 0x000002c8, // 1348 000002c8 'ABORT // 00002004 docon 0x1b8, next, 0x000007e8, // 134c 000007e8 @EXECUTE // 00000006 dolist 0x7ec, next, 0x00000338, // 1350 00000338 EXIT // 00000007 exitt, next, // 133 /////// : abort"| IF do$ COUNT TYPE ABORT THEN do$ DROP ; 0x0000133c, // 1354 0000133c ( link to ABORT ) 0x6f626106, // 1358 6f626106 0x7 "abort\"|" 0x00227472, // 135c 7c227472 0x00000006, // abort"| 1360 00000006 dolist 0x1364, next, 0x00000368, // 1364 00000368 QBRANCH // 0000000a qbran 0x137c, next, 0x0000137c, // 1368 0000137c 0x00000d9c, // 136c 00000d9c do$ // 00000006 dolist 0xda0, next, 0x00000604, // 1370 00000604 COUNT // 0000203c count, next, 0x00000d34, // 1374 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00001344, // 1378 00001344 ABORT // 00000006 dolist 0x1348, next, 0x00000d9c, // 137c 00000d9c do$ // 00000006 dolist 0xda0, next, 0x00000420, // 1380 00000420 DROP // 00002017 drop, next, 0x00000338, // 1384 00000338 EXIT // 00000007 exitt, next, // 134 /////// : ERROR SPACE COUNT TYPE 0x3f EMIT 0x1b EMIT CR ABORT ; 0x00001358, // 1388 00001358 ( link to abort"| ) 0x52524505, // 138c 52524505 0x5 "ERROR" 0x0000524f, // 1390 0000524f 0x00000006, // ERROR 1394 00000006 dolist 0x1398, next, 0x00000cb8, // 1398 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000604, // 139c 00000604 COUNT // 0000203c count, next, 0x00000d34, // 13a0 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000318, // 13a4 00000318 DOLIT // 00000005 dolit 0x3f, next, 0x0000003f, // 13a8 0000003f 0x00000308, // 13ac 00000308 EMIT // 00002003 txsto, next, 0x00000318, // 13b0 00000318 DOLIT // 00000005 dolit 0x1b, next, 0x0000001b, // 13b4 0000001b 0x00000308, // 13b8 00000308 EMIT // 00002003 txsto, next, 0x00000d70, // 13bc 00000d70 CR // 00000006 dolist 0xd74, next, 0x00001344, // 13c0 00001344 ABORT // 00000006 dolist 0x1348, next, // 135 /////// : $INTERPRET NAME? ?DUP // 13e0 // IF ( QBRANCH 1414 ) // 13e8 // C@ 0x40 AND ABORT" compile only" // 140c // EXECUTE EXIT // 1414 // THEN NUMBER? // 1418 // IF ( QBRANCH 142c ) // 1420 // EXIT // 1424 // ELSE ( BRANCH 1430 ) // 142c // ERROR // 1430 // THEN ; 0x0000138c, // 13c4 0000138c ( link to ERROR ) 0x4e49240a, // 13c8 4e49240a 0xa "$INTERPRET" 0x50524554, // 13cc 50524554 0x00544552, // 13d0 00544552 0x00000006, // $INTERPRET 13d4 00000006 dolist 0x13d8, next, 0x000012c8, // 13d8 000012c8 NAME? // 00000006 dolist 0x12cc, next, 0x00000498, // 13dc 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 13e0 00000368 QBRANCH // 0000000a qbran 0x1414, next, 0x00001414, // 13e4 00001414 0x000003a8, // 13e8 000003a8 C@ // 0000200f cat, next, 0x00000318, // 13ec 00000318 DOLIT // 00000005 dolit 0x40, next, 0x00000040, // 13f0 00000040 0x00000464, // 13f4 00000464 AND // 0000201c andd, next, 0x00001360, // 13f8 00001360 abort"| // 00000006 dolist 0x1364, next, 0x6f63200d, // 13fc 6f63200d 0xd " compile only" 0x6c69706d, // 1400 6c69706d 0x6e6f2065, // 1404 6e6f2065 0x0000796c, // 1408 0000796c 0x00000348, // 140c 00000348 EXECUTE // 00002008 execu, next, 0x00000338, // 1410 00000338 EXIT // 00000007 exitt, next, 0x00000b80, // 1414 00000b80 NUMBER? // 00000006 dolist 0xb84, next, 0x00000368, // 1418 00000368 QBRANCH // 0000000a qbran 0x142c, next, 0x0000142c, // 141c 0000142c 0x00000338, // 1420 00000338 EXIT // 00000007 exitt, next, 0x00000378, // 1424 00000378 BRANCH // 0000000b bran 0x1430, next, 0x00001430, // 1428 00001430 0x00001394, // 142c 00001394 ERROR // 00000006 dolist 0x1398, next, 0x00000338, // 1430 00000338 EXIT // 00000007 exitt, next, // 136 /////// : [ [ ' $INTERPRET ] LITERAL 'EVAL ! ; IMMEDIATE 0x000013c8, // 1434 000013c8 ( link to $INTERPRET ) 0x00005b81, // 1438 00005b81 0x81 "[" 0x00000006, // [ 143c 00000006 dolist 0x1440, next, 0x00000318, // 1440 00000318 DOLIT // 00000005 dolit 0x13d4, next, 0x000013d4, // 1444 000013d4 0x000002b4, // 1448 000002b4 'EVAL // 00002004 docon 0x1b4, next, 0x00000384, // 144c 00000384 ! // 0000200c store, next, 0x00000338, // 1450 00000338 EXIT // 00000007 exitt, next, // 137 /////// : .OK CR [ ' $INTERPRET ] LITERAL 'EVAL @ = IF >R >R >R DUP . R> DUP . R> DUP . R> DUP . ." ok> " THEN ; 0x00001438, // 1454 00001438 ( link to [ ) 0x4b4f2e03, // 1458 4b4f2e03 0x3 ".OK" 0x00000006, // .OK 145c 00000006 dolist 0x1460, next, 0x00000d70, // 1460 00000d70 CR // 00000006 dolist 0xd74, next, 0x00000318, // 1464 00000318 DOLIT // 00000005 dolit, next, 0x000013d4, // 1468 000013d4 $INTERPRET 0x000002b4, // 146c 000002b4 'EVAL // 00002004 docon 0x1b4, next, 0x00000390, // 1470 00000390 @ // 0000200d at, next, 0x00000520, // 1474 00000520 = // 0000202b equal, next, 0x00000368, // 1478 00000368 QBRANCH // 0000000a qbran 0x14c4, next, 0x000014c4, // 147c 000014c4 0x000003f0, // 1480 000003f0 >R // 00002014 tor, next, 0x000003f0, // 1484 000003f0 >R // 00002014 tor, next, 0x000003f0, // 1488 000003f0 >R // 00002014 tor, next, 0x0000042c, // 148c 0000042c DUP // 00002018 dup, next, 0x00000e84, // 1490 00000e84 . // 00000006 dolist 0xe88, next, 0x000003d8, // 1494 000003d8 R> // 00002012 rfrom, next, 0x0000042c, // 1498 0000042c DUP // 00002018 dup, next, 0x00000e84, // 149c 00000e84 . // 00000006 dolist 0xe88, next, 0x000003d8, // 14a0 000003d8 R> // 00002012 rfrom, next, 0x0000042c, // 14a4 0000042c DUP // 00002018 dup, next, 0x00000e84, // 14a8 00000e84 . // 00000006 dolist 0xe88, next, 0x000003d8, // 14ac 000003d8 R> // 00002012 rfrom, next, 0x0000042c, // 14b0 0000042c DUP // 00002018 dup, next, 0x00000e84, // 14b4 00000e84 . // 00000006 dolist 0xe88, next, 0x00000de4, // 14b8 00000de4 ."| // 00000006 dolist 0xde8, next, 0x6b6f2005, // 14bc 6b6f2005 0x5 " ok> " 0x0000203e, // 14c0 0000203e 0x00000338, // 14c4 00000338 EXIT // 00000007 exitt, next, // 138 /////// : EVAL // 14d8 // BEGIN TOKEN DUP @ // 14e4 // WHILE ( QBRANCH 14fc ) 'EVAL @EXECUTE // 14f4 // REPEAT ( BRANCH 14d8 ) // 14fc // DROP .OK ; 0x00001458, // 14c8 00001458 ( link to .OK ) 0x41564504, // 14cc 41564504 0x4 "EVAL" 0x0000004c, // 14d0 0000004c 0x00000006, // EVAL 14d4 00000006 dolist 0x14d8, next, 0x000010b4, // 14d8 000010b4 TOKEN // 00000006 dolist 0x10b8, next, 0x0000042c, // 14dc 0000042c DUP // 00002018 dup, next, 0x00000390, // 14e0 00000390 @ // 0000200d at, next, 0x00000368, // 14e4 00000368 QBRANCH // 0000000a qbran 0x14fc, next, 0x000014fc, // 14e8 000014fc 0x000002b4, // 14ec 000002b4 'EVAL // 00002004 docon 0x1b4, next, 0x000007e8, // 14f0 000007e8 @EXECUTE // 00000006 dolist 0x7ec, next, 0x00000378, // 14f4 00000378 BRANCH // 0000000b bran 0x14d8, next, 0x000014d8, // 14f8 000014d8 0x00000420, // 14fc 00000420 DROP // 00002017 drop, next, 0x0000145c, // 1500 0000145c .OK // 00000006 dolist 0x1460, next, 0x00000338, // 1504 00000338 EXIT // 00000007 exitt, next, // 139 /////// : QUIT [COMPILE] [ BEGIN QUERY EVAL AGAIN ; 0x000014cc, // 1508 000014cc ( link to EVAL ) 0x49555104, // 150c 49555104 0x4 "QUIT" 0x00000054, // 1510 00000054 0x00000006, // QUIT 1514 00000006 dolist 0x1518, next, 0x0000143c, // 1518 0000143c [ // 00000006 dolist 0x1440, next, 0x00001304, // 151c 00001304 QUERY // 00000006 dolist 0x1308, next, 0x000014d4, // 1520 000014d4 EVAL // 00000006 dolist 0x14d8, next, 0x00000378, // 1524 00000378 BRANCH // 0000000b bran 0x151c, next, 0x0000151c, // 1528 0000151c // 140 /////// : , HERE DUP CELL+ CP ! ! ; // CODE , dup, dobcon 0x4, plus, dohcon 0x1ac, store, store, next, END-CODE 0x0000150c, // 152c 0000150c ( link to QUIT ) 0x00002c01, // 1530 00002c01 0x1 "," 0x00000006, // , 1534 00000006 dolist 0x1538, next, 0x00000790, // 1538 00000790 HERE // 00000006 dolist 0x794, next, 0x0000042c, // 153c 0000042c DUP // 00002018 dup, next, 0x00000650, // 1540 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x0000028c, // 1544 0000028c CP // 00002004 docon 0x1ac, next, 0x00000384, // 1548 00000384 ! // 0000200c store, next, 0x00000384, // 154c 00000384 ! // 0000200c store, next, 0x00000338, // 1550 00000338 EXIT // 00000007 exitt, next, // 141 /////// : LITERAL [ ' DOLIT ] LITERAL , , ; IMMEDIATE 0x00001530, // 1554 00001530 ( link to , ) 0x54494c87, // 1558 54494c87 0x87 "LITERAL" 0x4c415245, // 155c 4c415245 0x00000006, // LITERAL 1560 00000006 dolist 0x1564, next, 0x00000318, // 1564 00000318 DOLIT // 00000005 dolit 0x318, next, 0x00000318, // 1568 00000318 0x00001534, // 156c 00001534 , 0x00001534, // 1570 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1574 00000338 EXIT // 00000007 exitt, next, // 142 /////// : ALLOT ALIGNED CP +! ; 0x00001558, // 1578 00001558 ( link to LITERAL ) 0x4c4c4105, // 157c 4c4c4105 0x5 "ALLOT" 0x0000544f, // 1580 0000544f 0x00000006, // ALLOT 1584 00000006 dolist 0x1588, next, 0x00000764, // 1588 00000764 ALIGNED // 00000006 dolist 0x768, next, 0x0000028c, // 158c 0000028c CP // 00002004 docon 0x1ac, next, 0x000005dc, // 1590 000005dc +! // 00002039 pstor, next, 0x00000338, // 1594 00000338 EXIT // 00000007 exitt, next, // 143 /////// : $," 0x22 WORD COUNT + ALIGNED CP ! ; 0x0000157c, // 1598 0000157c ( link to ALLOT ) 0x222c2403, // 159c 222c2403 0x3 "$,\"" 0x00000006, // $," 15a0 00000006 dolist 0x15a4, next, 0x00000318, // 15a4 00000318 DOLIT // 00000005 dolit 0x22, next, 0x00000022, // 15a8 00000022 0x000010e8, // 15ac 000010e8 WORD // 00000006 dolist 0x10ec, next, 0x00000604, // 15b0 00000604 COUNT // 0000203c count, next, 0x000004d0, // 15b4 000004d0 + // 00002025 plus, next, 0x00000764, // 15b8 00000764 ALIGNED // 00000006 dolist 0x768, next, 0x0000028c, // 15bc 0000028c CP // 00002004 docon 0x1ac, next, 0x00000384, // 15c0 00000384 ! // 0000200c store, next, 0x00000338, // 15c4 00000338 EXIT // 00000007 exitt, next, // 144 /////// : ?UNIQUE DUP NAME? ?DUP IF COUNT 0x1f AND SPACE TYPE ." reFef " THEN DROP ; 0x0000159c, // 15c8 0000159c ( link to $," ) 0x4e553f07, // 15cc 4e553f07 0x7 "?UNIQUE" 0x45555149, // 15d0 45555149 0x00000006, // ?UNIQUE 15d4 00000006 dolist 0x15d8, next, 0x0000042c, // 15d8 0000042c DUP // 00002018 dup, next, 0x000012c8, // 15dc 000012c8 NAME? // 00000006 dolist 0x12cc, next, 0x00000498, // 15e0 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 15e4 00000368 QBRANCH // 0000000a qbran 0x1610, next, 0x00001610, // 15e8 00001610 0x00000604, // 15ec 00000604 COUNT // 0000203c count, next, 0x00000318, // 15f0 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 15f4 0000001f 0x00000464, // 15f8 00000464 AND // 0000201c andd, next, 0x00000cb8, // 15fc 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000d34, // 1600 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000de4, // 1604 00000de4 ."| // 00000006 dolist 0xde8, next, 0x65722007, // 1608 65722007 0x7 " reDef " 0x20666544, // 160c 20666544 0x00000420, // 1610 00000420 DROP // 00002017 drop, next, 0x00000338, // 1614 00000338 EXIT // 00000007 exitt, next, // 145 /////// : $,n DUP @ IF ( 166c ) ?UNIQUE DUP NAME> CP ! DUP LAST ! CELL- CONTEXT @ SWAP ! THEN ERROR ; 0x000015cc, // 1618 000015cc ( link to ?UNIQUE ) 0x6e2c2403, // 161c 6e2c2403 0x3 "$,n" 0x00000006, // $,n 1620 00000006 dolist 0x1624, next, 0x0000042c, // 1624 0000042c DUP // 00002018 dup, next, 0x00000390, // 1628 00000390 @ // 0000200d at, next, 0x00000368, // 162c 00000368 QBRANCH // 0000000a qbran 0x166c, next, 0x0000166c, // 1630 0000166c 0x000015d4, // 1634 000015d4 ?UNIQUE // 00000006 dolist 0x15d8, next, 0x0000042c, // 1638 0000042c DUP // 00002018 dup, next, 0x0000110c, // 163c 0000110c NAME> // 00000006 dolist 0x1110, next, 0x0000028c, // 1640 0000028c CP // 00002004 docon 0x1ac, next, 0x00000384, // 1644 00000384 ! // 0000200c store, next, 0x0000042c, // 1648 0000042c DUP // 00002018 dup, next, 0x000002a0, // 164c 000002a0 LAST // 00002004 docon 0x1b0, next, 0x00000384, // 1650 00000384 ! // 0000200c store, next, 0x00000664, // 1654 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x0000027c, // 1658 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x00000390, // 165c 00000390 @ // 0000200d at, next, 0x0000043c, // 1660 0000043c SWAP // 00002019 swap, next, 0x00000384, // 1664 00000384 ! // 0000200c store, next, 0x00000338, // 1668 00000338 EXIT // 00000007 exitt, next, 0x00001394, // 166c 00001394 ERROR // 00000006 dolist 0x1398, next, // 146 /////// : ' TOKEN NAME? IF EXIT THEN ERROR ; 0x0000161c, // 1670 0000161c ( link to $,n ) 0x00002701, // 1674 00002701 0x1 "'" 0x00000006, // ' 1678 00000006 dolist 0x167c, next, 0x000010b4, // 167c 000010b4 TOKEN // 00000006 dolist 0x10b8, next, 0x000012c8, // 1680 000012c8 NAME? // 00000006 dolist 0x12cc, next, 0x00000368, // 1684 00000368 QBRANCH // 0000000a qbran 0x1690, next, 0x00001690, // 1688 00001690 0x00000338, // 168c 00000338 EXIT // 00000007 exitt, next, 0x00001394, // 1690 00001394 ERROR // 00000006 dolist 0x1398, next, // 147 /////// : [COMPILE] ' , ; IMMEDIATE 0x00001674, // 1694 00001674 ( link to ' ) 0x4f435b89, // 1698 4f435b89 0x89 "[COMPILE]" 0x4c49504d, // 169c 4c49504d 0x00005d45, // 16a0 00005d45 0x00000006, // [COMPILE] 16a4 00000006 dolist 0x16a8, next, 0x00001678, // 16a8 00001678 ' // 00000006 dolist 0x167c, next, 0x00001534, // 16ac 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 16b0 00000338 EXIT // 00000007 exitt, next, // 148 /////// : COMPILE R> DUP @ , CELL+ >R ; 0x00001698, // 16b4 00001698 ( link to [COMPILE] ) 0x4d4f4307, // 16b8 4d4f4307 0x7 "COMPILE" 0x454c4950, // 16bc 454c4950 0x00000006, // COMPILE 16c0 00000006 dolist 0x16c4, next, 0x000003d8, // 16c4 000003d8 R> // 00002012 rfrom, next, 0x0000042c, // 16c8 0000042c DUP // 00002018 dup, next, 0x00000390, // 16cc 00000390 @ // 0000200d at, next, 0x00001534, // 16d0 00001534 , // 00000006 dolist 0x1538, next, 0x00000650, // 16d4 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x000003f0, // 16d8 000003f0 >R // 00002014 tor, next, 0x00000338, // 16dc 00000338 EXIT // 00000007 exitt, next, // 149 /////// : $COMPILE NAME? ?DUP // 16fc // IF // 1704 // @ 0x80 AND IF EXECUTE ELSE , EXIT // 1730 // THEN NUMBER? // 1734 // IF [COMPILE] LITERAL EXIT // 1744 // THEN ERROR ; 0x000016b8, // 16e0 000016b8 ( link to COMPILE ) 0x4f432408, // 16e4 4f432408 0x8 "$COMPILE" 0x4c49504d, // 16e8 4c49504d 0x00000045, // 16ec 00000045 0x00000006, // $COMPILE 16f0 00000006 dolist 0x16f4, next, 0x000012c8, // 16f4 000012c8 NAME? // 00000006 dolist 0x12cc, next, 0x00000498, // 16f8 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 16fc 00000368 QBRANCH // 0000000a qbran 0x1730, next, 0x00001730, // 1700 00001730 0x00000390, // 1704 00000390 @ // 0000200d at, next, 0x00000318, // 1708 00000318 DOLIT // 00000005 dolit 0x80, next, 0x00000080, // 170c 00000080 0x00000464, // 1710 00000464 AND // 0000201c andd, next, 0x00000368, // 1714 00000368 QBRANCH // 0000000a qbran 0x1728, next, 0x00001728, // 1718 00001728 0x00000348, // 171c 00000348 EXECUTE // 00002008 execu, next, 0x00000378, // 1720 00000378 BRANCH // 0000000b bran 0x172c, next, 0x0000172c, // 1724 0000172c 0x00001534, // 1728 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 172c 00000338 EXIT // 00000007 exitt, next, 0x00000b80, // 1730 00000b80 NUMBER? // 00000006 dolist 0xb84, next, 0x00000368, // 1734 00000368 QBRANCH // 0000000a qbran 0x1744, next, 0x00001744, // 1738 00001744 0x00001560, // 173c 00001560 LITERAL // 00000006 dolist 0x1564, next, 0x00000338, // 1740 00000338 EXIT 0x00001394, // 1744 00001394 ERROR // 00000006 dolist 0x1398, next, // 150 /////// : OVERT LAST @ CONTEXT ! ; // CODE OVERT dohcon 0x1b0, at, dohcon 0x1a8, store, next, END-CODE 0x000016e4, // 1748 000016e4 ( link to $COMPILE ) 0x45564f05, // 174c 45564f05 0x5 "OVERT" 0x00005452, // 1750 00005452 0x00000006, // OVERT 1754 00000006 dolist 0x1758, next, 0x000002a0, // 1758 000002a0 LAST // 00002004 docon 0x1b0, next, 0x00000390, // 175c 00000390 @ // 0000200d at, next, 0x0000027c, // 1760 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x00000384, // 1764 00000384 ! // 0000200c store, next, 0x00000338, // 1768 00000338 EXIT // 00000007 exitt, next, // 151 /////// : ] [ ' $COMPILE ] LITERAL 'EVAL ! ; 0x0000174c, // 176c 0000174c ( link to OVERT ) 0x00005d01, // 1770 00005d01 0x1 "]" 0x00000006, // ] 1774 00000006 dolist 0x1778, next, 0x00000318, // 1778 00000318 DOLIT // 00000005 dolit 0x16f0, next, 0x000016f0, // 177c 000016f0 0x000002b4, // 1780 000002b4 'EVAL // 00002004 docon 0x1b4, next, 0x00000384, // 1784 00000384 ! // 0000200c store, next, 0x00000338, // 1788 00000338 EXIT // 00000007 exitt, next, // 152 /////// : : TOKEN $,n ] 0x0006 , ; 0x00001770, // 178c 00001770 ( link to ] ) 0x00003a01, // 1790 00003a01 0x1 ":" 0x00000006, // : 1794 00000006 dolist 0x1798, next, 0x000010b4, // 1798 000010b4 TOKEN // 00000006 dolist 0x10b8, next, 0x00001620, // 179c 00001620 $,n // 00000006 dolist 0x1624, next, 0x00001774, // 17a0 00001774 ] // 00000006 dolist 0x1778, next, 0x00000318, // 17a4 00000318 DOLIT // 00000005 dolit 0x6, next, 0x00000006, // 17a8 00000006 0x00001534, // 17ac 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 17b0 00000338 EXIT // 00000007 exitt, next, // 153 /////// : ; [ ' EXIT ] LITERAL , [COMPILE] [ OVERT ; IMMEDIATE 0x00001790, // 17b4 00001790 ( link to : ) 0x00003b81, // 17b8 00003b81 0x81 ";" 0x00000006, // ; 17bc 00000006 dolist 0x17c0, next, 0x00000318, // 17c0 00000318 DOLIT // 00000005 dolit 0x338, next, 0x00000338, // 17c4 00000338 0x00001534, // 17c8 00001534 , // 00000006 dolist 0x1538, next, 0x0000143c, // 17cc 0000143c [ // 00000006 dolist 0x1440, next, 0x00001754, // 17d0 00001754 OVERT // 00000006 dolist 0x1758, next, 0x00000338, // 17d4 00000338 EXIT // 00000007 exitt, next, // 154 /////// : dm+ OVER 0x6 U.R // 17f4 // FOR AFT // 1800 // DUP @ 0x9 U.R CELL+ // 1818 // NEXT ; 0x000017b8, // 17d8 000017b8 ( link to ; ) 0x2b6d6403, // 17dc 2b6d6403 0x3 "dm+" 0x00000006, // dm+ 17e0 00000006 dolist 0x17e4, next, 0x0000044c, // 17e4 0000044c OVER // 0000201a over, next, 0x00000318, // 17e8 00000318 DOLIT // 00000005 dolit 0x6, next, 0x00000006, // 17ec 00000006 0x00000e2c, // 17f0 00000e2c U.R // 00000006 dolist 0xe30, next, 0x000003f0, // 17f4 000003f0 >R // 00002014 tor, next, 0x00000378, // 17f8 00000378 BRANCH // 0000000b bran 0x1818, next, 0x00001818, // 17fc 00001818 0x0000042c, // 1800 0000042c DUP // 00002018 dup, next, 0x00000390, // 1804 00000390 @ // 0000200d at, next, 0x00000318, // 1808 00000318 DOLIT // 00000005 dolit 0x9, next, 0x00000009, // 180c 00000009 0x00000e2c, // 1810 00000e2c U.R // 00000006 dolist 0xe30, next, 0x00000650, // 1814 00000650 CELL+ // 00202504 docon 0x4, plus, next, 0x00000358, // 1818 00000358 DONEXT // 00000009 donext 0x1800, next, 0x00001800, // 181c 00001800 0x00000338, // 1820 00000338 EXIT // 00000007 exitt, next, // 155 /////// : DUMP BASE @ >R HEX 0x1f 0x20 / // 185c // FOR AFT // 1868 // CR 0x8 2DUP dm+ >R SPACE CELLS TYPE R> // 1890 // NEXT DROP R> BASE ! ; 0x000017dc, // 1824 000017dc ( link to dm+ ) 0x4d554404, // 1828 4d554404 0x4 "DUMP" 0x00000050, // 182c 00000050 0x00000006, // DUMP 1830 00000006 dolist 0x1834, next, 0x00000268, // 1834 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000390, // 1838 00000390 @ // 0000200d at, next, 0x000003f0, // 183c 000003f0 >R // 00002014 tor, next, 0x00000a6c, // 1840 00000a6c HEX // 00000006 dolist 0xa70, next, 0x00000318, // 1844 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 1848 0000001f 0x000004d0, // 184c 000004d0 + // 00002025 plus, next, 0x00000318, // 1850 00000318 DOLIT // 00000005 dolit 0x20, next, 0x00000020, // 1854 00000020 0x00000580, // 1858 00000580 / // 00002032 slash, next, 0x000003f0, // 185c 000003f0 >R // 00002014 tor, next, 0x00000378, // 1860 00000378 BRANCH // 0000000b bran 0x1890, next, 0x00001890, // 1864 00001890 0x00000d70, // 1868 00000d70 CR // 00000006 dolist 0xd74, next, 0x00000318, // 186c 00000318 DOLIT // 00000005 dolit 0x8, next, 0x00000008, // 1870 00000008 0x000004c4, // 1874 000004c4 2DUP // 00002024 ddup, next, 0x000017e0, // 1878 000017e0 dm+ // 00000006 dolist 0x17e4, next, 0x000003f0, // 187c 000003f0 >R // 00002014 tor, next, 0x00000cb8, // 1880 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000678, // 1884 00000678 CELLS // 00203404 docon 0x4, star, next, 0x00000d34, // 1888 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x000003d8, // 188c 000003d8 R> // 00002012 rfrom, next, 0x00000358, // 1890 00000358 DONEXT // 00000009 donext 0x1868, next, 0x00001868, // 1894 00001868 0x00000420, // 1898 00000420 DROP // 00002017 drop, next, 0x000003d8, // 189c 000003d8 R> // 00002012 rfrom, next, 0x00000268, // 18a0 00000268 BASE // 00002004 docon 0x1a4, next, 0x00000384, // 18a4 00000384 ! // 0000200c store, next, 0x00000338, // 18a8 00000338 EXIT // 00000007 exitt, next, // 156 /////// : >NAME CONTEXT // 18c0 // BEGIN @ DUP // 18c8 // WHILE 2DUP NAME> XOR // 18dc // IF 1- // 18e8 // ELSE SWAP DROP EXIT // 18fc // THEN // 18fc // REPEAT SWAP DROP ; 0x00001828, // 18ac 00001828 ( link to DUMP ) 0x414e3e05, // 18b0 414e3e05 0x5 ">NAME" 0x0000454d, // 18b4 0000454d 0x00000006, // >NAME 18b8 00000006 dolist 0x18bc, next, 0x0000027c, // 18bc 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x00000390, // 18c0 00000390 @ // 0000200d at, next, 0x0000042c, // 18c4 0000042c DUP // 00002018 dup, next, 0x00000368, // 18c8 00000368 QBRANCH // 0000000a qbran 0x1904, next, 0x00001904, // 18cc 00001904 0x000004c4, // 18d0 000004c4 2DUP // 00002024 ddup, next, 0x0000110c, // 18d4 0000110c NAME> // 00000006 dolist 0x1110, next, 0x0000047c, // 18d8 0000047c XOR // 0000201e xorr, next, 0x00000368, // 18dc 00000368 QBRANCH // 0000000a qbran 0x18f0, next, 0x000018f0, // 18e0 000018f0 0x000006ac, // 18e4 000006ac 1- // 00202904 docon 0x1, subb, next, 0x00000378, // 18e8 00000378 BRANCH // 0000000b bran 0x18fc, next, 0x000018fc, // 18ec 000018fc 0x0000043c, // 18f0 0000043c SWAP // 00002019 swap, next, 0x00000420, // 18f4 00000420 DROP // 00002017 drop, next, 0x00000338, // 18f8 00000338 EXIT // 00000007 exitt, next, 0x00000378, // 18fc 00000378 BRANCH // 0000000b bran 0x18c0, next, 0x000018c0, // 1900 000018c0 0x0000043c, // 1904 0000043c SWAP // 00002019 swap, next, 0x00000420, // 1908 00000420 DROP // 00002017 drop, next, 0x00000338, // 190c 00000338 EXIT // 00000007 exitt, next, // 157 /////// : .ID COUNT 0x1f AND TYPE SPACE ; 0x000018b0, // 1910 000018b0 ( link to >NAME ) 0x44492e03, // 1914 44492e03 0x3 ".ID" 0x00000006, // .ID 1918 00000006 dolist 0x191c, next, 0x00000604, // 191c 00000604 COUNT // 0000203c count, next, 0x00000318, // 1920 00000318 DOLIT // 00000005 dolit 0x1f, next, 0x0000001f, // 1924 0000001f 0x00000464, // 1928 00000464 AND // 0000201c andd, next, 0x00000d34, // 192c 00000d34 TYPE // 00000006 dolist 0xd38, next, 0x00000cb8, // 1930 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00000338, // 1934 00000338 EXIT // 00000007 exitt, next, // 158 /////// : WORDS CR CONTEXT 0 TMP ! // 1960 // BEGIN @ ?DUP // 1968 // WHILE DUP SPACE .ID CELL- tmp @ 0x10 < // 1994 // IF 0x1 tmp +! // 19ac // ELSE // 19b4 // CR 0x0 tmp ! // 19c8 // THEN // 19c8 // REPEAT // 19d0 // ; 0x00001914, // 1938 00001914 ( link to .ID ) 0x524f5705, // 193c 524f5705 0x5 "WORDS" 0x00005344, // 1940 00005344 0x00000006, // WORDS 1944 00000006 dolist 0x1948, next, 0x00000d70, // 1948 00000d70 CR // 00000006 dolist 0xd74, next, 0x0000027c, // 194c 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x00000318, // 1950 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1954 00000000 0x000002d8, // 1958 000002d8 tmp // 00002004 docon 0x1bc, next, 0x00000384, // 195c 00000384 ! // 0000200c store, next, 0x00000390, // 1960 00000390 @ // 0000200d at, next, 0x00000498, // 1964 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 1968 00000368 QBRANCH // 0000000a qbran 0x19d0, next, 0x000019d0, // 196c 000019d0 0x0000042c, // 1970 0000042c DUP // 00002018 dup, next, 0x00000cb8, // 1974 00000cb8 SPACE // 00000006 dolist 0xcbc, next, 0x00001918, // 1978 00001918 .ID // 00000006 dolist 0x191c, next, 0x00000664, // 197c 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x000002d8, // 1980 000002d8 tmp // 00002004 docon 0x1bc, next, 0x00000390, // 1984 00000390 @ // 0000200d at, next, 0x00000318, // 1988 00000318 DOLIT // 00000005 dolit 0x10, next, 0x00000010, // 198c 00000010 0x00000538, // 1990 00000538 < // 0000202d less, next, 0x00000368, // 1994 00000368 QBRANCH // 0000000a qbran 0x19b4, next, 0x000019b4, // 1998 000019b4 0x00000318, // 199c 00000318 DOLIT // 00000005 dolit 0x1, next, 0x00000001, // 19a0 00000001 0x000002d8, // 19a4 000002d8 tmp // 00002004 docon 0x1bc, next, 0x000005dc, // 19a8 000005dc +! // 00002039 pstor, next, 0x00000378, // 19ac 00000378 BRANCH // 0000000b bran 0x19c8, next, 0x000019c8, // 19b0 000019c8 0x00000d70, // 19b4 00000d70 CR // 00000006 dolist 0xd74, next, 0x00000318, // 19b8 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 19bc 00000000 0x000002d8, // 19c0 000002d8 tmp // 00002004 docon 0x1bc, next, 0x00000384, // 19c4 00000384 ! // 0000200c store, next, 0x00000378, // 19c8 00000378 BRANCH // 0000000b bran 0x1960, next, 0x00001960, // 19cc 00001960 0x00000338, // 19d0 00000338 EXIT // 00000007 exitt, next, // 159 /////// : FORGET TOKEN NAME? ?DUP IF CELL- DUP CP ! @ DUP CONTEXT ! LAST ! DROP EXIT THEN ERROR ; 0x0000193c, // 19d4 0000193c ( link to WORDS ) 0x524f4606, // 19d8 524f4606 0x6 "FORGET" 0x00544547, // 19dc 00544547 0x00000006, // FORGET 19e0 00000006 dolist 0x19e4, next, 0x000010b4, // 19e4 000010b4 TOKEN // 00000006 dolist 0x10b8, next, 0x000012c8, // 19e8 000012c8 NAME? // 00000006 dolist 0x12cc, next, 0x00000498, // 19ec 00000498 ?DUP // 00002021 qdup, next, 0x00000368, // 19f0 00000368 QBRANCH // 0000000a qbran 0x1a28, next, 0x00001a28, // 19f4 00001a28 0x00000664, // 19f8 00000664 CELL- // 00202904 docon 0x4, subb, next, 0x0000042c, // 19fc 0000042c DUP // 00002018 dup, next, 0x0000028c, // 1a00 0000028c CP // 00002004 docon 0x1ac, next, 0x00000384, // 1a04 00000384 ! // 0000200c store, next, 0x00000390, // 1a08 00000390 @ // 0000200d at, next, 0x0000042c, // 1a0c 0000042c DUP // 00002018 dup, next, 0x0000027c, // 1a10 0000027c CONTEXT // 00002004 docon 0x1a8, next, 0x00000384, // 1a14 00000384 ! // 0000200c store, next, 0x000002a0, // 1a18 000002a0 LAST // 00002004 docon 0x1b0, next, 0x00000384, // 1a1c 00000384 ! // 0000200c store, next, 0x00000420, // 1a20 00000420 DROP // 00002017 drop, next, 0x00000338, // 1a24 00000338 EXIT // 00000007 exitt, next, 0x00001394, // 1a28 00001394 ERROR // 00000006 dolist 0x1398, next, // 160 /////// : COLD CR ." esp32eForth 1.4 2017" .OK QUIT ; 0x000019d8, // 1a2c 000019d8 ( link to FORGET ) 0x4c4f4304, // 1a30 4c4f4304 0x4 "COLD" 0x00000044, // 1a34 00000044 0x00000006, // COLD 1a38 00000006 dolist 0x1a3c, next, 0x00000d70, // 1a3c 00000d70 CR // 00000006 dolist 0xd74, next, 0x00000de4, // 1a40 00000de4 ."| // 00000006 dolist 0xde8, next, 0x70736514, // 1a44 70736514 0x14 "esp32eForth 1.4 2017" 0x46653233, // 1a48 46653233 0x6874726f, // 1a4c 6874726f 0x332e3120, // 1a50 332e3120 0x31303220, // 1a54 31303220 0x00000037, // 1a58 00000037 0x0000145c, // 1a5c 0000145c .OK // 00000006 dolist 0x1460, next, 0x00001514, // 1a60 00001514 QUIT // 00000006 dolist 0x1518, next, 0x00000338, // 1a64 00000338 EXIT // 00000007 exitt, next, // 161 /////// : THEN HERE SWAP ! ; IMMEDIATE 0x00001a30, // 1a68 00001a30 ( link to COLD ) 0x45485484, // 1a6c 45485484 0x84 "THEN" 0x0000004e, // 1a70 0000004e 0x00000006, // THEN 1a74 00000006 dolist 0x1a78, next, 0x00000790, // 1a78 00000790 HERE // 00000006 dolist 0x794, next, 0x0000043c, // 1a7c 0000043c SWAP // 00002019 swap, next, 0x00000384, // 1a80 00000384 ! // 0000200c store, next, 0x00000338, // 1a84 00000338 EXIT // 00000007 exitt, next, // 162 /////// : FOR COMPILE >R HERE ; IMMEDIATE 0x00001a6c, // 1a88 00001a6c ( link to THEN ) 0x524f4683, // 1a8c 524f4683 0x83 "FOR" 0x00000006, // FOR 1a90 00000006 dolist 0x1a94, next, 0x000016c0, // 1a94 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x000003f0, // 1a98 000003f0 >R 0x00000790, // 1a9c 00000790 HERE // 00000006 dolist 0x794, next, 0x00000338, // 1aa0 00000338 EXIT // 00000007 exitt, next, // 163 /////// : BEGIN HERE ; IMMEDIATE 0x00001a8c, // 1aa4 00001a8c ( link to FOR ) 0x47454285, // 1aa8 47454285 0x85 "BEGIN" 0x00004e49, // 1aac 00004e49 0x00000006, // BEGIN 1ab0 00000006 dolist 0x1ab4, next, 0x00000790, // 1ab4 00000790 HERE // 00000006 dolist 0x794, next, 0x00000338, // 1ab8 00000338 EXIT // 00000007 exitt, next, // 164 /////// : NEXT COMPILE DONEXT , ; IMMEDIATE 0x00001aa8, // 1abc 00001aa8 ( link to BEGIN ) 0x58454e84, // 1ac0 58454e84 0x84 "NEXT" 0x00000054, // 1ac4 00000054 0x00000006, // NEXT 1ac8 00000006 dolist 0x1acc, next, 0x000016c0, // 1acc 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x00000358, // 1ad0 00000358 DONEXT 0x00001534, // 1ad4 00001534 , // 00000006 dolist 0x1538, next 0x00000338, // 1ad8 00000338 EXIT // 00000007 exitt, next, // 165 /////// : UNTIL COMPILE QBRANCH , ; IMMEDIATE 0x00001ac0, // 1adc 00001ac0 ( link to NEXT ) 0x544e5585, // 1ae0 544e5585 0x85 "UNTIL" 0x00004c49, // 1ae4 00004c49 0x00000006, // UNTIL 1ae8 00000006 dolist 0x1aec, next, 0x000016c0, // 1aec 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x00000368, // 1af0 00000368 QBRANCH 0x00001534, // 1af4 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1af8 00000338 EXIT // 00000007 exitt, next, // 166 /////// : AGAIN COMPILE BRANCH , ; IMMEDIATE 0x00001ae0, // 1afc 00001ae0 ( link to UNTIL ) 0x41474185, // 1b00 41474185 0x85 "AGAIN" 0x00004e49, // 1b04 00004e49 0x00000006, // AGAIN 1b08 00000006 dolist 0x1b0c, next, 0x000016c0, // 1b0c 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x00000378, // 1b10 00000378 BRANCH 0x00001534, // 1b14 00001534 , 0x00000338, // 1b18 00000338 EXIT // 00000007 exitt, next, // 167 /////// : IF COMPILE QBRANCH HERE 0x0 , ; IMMEDIATE 0x00001b00, // 1b1c 00001b00 ( link to AGAIN ) 0x00464982, // 1b20 00464982 0x82 "IF" 0x00000006, // IF 1b24 00000006 dolist 0x1b28, next, 0x000016c0, // 1b28 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x00000368, // 1b2c 00000368 QBRANCH 0x00000790, // 1b30 00000790 HERE // 00000006 dolist 0x794, next, 0x00000318, // 1b34 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1b38 00000000 0x00001534, // 1b3c 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1b40 00000338 EXIT // 00000007 exitt, next, // 168 /////// : AHEAD COMPILE BRANCH HERE 0x0 , ; IMMEDIATE 0x00001b20, // 1b44 00001b20 ( link to IF ) 0x45484185, // 1b48 45484185 0x85 "AHEAD" 0x00004441, // 1b4c 00004441 0x00000006, // AHEAD 1b50 00000006 dolist 0x1b54, next, 0x000016c0, // 1b54 000016c0 COMPILE // 00000006 dolist 0x16c4, next, 0x00000378, // 1b58 00000378 BRANCH 0x00000790, // 1b5c 00000790 HERE // 00000006 dolist 0x794, next, 0x00000318, // 1b60 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1b64 00000000 0x00001534, // 1b68 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1b6c 00000338 EXIT // 00000007 exitt, next, // 169 /////// : REPEAT [COMPILE] AGAIN ; IMMEDIATE 0x00001b48, // 1b70 00001b48 ( link to AHEAD ) 0x50455286, // 1b74 50455286 0x86 "REPEAT" 0x00544145, // 1b78 00544145 0x00000006, // REPEAT 1b7c 00000006 dolist 0x1b80, next, 0x00001b08, // 1b80 00001b08 AGAIN // 00000006 dolist 0x1b0c, next, 0x00001a74, // 1b84 00001a74 THEN // 00000006 dolist 0x1a78, next, 0x00000338, // 1b88 00000338 EXIT // 00000007 exitt, next, // 170 /////// : AFT DROP AHEAD HERE SWAP ; IMMEDIATE 0x00001b74, // 1b8c 00001b74 ( link to REPEAT ) 0x54464183, // 1b90 54464183 0x83 "AFT" 0x00000006, // AFT 1b94 00000006 dolist 0x1b98, next, 0x00000420, // 1b98 00000420 DROP // 00002017 drop, next, 0x00001b50, // 1b9c 00001b50 AHEAD // 00000006 dolist 0x1b54, next, 0x00000790, // 1ba0 00000790 HERE // 00000006 dolist 0x794, next, 0x0000043c, // 1ba4 0000043c SWAP // 00002019 swap, next, 0x00000338, // 1ba8 00000338 EXIT // 00000007 exitt, next, // 171 /////// : ELSE [COMPILE] AHEAD SWAP [COMPILE] THEN ; IMMEDIATE 0x00001b90, // 1bac 00001b90 ( link to AFT ) 0x534c4584, // 1bb0 534c4584 0x84 "ELSE" 0x00000045, // 1bb4 00000045 0x00000006, // ELSE 1bb8 00000006 dolist 0x1bbc, next, 0x00001b50, // 1bbc 00001b50 AHEAD // 00000006 dolist 0x1b54, next, 0x0000043c, // 1bc0 0000043c SWAP // 00002019 swap, next, 0x00001a74, // 1bc4 00001a74 THEN // 00000006 dolist 0x1a78, next, 0x00000338, // 1bc8 00000338 EXIT // 00000007 exitt, next, // 172 /////// : WHILE [COMPILE] IF SWAP ; IMMEDIATE 0x00001bb0, // 1bcc 00001bb0 ( link to ELSE ) 0x49485785, // 1bd0 49485785 0x85 "WHILE" 0x0000454c, // 1bd4 0000454c 0x00000006, // WHILE 1bd8 00000006 dolist 0x1bdc, next, 0x00001b24, // 1bdc 00001b24 IF // 00000006 dolist 0x1b28, next, 0x0000043c, // 1be0 0000043c SWAP // 00002019 swap, next, 0x00000338, // 1be4 00000338 EXIT // 00000007 exitt, next, // 173 /////// : ABORT" [ ' abort"| ] LITERAL HERE ! $," ; IMMEDIATE 0x00001bd0, // 1be8 00001bd0 ( link to WHILE ) 0x4f424186, // 1bec 4f424186 0x86 "ABORT\"" 0x00225452, // 1bf0 00225452 0x00000006, // ABORT" 1bf4 00000006 dolist 0x1bf8, next, 0x00000318, // 1bf8 00000318 DOLIT // 00000005 dolit, next, 0x00001360, // 1bfc 00001360 abort"| 0x00000790, // 1c00 00000790 HERE // 00000006 dolist 0x794, next, 0x00000384, // 1c04 00000384 ! // 0000200c store, next, 0x000015a0, // 1c08 000015a0 $," // 00000006 dolist 0x15a4, next, 0x00000338, // 1c0c 00000338 EXIT // 00000007 exitt, next, // 174 /////// : $" [ ' $"| ] LITERAL HERE ! $," ; IMMEDIATE 0x00001bec, // 1c10 00001bec ( link to ABORT" ) 0x00222482, // 1c14 00222482 0x82 "$\"" 0x00000006, // $" 1c18 00000006 dolist 0x1c1c, next, 0x00000318, // 1c1c 00000318 DOLIT // 00000005 dolit, next, 0x00000dd0, // 1c20 00000dd0 $"| // 00000006 dolist 0xdd4, next, 0x00000790, // 1c24 00000790 HERE // 00000006 dolist 0x794, next, 0x00000384, // 1c28 00000384 ! // 0000200c store, next, 0x000015a0, // 1c2c 000015a0 $," // 00000006 dolist 0x15a4, next, 0x00000338, // 1c30 00000338 EXIT // 00000007 exitt, next, // 175 /////// : ." [ ' ."| ] LITERAL HERE ! $," ; IMMEDIATE 0x00001c14, // 1c34 00001c14 ( link to $" ) 0x00222e82, // 1c38 00222e82 0x82 ".\"" 0x00000006, // ." 1c3c 00000006 dolist 0x1c40, next, 0x00000318, // 1c40 00000318 DOLIT // 00000005 dolit, next, 0x00000de4, // 1c44 00000de4 ."| // 00000006 dolist 0xde8, next, 0x00000790, // 1c48 00000790 HERE // 00000006 dolist 0x794, next, 0x00000384, // 1c4c 00000384 ! // 0000200c store, next, 0x000015a0, // 1c50 000015a0 $," // 00000006 dolist 0x15a4, next, 0x00000338, // 1c54 00000338 EXIT // 00000007 exitt, next, // 176 /////// : CODE TOKEN $,n OVERT ; 0x00001c38, // 1c58 00001c38 ( link to ." ) 0x444f4304, // 1c5c 444f4304 0x4 "CODE" 0x00000045, // 1c60 00000045 0x00000006, // CODE 1c64 00000006 dolist 0x1c68, next, 0x000010b4, // 1c68 000010b4 TOKEN // 00000006 dolist 0x10b8, next, 0x00001620, // 1c6c 00001620 $,n // 00000006 dolist 0x1624, next, 0x00001754, // 1c70 00001754 OVERT // 00000006 dolist 0x1758, next, 0x00000338, // 1c74 00000338 EXIT // 00000007 exitt, next, // 177 /////// : CREATE CODE 0x203d , ; 0x00001c5c, // 1c78 00001c5c ( link to CODE ) 0x45524306, // 1c7c 45524306 0x6 "CREATE" 0x00455441, // 1c80 00455441 0x00000006, // CREATE 1c84 00000006 dolist 0x1c88, next, 0x00001c64, // 1c88 00001c64 CODE // 00000006 dolist 0x1c68, next, 0x00000318, // 1c8c 00000318 DOLIT // 00000005 dolit, next, 0x0000203d, // 1c90 0000203d dovar, next, 0x00001534, // 1c94 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1c98 00000338 EXIT // 00000007 exitt, next, // 178 /////// : VARIABLE CREATE 0x0 , ; 0x00001c7c, // 1c9c 00001c7c ( link to CREATE ) 0x52415608, // 1ca0 52415608 0x8 "VARIABLE" 0x4c424149, // 1ca4 4c424149 0x00000045, // 1ca8 00000045 0x00000006, // VARIABLE 1cac 00000006 dolist 0x1cb0, next, 0x00001c84, // 1cb0 00001c84 CREATE // 00000006 dolist 0x1c88, next, 0x00000318, // 1cb4 00000318 DOLIT // 00000005 dolit 0x0, next, 0x00000000, // 1cb8 00000000 0x00001534, // 1cbc 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1cc0 00000338 EXIT // 00000007 exitt, next, // 179 /////// : CONSTANT CODE 0x2004 , , ; 0x00001ca0, // 1cc4 00001ca0 ( link to VARIABLE ) 0x4e4f4308, // 1cc8 4e4f4308 0x8 "CONSTANT" 0x4e415453, // 1ccc 4e415453 0x00000054, // 1cd0 00000054 0x00000006, // CONSTANT 1cd4 00000006 dolist 0x1cd8, next, 0x00001c64, // 1cd8 00001c64 CODE // 00000006 dolist 0x1c68, next, 0x00000318, // 1cdc 00000318 DOLIT // 00000005 dolit, next, 0x00002004, // 1ce0 00002004 docon, next, 0x00001534, // 1ce4 00001534 , // 00000006 dolist 0x1538, next, 0x00001534, // 1ce8 00001534 , // 00000006 dolist 0x1538, next, 0x00000338, // 1cec 00000338 EXIT // 00000007 exitt, next, // 180 /////// : .( 0x29 PARSE TYPE ; IMMEDIATE 0x00001cc8, // 1cf0 00001cc8 ( link to CONSTANT ) 0x00282e82, // 1cf4 00282e82 0x82 ".(" 0x00000006, // .( 1cf8 00000006 dolist 0x1cfc, 0x00000318, // 1cfc 00000318 DOLIT // 00000005 dolit 0x29, 0x00000029, // 1d00 00000029 0x00001068, // 1d04 00001068 PARSE // 00000006 dolist 0x106c, 0x00000d34, // 1d08 00000d34 TYPE // 00000006 dolist 0x0d38, 0x00000338, // 1d0c 00000338 EXIT // 00000007 exitt, // 181 /////// : \ 0xa WORD DROP ; IMMEDIATE 0x00001cf4, // 1d10 00001cf4 ( link to .( ) 0x00005c81, // 1d14 00005c81 0x81 "\\" 0x00000006, // \ 1d18 00000006 dolist 0x1d1c, 0x00000318, // 1d1c 00000318 DOLIT // 00000005 dolit 0xa, 0x0000000a, // 1d20 0000000a 0x000010e8, // 1d24 000010e8 WORD // 00000006 dolist 0x10ec, 0x00000420, // 1d28 00000420 DROP // 00002017 drop, next, 0x00000338, // 1d2c 00000338 EXIT // 00000007 exitt, // 182 /////// : ( 0x29 PARSE 2DROP ; IMMEDIATE 0x00001d14, // 1d30 00001d14 ( link to \ ) 0x00002881, // 1d34 00002881 0x81 "(" 0x00000006, // ( 1d38 00000006 dolist 0x1d3c, 0x00000318, // 1d3c 00000318 DOLIT // 00000005 dolit 0x29, 0x00000029, // 1d40 00000029 0x00001068, // 1d44 00001068 PARSE // 00000006 dolist 0x106c, 0x000004b4, // 1d48 000004b4 2DROP // 00002023 ddrop, next, 0x00000338, // 1d4c 00000338 EXIT // 00000007 exitt, /////////////////// // new primitive words // 183 /////// CODE COMPILE-ONLY dobcon 0x40, dohcon 0x1b0, at, pstor, next, END-CODE 0x00001d34, // 1d50 00001d34 ( link to ( ) 0x4d4f430c, // 1d54 4d4f430c 0xc "COMPILE-ONLY" 0x454c4950, // 1d58 454c4950 0x4c4e4f2d, // 1d5c 4c4e4f2d 0x00000059, // 1d60 00000059 0xb0464045, // COMPILE-ONLY 1d64 b0464045 dobcon 0x40, dohcon 0x1b0, 0x20390d01, // 1d68 20390d01 _, at, pstor, next, // 184 /////// CODE IMMEDIATE dobcon 0x80, dohcon 0x1b0, at, pstor, next, END-CODE 0x00001d54, // 1d6c 00001d54 ( link to COMPILE-ONLY ) 0x4d4d4909, // 1d70 4d4d4909 0x9 "IMMEDIATE" 0x41494445, // 1d74 41494445 0x00004554, // 1d78 00004554 0xb0468045, // IMMEDIATE 1d7c b0468045 dobcon 0x80, dohcon 0x1b0, 0x20390d01, // 1d80 20390d01 _, at, pstor, next, // 185 /////// CODE ledSet dobcon 0x2, dobcon 0x10, pinsel, next, END-CODE 0x00001d70, // 1d84 00001d70 ( link to IMMEDIATE ) 0x64656c06, // 1d88 64656c06 0x6 "ledSet" 0x00746553, // 1d8c 00746553 0x10450245, // ledSet 1d90 10450245 dobcon 0x2, dobcon 0x10, 0x00002011, // 1d94 00002011 pinsel, next, // 186 /////// CODE ledOff dobcon 0x1, dobcon 0x10, pinout, next, END-CODE 0x00001d88, // 1d98 00001d88 ( link to ledSet ) 0x64656c06, // 1d9c 64656c06 0x6 "ledOff" 0x0066664f, // 1da0 0066664f 0x10450145, // ledOff 1da4 10450145 dobcon 0x1, dobcon 0x10, 0x00002015, // 1da8 00002015 pinout, next, // 187 /////// CODE ledOn dobcon 0x0, dobcon 0x10, pinout, next, END-CODE 0x00001d9c, // 1dac 00001d9c ( link to ledOff ) 0x64656c05, // 1db0 64656c05 0x5 "ledOn" 0x00006e4f, // 1db4 00006e4f 0x10450045, // ledOn 1db8 10450045 dobcon 0x0, dobcon 0x10, 0x00002015, // 1dbc 00002015 pinout, next, 0x00441045, // "0" 1dc0 00441045 dobcon 0x0, ret, 0x00440045, // "led" 1dc4 00440045 dobcon 0x10, ret, // 188 /////// CODE ledLow call 0x1dc4, call 0x1dc0, pinout, next, END-CODE 0x00001db0, // 1dc8 00001db0 ( link to ledOn ) 0x64656c06, // 1dcc 64656c06 0x6 "ledLow" 0x00776f4c, // 1dd0 00776f4c 0x431dc443, // ledLow 1dd4 431dc443 call "led", call "0", 0x20151dc0, // 1dd8 20151dc0 . . pinout, next, // 189 /////// CODE , dohcon 0x1ac, dup, at, dup, dobcon 0x4, plus, rot, store, store, next, END-CODE 0x00001dcc, // 1ddc 00001dcc ( link to ledLow ) 0x00002c01, // 1de0 00002c01 0x1 "," 0x1801ac46, // , 1de4 1801ac46 dohcon 0x1ac, dup, 0x0445180d, // 1de8 0445180d at, dup, dobcon 0x4, 0x0c0c2225, // 1dec 0c0c2225 plus, rot, store, store, 0x00000020, // 1df0 00000020 next, // 190 /////// CODE WAIT tor, pdonext 0xff, next, END-CODE 0x00001de0, // 1df4 00001de0 ( link to , ) 0x49415704, // 1df8 49415704 0x4 "WAIT" 0x00000054, // 1dfc 00000054 0x20ff4b14, // WAIT 1e00 20ff4b14 tor, pdonext 0x1e01-P, next, // 191 /////// CODE BLINK ( n -- ) // blink led n times (at least 1 time) // 1e10 // 1fffff4c dotcon 0x1fffff, // push 3-byte value 0x1ffffff on data stack // 1e14 // 0245 dobcon 0x02, // push 1-byte value 0x02 on data stack // 1e16 // 1045 dobcon 0x10, // push 1-byte value 0x10 on data stack // le18 // 11 pinsel, // select pin led as output pin // 1e19 // 0045 dobcon 0x00, // push 1-byte value 0x00 on data stack // 1e1c // 1045 dobcon 0x10, // push 1-byte value 0x10 on data stack // 1e1e // 15 pinout, // set led pin level to low (turn on led) // 1e20 // 1418 dup, tor, // copy top of data stack 0x1fffff to return stack // 1e22 // ff4b pdonext 0x1e22-P,// loop back to 1-byte relative address -1 (0x1e22-0x1e23) 0x200000 times // 1e24 // 0145 dobcon 0x01, // push 1-byte value 0x01 on data stack // 1e26 // 1045 dobcon 0x10, // push 1-byte value 0x10 on data stack // 1e28 // 15 pinout, // set led pin level to high (turn led off) // 1e29 // 19 swap, // swap n to top of data stack // 1e2a // 0245 dobcon 0x02, // push 1-byte value 0x02 on data stack // 1e2c // 29 subb, // top of data stack becomes n-2 // 1e2d // 1b18 dup, zless, // top of data stack less than 0? // 1e30 // 0449 pqbran 0x1e35-P, // if not, brach to 1-byte relative address 0x04 (0x1e35-0x1e31) // 1e32 // 17 drop, // drop n-2 // 1e33 // 164a pbran 0x1e4a-P, // branch 1-byte relative address 0x16 (0x1e4a-0x1e34) // 1e35 // 14 tor, // pop n-2 to return stack // 1e36 // 1418 dup, tor, // copy top of data stack 0x1fffff to return stack // 1e38 // ff4b pdonext 0x1e38-P,// loop back to 1-byte relative address -1 (0x1e38-0x1e39) 0x200000 times // 1e3a // 0045 dobcon 0x00, // push 1-byte value 0x00 on data stack // 1e3c // 1045 dobcon 0x10, // push 1-byte value 0x10 on data stack // 1e3e // 15 pinout, // set led pin level to low (turn on led) // 1e3f // 1418 dup, tor, // copy top of data stack 0x1fffff to return stack // 1e41 // ff4b pdonext 0x1e41-P,// loop back to 1-byte relative address -0x1 (0x1e41-0x1e42) 0x200000 times // 1e43 // 0145 dobcon 0x01, // push 1-byte value 0x01 on data stack // 1e45 // 1045 dobcon 0x10, // push 1-byte value 0x10 on data stack // 1e47 // 15 pinout, // set led pin level to high (turn off led) // 1e48 // ed4b pdonext 0x1e36-P,// loop back to 1-byte relative address -0x13 (0x1e36-0x1e49) 0x200000 times // 1e4a // 17 drop, // drop top of data stack 0x1fffff // 1e4b // 20 next, // END-CODE 0x00001df8, // 1e04 00001df8 (link to WAIT) 0x494c4205, // 1e08 494c4205 0x5 "BLINK" 0x00004b4e, // 1e0c 00004b4e 0x1fffff4c, // 1e10 BLINK 1fffff4c dotcon 0x1fffff, 0x10450245, // 1e14 10450245 dobcon 0x2, dobcon 0x10, 0x00004511, // 1e18 00004511 pinsel, dobcon 0x0, nop, 0x00151045, // 1e1c 00151045 dobcon 0x10, pinout, nop, 0xff4b1418, // 1e20 ff4b1418 dup, tor, pdonext 0xff, 0x10450145, // 1e24 10450145 dobcon 0x1, dobcon 0x10, 0x02451915, // 1e28 02451915 pinout, swap, dobcon 0x2, 0x001b1829, // 1e2c 001b1829 subb, dup, zless, nop, 0x4a170449, // 1e30 4a170449 pqbran 0x4, drop, pbran 0x16, 0x14181416, // 1e34 14181416 . tor, dup, tor, 0x0045ff4b, // 1e38 0045ff4b pdonext 0xff, dobcon 0x0, 0x18151045, // 1e3c 18151045 dobcon 0x10, pinout, dup, 0x45ff4b14, // 1e40 45ff4b14 tor, pdonext 0xff, dobcon 0x1, 0x15104501, // 1e44 15104501 . dobcon 0x10, pinout, 0x2017ed4b, // 1e48 2017ed4b pdonext 0xed, drop, next, // 192 /////// CODE DEBUGGER debugger, next, END-CODE 0x00001e08, // 1e4c 00001e08 ( link to BLINK ) 0x42454408, // 1e50 42454408 0x8 "DEBUGGER" 0x45474755, // 1e54 45474755 0x00000052, // 1e58 00000052 0x0000204d, // DEBUGGER 1e5c 0000204d debugger, next, 0 }; // esp32eForth Kernel void tone(int pin, int freq, int ms){}; // called by audio() as byte-code 0x40 implemented on ESP8266 but not yet on ESP32. /*00*/ void nop (){} // do nothing // get rid of next() /*01*/ void accep (){ int n; while(!AVAILABLE()); while(AVAILABLE())n=READBYTES(cData,top); cData[n]='\n',cData[n+1]=0,top=n; PRINT(cData); } // ( m -- n ) // no UDP so far /*02*/ void qrx (){ if( top=AVAILABLE() )stack[(unsigned char)(S++)]=READ(); } // not used so far /*03*/ void txsto (){ WRITE((unsigned char) top),pop; } // without Udp.write((char) top) so far /*04*/ void docon (){ push data[WP/4]; } // push the cell value pointed by WP (the PFA) to data stack /*05*/ void dolit (){ push data[IP/4]; IP+=4; next(); } // push the cell value pointed by IP to data stack // get rid of next() /*06*/ void dolist (){ rack[(unsigned char)(++R)]=IP; IP = WP; next(); } // interpret high level code defined by : // get rid of next() /*07*/ void exitt (){ IP=rack[(unsigned char)(R--)]; next(); } // exit from high level code // get rid of next() /*08*/ void execu (){ P=top,pop; WP=P+4; } // pop CFA from data stack to execute /*09*/ void donext (){ if(rack[(unsigned char)(R)]--)IP = data[IP/4]; else { IP+=4,R--; } next(); } // end of the high level FOR..NEXT loop /*0a*/ void qbran (){ if(top)IP+=4; else IP=data[IP/4]; pop; next(); } // get rid of next() /*0b*/ void bran (){ IP=data[IP/4]; next(); } // get rid of next() /*0c*/ void store (){ data[top/4]=stack[(unsigned char)(S--)]; pop; } /*0d*/ void at (){ top=data[top/4]; } /*0e*/ void cstor (){ cData[top]=(unsigned char)stack[(unsigned char)(S--)]; pop; } /*0f*/ void cat (){ top=(long)cData[top]; } /*10*/ void sndpck (){} // do nothing so far /*11*/ void pinsel (){ X=top; pop; pinMode(X,top); pop; } /*12*/ void rfrom (){ push rack[(unsigned char)(R--)]; } /*13*/ void rat (){ push rack[(unsigned char)(R)]; } /*14*/ void tor (){ rack[(unsigned char)(++R)]=top; pop; } /*15*/ void pinout (){ X=top; pop; digitalWrite(X,top); pop; } /*16*/ void pinin (){ top=digitalRead(top); } /*17*/ void drop (){ pop; } /*18*/ void dup (){ stack[(unsigned char)(++S)]=top; } /*19*/ void swap (){ X=top; top=stack[(unsigned char)(S)]; stack[(unsigned char)(S)]=X; } /*1a*/ void over (){ push stack[(unsigned char)(S-1)]; } /*1b*/ void zless (){ top=(top<0)LOGICAL; } /*1c*/ void andd (){ top&=stack[(unsigned char)(S--)]; } /*1d*/ void orr (){ top|=stack[(unsigned char)(S--)]; } /*1e*/ void xorr (){ top^=stack[(unsigned char)(S--)]; } /*1f*/ void umplus (){ stack[(unsigned char)(S)]+=top; top=LOWER(stack[(unsigned char)(S)],top); } /*20*/ void next (){ P=data[IP/4]; IP+=4; WP=P+4; } /*21*/ void qdup (){ if(top)stack[(unsigned char)(++S)]=top; } /*22*/ void rot (){ X=stack[(unsigned char)(S-1)]; stack[(unsigned char)(S-1)]=stack[(unsigned char)(S)]; stack[(unsigned char)(S)]=top; top=X; } /*23*/ void ddrop (){ pop,pop; } /*24*/ void ddup (){ over(),over(); } /*25*/ void plus (){ top+=stack[(unsigned char)(S--)]; } /*26*/ void inver (){ top^=-1; } /*27*/ void negat (){ top=-top; } /*28*/ void dnega (){ // top=(top^-1); if(stack[(unsigned char)(S)]^-1) top++; stack[(unsigned char)(S)]=-stack[(unsigned char)(S)]; } /* // long long d=(long long)stack[(unsigned char)(S)]+((long long)top<<32); d=-d; top=(long)(d>>32); stack[(unsigned char)S]=(long)d; /* inver(); // ( a b^-1 ) swap(); // ( b^-1 a ) inver(); // ( b^-1 a^-1 ) push 1; // ( b^-1 a^-1 1 ) umplus(); // ( b^-1 (a^-1)+1 LOWER(a^-1,1) ) rot(); // ( (a^-1)+1 LOWER(a^-1,1) b^-1 ) plus(); // ( (a^-1)+1 (b^-1)+LOWER(a^-1,1) ) //*/ } /*29*/ void subb (){ top=stack[(unsigned char)(S--)]-top; } /*2a*/ void abss (){ if(top<0)top=-top; } /*2b*/ void equal (){ top=(stack[(unsigned char)(S--)]==top) LOGICAL; } void great (){ top=(stack[(unsigned char)(S--)]>top) LOGICAL; } /*2c*/ void uless (){ top=LOWER(stack[(unsigned char)(S)], top) LOGICAL; S--; } /*2d*/ void less (){ top=(stack[(unsigned char)(S--)]>32); stack[(unsigned char)(S)]=(unsigned long)m; } /*34*/ void star (){ top*=stack[(unsigned char)(S--)]; } /*35*/ void mstar (){ m=(signed long long int)top*(signed long long int)stack[(unsigned char)(S)]; top=(signed long)(m>>32); stack[(unsigned char)(S)]=(signed long)m; } /*36*/ void ssmod (){ d=(signed long long int)top; m=(signed long long int)stack[(unsigned char)(S--)]*(signed long long int)stack[(unsigned char)(S)]; top=(signed long)(m/d); stack[(unsigned char)(S)]=(signed long)(m%d); } /*37*/ void stasl (){ top=(signed long)(((signed long long int)stack[(unsigned char)(S--)]*(signed long long int)stack[(unsigned char)(S--)])/(signed long long int)top); } /*38*/ void pick (){ top=stack[(unsigned char)(S-top)]; } /*39*/ void pstor (){ data[top/4]+=stack[(unsigned char)(S--)]; pop; } // ( n a -- ) // data[a/4]+=n /*3a*/ void dstor (){ data[(top/4)+1]=stack[(unsigned char)(S--)]; data[top/4]=stack[(unsigned char)(S--)]; pop; } // ( n1 n2 a -- ) // data[a/4+1]=n2, data[a/4]=n1 /*3b*/ void dat (){ push data[top/4]; top=data[(top/4)+1]; } // ( a -- n1 n2 ) // n1=data[a/4], n2=data[a/4+1] /*3c*/ void count (){ stack[(unsigned char)(++S)]=top+1; top=cData[top]; } // ( a -- a+1 c ) // c=cData[a] /*3d*/ void dovar (){ push WP; } // ( -- a ) /*3e*/ void maxx (){ if(topb?a:b ) /*3f*/ void minn (){ if(top ( -- n ) pop top of return stack to data stack /*13*/,rat // R@ ( -- n ) copy top of return stack to data stack /*14*/,tor // >R ( n -- ) pop top of data stack to return stack /*15*/,pinout // pinOut ( level pin -- ) set pin level /*16*/,pinin // pinIn ( pin -- level ) get pin level /*17*/,drop // DROP ( n -- ) drop the top of data stack /*18*/,dup // DUP ( n -- n n ) duplicate the top of data stack /*19*/,swap // SWAP ( a b -- b a ) swap the top two values of data stack /*1a*/,over // OVER ( a b -- a b a ) copy the next value as the new top of data stack /*1b*/,zless // 0< ( n -- flag ) flag=(n<0)?TRUE:FALSE /*1c*/,andd // AND ( a b -- b&a ) bitwise AND of b and a /*1d*/,orr // OR ( a b -- b|a ) bitwise OR of b and a /*1e*/,xorr // XOR ( a b -- b^a ) bitwise XOR of b and a /*1f*/,umplus // UM+ ( ua ub -- dL dH ) unsigned summation /*20*/,next // go back to high level /*21*/,qdup // ?DUP ( n -- n n | 0 ) if the top of data stack is non-zero, duplicate the top of data stack /*22*/,rot // ROT ( a b c -- b c a ) rotate the third as the top of data stack /*23*/,ddrop // 2DROP ( a b -- ) drop the top two of data stack /*24*/,ddup // 2DUP ( a b -- a b a b ) duplicate the top two of data stack /*25*/,plus // + ( a b -- b+a ) /*26*/,inver // NOT ( n -- n^-1 ) /*27*/,negat // NEGATE ( n -- -n ) /*28*/,dnega // DNEGATE ( a b -- -a (b^-1)+LOWER(a^-1,1) ) /*29*/,subb // - ( a b -- a-b ) /*2a*/,abss // ABS ( n -- abs(n) ) /*2b*/,equal // = ( a b -- a==b ) /*2c*/,uless // U< ( ua ub -- uab?a:b ) /*3F*/,minn // MIN ( a b -- a=bytecodeLimit){ PRINTF("\n Illegal code 0x%02x at 0x%04x ", bytecode, P); debugger(); } primitives[bytecode](); } int cfa(char*name); void showTraceStep(int a); int dis(int ip, int p, int wp); int tracing ; // auto trace, if tracing!=0 int traceBegin ; // begin of tracing if P==traceBegin int traceDepth ; // depth of tracing int traceLimit ; // limit of tracing if P==traceLimit int traceSteps ; // maximum number of tracing steps, auto decreased, goto debugger if traceSteps==0 int traceLevel ; // level of tracing int traceLevelLimit; // level limit of tracing int disIP ; // disassembled IP int disP ; // disassembled P int disGo ; // auto disassemble, if disGo!=0 void setup() { P=0x180, WP=P+4, IP=S=R=top=tracing=disIP=disP=disGo=0, cData=(char*)data; traceBegin=traceBEGIN, traceLimit=traceLIMIT, traceDepth=traceDEPTH, traceSteps=traceSTEPS; Serial.begin(115200); delay(100); /* ignore wifi so far // attempt to connect to Wifi network: WiFi.begin(ssid, pass); while (WiFi.status() != WL_CONNECTED) { delay(500); PRINT("."); } PRINTLN(""); PRINTLN("WiFi connected"); PRINT("SSID: "); PRINTLN(WiFi.SSID()); IPAddress ip = WiFi.localIP(); PRINT("IP Address: "); PRINTLN(ip); long rssi = WiFi.RSSI(); PRINT("signal strength (RSSI): %d dBm", rssi); PRINTLN("Starting connection to server..."); // if you get a connection, report back via serial: Udp.begin(localPort); PRINTF("Local Port: %d\n", localPort); PRINTLN("Booting espForth_44 ..."); pinMode(16,2); // set pin direction as output digitalWrite(16,0); // set pin level low to turn on led of wifiboy esp32 */ PRINTLN("Booting esp32eForth_14"); } int oldIp=0; int oldP=0; void loop() { //while (TRUE) { bytecode=cData[P], showTraceStep(P); if((P>=0x1e10 && P<0x1e4c || P>=0x1dd4 && P<0x1ddc) && P!=oldP){ oldP=P; PRINTF("\nIP 0x%04x %04x P 0x%04x bytecode 0x%02x ", IP-4, WP-4, P, bytecode); dis(IP, P, WP); } P++; execute(bytecode); //} } //----- convert byte to be printable #define toChar(byte) ((byte<0x20||byte>=0x7f) ? '_' : byte) //----- create a null-terminated string copied from a of length n char sBuf[0x100], disBuf[0x10]; char*dotStr(int a, int n){ int i; for(i=0; i=bytecodeLimit) return ""; strcpy(disBuf,mnemonics[byte]); return disBuf; } //----- shrink string length by n void shrinkStr(char*s, char n){ *(s+strlen(s)-n)='\0'; } //----- return number of bytes taken as parameter of a byte code instruction #define x1M 4 char*x1[x1M]={"dobcon,","pdonext,","pbran,","pqbran,"}; #define x2M 2 char*x2[x2M]={"dohcon,","call,"}; #define x3M 1 char*x3[x3M]={"dotcon,"}; int extraBytes(char*s){ return any(s,x1,x1M)?1 : any(s,x2,x2M)?2 : any(s,x3,x3M)?3 : 0; } //----- show information of tracing state char*more=".. "; void showState(){ int cfa=WP-4; PRINTF("\ntracing %d traceBegin %04x %s " , tracing, traceBegin, cellName(traceBegin)); PRINTF("traceLimit %04x %s traceLevel %d ", traceLimit, cellName(traceLimit), traceLevel); PRINTF("traceDepth %d traceSteps %d" , traceDepth, traceSteps); PRINTF("\nbase%d P %04x " , cData[0x1a4], P); PRINTF("%08x %02x " , data[P/4], cData[P]); dis(IP, P,WP); PRINTF("\n%04x %s %08x " , cfa, cellName(cfa), data[cfa/4]); PRINTF("WP %04x %08x IP %04x %08x" , WP, data[WP/4], IP, data[IP/4]); PRINTF("\nS 0x%x stack [" , S); if(S>3) PRINT(".. "); if(S>2) PRINTF("0x%x " , stack[(unsigned char)(S-1)]); if(S>1) PRINTF("0x%x " , stack[(unsigned char)S]); if(S>0) PRINTF("0x%x" , top); PRINT("] "); PRINTF("\nR 0x%x rack [" , R); if(R>3) PRINT(".. "); if(R>2) PRINTF("0x%x " , rack[(unsigned char)(R-2)]); if(R>1) PRINTF("0x%x " , rack[(unsigned char)(R-1)]); if(R>0) PRINTF("0x%x" , rack[(unsigned char)R]); PRINT("] "); PRINT("\n========================================"); } //----- convert (at most n before '\r') hexadecimal digits to integer value v int parsedChars; // *** side effect of hex() *** int hex(char*a, int n){ int v=0, d; char c; parsedChars=0; while( n-- && *a!='\r' ){ d=c=*a++; parsedChars++; if(d==' ') break; if (d>='a') d-=87; // 'a'-10 // 0x61-10 // 97-10 else if(d>='A') d-=55; // 'A'-10 // 0x41-10 // 65-10 else d-=48; // '0' // 0x30 // 48 if(d>=16) break; v=v*16+d; } return v; } //----- dump 32-byte memory at address a void dump32(int a){ int i; PRINTF("\n%04x: ",a); for(i=0; i<32; i+=4, a+=4) PRINTF("%08x ",data[a/4]); for(i=0, a-=32; i<32; i++, a++) PRINTF("%c",toChar(cData[a])); } //----- show a memory cell at given address void showMemoryCell(int a, char*name){ int d=data[a/4]; PRINTF("\n0x%08x, // %14s %04x %08x ", d, name, a, d); } //----- show a memory string at given address void showMemoryStr(int a){ char b=cData[a], n=b&0x1f; int m=align(a+1+n); showMemoryCell(a,""); PRINTF("0x%x ", b); qprint(dotId(a)); while((a+=4)=0)&&flag){ showMemoryCell(x&-4, ""); while(n--) PRINT("_, "); } a=x; } while(flag); } //----- see the insight of the forth word of a given name void see(char*name){ int i; int nf=nfa(name); if(!nf){ PRINTLN(); qprint(name); PRINT(" is not a forth word "); return; } int flag, cf=nameFrom(nf), pf=cf+4, pfLimit, a, n; showMemoryAtLFA(nf-4); showMemoryAtNFA(nf); showMemoryAtCFA(cf, name); if(strcmp(disBuf, "dolist")==0){ // forth high level colon word pfLimit=0; bool notEXIT; do{ showMemoryCell(pf, ""); showColonCell(pf, 0); pf+=4; bool branching=strcmp(sBuf,"BRANCH")*strcmp(sBuf,"QBRANCH")==0; bool needExtraCell=any(sBuf,extraCell,extraCellM); bool needExtraStr=any(sBuf,extraStr,extraStrM); notEXIT=strcmp(sBuf, "EXIT")!=0; if(branching){ showMemoryCell(pf, ""); a=data[pf/4]; pf+=4; if(a>pf){ //PRINT("\nforward branching "); if(a>pfLimit) pfLimit=a; // extend pfLimit } else { //PRINT("\nbackward branching "); if(pf>pfLimit) notEXIT=false; } } else if(needExtraCell){ a=pf&-4; showMemoryCell(a, ""); cf=data[a/4]; nf=toName(cf); if(nf) showColonCell(a, 1); pf+=4; } else if(needExtraStr){ showMemoryStr(pf); pf=align(pf+1+idLen(pf)); } } while(notEXIT); } else if(extraWp){ showMemoryCell(pf, ""); } } //----- the debugger (to check/modify memory, to see a forth word, or to change P) int cmdReading, cmdProcessing; void debugger(){ PRINT("\n========== begin of debugging ========== "); int a, n, v; char c; char*cmd=&cData[0xff00]; // *** cmdReading at most 255 characters *** showState(); while(1){ // enter 'e' to exit debugging PRINTF("\n'e' to exit, '?' for help\nP %04x > ",P); cmdReading=1; // begin of cmdReading while(cmdReading){ while(AVAILABLE()){ n=READBYTES(cmd,0x400); cmd[n-1]=cmdReading=0; // end of cmdReading PRINT(cmd); if(n>0x3ff) PRINTF("\ncmdReading more than %d characters",0x3ff); cmdProcessing=1; // begin of cmdProcessing while(cmdProcessing && n--){ c=*cmd++; if(c>='a')c-=0x20; // assure c is upper case if(c=='A'){ PRINTF("\ntake 0x%04x as 16-bit save (A)ddress ", a=hex(cmd,4)); cmd+=parsedChars, n-=parsedChars; } else if(c=='B'){ PRINTF("\nsave 0x%02x as 8-bit 1-(B)yte value to address 0x%04x ", v=hex(cmd,2),a); cData[a++]=v, cmd+=parsedChars, n-=parsedChars; } else if(c=='C'){ PRINTF("\nstore 0x%08x as 32-bit (C)ell value to address 0x%04x ", v=hex(cmd,8), a=(a+3)&-4); data[a/4]=v; cmd+=parsedChars, n-=parsedChars; } else if(c=='D'){ PRINTF("\ntake 0x%04x as 16-bit address to (D)ump 32-byte (M)emory ", v=hex(cmd,4)); dump32(v), cmd+=parsedChars, n-=parsedChars; } else if(c=='E'){ showState(); PRINT("\n========== end of debugging ========== "); PRINT("\n "); itoa(stack[(unsigned char)(S-2)],sBuf,cData[0x1a4]); PRINTF("%s " ,sBuf); itoa(stack[(unsigned char)(S-1)],sBuf,cData[0x1a4]); PRINTF("%s " ,sBuf); itoa(stack[(unsigned char) S ],sBuf,cData[0x1a4]); PRINTF("%s " ,sBuf); itoa(top ,sBuf,cData[0x1a4]); PRINTF("%s ok> ",sBuf); return; } // end of debugging else if(c=='H'){ PRINTF("\nstore 0x%04x as 16-bit (H)alf cell value to address 0x%04x ", v=hex(cmd,4), a); cData[a++]=v&0xff; cData[a++]=v>>8; cmd+=parsedChars, n-=parsedChars; } else if(c=='I'){ PRINTF("\ntake 0x%04x as 16-bit High level colon cell (I)P address ", IP=hex(cmd,4)); cmd+=parsedChars, n-=parsedChars; } else if(c=='N'){ PRINT("\nshow byte code mnemonics"); for(int i=0;i>=8; cData[a++]=v&0xff; cData[a++]=v>>8; cmd+=parsedChars, n-=parsedChars; } else if(c=='W'){ PRINTLN("\nshow forth word names "); int context=0x1a8, a=data[context/4], n=0, m=90; while(a){ if(n+idLen(a)>m) n=0, PRINTLN(); n+=idLen(a)+1; PRINTF("%s ", dotId(a)); a=data[a/4-1]; } } else if(c=='?'){ PRINT("\na set hex 16-bit address to save, b save hex 16-bit to address,"); PRINT("\nc save hex 32-bit to address, d dump 32-byte at given address,"); PRINT("\nh save hex 16-bit to address, i take hex 16-bit as IP,"); PRINT("\np take hex 16-bit as P, t save hex 24-bit to address,"); PRINT("\nw show forth word names, s see forth word of given name (case sensitive),"); PRINT("\nn show byte code mnemonics, s disassemle bytecode at given address,"); } else if(c==0) break; // end of input else { PRINTF("\n%c 0x%x ? ", c, c); break; } } cmdProcessing=0; // end of cmdProcessing } } } } #define extraWpAddrM 2 char*extraWpAddr[extraWpAddrM]={"dolist,","dovar,"}; #define extraIpValueM 4 char*extraIpValue[extraIpValueM]={"dolit,","qbran,","bran,","donext,"}; #define relativeM 3 char*relative[relativeM]={"pdonext","pbran","pqbran"}; //----- disassembly byte code at p with ip and wp int dis(int ip, int p, int wp){ char b; char*s; int a=p, n, v=0, x; b=cData[a++]; s=byteName(b); n=extraBytes(s); if(!b){ PRINT("_, "); } else if (n==0){ if(strcmp(s,"docon,")==0){ extraWp=1; PRINTF("docon 0x%x, ", data[wp/4]); } else if(any(s,extraWpAddr,extraWpAddrM)){ if(strcmp(s,"dovar,")==0) extraWp=1; shrinkStr(s, 1); PRINTF("%s 0x%04x, ", s, wp); } else if(any(s,extraIpValue,extraIpValueM)){ shrinkStr(s, 1); if(ip){ PRINTF("%s 0x%x, ", s, data[ip/4]); } else PRINTF("%s *IP, ",s); } else PRINTF("%s ",s); } else { shrinkStr(s, 1); a+=n; x=a; while(n--) v=v*256+cData[--x]; if(any(s, relative, relativeM)) PRINTF("%s 0x%x-P, ", s, x+(signed char)v); else PRINTF("%s 0x%x, ", s, v); } return a; } int L=0, M=1000; void showTraceStep(int a){ char i, b, n, *s; int x, d, p, v, ip; if(P==traceBegin){ if(traceDepth>0)tracing=1; traceLevel=L, traceLevelLimit=L+traceDepth; PRINT("\n========== begin of tracing ========== "); showState(); } if(tracing && traceSteps){ x=a&-4; if(IP!=disIP || x!=disP){ disIP=IP, disP=x, d=data[disP/4]; //if(L<=traceLevelLimit){ traceSteps--; ip=disIP-4; int cfa=data[ip/4]; int nfa=toName(cfa); int n=idLen(nfa); dotId(nfa), d=data[cfa/4]; byteName(d); if(L<=traceLevelLimit){ PRINTF("\n%04x %08x %02d ", ip, disP, L); for(i=0; i