{block 0} [0x65eb56fa] [0xb40] [0x7c080027] < tors > [0xffff] [0xcf9a00] [0xffff] [0xcf9200] [0xffff] [0x9a00] [0xffff] [0x9200] [0x200000] [0x0] [0x0] [0x0] [0x4144] < oootoro > [0x37363534] [0x42413938] [0x46454443] [0x58415049] [0x58445843] [0x50535842] [0x49535042] [0x53454944] < drmaf > [0xc08ed88e] [0xbf7c00be] [0xb97a00] [0xf3fc8901] [0xb4d08ea5] [0xfe88eb8] [0x7c081601] [0xb000dae8] [0xe464e6d1] [0x75022464] [0xe64bb0fa] < idea*s > [0x66c03166] [0x10e8ba0f] [0xb74f608] [0x8478b66] [0x2c458966] [0x88078b66] < eamtu0 > [0x608b430] [0x7213cd57] [0xbfe8fe] [0x5589075f] [0x3fe18034] [0x8b364d89] [0x4d8b3055] [0x4368b32] [0x7c00bb7c] [0x1b842eb] [0x2c78002] [0xef800375] [0xe813cd02] [0xfe720095] [0x45bc0f66] [0x75153c28] [0xbb5308] [0x99e87a] [0x95e85b] [0x3f24c888] [0x7536453a] [0x3ac6fe13] [0x9763575] < p?wfo > [0xc1800375] [0xc0e18040] [0x754ec1fe] [0x7c0ebeb9] < ?yptas > [0x41b52f74] [0xbf57c188] [0x1b87a00] [0x8310cd4f] [0x12754ff8] [0x312458b] [0x45021445] [0x7203d19] [0x8b660475] [0xac5f285d] [0x8966d475] [0x4d88005d] [0x385d8b38] [0xe8e99d1e] [0xc0200f00] [0x220f010c] [0x1068c0] [0xc8fea10f] [0x1ec0220f] [0x680ea10f] [0x8f667db4] [0xe000406] [0xe589609c] [0x8010468b] [0xe48001cc] [0x144687fd] [0x61104689] [0xb960cf] [0x66de8901] [0xad285d8b] [0x3896764] [0x2c38366] [0x8966f5e2] [0xc361285d] [0xa80f0660] [0x31e58907] [0xbe0fb4ff] [0xab97c54] < gcg3 > [0xab20b0ab] [0xf5e2abab] [0xbe00a0bf] [0x28b0012] [0xb45004b1] [0xc3c15b07] [0xe3835304] [0x44878a0f] [0xf1e2ab7c] [0x58abc030] [0x7302ee83] [0xcf6107e1] < crtrtrt gegnete > [0xfdba5052] [0xec000003] [0xfb7420a8] [0x5805ea80] [0x60c35aee] [0x8b9] < d8les > [0xd08904c2] [0xf25] < eesrre > [0xe800007c] < ???* > [0x20b0e9e2] [0xffffc7e8] [0xc3ad61ff] [0xe80db050] [0xffffffbc] [0xb5e80ab0] [0x58ffffff] [0x4f02b8c3] [0xfbba10cd] [0xee83b003] [0xea8003b0] [0xc030ee03] [0xb0ee4266] [0x2c28003] [0x80c030ee] [0xb0ee02ea] [0x3c28003] [0x8041b0ee] [0xe8ee04ea] [0xbc0085] [0xbe000a00] [0x9f400] [0xffffafe8] [0xfc768dff] [0x78b80689] [0xe8123456] [0xffffff77] [0xffff9be8] [0x855ae9ff] [0x8960001f] [0x340503e5] [0x5000007c] [0x7c3da0] [0xf6c0fe00] [0x7c3e25] < ams9t > [0xf3f7d231] [0xd089c189] [0x7c3e1d8a] < '*s > [0xc1c1c388] [0x6e1c008] [0xc1fee108] [0x88184d89] [0x380d8add] [0x8900007c] [0xc361144d] [0xcc0200f] [0xc0220f01] [0xc3c03166] [0x86858] [0xf58cb50] [0x66cb50a0] < ?'olo > [0xb8ffede8] [0x10] [0xd88ec08e] [0x8c66db31] [0x4e3c1d3] [0x8ee30166] < nr6eek > [0x6858c366] [0x18] < mtdxg > [0xc2200fe1] [0xffffede8] [0x20b8ff] [0xc08ed88e] [0xc931d08e] [0x4e9c166] [0x220fcafe] [0x1000bbc2] [0xa9e8dc87] [0x31dc89ff] < m5mr4 nn0bf > [0x60c36661] [0x24b9e589] < + > [0xe85150e1] [0xffffff32] [0x25e8] [0x45d8b00] [0xe7c13b8b] [0x80b902] [0xbe0000] [0xf300007a] [0x2efc1a5] [0x58593b89] < 3irtse > [0x1c45ff58] [0x8be8c361] [0xbbffffff] [0x1b87a00] [0xfa13cd02] [0xc3ff54e8] < woxmtd > [0x24] [0x5d8be1f6] [0xc1338b04] [0x515002e6] [0xbf80b1] [0xf300007a] [0xfed4e8a5] [0x14e8ffff] < ac > [0xe2504058] [0xeec158e6] [0x1c45ff02] [0x89045d8b] [0xe8c36133] [0xffffff3e] [0xb87a00bb] [0x13cd0301] [0xff07e8fa] [0xc3] {block 1} [0x1afae9] [0x0] [0x1aede9] [0x0] [0x66636d63] < ort9lt > [0x64702d62] [0x89fc768d] [0xfca15606] [0x89002027] [0x4c08320] [0x8b58e0ff] < ti,arc > [0xad5e0020] [0xdde857c3] [0x5fffffff] [0xffe8e8c3] [0xffe8ffff] [0xdfe80009] [0xf0ffffff] [0xe80009db] [0xffffffd6] [0x9b7f0] [0xfcbae3eb] [0x890009cf] [0xdbfcb90a] [0x18f0009] [0x89fc498d] [0x4f0d8911] [0xc3002004] [0x9abfcba] < wtrart > [0x9b7fc] [0x498d018f] [0x891189fc] [0x2004580d] < m@ovs > [0x20280005] < ?8ol > [0x15ffffff] [0x202808] [0x280015ff] [0x15ff0020] [0x20280c] [0xdce8eceb] [0xc3ffffff] [0x2800058f] [0x9be80020] [0xffffffff] [0x20280015] < m?m3 > [0x20280405] < ?0we > [0x5ee8ffff] [0xffffffff] [0x20280415] < kiy.s > [0xffffffe3] [0xf404bec3] [0x8bc30009] [0x2027b80d] < csonte > [0x8b002027] [0x2027b40d] [0x980d8900] [0x8b002027] [0x2027a00d] < ysonte > [0xc3002027] [0x279c0d8b] [0xd890020] [0x2027a0] [0x27980d8b] [0xd890020] [0x2027b4] [0x27940d8b] [0xd890020] [0x2027b8] [0x27a805c7] [0x20] < misd > [0x2027b80d] < ohngi > [0x2028388d] < mnr6f > [0x2027b40d] < ohngi > [0x367ffc8d] < g?t,s > [0xffc35ffc] [0x20275425] [0xa0158b00] [0x89002027] [0x2027ac15] [0xad02c600] [0x27a005ff] [0x8bc30020] [0x2027a015] < raoccs > [0x2027ac] [0x3a800c75] [0x890775ad] [0x2027a015] < ramisd > [0x2027a0] [0x768d02c7] [0x42c689fc] [0x5830604] [0x2027a0] [0x768dc305] [0xc30689fc] [0x27c8058f] [0xe8c30020] [0xfffffff4] [0xb80d8b50] [0xff002027] [0x2027b805] < mlotoe > [0x20283c] [0x218b8] [0xe81eeb00] [0xffffffd4] < fsont2 > [0xff002027] [0x2027b405] < mlotoe > [0x368000] [0x2800b8] < wlattd > [0xfffffffc] [0x89f0e283] [0xa0158b11] [0x89002027] [0x148d0114] [0x2eac101] [0x27a41589] [0x89580020] [0x2027ac25] [0x9005c700] [0xb6002027] [0xf7002005] [0x2027a805] < ???8 > [0xff0674ff] [0x2027a825] [0x768dc300] [0x8b0689fc] [0x80048d04] [0xe8c30036] < ???' > [0x280081c7] [0x6460000] [0x5ff0020] [0x2027b4] [0x47047989] [0x9005c7c3] [0xb6002027] [0xe8002005] [0xffffff07] [0x27ac158b] [0x15890020] [0x2027b0] [0x27a0158b] [0x15890020] [0x2027ac] [0x89b802c6] [0x5830142] [0x2027a0] [0x15ffc305] [0x202790] [0xbd048b] < ei > [0x15ff10eb] [0x202790] [0xfcbd048b] [0xc1ffffff] [0xb0e805f8] [0xadffffff] [0xffff31c3] [0x2027840d] < glir0 > [0x5c7f5eb] [0x202790] [0x20066d] [0x89fc768d] [0xbd048b06] [0xfffffffc] [0xe8f0e083] [0xfffffe5f] [0xfe6d850f] [0xffadffff] [0xa8008d24] [0x15ff0036] [0x202790] [0xfcbd048b] [0x83ffffff] < tqeis8 > [0x75fffffe] [0x24ffad08] [0x202a548d] < ?rn! > [0x48bffff] [0x36a8008d] < oeslod > [0x8bfffffe] [0x2027a015] < gsante > [0xc6002027] [0xc283e802] [0x89d02905] [0x1589fc42] [0x2027a0] [0x15ffc3ad] [0x202790] [0xfcbd048b] [0x83ffffff] < 6ieis8 > [0x8bfffffd] [0x2a548d04] [0xbdeb0020] [0x279005c7] [0x66d0020] [0x768d0020] [0x8b0689fc] [0xfffcbd04] [0xf8c1ffff] [0x5c7c305] [0x202790] [0x20066d] [0x89fc768d] [0xbd048b06] [0x0] [0x4b9c347] < mn > [0x2027a015] [0x8b028900] [0x11148d06] [0x8904768d] [0x2027a015] [0x1b9c300] < .s > [0x2b9e2] < 5!d > [0x3b9] < migogs > [0x2027a015] [0x5ea8300] [0x27ac1539] [0x8750020] < iakr2 > [0xc302fe03] [0xc30542c6] [0x27a005ff] [0x89c30020] [0x2027ac25] [0xa0158b00] {block 2} [0x29002027] [0xff5088c2] [0x2589c3ad] [0x2027ac] [0x89fc768d] [0x27a0a106] [0x8bc30020] [0x2027a015] < *gtml > [0x27ac1539] [0x33750020] [0x75b83a80] [0xfc768d2e] [0xb0a10689] [0xa3002027] [0x2027ac] [0x8101428b] [0x768dfb7a] [0xb7489fc] [0x27a01589] [0x16e90020] [0x83fffffd] [0x2027a005] < orv*s > [0x639c3d2] [0xc9310278] [0xbd04f7c3] [0xfffffffc] < ???? > [0x5f5f0275] [0xc2015ac3] [0x582548d] [0xadfc5203] [0x503e2ff] [0x202744] [0x5708e0c1] [0x8badc789] [0xbd14] < snmd > [0x14ff0fe2] [0x2027bc95] [0xeceb00] [0x28140d8b] [0xe1c10020] [0x3c18310] [0x28100d89] [0xd890020] [0x20281c] [0xd8b66c3] [0x202812] [0x180d3b66] [0x78002028] [0x140d8b19] [0xc1002028] [0x8b6610e1] [0x2028100d] [0x1ec18300] [0x28100d89] [0x8dc30020] [0x689fc76] [0xffffffb8] < tsnren > [0xc3ad0020] [0xcf8ba] < atmwws > [0x8dc3ed04] [0x689fc76] [0x80001b8] < crtrsd crtrtrt crtrtrt crtrtrt crtrtrt crtrtrt crtrtrt crtrtrt crtrtrt crtrtrt > [0xb89090] [0xe8030000] [0xffffffc3] [0xb110408d] [0xfc768d06] [0xa9e80689] [0x24ffffff] [0x740834fb] [0x408dad16] [0xe9754904] [0x8de8408d] [0x689fc76] [0xffff8fe8] [0xa3f024ff] [0x20282c] [0xc3adc3ad] [0x28358b56] [0x57002028] [0x7c083d8b] [0xb90000] [0xf3000c00] [0xc35e5fa5] [0xffffe3e8] [0xfa9fe9ff] [0x3d8bffff] [0x202810] [0x8566f989] [0x310279c9] [0xffe181c9] [0x890000ff] [0x2028380d] [0xc96900] [0xc1000010] [0x27910ff] [0x3d89ff31] [0x202834] [0x3b93c8d] [0x2028243d] < ggynrs > [0x10b9c486] < nn > [0x273e0d1] [0xc7831789] [0xf3754904] [0x86ad66c3] [0x10b9c4] < 8nm > [0x17891173] [0x89045789] [0x100097] [0x4978900] [0x83000010] [0x754908c7] [0xaee8c3e5] [0x56fffffe] [0xc06b5257] [0xb08d30] [0xe8002030] [0xffffff76] [0x2830158b] [0x18b90020] < ar > [0xffff9de8] [0xc0c781ff] [0x5900000f] [0x5af07549] [0x81ad5e5f] [0x20281005] < rn aianvs > [0x30c06b52] [0x3000b08d] [0x3be80020] [0x8bffffff] [0x20283015] [0x18b900] < ktm > [0xffffff79] [0x1f80c781] < ecfe > [0x5f5af075] [0x1005815e] [0x2028] [0xad002c00] [0xfe5de8c3] [0x5c7ffff] [0x202814] [0x3] [0x281805c7] [0x3f40020] [0x1e90000] [0xe8fffffe] [0xfffffeee] [0xe1d10e8b] [0xcf29e1d1] [0x30a1c189] [0xf3002028] [0x1005ffab] [0xad002028] [0xcfe8c3ad] [0x3dfffffe] [0x301] [0xb80578] [0x89000003] [0x380d2bc1] [0x7e002028] [0x13e8131] [0x78000004] [0x6c706] [0xa1000004] [0x202834] [0x1a7e0629] [0x400ba] < dmntf > [0x30a102e2] [0x51002028] [0xabf30e8b] [0x4959d701] [0xadadf575] [0xfc768dc3] [0xffb80689] [0xe90000ff] [0xfffffdd1] [0x89fc768d] [0xffb806] [0xc2e900ff] [0x8dfffffd] [0x689fc76] [0xc0c0c0b8] < ,4*t > [0x768dffff] [0xb80689fc] [0x4040ff] [0xfffda4e9] [0xfc768dff] [0xb80689] [0xe900ff00] [0xfffffd95] [0x89fc768d] [0xff00b806] < s6y > [0xfffffd] [0x0] [0x30f2a00] [0xb9562401] [0xa] [0xb6f3d8d] [0x778d0020] [0x5ea4f301] [0x200b79a2] [0x8dc3ad00] [0x689fc76] [0xbb9] < n'zoe > [0x3100200b] < gfgiyd > [0xfc768dc3] [0xd2310689] [0x1eb9] < mo9+s > [0xe5c281d0] [0x8900037f] [0x20281015] < wrstre > [0x0] [0xc3400175] [0x89fc768d] [0xa3c03106] [0x202810] [0xfffd14e8] [0xfc768dff] [0xb80689] [0x8d000004] [0x689fc76] [0x300b8] < ?nnies > [0x14a3ffff] [0xad002028] {block 3} [0x2818a3c3] [0xc3ad0020] [0x2810a366] [0x66ad0020] [0x202812a3] < nnv3e > [0x28100501] [0x66ad0020] [0x28120501] [0xc3ad0020] [0x89fc768d] [0x43b806] < anmn > [0x79d28504] [0x89daf707] [0x1340456] [0x279163b] [0x18c30434] [0x1c1b1a19] [0x201f1e1d] [0xa130521] [0x8d0e0410] [0x689fc76] [0x47808a51] [0xe800200c] [0xfffffda6] [0xc0c1c359] [0xfc768d04] [0xe0830689] [0xc289c30f] [0xc8dd8f7] [0x2085] < dnygl > [0x5ebd189] [0x8b9] < ?zol > [0xc5e8ffff] [0x49ffffff] [0xc3adf375] [0x7b9] < ?9ol > [0x1975ffff] [0xf57549ad] [0xffb8e841] [0xa5e8ffff] [0x49ffffff] [0x84e8f375] [0xadfffffd] [0xeeeb41c3] [0x276c3d83] [0x750a0020] [0x85c289cf] [0xf71179d2] [0xfc768dda] [0x23b80689] < k > [0xfffffd2a] [0x8b9] < or0ees > [0x8d34f7d2] [0x202700] [0x1075c085] [0xebee7949] [0x31d08913] [0x8d34f7d2] [0x202700] [0xffff4ae8] [0xed7949ff] [0x40e8d089] [0xe8ffffff] [0xfffffd27] [0xc783c3ad] [0x8e80c] < rm0 > [0x83fffffd] [0x4b910ef] < ar > [0x89fc768d] [0x8ac03106] [0xe8470447] [0xfffffcca] [0xeb754959] [0xf3fcbfc3] [0x158b0009] [0x200446] [0x11733a39] [0x89fc768d] [0x83078b06] [0x5de804ef] [0xebffffff] [0x1ae8c3e5] [0x8bfffffd] [0x2027643d] < ,ofml > [0x74a10689] [0xe8002027] [0xfffffb71] [0x20275ca1] [0xc08300] [0x202814a3] < sosles > [0xc6c2] < rstfte > [0xc1002028] [0x50310e0] [0x202760] [0x202810a3] < ?fqe > [0x67e8ffff] [0xe8ffffff] [0xffffff62] [0xfffb10e8] [0x100581ff] [0x2028] [0x8b005800] [0x2027683d] [0xcc78300] [0x3b9] < ?gak > [0x5c7ffff] [0x202814] [0x3] [0x1205c766] [0x3002028] < ?gok > [0xc766ffff] [0x20281205] [0x8d024b00] [0x200b6b3d] [0xbb900] < teks > [0xdffffff] [0x140c010a] [0x13080602] [0x12110f09] [0x5070e0b] [0x17160403] [0x19101524] [0x1c001b1a] [0x1f181e1d] < tcajrt > [0x262c2a28] [0x2d2e2522] [0x19232b27] [0x1c001b1a] [0x1f181e1d] [0x2120] [0x0] [0x0] < rc > [0x1c001b1a] [0x1f181e1d] [0x2120] [0xa1305] [0xe0410] < od > [0x8b097804] [0x20276415] [0x10048a00] [0x121110c3] [0x4000013] [0x70605] < re > [0x171615] [0xa090800] [0xb] < rloto > [0xc01001b] [0xf0e0d] [0x8d020300] [0x689fc76] [0x86e8c031] [0xe4fffff5] [0x7401a864] [0xa860e4fa] < oqlie; > [0x8af0733a] [0x200e6d80] [0x90c300] [0x1902180b] [0x1b041a03] [0x1d061c05] [0x1f081e07] [0x210a2009] [0x1330051e] [0x10200a2e] [0xe210412] [0x14230d22] [0x22240717] [0xc262425] [0x6310932] [0x12190318] [0x1131710] [0x214081f] [0x112f1616] [0x152d0f11] [0x262c0b15] [0x2534230c] [0x28272735] [0x2a822928] [0x2c832b8d] [0x2e332d89] [0x80392fb5] [0x820e811c] [0x843b8301] [0x768d3029] [0x310689fc] < !iwkn > [0x64e4ffff] [0xfa7401a8] [0xc18960e4] [0x807fe180] [0x5742af9] < iaon@d > [0x3480240b] < timrei > [0xdeeb0020] [0xda78c008] [0x50b7f24] [0x202788] [0x200eccba] [0x35b900] [0x2380000] [0xc2830874] [0x31f7e202] < etmas; > [0xccea8101] [0xd100200e] [0x8c1589ea] [0xa9002027] [0x80] [0x2011d7c3] [0x2011d700] [0x2011d700] [0x20122900] [0x5000000] [0x2010e400] [0x20107c00] [0x20102200] [0x20124e00] [0x5251500] [0x2011d700] [0x2011d700] [0x20111500] [0x20123b00] [0x2d210000] [0x2010e400] [0x20107c00] [0x20102200] [0x20126000] < t1tma > [0x2011d700] [0x20110b00] [0x20122800] [0x2011b300] [0xe052300] {block 4} [0x20111200] [0x2011cf00] [0x20116800] [0x20111200] [0x251500] [0xd8a0100] [0x201015] < 1sedd > [0xefe8c326] [0xadffffff] [0xffe8e8c3] [0x5ffffff] [0x202784] [0x101505c6] [0x281c0020] [0x2010152d] < mwette > [0x689fc76] [0x50c083c3] [0xdeb07b1] [0xf573103c] [0x8a804b1] [0x34410374] [0x88c28918] [0x150d38cd] [0x73002010] [0x72e8d008] [0xebc9febc] < ortn1@ > [0x150d2806] [0xc3002010] [0xfffb12e8] [0x2784a1ff] [0x348d0020] [0x25ffad86] [0x20274c] [0xfffafee8] [0x8405c7ff] [0x1002027] < bs > [0x20277805] [0x100] < ,ofml > [0x6c70689] [0x0] [0x101505c6] [0xe81c0020] [0xfffffdaf] [0x158b0979] [0x202768] [0x848224ff] < mlaa1s > [0x689fc76] [0xfffaa1e8] [0xff72e8ff] [0x5ffffff] [0x202778] [0xfdbde8ad] [0xcfebffff] [0xa0e] [0xc0000] [0xf0000] [0xb00000d] [0x0] [0x3020100] [0x7060504] [0xa2000908] [0x20110a] [0xebad49eb] [0x7015ff0f] [0xc6002027] [0x20110a05] < drm > [0xfffd7ee8] [0xfd41e8ff] [0x979ffff] [0x2768158b] [0x24ff0020] [0x74c08482] [0xe8808ad5] [0xf6002010] [0x20110a05] [0x2741f00] [0x168bd8f7] [0x6c15af0f] [0x1002027] [0xad1689c2] [0x276805c7] [0x10010020] [0xbceb0020] [0x8015ffad] [0xff002027] [0x20274c25] < ndt9d > [0xa002027] < bs > [0x20276805] [0x200fed00] [0x6405c700] [0x3b002027] [0xc300200e] [0x276c05c7] [0x100020] [0x5c70000] [0x202768] [0x200fed] [0x276405c7] [0xe530020] [0x81c30020] [0x20277035] [0xe100] < ?yas > [0x2f00200f] [0x277015ff] [0x43e90020] [0xadffffff] [0x4c25ffad] [0xad002027] [0x5c716eb] [0x202768] [0x200fc5] [0xe0b3d8d] [0x3d890020] [0x202764] [0x275005f7] [0xffff0020] [0x674ffff] [0x275025ff] [0xa0e80020] [0x3cfffffc] [0x8b097904] [0x20276815] < seey, > [0x27680583] [0xe8140020] < ???q > [0x277c15ff] [0xb2eb0020] [0x6805c7ad] [0xc5002027] [0x8d00200f] [0x200e0b3d] [0xc710eb00] [0x20276805] [0x200f9d00] < too4ns > [0xad00200e] [0x5c79ceb] [0x202768] [0x200fd9] [0xe0b3d8d] [0x10eb0020] [0x276805c7] [0xfb10020] [0x3d8d0020] [0x200e23] [0x27643d89] [0x69e90020] [0x8dfffffe] [0x689fc76] [0xa78c085] [0xc10426c1] < 8ersed > [0xe0d1c307] [0x26c10c78] [0x4c0c105] [0x3407e083] [0x26c1c308] [0x6c0c107] [0x2c3fe083] [0x768dc310] [0xff0689fc] [0x303d3906] [0x75002027] [0x2730a305] [0x53b0020] [0x202730] [0x6790a74] [0x27383d89] [0xc3ad0020] [0x27343d89] [0x2d810020] [0x202810] [0x160000] [0x89fc768d] [0x4000b806] [0x6e800e0] [0xb8fffff6] [0x30] [0x120d8b66] [0x66002028] [0x28180d3b] [0x10780020] [0xfff705e8] [0x102d81ff] [0x2028] [0xc3001600] [0xfff6f5e9] [0xf5cde8ff] [0x768dffff] [0x8b0689fc] [0xfffcbd04] [0xe083ffff] < ?ly0; > [0x774ffff] [0xfff6d5e8] [0xe8f2ebff] [0xfffff703] [0x66c3adad] [0x28120d8b] [0x3b660020] [0x2028140d] [0xe8057400] [0xfffff579] [0xfff7f4e8] [0xe8bfebff] [0xfffff7fc] [0xaae8b8eb] [0xebfffff7] [0xfc768db1] [0xb80689] [0xe800ffff] [0xfffff579] [0x68e8a0eb] [0x8dfffff5] [0x689fc76] [0xfcbd048b] [0x83ffffff] < jieis8 > [0x4fffffe] < +oskrs > [0x8debffff] [0xfff546e8] [0xfc768dff] [0x48b0689] [0xfffffcbd] [0xf0e083ff] [0xfffec2e8] [0x48074ff] < +tniers > [0xf0ebffff] [0x28102d81] [0x20] [0x4f70016] [0xfffffcbd] [0xfffff0ff] [0x3f850fff] [0x4fffffff] [0x273c3d89] [0x58e80020] [0xe8fffff6] [0xfffffeba] [0x8bc3ad5a] [0xfffcbd14] [0xfac1ffff] [0xc71ceb05] {block 5} [0x20272405] [0x200ccd00] < +mnk > [0xbe8ffff] [0x8bffffff] [0xbd14] < mgrd > [0x689fc76] [0xf800b8] [0x243d8100] [0xcd002027] [0x7400200c] [0xc000b836] < t?as > [0xfcbd148b] [0xc1ffffff] [0x8eb05fa] [0xbd148b] < ei > [0x89fc768d] [0xff00b806] [0x3d8100ff] [0x202724] [0x200ccd] [0xb80574] [0xe800c0c0] [0xfffff489] [0x89fc768d] [0xffd08906] [0x20272425] < wlattd > [0xfffffffc] [0x8d05fac1] [0x689fc76] [0xffffffb8] [0x243d8100] [0xcd002027] [0x7400200c] [0xc0c0b805] < b!drs > [0x2013c4] [0x20136d] [0x201444] [0x201343] [0x20135f] [0x201413] [0x2013f3] [0x201366] [0x201438] [0x201319] [0x20137e] [0x2013a0] [0x2013ff] [0x36e318] [0x36e360] [0x201479] [0xfff5a4e8] [0xfc768dff] [0x3ca10689] [0xa3002027] [0x202734] [0x3d8bc031] [0x202728] [0x27443d03] [0xe7c10020] [0x383d8908] [0xf7002027] [0xbd04] [0xf0000] [0x5740000] [0xfffd8de8] [0xbd148bff] [0x0] [0x2405c747] [0xcd002027] [0xf600200c] [0xa7410c2] [0x272405c7] [0xc9c0020] [0xe2830020] [0x9514ff0f] [0x2014a0] [0x44e8c1eb] [0xe8ffffef] [0xfffff67c] [0xffff87e8] [0xf80ce9ff] [0xffff] [0xffff00] [0x0] [0xff0000] [0xc000] [0x0] [0x0] [0xffff] [0x0] [0xffffff] [0xffffff] [0xffffff] [0x8080ff] [0xc0c0c0] [0xff] [0x0] [0x0] [0x300dff01] [0x79002027] [0x3005ff06] [0xc3002027] [0x27302d83] [0x79080020] [0x3005c70a] [0x2027] < vs > [0x27300583] [0xc3080020] [0x27280583] [0xc3020020] [0x27283d83] [0x78140020] [0x282d8307] [0x2002027] [0x280d8bc3] [0x87002027] [0x20272c0d] < tsrfte > [0xc3002027] [0x27283583] [0xc3010020] [0x273c0d8b] [0xd030020] [0x202784] [0x273c0d33] [0xe1810020] < ???8 > [0xd8b0b74] [0x202784] [0xfc7549ad] [0x358b56c3] [0x20273c] [0x894ef189] [0x843d03f7] [0xc1002027] [0xd2b02e7] [0x202734] [0xe6c10778] [0xa5f3fd02] [0xefc15efc] [0x3d894702] [0x202730] [0x27840d8b] [0x894f0020] [0xbd04] < eyal > [0xe8c3f475] [0xffffff94] [0x15a00d8a] [0xc300020] [0xbd] [0x3f98000] [0x5c61175] [0x2015a0] [0x7405c704] [0x2027] [0xc30000c0] [0x277c058f] [0x5c70020] [0x20277c] [0x2006c9] [0x7c05c7c3] [0x90002027] [0xe9002016] [0xfffffb2a] [0x89fc768d] [0x1b806] < o4 > [0x2015a0] [0xb0027404] [0x6c3d8303] [0xa002027] [0x10340274] [0x5c70687] [0x202784] [0x2] [0x5f689eb] [0x2015a0] [0x893c750a] [0xe281c2] < ie, > [0xfa8108] < ia, > [0x5e0c1b7] [0x3d800234] [0x2015a0] [0x34027404] [0x6c3d830b] [0xa002027] [0x10340274] [0x278405c7] [0x10020] < eeks > [0x80ffffff] [0x2015a03d] [0xc750900] [0xe2c1c289] [0x5fac105] [0x274c239] [0xe0c1c3ad] [0xeb063405] [0xfc768dc8] [0x34a10689] [0x2b002027] [0x20273805] < mte/e > [0x8b5692c1] [0x20273435] < fl1rl > [0xfffffffc] [0x27403d8b] [0xadfd0020] [0x7549abfc] [0x89ab92f9] [0x2027403d] < v3ais > [0xffffc0e8] [0x383d8bff] [0x8b002027] [0x20273c0d] < d,els > [0x8b5602e7] [0x20273435] [0x2e6c100] [0xe95ea5f3] [0xfffffdfd] [0xffff98e8] [0xfdf3e9ff] [0x1b0ffff] [0x3b01eeb] [0x4b01aeb] [0x9b016eb] [0xab012eb] [0xbb00eeb] [0xdb00aeb] [0xeb006eb] [0x7b002eb] [0x2015a0a2] < idt9d > [0x67002027] [0x8b002016] [0x155c8504] [0x74a30020] [0x58002027] [0xf9e8e9ad] [0x768dffff] [0x310689fc] < ssri?s > [0xe9002027] {block 6} [0xfffffe63] [0x15a005c6] [0xb80c0020] [0xff00ff] [0x277c05c7] [0x17f20020] [0xcaeb0020] [0x5c7ad58] [0x20277c] [0x2006c9] [0x278005c7] [0x4920020] [0x5c60020] [0x200fd5] < hsabs > [0xd700200f] [0xc7002011] [0x20277405] < ??d @pols > [0x158bffff] [0x202740] [0x4c00fa81] [0x1750009] [0x8ea83c3] [0x89044a8b] [0x2027840d] < ,ofml > [0x28b0689] [0x4904ea83] [0xc283f375] [0x40158904] [0xe9002027] [0xfffffd78] [0x200492] [0x20177c] [0x20181c] [0x201852] [0x2017ae] [0x2017b2] [0x2017b6] [0x2015f8] [0x2015a1] [0x2015b0] [0x2015c4] [0x2015a9] [0x2015d4] [0x201804] [0x2017ce] [0x2015cc] [0x200492] [0x2017c2] [0x2017be] [0x2017ba] [0x36e293] [0x36e14d] [0x36e198] [0x2015e5] [0x2017c6] [0x2017ca] [0x200492] [0x2017a4] [0x72515] [0x2d0d010b] [0x110160c] [0x2b0a0923] [0x23a3800] [0x220e100a] [0x24001305] [0x201c32] [0x8b38ebad] [0x2027280d] < tdnpe > [0xa3002027] [0x202728] [0xfc18e8ad] [0x15ffffff] [0x201914] [0x278005c7] [0x16de0020] [0x5c60020] [0x200fd5] [0xc905c725] [0x1800200f] [0xc7002019] [0x20276805] [0x2018e800] [0x6405c700] [0xf8002027] [0xc7002018] [0x20277405] < ??d !yrk > [0x14ffffff] [0x20188885] < ;!.l > [0x9c15895a] [0x81002015] [0x8cc2] < neramt > [0x83002027] [0x158910ea] [0x202768] [0xfff506e8] [0x9c158bff] [0x1002015] [0x82548dc2] [0xfc520305] [0xebd2ffad] [0xe7] [0x15040200] [0x2] [0x40f1700] [0x1] [0x0] [0x70358100] [0xe1002027] < s > [0x200ff935] < ra?c; > [0x202770] [0x19b505c7] [0x20] < o4rs > [0x20276c] < bsl.r > [0x2019b505] [0x15041400] [0x6405c700] [0xb1002027] [0xc7002019] [0x20276805] [0x2019b500] < fa0vs > [0xebffffff] [0x20116879] [0x20116800] [0x2011cf00] [0x201a9600] [0x201a1600] < ;g7e > [0x5c7ffff] [0x2019b9] [0x91606] [0xffff99e8] [0xa05c6ff] [0x2011] [0x20278ca1] [0xf4e0e800] [0x774ffff] [0x1d8524ff] [0x85002018] < ovyiz > [0xa1277423] [0x20278c] [0x276c053b] [0x18790020] [0x110a05f6] [0x74ff0020] [0x8bd8f702] [0x15af0f16] [0x20276c] [0x1689c201] [0x53108eb] [0x20110a] [0xebad1ef7] [0x201022b8] [0x20102200] [0x20107c00] [0xb905c700] [0x2002019] [0xe8021504] [0xfffff0df] [0x278405c7] [0x10020] [0x5c70000] [0x202778] [0x1] [0x89fc768d] [0x6c706] < b > [0x20101505] [0xe741c00] [0x833d] < ?siic > [0x18998524] [0xc0850020] [0x303d1c7e] < ic > [0xfc768d15] [0x7be80689] < ki??8 > [0xfffff54c] [0x277805ff] [0xe8ad0020] [0xfffff426] [0xb6e8c8eb] [0xe9fffffe] [0xfffff6bb] [0xfc925ff] [0x11d70020] [0x11d70020] [0x11d70020] [0x1b1c0020] [0x1b120020] [0x5c70020] [0x2019b9] [0x0] [0x276805c7] [0x19b50020] [0x5c70020] [0x202764] [0x2019b1] [0xfff3dde8] [0xff0774ff] [0x19228524] [0x303c0020] [0x5c70d75] [0x2019b9] [0x2150402] [0x85e1ebad] [0xf7307ec0] [0x2019b905] < ???8 > [0x800d75ff] [0x20278c3d] [0x880f0a00] [0xfffffea1] [0x303d] [0xe8107900] [0xffffff09] [0x277c15ff] [0x768d0020] [0xad0689fc] [0xfff62de9] [0x5005c7ff] [0x36002027] [0xc300201b] [0x1200ef81] [0x29720008] [0x1200c781] < @ees > [0xff25] [0x8efc100] [0x5a0ff81] < rrio > [0x202730a3] < tsifte > [0xff002027] [0x20275815] [0xbc00] [0xfe81000a] [0x9f400] [0xbe0572] [0xc70009f4] [0x2027c805] {block 7} [0x2005e800] [0xcc05c700] [0x2002027] [0xc7002007] [0x2027d005] [0x2006a200] [0xd405c700] [0xb2002027] [0xb8002006] [0x2f] [0xffef4de8] [0xf5a8e9ff] [0xbc59ffff] [0xa0000] [0x768de1ff] [0xb80689fc] [0xa0000] [0xe8d1e029] [0xb0c3e8d1] [0xeb64e6fe] [0xc1c189fe] [0x57ad08e1] [0xe7c1c789] [0xf3c0310a] [0xc3ad5fab] [0xf0cf883] [0xffe8fa82] [0xc78957ff] [0x560ae7c1] [0x2728358b] [0xe6c10020] [0x200b90a] < lwu > [0x28a35f5e] [0xad002027] [0x1005c7c3] [0xb5002028] [0x8d000302] [0x689fc76] [0x200446a1] < krs?s > [0xffffeff4] [0x89fc768d] [0xe9e85806] [0x8dffffef] [0x689fc76] [0x20044fa1] < /zwe > [0x768dffff] [0x890689fc] < /-we@ > [0xdffffff] [0x202784] [0xebad0374] [0xc2e8c3f5] [0xe8fffff9] [0xffffffea] [0xffe86ae8] [0x78850fff] [0x8bffffe8] [0xa8008d04] [0x25c30036] < ???? > [0xffe852e8] [0x8d048bff] [0x36a800] [0xfc768dc3] [0xb80689] [0x9000000] [0xc3c0] [0x1] [0x2010000] [0xff1b12] [0x3f4ba66] [0xd0e1e6ec] < et@wo8 > [0x8dc3c084] [0x201d1a15] [0x56028800] [0xe1e8d689] [0x79ffffff] [0xe1e6ec05] [0xb4acf4eb] [0xe1e6ee1e] [0xfa75ccfe] [0xc35ee8e2] [0x1b108b0] [0xffffd2e8] [0xffbee8ff] [0xe6ecffff] [0xc3803ce1] [0xe5e80be6] [0x75ffffff] [0xb10fb0f9] [0xffb5e803] [0xd5e8ffff] [0x74ffffff] [0x5c7c3f9] [0x202740] [0x94c00] [0xba660cb0] [0xfb403f2] [0xfee1e6ee] [0xc3fa75cc] [0xebe81cb0] [0xb9ffffff] [0x47868c0] [0x7b0fee2] [0xc5eb02b1] [0xe08805e6] [0xb805e6] [0xe600094c] [0xe6e08804] [0x10e8c104] [0xbb081e6] [0xc7660fe6] [0x201d1b05] [0xb002a100] [0xe803b103] [0xffffff53] [0x1b05c766] [0x201d] [0x1805c600] [0x201d] [0xe809b1c3] [0xffffff3b] [0x1d1c05fe] [0x21e80020] [0x79ffffff] [0x16b0c3f9] [0xffff5fe8] [0xe8e6b0ff] [0xffffffdd] [0x4c00be56] [0xb90009] [0xf3000012] [0xbfc35ea5] [0x94c00] [0x1200b9] < frewu > [0xff36e81a] [0xc5b0ffff] [0x1ca2b7eb] [0x8d00201d] [0x689fc76] [0x3f2ba66] [0xa8e1e6ec] < ksaiar > [0xffffff4c] [0xf6c931c3] [0x201d1805] [0x1074ff00] [0x89fc768d] [0x47ffb806] < eak > [0xadffffff] [0xffdfe8c3] [0xbfe8ffff] [0x57ffffff] [0xc1047e8b] [0x7fe802e7] [0x5fffffff] [0x68140ad] [0x1200] [0xffbfe8c3] [0x9fe8ffff] [0x56ffffff] [0xc104768b] [0x7ce802e6] [0x5effffff] [0x768ddeeb] [0xe80689fc] [0xfffffed2] [0x1ab0c3ad] [0xfffeafe8] [0xb1f289ff] [0xfe75e806] [0x59e8ffff] [0x79fffffe] [0xb850c3f9] [0x47] [0xd9e8c931] [0x58fffffe] [0xffff59e8] [0x768b56ff] [0x2e6c104] [0xffffc9e8] [0xffb85eff] [0xe8000047] [0xfffffebc] [0x768dc3ad] [0x310689fc] [0x909090c9] [0xffe5a9e8] [0xe5d5e8ff] [0x97e8ffff] [0xc6ffffff] [0x201d1805] [0x5c70100] [0x2027b4] [0x5e] [0x27b805c7] [0x60020] [0x5c70000] [0x202740] [0x94c00] [0x6c358d56] [0xbf00202c] [0x368000] [0x27b40d8b] [0xa5f30020] [0x2de4358d] [0xbf0020] [0x8b0036a8] [0x2027b40d] < a.t@d > [0x27a005c7] [0xd0000020] [0x5c70036] [0x202758] [0x200492] [0x275005c7] [0x20] [0x5c70000] [0x202744] [0x800] [0x12b8] < kilk > [0x43e9ffff] [0xfffff2] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x89fc768d] [0x9d2b806] [0x8dc30008] [0x689fc76] [0x80a04b8] [0x768dc300] [0xb80689fc] [0x80a08] [0xfc768dc3] [0xefb80689] [0xc3000809] [0x89fc768d] [0x9e9b806] [0x8dc30008] [0x689fc76] {block 8} [0x809cab8] [0x768dc300] [0xb80689fc] [0x809cc] [0xfc768dc3] [0x22b80689] [0xc3000806] [0x89fc768d] [0x9d6b806] [0x8dc30008] [0x689fc76] [0x809e1b8] [0x768dc300] [0xb80689fc] [0x809e3] [0xfc768dc3] [0x58b80689] [0xc3000805] [0x89fc768d] [0x9e8b806] [0x8dc30008] [0x689fc76] [0x809d1b8] [0x768dc300] [0xb80689fc] [0x80a0a] [0xfc768dc3] [0x10b80689] [0xc300001f] [0x89fc768d] [0x9d0b806] [0x8dc30008] [0x689fc76] [0x25300b8] [0x768dc300] [0xb80689fc] [0x809cd] [0xfc768dc3] [0xceb80689] [0xc3000809] [0x89fc768d] [0x7e6b806] [0x8dc30008] [0x689fc76] [0x80528b8] [0xc300] {block 9} [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0xa] [0x64] [0x3e8] [0x2710] [0x186a0] [0xf4240] [0x989680] [0x5f5e100] < owoacs > [0x200ccd] [0x12] [0x288] [0x0] [0x0] [0x0] [0x0] [0x94c00] [0x800] [0x50] [0x2011da] [0x201b36] [0x201bb8] [0x36df87] [0x33d] [0x28b] [0x2019b1] [0x2019b5] [0xa] [0x201175] [0xffff00] [0x6] [0x2006c9] [0x200492] [0x0] [0x0] [0x2f] [0x20066d] [0x47] [0x17d] [0x37091c] [0x37091c] [0xdab7c] [0x0] [0x370916] [0x9ffd0] [0x17d] [0x47] [0x200869] [0x2006d6] [0x20078a] [0x2005e8] [0x200702] [0x2006a2] [0x2006b2] [0x200752] [0x200770] [0x200492] [0x200492] [0x200492] [0x200653] [0x200492] [0x200492] [0x200492] [0x200446] {block 10} [0x36daf1] [0x2004e8] [0x200977] [0x200990] [0x33d02e5] [0x3] [0x403] [0x30003] [0x4b00] [0x1f00000] [0x1f00000] [0x0] [0xffff00] [0x327] [0x2e5] < ; dup ?dup drop then begin swap 0 if -if while -whil a a! 2* @ ! nip + or binary and +or u+ ? over push pop - *end end loop until -unti for *next next 0next -next i +! nop align or! * */ /mod / mod 2/ time 7pus 7pop dann then p@ *byte bt 7@+ 7dec @ret 4@ ,lit strings .' remem r3@ r1! 2*d 2*c 2/r > [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x2007d3] [0x20059e] [0x200583] [0x20056d] [0x2007f7] [0x20080a] [0x36d000] [0x36d01e] [0x36d032] [0x36d046] [0x36d05a] [0x36d066] [0x36d072] [0x36d086] [0x36d0b5] [0x36d0cd] [0x36d108] [0x36d173] [0x36d182] [0x36d1b1] [0x36d1bb] [0x36d1e1] [0x36d1f0] [0x36d1ff] [0x36d22e] [0x36d247] [0x36d25b] [0x36d28a] [0x36d29e] [0x36d2ad] [0x36d2b3] [0x36d2bd] [0x36d2d3] [0x36d2e2] [0x36d2f1] [0x36d2fb] [0x36d301] [0x36d30b] [0x36d330] [0x36d33f] [0x36d353] [0x36d3be] [0x36d3cd] [0x36d3e7] [0x36d40c] [0x36d420] [0x36d448] [0x36d46b] [0x36d475] [0x36d47f] [0x36d48e] [0x36d4a2] [0x36d4b1] [0x36d5ae] [0x36d5b3] [0x36d861] [0x36dba0] [0x36de10] [0x36e40c] [0x36e42f] [0x36e43e] [0x36e461] [0x36e4ef] [0x36e508] [0x36e520] [0x36e545] [0x36e5c7] [0x36e5db] [0x36e5ef] [0x36e5fe] [0x36e60d] {block 11} [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] < boot warm pause macro forth c stop read write nc format show serve load here ?lit 3, 2, 1, , less jump pci nsec accept pad erase copy mark empt emit digit 2emit . h. h.n cr space down edit e lm rm graph switch freeze text top keybo debu at +at xy fov fifo box line color octant sp last unpac blk curs word ekt abort h buffe offset tic winver aper vesa trash hsvv tsim cpoint words qkey digin qwert no-ret r? nul cad pcad displ actc +list itick lis +e > [0x0] [0x201c4b] [0x201efa] [0x200439] [0x2005c3] [0x2005e3] [0x2004e9] [0x201eaa] [0x7f63] [0x7fb0] [0x201fc4] [0x201ece] [0x200493] [0x2004cb] [0x200886] [0x200810] [0x20081b] [0x2007cc] [0x2007c5] [0x2007be] [0x2007a2] [0x200862] [0x200879] [0x2008fc] [0x200907] [0x2011da] [0x201980] [0x201c51] [0x201c64] [0x2004ef] [0x200514] [0x200a0e] [0x200c5c] [0x200a4e] [0x200ccd] [0x200c88] [0x200c76] [0x2008d1] [0x200a43] [0x200ba9] [0x20191b] [0x20192d] [0x200bfa] [0x200c01] [0x200977] [0x200978] [0x2004b8] [0x200a89] [0x2008a8] [0x200d6a] [0x201c8d] [0x200c08] [0x200c17] [0x201fcf] [0x201fda] [0x200976] [0x200ac6] [0x200aa7] [0x2008f5] [0x200c28] [0x201fe5] [0x201ff0] [0x20127b] [0x201ffb] [0x202006] [0x2016a1] [0x202011] [0x200567] [0x202048] [0x20207f] [0x202053] [0x201cda] [0x201d09] [0x20205e] [0x202069] [0x202074] [0x2020a0] [0x201fc4] [0x20201c] [0x202027] [0x200f36] [0x202032] [0x201bad] [0x201c32] [0x201c3a] [0x200492] [0x20208a] [0x202095] [0x2020ab] [0x20203d] [0x2014e0] [0x201cf7] [0x20154a] [0x201932] {block 12} [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] < @irs > [0xfffffef7] [0x1f807fc] [0xf000f0] [0xf000f0] [0xf000f0] [0xf000f0] [0xf0] [0x0] [0x0] [0x80030000] [0xc003c003] [0xfc3fc003] [0xfc3ffc3f] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003] [0x0] [0x0] [0x0] [0x0] [0xf81f0000] [0xfe7ffe7f] [0xff01ff8] [0xff00ff0] [0xff00ff0] < r?do, > [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] [0xf81f0000] [0xff7ffe7f] [0xff00ff0] < ?i@i, > [0xf0fcff] [0xf800f0] [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] [0xf81f0000] [0xfe7ffe7f] [0xf001f00] < ?y;is > [0xff8ff7f] [0x1ff00ff0] [0xff7fff7f] [0xf71f] [0x0] [0x0] [0x0] [0x0] < @irs > [0xfefffef7] [0xff81ffc] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff0] [0x0] [0x0] [0xc003c003] [0xc003] [0x0] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003c003] [0xc003] [0x0] [0x0] [0x0] [0x0] [0xf81f0000] [0xfe7ffe7f] [0xf002f8] [0xfc7f00f0] [0xf00fe3f] [0x1f400f00] [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] < ou8 > [0xffff7efe] [0xcff3ffff] [0x7e087e1] [0x7e007e0] [0x7e007e0] [0x7e007e0] [0x7e0] [0x0] [0x0] [0x0] [0x0] [0xf81f0000] [0xfe7ffe7f] [0x1f00ff8] [0xf000f0] [0xf000f0] [0xff801f0] [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] [0xff00000] [0xff00ff0] [0xff00ff0] [0xff00ff0] < r?do, > [0xff7f3f7c] [0xef07ff1f] [0xf000f00] < ?o@i4 > [0xf83ffe7f] [0x8007000f] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0xc007c007] [0xe003] [0x0] [0x0] [0x0] [0x0] < -m; > [0xff7ff77f] [0xff01ff8] [0xff00ff0] [0xff00ff0] [0xff7f1ff8] [0xff1fff7f] [0xf000f00] < ?o@i4 > [0xf81ffe7f] [0xfc03f801] [0x80078c07] [0xf03f8007] [0xf03ff03f] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0x80078007] [0x8007] [0x0] [0x0] [0x0] [0x0] [0x3c00000] [0x7e007e0] [0x8ff107e0] [0x8e718e71] [0xdc3bde7b] [0x781efc3f] [0x300c781e] [0x300c] [0x0] [0x0] [0xf000f00] [0xf000f00] < /m;is > [0xff7fff7f] [0xff01ff8] [0xff00ff0] [0xff00ff0] < r?do, > [0xff7fff7f] [0xef1f] [0x0] [0x0] [0x0] [0x0] [0x7e00000] [0xff007e0] < r-doys > [0x3c3c1c38] [0x781e381c] [0xf00f700e] [0xc003e007] [0x8001] [0x0] [0x0] [0x0] [0x0] < @ios > [0xfefffeff] [0xff01ff8] [0xff00ff0] [0xff00ff0] < r?do, > [0xfefffeff] [0xf0f8f7] [0xf000f0] [0xf000f0] [0xf000f0] [0xf000f0] [0xf8f700f0] [0xfefffeff] [0xff01ff8] [0xff00ff0] [0xff00ff0] < r?do, > [0xfeeffeff] [0xf8e7] [0x0] [0x0] [0xf000f0] [0xf000f0] [0xf8f700f0] [0xfefffeff] [0xff01ff8] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff0] [0x0] [0x0] [0x0] [0x0] [0xff00000] [0x3e7c1ff8] {block 13} [0xf81f7c3e] [0xe007f00f] [0xf00fe007] [0x7c3ef81f] [0x1ff83e7c] [0xff0] [0x0] [0x0] [0x0] [0x0] [0xff00000] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff00ff0] < r?do, > [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] < -m; > [0xff7ff77f] [0xff01ff8] [0xff00ff0] [0xff00ff0] < r?do, > [0xff7fff7f] [0xf00ef1f] [0xf000f00] [0xe000f00] [0xfe7ff81f] [0x1ff8fe7f] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff00ff0] [0xff00ff0] < r?do, > [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0xe003e001] [0xe00fe007] [0xe00de00f] [0xe001e009] [0xe001e001] [0xe001e001] [0xe001e001] [0xe001e001] [0xe001e001] [0xe001] [0x0] [0x0] [0xfe7ff81f] [0x1ff0fe7f] [0xf000f00] [0x1f000f00] [0xfe7ffe1f] [0xf8f87f] [0xf000f0] [0xf000f0] [0xffffffff] [0xffff] [0x0] [0x0] [0xfe7ff81f] [0x1ff0fe7f] [0xf000f00] [0x1f000f00] [0xfc07fe07] [0x1f00fe07] [0xf000f00] [0x1ff00f00] [0xfe7ffe7f] [0xf81f] [0x0] [0x0] < ;is;is ;is;is ;is;is ;is;is > [0xffffffff] [0xf000ffff] [0xf000f000] [0xf000f000] [0xf000f000] [0xf000] [0x0] [0x0] [0xffffffff] [0xf0ffff] [0xf000f0] [0xf000f0] [0xfefff8ff] [0x1f00feff] [0xf000f00] [0x1ff00f00] [0xfe7ffeff] [0xf81f] [0x0] [0x0] [0xfe7ff81f] [0xff8ff7f] [0xf000f0] [0xf000f0] [0xfefff8f7] [0x1ff8ffff] [0xff00ff0] < r?do, > [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0xffffffff] [0x700ffff] [0x1f000f00] [0x7c003e00] [0xf001f800] [0xc007e003] [0x1f800f] [0x7c003e] [0xf000f8] [0xe0] [0x0] [0x0] [0xfe7ff81f] [0x1ff8fe7f] [0xff00ff0] < r?do, > [0xfc3ffe7f] [0x1ff8fe7f] [0xff00ff0] < r?do, > [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0xfe7ff81f] [0x1ff8fe7f] [0xff00ff0] < r?do, > [0xff7fffff] [0xf00ef1f] [0xf000f00] [0x1ff00f00] [0xfe7ffeff] [0xf81f] [0x0] [0x0] [0x78007800] [0x7800] [0x0] [0x78007800] [0x78007800] [0x78007800] [0x78007800] [0x78007800] [0x78007800] [0x78007800] [0xf03ff83c] [0xc00ff01f] [0x0] [0x0] [0x0] [0x0] [0xfc3ffc1f] [0xf83f] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0xf000f0] [0xf000f0] [0x3cf000f0] < ,iy,is > [0x80ffe0ff] [0xff00ff] [0xf0ffc0ff] [0xfff1fcf3] < r?si?s > [0x7f0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x70000] [0xc01f800f] [0xc01fc01f] [0x7800f] [0x0] [0x0] [0x0] [0x0] [0x0] [0xffffffff] [0x1f00ffff] [0xfe003f00] [0xe00ff803] [0xfe803f] [0xffffffff] [0xffff] [0x0] [0x0] [0x1f000f00] [0x3e001f00] [0x7c007c00] [0xf001f800] [0xe003f001] [0xc007c007] [0x1f800f] [0x3e001f] [0xfc007c] [0xf8] [0x0] [0x0] [0x0] [0x70000] [0xc01f800f] [0xc01fc01f] [0x7800f] [0x0] [0x70000] [0xc01f800f] [0xc01fc01f] [0xc007c00f] [0x78003] [0x1c000e] [0xf000f000] [0xe001e001] [0xc001c001] [0x80038003] [0x30003] [0x20002] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x80018001] [0xc003c003] [0xe007c003] [0xe007e007] [0xc003e007] [0x8001c003] [0x0] [0xc0038001] {block 14} [0xe007e007] [0x8001c003] [0x0] [0x0] [0x0] [0x0] [0xc003c003] [0xc003c003] [0xfc3ffc3f] [0xc003fc3f] [0xc003c003] [0xc003] [0x0] [0x0] [0x0] [0x0] [0xfe7ff81f] [0xff0fe7f] [0x7e007e0] [0xc7e387e1] [0xc7e3c7e3] [0xfee3fee3] [0xe0f8e1] [0xff000e0] [0xfe7ffe7f] [0xf81f] [0x0] [0x0] [0x0] [0x0] [0x381c1008] [0xf81f7c3e] [0xe007f00f] [0xf81ff00f] [0x381c7c3e] [0x1008] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x70000] [0xc01f800f] [0xc01fc01f] [0xc007c00f] [0x78003] [0x1c000e] [0xfe7ff81f] [0xff0fe7f] [0x70007f0] [0x3e000f00] [0xe003f800] [0xc003c003] [0x0] [0xc0038001] [0xe007e007] [0x8001c003] [0x0] [0x0] [0xfcfff0ff] [0xfe7ffeff] [0xff1fff3f] [0xff07ff0f] [0xff01ff03] [0xff00ff00] [0xff00ff00] [0xff03ff01] [0xff0fff07] [0xff3fff1f] [0xfefffe7f] [0xf0fffcff] [0x0] [0x6e0000] [0x71007f] [0x600060] [0x600060] [0x60] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180000] [0x7e0018] [0x18007e] [0x180018] [0x180018] [0x1c] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3e0000] [0x63007f] [0x630063] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3e0000] [0x63007f] [0x7e007f] [0x7f0060] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x1e0000] [0x3003f] [0x7f003f] [0x7f0063] [0x803b] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x6e0000] [0x73007f] [0x630063] [0x630063] [0x63] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180018] [0x0] [0x180038] [0x180018] [0x180018] [0x1c] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3e0000] [0x60007f] [0x3f007e] [0x7f0003] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x630000] [0x7f0077] [0x63006b] [0x630063] [0x63] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3e0000] [0x61007f] [0x600060] [0x7f0061] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x630000] [0x630063] [0x7f0063] [0x3003f] [0x7f0043] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x380000] [0x180018] [0x180018] [0x180018] [0x180018] [0x1c] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3b0000] [0x63007f] [0x7f0063] [0x3003f] [0x7f0043] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x1a000e] [0x7e0018] [0x18007e] [0x180018] [0x180018] [0x18] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] < srb > [0x630063] [0x7f006b] [0x77007f] [0x63] {block 15} [0x30003] [0x3b0003] [0x63007f] [0x630063] [0x7f0063] [0x3b] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x630000] [0x630063] [0x770063] [0x1c003e] [0x8] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x6e0000] [0x63007f] [0x630063] [0x7f0063] [0x60006e] [0x600060] [0x0] [0x0] [0x0] [0x0] [0x0] [0x600060] [0x6e0060] [0x63007f] [0x630063] [0x7f0063] [0x6e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x600060] [0x6e0060] [0x73007f] [0x630063] [0x630063] [0x63] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x630000] [0x360077] [0x1c001c] [0x770036] [0x63] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x630000] [0x630063] [0x630063] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3b0000] [0x63007f] [0x630063] [0x7f0063] [0x3003b] [0x30003] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x630063] [0x630063] [0x630063] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x1c000c] [0xc003c] [0xc000c] [0xc000c] [0x3f000c] [0x3f] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x30063] [0xe0007] [0x38001c] [0x7f0070] [0x7f] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x30063] [0xf000f] [0x630003] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x660006] [0x660066] [0x7f0066] [0x6007f] [0x60006] [0x6] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f007f] [0x600060] [0x7f007e] [0x30003] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x600063] [0x7f007e] [0x630063] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f007f] [0x30003] [0xe0007] [0x18001c] [0x180018] [0x18] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x630063] [0x7f007f] [0x630063] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x630063] [0x3f007f] [0x30003] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x60006] [0x0] [0x6000e] [0x60006] [0x60006] [0x660006] [0x3c007e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3e001f] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x600060] [0x660060] [0x7c006e] [0x780078] [0x6e007c] [0x67] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180000] {block 16} [0x3c003c] [0x18] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f007f] [0x1c000e] [0x7f0038] [0x7f] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x70003] [0xe0006] [0x1c000c] [0x380018] [0x700030] [0x60] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x3c0018] [0x18003c] [0x180000] [0x3c003c] [0x300018] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0xe000f] [0x18001c] [0x30] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180018] [0x3c003c] [0x18003c] [0x18] [0x180000] [0x18] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180018] [0x7e007e] [0x180018] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x630063] [0x6f006b] [0x60006e] [0x7f0063] [0x3e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7e0066] [0x3c003c] [0x66007e] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x180000] [0x3c003c] [0x300018] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f003e] [0x70063] [0x1c000e] [0x18] [0x180000] [0x18] [0x0] [0x0] [0x0] [0x0] [0x0] [0x0] [0x7f007e] [0x1f003f] [0xf000f] [0x1f000f] [0x7f003f] [0x7e] {block 17} {block 18} :var ns [0xb40] :var nblk [0x5a0] :var nc [0x50] | cr ( colorforth v3.5f pd g144a12 greenarrays,inc) | cr 20 load 22 load 24 load ( colors) 28 load | cr ( decompress) mark 30 load restore empt ] : env [ 34 ] winver 2* + ; env ( ironment) load | cr 46 load 62 4 loads 88 load 84 load | br : dump 48 load ; ( background dump) : floppy 52 load ; ( format, archive, set video) : icons 54 load ; ( edit chars) : audit 90 load ; ( disk audit utility) : png winver drop if 168 load then ; : html winver drop if 176 load then ; : index winver drop if 76 load then ; | br ( blocks 0-143 are public domain software) | cr mark empty ( arrayforth) 144 load {block 19} ( compile x86 colorforth) : ns ( number of sectors compressed if neg,) | cr ( last compressed if pos.) : nblk ( number of uncompressed blocks.) : nc ( no. of compressed cylinders, deprecated) | cr [ these vars must be first things in block! | br : dump ( compile memory display background task) : icons ( compile icon editor) : png ( screen image to png file resident) : html ( colorforth source to 2-up html) : index ( of first lines) : --- : editor : sct [ yrg* ( all-caps cap lower-case yellow red green * toggles shadow comment block) : fj [ ludr ( find jump left up down right) : .. [ -mc+ ( dec-block magenta cyan inc-block) : x.i ( delete exit insert) : . ( jump jumps between -edited- blocks) : f ( finds next word from) [ find word {block 20} macro ] : swap $168b 2, $c28b0689 , ; : 0 [compile] ?dup $c031 2, ; | -cr : if $74 2, here ; : -if $79 2, here ; | -cr : while ( n-nn) [compile] if swap ; : -while ( n-nn) [compile] -if swap ; | -cr : a [compile] ?dup $c28b 2, ; : a! ?lit if $ba 1, , ; ] then $d08b 2, [compile] drop ; : 2* $e0d1 2, ; forth ] : a, 2* 2* , ; macro ] : @ ?lit if [compile] ?dup $58b 2, a, ; ] then $85048b 3, $ 0 , ; : ! ?lit if ?lit if $5c7 2, swap a, , ; ] then $589 2, a, [compile] drop ; ] then [compile] a! $950489 3, $ 0 , [compile] drop ; : nip $4768d 3, ; : + ?lit if $5 1, , ; ] then $603 2, [compile] nip ; : or $633 : binary ?lit if swap 2 + 1, , ; ] then 2, [compile] nip ; : and $623 [compile] binary ; | -cr : +or $60b [compile] binary ; : u+ ?lit if $681 2, , ; ] then $44601 3, [compile] drop ; : ? ?lit $a9 1, , ; | -cr : over [compile] ?dup $4468b 3, ; {block 21} ( pentium macros' 1, 2, 3, , compile 1-4 bytes) : drop ( lodsd, flags unchanged, why sp is in esi - in kernel) : then ( fix address - in kernel) : swap ( sp xchg) : 0 ( 0 0 xor, macro 0 identical to number 0) : if ( jz, flags set, max 127 bytes, leave address) : -if ( jns, same) : a ( 2 0 mov, never used?) : a! ( 0 2 mov, unoptimized) : 2* ( shift left) : a, ( compile word address) : @/! ( fetch/store from/to word address, or eax) : nip swap drop : +/or/and ( number or sp with eax) : u+ ( add to 2nd number, number or sp) : ? ( test bits, set flags, literal only!) : over ( sp 4 + @) {block 22} ( macros) : push ?lit if $68 1, , ; ] then $50 1, [compile] drop ; : pop [compile] ?dup $58 1, ; : - $d0f7 2, ; : *end swap : end $eb : loop 1, here - + 1, ; : until $74 [compile] loop ; : -until $79 [compile] loop ; : for [compile] push [compile] begin ; : *next swap : next $75240cff : 0next , here - + 1, $4c483 3, ; : -next $79240cff [compile] 0next ; : i [compile] ?dup $24048b 3, ; : +! ?lit if ?lit if $581 2, swap a, , ; ] then $501 2, a, [compile] drop ; ] then [compile] a! $950401 3, $ 0 , [compile] drop ; : nop $90 1, ; : align here - 3 and drop if [compile] nop [compile] align ; ] then ; : or! [compile] a! $950409 3, $ 0 , [compile] drop ; : * $6af0f 3, [compile] nip ; : */ $c88b 2, [compile] drop $f9f72ef7 , [compile] nip ; : /mod [compile] swap $99 1, $16893ef7 , ; : / [compile] /mod [compile] nip ; : mod [compile] /mod [compile] drop ; {block 23} : push ( lit to sp; eax to sp) : pop ( sp to eax) : - ( ones-complement) : begin -a ( current code address - byte) : while a-aa ( if-escape from any structure usage example begin xxx while xxx next xxx then) : for n ( push count onto return stack,) begin : *next aa-aa ( swap) for ( and) if ( addresses) : next a ( decrement count, jnz to) for, ( pop return stack when done) : -next a ( same, jns - loop includes 0) : i -n ( copy loop index to data stack) : *end aa-aa ( swap) end ( and) if ( addresses) : end a ( jmp to) begin : +! na ( add to memory, 2 literals optimized) : align ( next call to end on word boundary) : or! na ( inclusive-or to memory, unoptimized) : * mm-p ( 32-bit product) : */ mnd-q ( 64-bit product, then quotient) : /mod nd-rq ( remainder and quotient) : / nd-q ( quotient) : mod nd-r ( remainder) {block 24} ( compiled macros) : 2/ ( n-n) $f8d1 2, ; | -cr : time ( -n) [compile] ?dup $310f 2, ; : 7push $57 1, ; | -cr : 7pop $5f 1, ; forth ] : @ @ ; | -cr : ! ! ; | -cr : + + ; | -cr : - - ; : */ */ ; | -cr : * * ; | -cr : / / ; | -cr : 2/ 2/ ; : dup dup ; | -cr : drop drop ; | -cr : nip ( ab-b) nip ; : over over ; | -cr : swap swap ; : or or ; | -cr : +or +or ; ( arithmetic) : negate ( n-n) - 1 + ; : min ( nn-n) less if drop ; ] then swap drop ; : abs ( n-u) dup negate : max ( nn-n) less if swap then drop ; : v+ ( vv-v) push u+ pop + ; ( vector) : loads ( bn) for dup push load pop 2 + next drop ; : writes ( acn) for write next drop drop ; : reads ( acn) for read next drop drop ; macro ] : dann [compile] then ; : then ( a-a) here over negate + 128 + | cr -256 and drop if abort dann [compile] dann ; forth {block 25} : 2/ ( arithmetic right shift) : time ( pentium cycle counter, calibrate to actual clock rate) : 7push/7pop ( save/restore save register 7, edi) : @-drop ( these macros redefined in) forth ( so they may be executed) : +or ( and) negate ( when you just can't use -) : min ( minimum) : abs ( absolute value) : max ( maximum) : v+ ( add 2-vectors) : loads ( load successive blocks) : nc ( number of cylinders booted and saved) : writes ( address, cylinder, cylinder count) : reads ( address, cylinder, count.) [ floppy access note do not hit any keys while floppy is being written - wait for light to go out ] : then ( aborts on jump out of range.) {block 26} {block 27} {block 28} ( colors etc) : -offset ( n-n) [ offset ] @ negate + ; : block [ offset ] @ + : blks $100 * ; : wrtboot [ 0 block ] 0 1 writes stop ; : white $ffffff color ; : red $ff0000 color ; : green $ff00 color ; : blue $ff color ; : silver $bfbfbf color ; : black 0 color ; : 5* 5 for 2emit next ; : cf 25 dup at red $b $5 $1 $1 $5 5* green $14 $2 $1 $3 $e 5* ( chip) 25 550 at red $1c $1c $19 $5 $d 5* ; : fill ( nan) for over over ! 1 + next drop drop ; : move ( sdn) for over @ over ! 1 + 1 u+ next drop drop ; : erase ( bn) push 0 swap block pop blks fill ; : copy ( n) [ blk ] @ block over block 512 move [ blk ] ! ; {block 29} : block n-a ( block number to word address) : wrtboot ( write boot and kernel) : colors ( specified as rgb' 888 bits) : at xy ( set current screen position - in kernel) : box xy ( lower-right of colored rectangle - in kernel) : 5* emit ( five characters in reverse order) : cf ( display double-size colorforth) : fill n an ( writes n into a cell string) : move sdn ( copies a cell string from s to d) : erase bn ( zeroes a string of blocks) : copy n ( copies current editor block and its shadow to the given block) {block 30} ( decompress) empt 32 load ] : char ( -n) $ 0 b! ( ?new) 4 bits b 8 and drop if b 4 and drop if 3 bits 7 ; ] then 1 bits 5 ; ] then 4 b $f and drop if ; ] then : eob ( n) drop pop drop ; : chars ( n-n) char ?full c! 2*c b or chars ; : word ( n) 28 [ nb ] ! dup chars tbits ; : short ( n) 28 bits : t, -4 [ nb ] ! b tbits ; : literal ( n) $ 0 b! 1 bits t, : 32bits 16 bits 16 bits b , ; : variable ( n) word 32bits ; : tag ( -n) b $f and dup jump eob word literal word word literal short word short word word word variable short word short : words ( ?new) 4 bits tag words ; : range ( ann) over block [ h ] ! dup push erase [ aa ] ! $ 0 [ na ] ! begin words [ h ] @ 256 + -256 and [ h ] ! next ; : restore [ ns ] @ dup and -if abs [ ns ] ! 36 block 3000 block [ 18 blks nc @ -2 + * ] move [ 3000 block ] 36 [ nblk @ -36 + ] range ; ] then drop ; {block 31} : char ( examine high bits; shift 4, 5 or 7 bits) : eob ( end of block) : chars ( shift characters until 0) : word ( shift characters, then tag) : short ( 28-bit value+tag) : literal ( 1-bit base base, tag. value in next word) : 32bits ( for values) : variable ( word, value) : tag ( vector) : words ( examine tags) : range ( process each block) : move ( blocks 72 thru 1419 to 3000) : res ( restore compressed blocks) {block 32} ( decompress) macro ( uses ebx) : b [compile] ?dup $c38b 2, ; : b! $d88b 2, [compile] drop ; : c! $c88b 2, [compile] drop ; : 2*d $c3a50f 3, ; : 2*c $e0d3 2, ; forth :var na [0xa] :var nb [0x9] :var h [0xda000] :var an :var aa [0x142fae] :var nz [0x4] : ?new [ na ] @ dup and drop if ; ] then : new [ aa ] @ @ [ an ] ! 1 [ aa ] +! 32 [ na ] ! ; : shift ( n-n) dup negate dup [ nb ] +! [ na ] +! c! [ an ] @ 2*d 2*c [ an ] ! ; : bits ( n) ?new dup negate [ na ] @ + -if dup push + shift new pop negate shift ; ] then drop shift ; : tbits ( nn) [ nb ] @ 8 + c! 2*c or : , [ h ] @ ! 1 [ h ] +! ; : tz ( nn-n) over [ nz ] ! dup negate push + b begin dup 1 and drop if drop drop pop drop [ nz ] @ ; ] then 2/ next b! dup [ nz ] @ - + - [ nb ] +! pop drop ; : ?full ( n-n) [ nb ] @ dup and -if tz dup push -4 + [ nb ] +! tbits $ 0 dup pop dup - 29 + [ nb ] ! ; ] then drop ; {block 33} : b ( pop ebx, register 3, into eax) : c! ( push eax into register 1, ecx) : 2*d ( shift ebx left by ecx. bits from eax) : 2*c ( shift eax left by ecx) : na ( bits remaining in source word) : nb ( bits remaining in ebx) : h ( destination address) : , ( store at destination) : ?new ( fetch new word if necessary) : new ( 32-bits in current word) : shift ( eax into ebx, decrement) nb : tbits ( fill ebx with tag) : ?full ( is there room in ebx?) : bits ( shift bits into ebx. overflow into next word) {block 34} ( native system dependencies) macro ] : p@ [compile] a! [compile] ?dup $ec 1, ; forth ] : key? $64 p@ 1 and drop if $60 p@ $80 and drop if ; ] then pop drop then ; : clock [ 40 ] load ; : altfrm ( -b) [ aper @ 1024 768 * -4 * + ] ; : topram ( -b) [ $30000000 ] ; : !work ( n) block 0 over [ 1 ] + @ [ 35 ] + [ 36 ] / writes stop ; : @rest ( nn) push [ 36 ] + block [ 2 ] pop reads stop ; : @back ( n) dup block 0 [ 2 ] reads dup [ 18 ] + block dup @ [ 18 block @ ] or drop if drop [ 78 ] @rest ; ] then dup [ 1 ] + @ dup and -if nip abs [ 35 ] + [ 36 ] / [ -2 ] + @rest ; ] then drop drop [ 78 ] @rest ; : !back ( n) block 0 [ nblk ] @ [ 18 ] / writes stop ; : @cyls ( acn) reads stop ; : screen 0 dup at 1024 768 box ; : utime ( -n) 0 ; | br : serial ( -n) 96 ; {block 35} : key? ( exits calling defn if key struck) : clock ( loads time of day suppt) : altfrm ( byte addr of alternate frame buffer) : topram ( end ram avail for applications.) : @back and !back ( read/wrt full disk to/from adr) [ @back reads only active part of compressed ] : @cyls ( equiv to reads) : screen ( fills screen with current color) : utime ( null definition for now for compatability) {block 36} ( windows system dependencies) : key? [ keych ] @ 0 or drop if pop drop ; ] then ; : beep ; | -cr : clock 38 load ; : topram | -cr : altfrm ( -b) [ endram -4096 768 * + ] ; : !work ( n) dup block [ 1 ] + @ [ 1 ] + 2/ wwork ; : @back ( n) dup 19 rback dup [ 18 ] + block dup @ [ 18 block @ ] or drop if drop [ 1440 ] rback ; ] then dup [ 1 ] + @ dup and -if nip abs [ 1 ] + 2/ rback ; ] then drop [ 3 ] + @ rback ; : !back ( n) [ nblk ] @ wback ; : @cyls ( acn) 3000 @back push [ 18 ] * [ 3000 ] + block swap pop [ 18 256 * ] * move ; : screen 0 dup at 868 for 0 1024 line next 0 dup at ; : serial ( -n) 114 ; : fopen ( af-h) push push 0 32 ( exist) 3 0 0 pop pop swap [ 4 ] * fcreate ; :var flng [0x3] flng 4 * dup ] : frd ( anh-n) push push push [ 0 + ] pop pop swap pop fread : frw? ( ok-n) if drop [ flng ] @ then ; : fwr ( anh-n) push push push [ 0 + ] pop pop swap pop fwrite frw? ; | -cr : r/o [ $80000000 ] ; : w/o [ $40000000 ] ; | -cr : r/w [ r/o w/o + ] ; {block 37} : key? ( exits calling defn if key struck) : save ( writes full disk image) : beep ( alert in hardsim) : clock ( loads time of day suppt) : altfrm ( byte adr of alt frame buffer) : topram ( end ram avail for applications.) : @back and !back ( read/wrt full disk to/from adr) [ @back reads only active part of compressed, and only active part of straight disks with vars ] : @cyls ( equiv to reads) : screen ( fills screen with current color) | br : fopen ( opens an existing win32 file given word adr of name and access code of) r/o w/o ( or) r/w. ( returns handle, indicators nz if it's good.) : frd ( and) fwr ( read and write on things with win32 handles.) {block 38} ( windows clock) : sec ( -n) utime [ 60 60 * 24 * ] mod ; : minute ( -n) sec 60 / ; {block 39} : utime ( returns unix time in sec since epoch 0000z fri 1/01/1970) : sec ( seconds since midnight needs unsigned mod by time we are all dead) : min ( minutes past midnight) {block 40} ( native clock) macro ( pentium timer) : p@ [compile] a! [compile] ?dup $ec 1, ; : p! [compile] a! $ee 1, [compile] drop ; forth ] : ms 100000 * for next ; : ca $70 p! $71 ; : c@ ca p@ ; : c! ca p! ; : !bcd push 10 /mod 16 * + pop c! ; : !hm 100 /mod 4 !bcd 2 !bcd $ 0 dup c! ; : bcd c@ 16 /mod 10 * + ; : sec0 4 bcd 60 * 2 bcd + 60 * 0 bcd + ; : sec sec0 2 ms dup sec0 or drop if drop sec ; ] then ; : minute sec 60 / ; : hms sec 60 /mod 60 /mod 100 * + 100 * + ; : ymd 9 bcd 100 * 8 bcd + 100 * 7 bcd + ; : day 6 c@ -1 + ; : hi 10 c@ $80 and drop if ; ] then hi ; : lo 10 c@ $80 and drop if lo ; ] then ; : cal hi lo time - hi lo time + ( 748) ; : beep $b6 $43 p! $ee $42 p! $ 0 $42 p! ( on) $61 p@ 3 or $61 p! 50000000 for next ( off) $61 p@ 3 or $61 p! ; {block 41} {block 42} {block 43} {block 44} {block 45} {block 46} ( logo, etc) : forths ( -a) [ h 5 + ] ; | -cr : macros ( -a) [ forths 1 + ] ; : !dict ( fmh) [ h ] ! [ macros ] ! [ forths ] ! ; : +buf ( n-n) [ blk ] @ over or if | indent over or [ blk 1 + ] ! ; ] then drop ; : list ( n) +buf [ blk ] ! lis ; | -cr : l [ blk ] @ load ; : logo show black screen 800 710 blue box 600 50 at 1024 620 red box 200 100 at 700 500 green box # 18 ( list) text cf keyboard ; : empty empt logo ; | br 156 load ] : watermark show black screen 16 center # $404060 $383838 color [ blk ] @ 4. +list keyboard ; : edit ( n) +buf [ blk ] ! : e watermark +e ; | br : -kbd ( -t) 7push pop dup and drop ; {block 47} ( logo, etc) : !dict ( resets dictionary to a saved state) : +buf ( preserves) blk ( if new block is different) : list ( displays the given block without entering the editor.) : l ( interprets the current editor block.) : logo ( displays colorforth logo) : empty ( empty dictionary and display logo) | br : -kbd ( returns true/nonzero flag if a word that calls it is being interpreted from a block as opposed to from the keyboard. use with caution from deep within an app that might have monkeyed with register) # 7 {block 48} ( dump) empty :var x [0x400acf0] :var y [0xfb40d730] : 5-8 8 /mod 32 /mod 32 /mod $100 * + $100 * + $100 * swap 4 * + ; : one dup @ dup 5-8 h. space h. space dup h. cr ; : lines for one -1 + next drop ; : dump [ x ] ! : r show black screen [ x ] @ 15 + 16 text lines keyboard ; : it @ + @ dup h. space ; : lines for white i [ x ] it i [ y ] it or drop if red then i . cr -next ; : cmp show blue screen text 19 lines red [ x ] @ h. space [ y ] @ h. keyboard ; : u 16 : +xy dup [ x ] +! [ y ] +! ; : d -16 +xy ; : ati $f4100000 ( ff7fc000) or ( agp graphics reg) : byte 4 / dump ; : fix for 0 over ! 1 + next ; dump {block 49} ( does not say empty, compiles on top of application) : x -a ( current address) : one a-a ( line of display) : lines an : dump a ( background task continually displays memory --- takes address -- displays three cols with address on right contents in middle and- the left col is g18 instruction view) : u ( increment address) : d ( decrement) : ati ( address of agp graphic registers) : byte a ( byte address dump) : fix an-a ( test word) {block 50} ( timing greg) :var tmt [0x1115a1a8] :var tmn [0xf652bbb4] :var tmp [0x3d44e16] :var secs : tmclr 0 [ tmt ] ! 0 [ tmn ] ! 0 [ tmp ] ! 0 [ secs ] ! ; : tms ( a) time - [ 1 ] + swap +! ; : tme ( a) time swap +! ; : tare [ tmt ] tms pause [ tmt ] tme ; : 0tare [ tmn ] tms switch [ tmn ] tme ; : counter utime negate [ secs ] +! ; : timer utime [ secs ] +! ; {block 51} {block 52} ( format floppy) empty :var hd [0x1] :var ad [0x25312] : array pop 2/ 2/ ; : com align array [ $1202004d , $6c 2, ] : word ( n) [ ad ] @ ! 1 [ ad ] +! ; : sectors ( cs-c) buffer [ ad ] ! 18 for over [ hd ] @ $100 * + over 18 mod 1 + $10000 * + $2000000 + word 1 + next drop ; : head ( ch-c) dup [ hd ] ! $400 * $1202004d + [ com ] ! dup 2* - 1801 + sectors format ; : cylinders ( n) push [ com ] 0 pop for 0 head 1 head 1 + next ( stop) drop drop ; : format ( nc @) 80 cylinders stop ; : archive [ 0 block ] 0 [ nc ] @ writes stop ; : check [ 3000 block ] 0 [ nc ] @ reads stop ; : ati $10cd4123 [ vesa ] ! ; ( setup for ati video card) : nvidia $10cd4118 [ vesa ] ! ; ( for nvidia card then save) {block 53} : format ( issue format command 30 cyl - in kernel) : hd ( disk head) : ad ( current address in) buffer : buffer ( usual floppy cylinder buffer) : array ( return word address) : com ( format command) : word ( store word into command string) : sectors ( build sector table) : head ( build sectors for selected head) : cylinders ( sectors advance 1 for each cylinder - to allow time for head step) : format ( only desired cylinders to save time) : bytes ( arguments for crc) : archive ( verify save' compute crc, save, read-back, recompute crc - first 64 bytes used by floppy read/write -- the two crc numbers should be the same !) {block 54} ( icons) empty macro ] : @w $8b66 3, ; : !w [compile] a! $28966 3, [compile] drop ; : *byte $c486 2, ; forth :var ic [0x35] :var cu [0xa9] : sq [ xy ] @ $10000 /mod 16 + swap 16 + box | cr 17 0 +at ; : loc [ ic ] @ [ 16 24 8 */ ] * [ 12 block 4 * ] + ; : 0/1 $8000 ? if green sq ; ] then blue sq ; : row dup @w *byte 16 for 0/1 2* next drop | cr [ -17 16 * ] 17 +at ; : ikon loc 24 for row 2 + next drop ; : adj 17 * swap ; : cursor [ cu ] @ 16 /mod adj adj over over at | cr red 52 u+ 52 + box ; : line ( i-in) for dup emit 1 + next ; : set ( xy) over lm at 0 10 for 12 line cr next | cr 8 line drop ; : ok show black screen cursor 18 dup at ikon | cr text [ ic ] @ . 400 60 set keyboard ; 56 load ok h {block 55} ( draw big-bits icon) : @w a-n ( fetch 16-bit word from byte address) : !w na ( store same) : *byte n-n ( swap bytes) : ic -a ( current icon) : cu -a ( cursor) : sq ( draw small square) : xy -a ( current screen position, set by) at : loc -a ( location of current icons bit-map) : 0/1 n-n ( color square depending on bit 15) : row a-a ( draw row of icon) : ikon ( draw big-bits icon) : adj nn-nn ( magnify cursor position) : cursor ( draw red box for cursor) : ok ( background task to continually draw icon, icon number at top) {block 56} ( edit character set application) : +ic 1 [ ic ] +! ; : -ic [ ic ] @ -1 + 0 max [ ic ] ! ; : bit [ cu ] @ 2/ 2/ 2/ 2/ 2* loc + $10000 [ cu ] @ $f and 1 + for 2/ next *byte ; : toggle bit over @w or swap !w ; : td toggle : d 16 : wrap [ cu ] @ + [ 16 24 * ] dup u+ /mod drop [ cu ] ! ; : tu toggle : u -16 wrap ; : tr toggle : r 1 wrap ; : tl toggle : l -1 wrap ; : h pad nul nul accept nul tl tu td tr l u d r -ic nul nul +ic nul nul nul nul nul nul nul nul nul nul nul nul [ $2500 , $110160c dup , , $2b000023 , 0 , 0 , 0 , {block 57} ( edit icon) {block 58} ( lan) empty $3f8 60 load init ] : no block 4 * 1024 ; : send no for dup 1@ xmit 1 + next drop ; : receive no for rcv over 1! 1 + next drop ; : no 18 [ 7 18 * ] ; : backup no for dup send 1 + next drop ; : accept no for dup receive 1 + next drop ; {block 59} {block 60} ( serial 3f8 2e8 1050) macro ] : p@ [compile] a! [compile] dup $ec 1, ; : p! [compile] a! $ee 1, [compile] drop ; : 1@ $8a 2, ; : 1! [compile] a! $288 2, [compile] drop ; forth ] : r [ 0 + ] + ; : 9600 12 ; : 115200 1 ; : b/s $83 [ 3 r ] p! 115200 [ 0 r ] p! 0 [ 1 r ] p! 3 [ 3 r ] p! ; : init b/s ( 16550) 1 [ 2 r ] p! 0 [ 4 r ] p! ; : xmit ( n) [ 5 r ] p@ $20 and drop if [ 0 r ] p! ; ] then ( pause) xmit ; : cts [ 6 r ] p@ $30 and $30 or drop if cts ; ] then xmit ; : st [ 6 r ] p@ : xbits $30 and $10 / dup 1 and 2* 2* + 2/ ; : st! [ 4 r ] p! ; : ?rcv [ 5 r ] p@ 1 and drop if [ 0 r ] p@ then ; : rcv ?rcv if ; ] then ( pause) rcv ; {block 61} : p@ p-n ( fetch byte from port) : p! np ( store byte to port) : 1@ a-n ( fetch byte from byte address) : 1! na ( store byte to byte address) : r n-p ( convert relative to absolute port address. base port on stack at compile time. compiled as literal at yellow-green transition) : 9600 : 115200 ( baud-rate divisors. these are names, not numbers) : b/s ( set baud rate. edit to change) : init ( initialize uart) : xmit n ( wait for ready and transmit byte) : cts n ( wait for clear-to-send then xmit) : st -n ( fetch status byte) : xbits n-n ( exchange status bits) : st! n ( store control byte) : ?rcv ( fetch byte if ready. set flag to be tested by) if : rcv -n ( wait for ready and fetch byte) {block 62} ( word search tcurs) macro ] : bt ( nm-n) [ $68bd08b ] , [ $f04768d ] , [ $d21bc2a3 ] , ; forth ] : tag? ( nm-n) over $f and swap bt drop ; : red? ( n-nm) [ $1008 ] tag? if [ $4092 ] ; ] then [ $1008 ] ; : t2 ( nn-nn) 1 + : t1 ( nn-nn) 1 [ curs ] +! : t0 ( nn-nn) 1 + ; : map ( nnn-nn) $f and jump | indent t0 t1 t2 t1 t1 t2 t1 t1 | indent t1 t1 t1 t1 t2 t1 t1 t1 : tcurs ( nn-n) over block push -1 [ curs ] ! 0 : tcu1 ( nnn-n) dup i + @ map over over negate + drop -if t1 drop drop pop drop ; ] then tcu1 ; : -curs ( -) [ curs ] @ -1 + 0 max [ curs ] ! ; here ] : tpoint [ blk ] @ [ curs ] @ tcurs drop -curs ; cpoint ! {block 63} ( word search tcurs) : bt ( returns nz and less if bit n of m is set. pops t to 2, bit test index t mask 2, 2-2-sbb to set nz if carry.) : tag? ( nz and less if bit in m indexed by tag of token n is 1.) : t2 nn-nn ( 2 cell - big nums, var) : t1 nn-nn ( 1 cell) : t0 nn-nn ( extensions, undefined) : map end n wrd-end n ( inc n and maybe curs) : tcurs blk offset-blk ( convert offset to tokens in curs) : -curs - ( decrement curs to zero) : tpoint - ( fix abort to point cursor correctly, except if last word in block) {block 64} ( word search) :var fmask [0xfffffff0] :var fnn [0xf4ec7800] | cr :var fna [0x81200] :var fbits [0x1008] 18 block fna ! ] : +shad ( a-a) dup [ fna ] @ or 256 and + ; : 1word ( -n) word [ words ] @ : 1wz 2 less drop if drop ; ] then nip -1 + 1wz ; : want? ( nm-n) tag? if or ; ] then drop drop -1 ; : -found ( na) @ [ fbits ] @ want? [ fmask ] @ and drop ; : reedit ( fna) nip dup 1 + [ fna ] ! | indent $100 /mod -offset swap tcurs swap | indent dup and drop if dup [ blk ] ! then edit ; : find 1word $5e9a | -cr : fnd+ 18 block -16 : fnd ( nbam) [ fmask ] ! [ fna ] ! [ fbits ] ! 16 or [ fnn ] ! 0 : f ( f) [ fnn ] @ 16 or [ fna ] @ begin | indent +shad [ nblk ] @ block less drop while | indent over over -found while 1 + end | indent then reedit ; ] then drop drop drop ; : def 1word [ $1008 ] fnd+ ; here ekt 21 + ! ] : fkc drop [ pcad ] @ @ [ $140 ] tag? if [ 32 ] / edit ; | cr ] then red? fnd+ ( blk @) dup ; here ekt 22 + ! ] : fk drop ( drop) [ cad ] @ [ fna ] ! 1 f ( blk @) dup ; : from ( n) 1word swap [ $5e9a ] swap block [ -16 ] fnd ; : literal ( n) $20 * [ $140 ] 18 block [ -32 ] fnd ; {block 65} ( word search) : +shad ( skips shadows if in one and skipping.) : 1word -n ( return 1st cell of word from kbd.) : find ( finds following short word, starting in block 18, regardless of color.) : def ( finds only definitions.) : f ( find next occurrence of word last found) : fk ( 'f' key in edit keyboard. drops key and block number and behaves like f except continues search from current editor position in current kind of block src/shad.) : fkc ( if word left of cursor is a number, list that block. if red or magenta definition, searches for references. otherwise searches for definitions.) : from n- ( like find but start from block number) : literal n- ( finds any equivalent literal) {block 66} ( editor recolor) 8 display + @ 13 display + ! ] : array pop 2/ 2/ + @ ; ( 1-4-9 2-5 8-6-15) : reclr align array | cr [ 0 , 4 , 5 , 3 , 9 , 2 , 15 , 7 , | cr 6 , 1 , 10 , 11 , 12 , 13 , 14 , 8 , ] : wadr ( -a) [ pcad ] @ [ blk ] @ max ; here ekt 20 + ! ] : change wadr @ $f and reclr wadr @ $fffffff0 and or wadr ! ; $220e100a ekt 33 + ! {block 67} ( tags) | cr ( extend) execute 32-bit ( define) | cr ] compile 32-bit [ 27-bit [compile] immediate | cr ] 27-bit ( comment cap caps) | cr ( variable address blue 27-bit) | br : array ( fetch new tag) : reclr ( table of color cycles) : wadr -a ( address of word to left of cursor) : change ( color of word to left of cursor) : 220e100a ( 0a-c 10-d 0e-f 22-j) {block 68} ( blue words) : -w@ ( -n) 7push pop -1 + @ ; : ?xqt -w@ -16 and itick if drop ; ] then push ; : @lit -w@ 32 / ; here display 13 + ! ] : tadr $c0c0c0 color @lit 3 h.n space ; : blu $ff color : type1 [ 9 display + @ 5 + ] push ; : d14 [ 14 display + ] ; here d14 ! ] : exb blu # 1 ( sp + @ push) ?xqt ; : tab ( n) for space next ; : indent cr 5 tab ; : br cr cr ; : sp/2 $b0000 [ xy ] +! ; : d03 ( -a) [ 3 display + ] ; here ] : exr [ d03 @ ] nop [ d03 ] ! space red type1 ; : -cr [ 0 + ] nop [ d03 ] ! ; : seeb [ d14 ] @ [ d14 @ dup 5 + or ] or [ d14 ] ! ; : ?seeb ( -t) [ d14 ] @ [ d14 @ 5 + ] or drop ; seeb {block 69} : ?xqt ( executes the word just passed over if it exists in the dictionary.) : @lit ( fetch 27-bit literal) : tadr ( display target address) : blu ( display blue word) : d14 ( tag 14 display entry) : exb ( display and execute blue word if found.) : tab ( advance n spaces) : indent ( 5 spaces) : br ( blank line) : s/2 ( halfspace for reports.) : -cr ( suppress cr on next red word.) : seeb ( toggle display of blue words) : ?seeb ( set flag non-zero if blue words visible) {block 70} {block 71} {block 72} ( convert cf character to/from ascii) | cr macro ] : 1@ $8a 2, ; | -cr : 1! [compile] a! $288 2, [compile] drop ; forth ] : string pop ; : cf-ii align string | cr [ $6f747200 , $696e6165 , $79636d73 , $7766676c , | cr $62707664 , $71757868 , $33323130 , $37363534 , | cr $2d6a3938 , $2f7a2e6b , $2b21273b , $3f2c2a40 , ] : ch $fffffff0 and unpack [ cf-ii ] + 1@ $ff and ; | br : ii-cf string | cr [ $2a00 , $2b , $2b2d0000 , $2725232e , | cr $1b1a1918 , $1f1e1d1c , $28292120 , $2f000000 , | cr $3a43355c , $3d3e3440 , $54523744 , $3336393c , | cr $38314742 , $3f414632 , $563b45 , $23000000 , | cr $a13052c , $d0e0410 , $24220714 , $306090c , | cr $8011712 , $f111602 , $260b15 , ] : chc $ffffffe0 + [ ii-cf ] + 1@ $ff and ; | br : set1 $3d21223a $3e2c203c : !8 ( nn-) [ cf-ii $2c + 2/ 2/ ] ! [ cf-ii $28 + 2/ 2/ ] ! ; : set0 $2b21273b $3f2c2a40 !8 ; {block 73} ( colorforth to ascii and ascii to colorforth) : cf-ii ( otr inae ycms wfgl bpvd quxh) | indent ( 3210 7654 -j98 /z.k +!'; ?,*@) : ii-cf ( ! +* /.-, 3zjk 7654 ;'98 ?) | indent ( cba@ gfed 02ih onml srqp wvut 1yx) | indent ( cba@ gfed 02ih onml srqp wvut 1yx) | br [ to facilitate pathnames and html strings... ] : set1 ( modifies cf-ii table.) | cr ; ( to colon,) ] ' ( to doublequote,) + ( to equal,) | cr @ ( to lessthan,) * ( to blank,) ? ( to greaterthan) : set0 ( restores original cf-ii table.) {block 74} ( pathname input) 72 load set1 ] : strng ( n-a) pop + ; : fnam ( n-a) align strng [ here 80 + h ! :var hld [0x8] : emt ( n-) [ hld ] @ fnam 1! 1 [ hld ] +! ; : +shan ch emt dup and if +shan ; ] then drop ; | br : ,src 7@+ @ : xx dup and if +shan 7@+ @ dup 15 and drop | cr while then [ 0 ] and emt 7dec ; ] then xx ; : named ( string) 0 [ hld ] ! -kbd if ,src ; | cr ] then ( keyboard) 0 word 0 | cr begin push dup and while end then drop | cr begin pop dup and while +shan end then emt ; | cr exit ( testing) : ccc dup 1@ 255 and swap 1 + ; | cr named ( //./a;) {block 75} ( filename input) : strng ( defines an array of bytes.) : fnam ( is a zero terminated ascii string consisting of) hld ( chars including the null.) emt ( appends a character to this string.) : +shan ( appends a shannon word to fnam.) | br : named ( returns the byte address of a null terminated ascii string representing the following colorforth string, which may follow in either source code or in keyboard input.) | br : inam ( accept filename input from keyboard, store zero terminated ascii string to fnam, and return byte address of fnam.) {block 76} ( index) empty 74 load set0 | cr :var pad [0x1030e000] 3000 block 4 * pad ! | cr :var hld [0x1030e306] pad @ hld ! :var pos [0x2] 0 pos ! ] : nxt ( a-an) dup 1 + swap @ ; : -eol? [ pos ] @ [ 47 ] or drop ; : .sp 32 : .ch ( c) -eol? if [ hld ] @ 1! 1 [ hld ] +! 1 [ pos ] +! ; | indent ] then drop ; : crlf 0 [ pos ] ! 13 .ch 10 .ch ; | br : .hd ( n) [ -10 ] + -if [ $3a ] + .ch ; ] then [ $41 ] + .ch ; : .dec ( n) [ 0 ] + -if $2d .ch negate then [ -1 ] swap | cr begin [ 10 ] /mod dup and while end then drop : spit ( -1 ...) begin .hd [ 0 ] + -until drop ; | br : hd ( n-nn) dup [ $f ] and swap 2/ 2/ 2/ 2/ ; : .hex ( n) [ -1 ] swap begin hd $fffffff and while end then drop spit ; | cr 78 load | br named ( index.txt) exit 18 1440 run {block 77} ( index) : hld ( place in file) : spot ( in line) : nxt ( fetch next word) : emit ( ascii character, won't go past column) # 72 : space ( written to file) : crlf ( to file) : digit ( hex digit to file) : .h ( print hex number) : .d ( decimal number) | br [ usage example in bottom line. {block 78} ( index.1) : word ( n) .sp [ $fffffff0 ] and : cont ( n) dup and if ch .ch cont ; ] then drop ; : short ( n) .sp 2/ 2/ 2/ 2/ dup 1 and drop | indent if 2/ .hex ; ] then 2/ .dec ; : variable ( an-a) word 0 : long ( an-a) .sp push nxt pop $10 and drop | indent if .hex ; ] then .dec ; : eol ( n) begin drop 47 [ pos ] ! ; : tag ( a-a) dup and until dup $f and jump | cr cont word long eol word long short word | cr short word word word variable short eol short : ?sp ( nl-n) + -if .sp then ; : line ( n) -100 ?sp -900 ?sp 1000 + | indent dup .dec space block 0 [ pos ] ! | indent begin -eol? while nxt tag end | indent then drop crlf ; : run ( 1st lst+1) [ pad ] @ [ hld ] ! over negate + 2/ | indent for dup line [ 2 ] + next drop : sav 0 32 2 0 0 w/o [ 0 fnam ] fcreate dup push | cr [ pad ] @ [ hld ] @ over negate + pop fwr drop fclose ; {block 79} ( index.1) : short ( number) : literal ( long number) : word ( text, not number) : cont ( inuation word) : variable ( name and value) : eol ( red word means end of line) : tag ( vector table) : words ( print maximum n words or to eol) : run [ first-block last+1 | cr ( prints first line of each block in range) | cr ( to a log file) in windows {block 80} {block 81} {block 82} {block 83} {block 84} ( resident compress) 86 load ] : short 4 rbits 28 bits ; : lit 4 rbits 2/ 2/ 2/ 2/ 1 rbits : 32bits drop 1 + dup @ 16 bits 16 bits ; : variable 1word 32bits ; : /whit ( n-n) -16 and 9 or atom ; : tag ( an-an) dup $f and jump cont atom lit atom atom lit short atom short atom /whit /whit variable short atom short : atoms ( a) dup @ dup and if tag drop 1 + atoms ; ] then 4 bits drop drop ; : range ( nn-an) here/4 here4 push new for dup block atoms 1 + next drop $ 0 31 bits drop pop here4 over negate + ; : !lng ( nw) [ 127 ] + [ 128 ] / [ 72 ] + dup ( nsec) [ 0 ] block [ 1 ] + ! dup negate [ ns ] ! [ 35 ] + [ 36 ] / [ nc ] ! ; : save 7push [ h ] @ push [ 5036 block 4 * ] h ! 36 [ nblk @ -36 + ] range ( an) !lng drop $ 0 block [ 5000 ] block [ 36 blks ] move [ 5000 ] !work [ ns ] @ abs [ ns ] ! pop [ h ] ! 7pop ; {block 85} : short ( tag, then 28bit value+base) : lit ( tag, then base) : 32bits ( from next word. 2 chunks) : variable ( single word, then 32-bits) : /whit ( replaces a word's tag with 9, making it a lowercase comment.) : tag ( identify kind of word) [ note /whit used for tags $a and $b to convert these deprecated capitalized comments to lower case. when all source of interest has been compressed at least once this may be removed. ] : atoms ( scan thru block. 8 0s eob) : range ( process blocks, number and count. 31 0s eof) : sve ( compress blocks 72 thru 1419) : flop ( write floppy; save number of cylinders) {block 86} ( compress) macro ( uses ebx) : r3@ [compile] ?dup $c38b 2, ; : r1! $c88b 2, [compile] drop ; : 2*d $c3a50f 3, ; : 2*c $e0d3 2, ; : 2/r $c8d3 2, ; forth :var nb [0x17] : here/4 here 3 and if 1, here/4 ; ] then drop ; : here4 here 2/ 2/ ; : new 32 [ nb ] ! ; : shift ( nn-n) dup negate [ nb ] +! r1! 2*d 2*c ; : rbits dup r1! swap 2/r swap : bits ( nn-n) dup negate [ nb ] @ + -if dup push + shift r3@ , new pop negate shift ; ] then drop shift ; : char -if 2* -if 2/ 7 bits ; ] then 2/ $80000000 or 5 bits ; ] then 4 bits ; : chars dup and if char chars ; ] then ; : 1word 4 rbits chars 4 bits ; : atom ( an-an) 4 rbits : cont chars over 1 + @ dup and if $f and drop if 4 bits ; ] then ; ] then drop 4 bits ; {block 87} : r3@ ( fetches register) # 3 ( onto stack.) : r1! ( stores top of stack to register 1.) : 2*d ( shift ebx left by ecx. bits from eax) : 2*c ( shift eax left by ecx) : 2/r ( rotate eax right by ecx) : nb ( number of bits remaining in word) : here/4 ( align to word boundary) : here4 ( word address in dictionary) : new ( 32-bits in current word) : shift ( eax into ebx, decrement) nb : rbits ( rotate bits to high-order position) : bits ( shift bits into ebx; cross word boundary) : char ( examine high bits. shift 4, 5 or 7 bits) : chars ( shift all non-zero characters) : 1word ( short word without continuation for variable) : atom ( shift tag, then characters) : cont ( continue without tag) {block 88} ( display text) macro ] : 7@+ ( -a) [compile] ?dup $c78b 2, $47 1, ; | -cr : 7dec $4f 1, ; : @ret ( -b) [compile] ?dup $24048b 3, $5240483 , ; : 4@ ( b-n) $8b 2, ; forth ] : tick ( b-b) dup [ 1 ] + 4@ + 5 + ; : call $e8 | -cr : dst 1, @ret tick here 3 + - + , ; : jmp $e9 dst ; | br : .shan ( n-) dup and if unpack emit .shan ; ] then drop ; | -cr : +str ( a-a) + ; macro ] : ,lit ( n) [compile] ?dup $b8 1, , ; : strings ( i-a) 7push pop [compile] ,lit jmp +str nop ; : .' ( comment) 7@+ @ -16 and [compile] ,lit call .shan nop ; : remember [ forths ] @ [compile] ,lit [ macros ] @ [compile] ,lit [ h ] @ [compile] ,lit call !dict nop ; forth | br : ' ( -b) -kbd if 7@+ @ itick if abort then ; | cr ] then tic ; : execute ( b) push ; : eval ( a) 7push [ 1 ] + push 7pop [ sp 1 + ] @ execute 7pop ; {block 89} ( various useful extensions.) | br : 7@+ ( interpret only, returns adr of next word in block and skips over it ... 7-0-mov 7-inc) : 7dec ( used to correct address after 7@+) : @ret ( fetch return address, skip bytes of code.) : 4@ ( cell fetch on byte boundary) : tick ( given adr of call instr, return tgt adr) : call ( and) jmp ( generate xfers to next word) | br : .shan ( displays a shannon coded string) : ,lit ( compiles a literal.) : .' ( displays the following one-word comment.) : remember used ( in a containing word to make that word restore dictionary to what immedately follows it.) | br : strings ( starts an array of words in source.) : ' ( interp only, returns next word's code addr.) : execute ( is a call to the given routine adr.) : eval ( interprets the source word whose address is given.) {block 90} ( disk audit utility) empty 30 load :var bias | cr :var sep [0xbb8] 3000 sep ! :var head [0x59f] 1439 head ! ] : +blocks ( sdn) 2* ( bloks ;) : bloks ( sdn) push swap block swap block pop [ 256 ] * move ; | -cr : n18 ( i-a) [ 3018 block ] + ; : wipe [ blk ] @ 1 erase ( e) lis ; | -cr : to ( n) [ head ] ! ; : obliterate ( lh) over negate + erase ; : matching ( sd) less if swap then dup [ bias ] ! negate + [ sep ] ! ; : cast ( nm-n') dup push /mod 1 or pop * + ; : other ( n-n') [ bias ] @ negate + [ sep ] @ cast [ bias ] @ + ; : lesser ( n-n) dup other min ; 92 load ] : ?blk ( n-n?n+) lesser dup block over other block [ 256 ] for over @ over @ or drop if drop drop dup [ 1 ] + pop drop ; ] then [ 1 ] + [ 1 ] u+ next drop drop [ 1 ] + ; | -cr : ?blks ( sn-?) for ?blk next drop ; : ?bin ( kernel) 0 12 ?blks ( icons) 12 6 ?blks ; : unpk abs [ 1 n18 ] ! [ 3036 ] block [ 5000 ] block [ 1404 ] blks move [ 5000 block ] 3036 [ 3 n18 ] @ [ -36 ] + range ; : check [ 3000 ] @back [ 0 n18 ] @ [ 18 block @ ] or drop if ; ] then [ 1 n18 ] @ dup and -if unpk ; ] then drop ; {block 91} ( disk mgmt and reconciliation utility.) : bloks ( copies n blocks from s to d, front to back so only moves overlap downward safely.) : +blocks ( copies n blocks and their shadows.) : obliterate ( wipes from block l to block h.) : matching ( sets up to match s to d.) : to ( sets block no. past end of source area.) : other ( given a block number in one of the areas returns the corresponding block no. in the other area.) : lesser ( given a block number returns the lesser of the pair it is a member of) : ?blks ( scans a range of blks leaving nos of any differing blks on the stack.) : ?bin ( scans the binary parts of okad disk.) : check ( reads backup to) # 3000 ( and decompresses if appropriate) {block 92} ( compare) : blink ( n) dup other [ blk ] ! edit ; : var ( nnxx-nnd) push push 1 + 1 u+ pop pop : *1 ( nnxx-nnd) or ; : *2 ( nnxx-nnd) var push over @ over @ or pop + ; : tag ( nn-n) dup $f and jump | indent *1 *1 *2 *1 *1 *2 *1 *1 | indent *1 *1 *1 *1 var *1 *1 *1 : ?nul ( nnxx-nnxx) over over +or drop if ; ] then drop drop pop drop drop drop ; : co ( naa-n) over @ over @ ?nul tag drop if drop drop blink ; ] then 1 + 1 u+ co ; : com ( n-n) dup block over other block co ; : g [ blk ] @ lesser : gg ( n) [ head ] @ over - + drop -if drop ; ] then [ 1 ] + com gg ; : v [ blk ] @ other edit ; : give [ blk ] @ dup other 1 bloks ; : take [ blk ] @ dup other swap 1 bloks ; : check [ 3000 ] @back ; : all 0 [ 3000 ] matching [ nblk ] @ [ -1 ] + to [ 17 ] gg ; {block 93} : blink ( displays the given block with its other set as the editor's 'other' block) : var ( compares a variable name, advancing pointers to skip its value.) : *1 ( compares garden variety words.) : *2 ( compares large literals.) : tag ( compares source cells given, true if diff, advancing ptrs and ignoring variable vals.) : ?nul ( ends loop in co if nuls hit in both blks.) : co ( does work of com given adrs of both blks.) : com ( invokes editor to blink the given block if it differs from the other, otherwise returns.) : g ( scans for diffs after current editor block.) : v ( shows the other block) : give ( writes current editor block over its twin) : take ( writes twin over current editor block.) : check ( reads backup to 3000 for matching.) : all ( scans the whole usable area of the disk.) {block 94} ( ide ats support) : zxch ( w n f n) push push dup # $2 ( +) # -2 ( and) [ vport ] @ pop /frame ( vport @) # $12000 ( + !18 dup -) # $1 ( and drop if vport @) # $10000 ( + !18 then) +frame [ wos ] !frame pop insea -stream ; | br : dox align create ( @p call) [ $56a9 , | indent ( arg) $0 , ] : xchg ( cmd arg - result) [ dox 1 + ] ! [ dox ] ! dox [ $2 ] fet [ 1 ( exch) ] zxch @18 ; | br : pfocus paths targets @ + dup @ swap -1 + @ wall port dup call lit rb! ; : test ( arg-ans) $5604 swap xchg ; : tfocus ( port) $5636 swap [ $10000 ] + xchg drop ; : creep $563a [ 67 ] xchg ( drop) ; : rip $5602 $20000 xchg ( drop) ; {block 95} ( this block interchanges ats commands with any node adjacent to the ide boot node.) | br : pfocus ( must be used after booting package into an adjacent node and before using the following words. focuses that node properly on the boot node with both) p ( and) b ( -) [ note! after pfocus regular ide functions may not be done against nodes in this path until ] rip [ has restored them to ] warm [ state. | br : tfocus ( performs ats focus function to select port thru which test and creep operate. use ide port names.) : test ( executes test w/) [ arg ( giving positive) ans. ] : creep ( creeps into focused node, making it active and changing current active to wire.) : rip ( tears out ats connection to active node returning it and all wire nodes to warm states.) {block 96} ( native async) 96 orgn ! macro ] : 1@ ( b-c) $8a 2, ; : 1! ( cb) [compile] a! $288 2, [compile] drop ; : 2@ ( b-h) $8b66 3, ; : 2! ( hb) [compile] a! $28966 3, [compile] drop ; : 4@ ( b-n) $8b 2, ; : 4! ( nb) [compile] a! $289 2, [compile] drop ; : swab ( h-h) $c486 2, ; : swa4 ( n-n) $c80f 2, ; forth ] : a-b ( a-b) 2* 2* ; : b-a ( b-a) [ 3 ] + 2/ 2/ ; : create ( -a) pop b-a ; : rez ( n) h +! ; : ?zero ( n-n) [ 0 ] or if dup or ; ] then ( -) [ -1 ] or ; | br :var act :var vport [0x175] :var 0tg [0x1] :var 1tg [0x1] :var 2tg [0x1] : cold 1 [ 0tg ] ! 1 [ 1tg ] ! 1 [ 2tg ] ! 0 [ act ] ! ; | br ( ser) 98 load 118 load ( routes) 120 load | cr ( generic) 122 6 loads ( panel) 134 load | cr ( user) 136 load ( canon) 138 load {block 97} ( talk to chip via native rs232.) | br : 1@ ( and) 1! ( byte fetch and store, byte address.) : 2@ ( and) 2! ( halfcell fetch/store, byte adr.) : swab ( and) swa4 ( 2-way and 4-way byte swaps.) : a-b ( and) b-a ( convert cells to+from bytes.) | br : bofs ( and) ofs ( make byte and cell offset adrs in a structure given byte posn and byte width.) : create ( used after) [ align ( to exit with word adr of cell following in dictionary.) note that writing into such allocations invalidates nearby instruction cache! ] : rez ( allots n bytes in the dictionary.) : ?zero ( classical zero-equal returning 0 or -1 with indicators.) | br : ntgt ( indices for active paths, 1 for adjacent.) : act ( number of selected path, to which) vport ( leads.) : cold ( sets no active paths.) : user ( test code before canonicals.) {block 98} ( async umbilical) $3f8 ( serial) 60 load ] : rsh ( ni-n) 0 + if for 2/ next ; ] then drop ; : sdat align create [ 16384 rez :var bi [0x1e] : -stream 0 [ bi ] ! ; : stream ( -b) [ sdat a-b ] ; : /str ( -b) [ bi ] @ [ stream ] + ; | br : @18 ( -n) /str 4@ [ $3ffff ] and : +wd 3 [ bi ] +! ; : !18 ( n) [ $3ffff ] or [ $40 ] * [ $12 ] + /str 4! +wd ; | br : +sea ( -ok) init 1 [ 0 ] + ; : -sea ; : reset [ 2 ] st! [ 100000 ] for next [ 0 ] st! ; : tosea ( bn) for dup 1@ xmit [ 1 ] + next drop ; : insea ( w) stream swap [ 3 ] * for | indent rcv over 1! [ 1 ] + next drop ; {block 99} ( async data are 18 bits per 3 bytes. to chip word inverted, shifted up 6, '12' inserted, then sent low order byte first. from chip are tbd.) | br : sport ( com port address) : 4@ ( and) 4! ( full cell on byte address.) : +sea ( opens serial; true if good, handle in dh.) : -sea ( closes the handle.) : /sea ( resets the chip.) : tosea ( transmits n bytes to chip.) : insea ( receives w g18 words from the chip.) | br : -stream ( clears byte index) bi ( in) sdat ( buffer.) : stream ( byte adr of buffer.) : /str ( byte adr of next 18-bit slot in buff.) | br : @18 ( returns the next 18 bits from the stream.) : !18 ( appends 18 bits to the stream. no higher order bits may be present!) {block 100} ( onspec usb interface) 100 orgn ! macro ] : 1@ ( b-c) $8a 2, ; : 1! ( cb) [compile] a! $288 2, [compile] drop ; : 2@ ( b-h) $8b66 3, ; : 2! ( hb) [compile] a! $28966 3, [compile] drop ; : swab ( h-h) $c486 2, ; : swa4 ( n-n) $c80f 2, ; forth ] : a-b ( a-b) 2* 2* ; : b-a ( b-a) [ 3 ] + 2/ 2/ ; : bofs ( bw-b'b) over + swap ; : ofs ( bw-b'a) bofs b-a ; : create ( -a) pop b-a ; : rez ( n) h +! ; : ?zero ( n-n) [ 0 ] or if dup or ; ] then ( -) [ -1 ] or ; | br :var act :var vport [0x145] :var 0tg [0x1] :var 1tg [0x1] :var 2tg [0x1] : cold 1 [ 0tg ] ! 1 [ 1tg ] ! 1 [ 2tg ] ! 0 [ act ] ! ; | br ( usb) 102 5 loads ( routes) 112 load | cr ( generic) 122 6 loads ( panel) 134 load | cr ( user) 136 load ( canon) 138 load {block 101} ( talk to seaforth via onspec usb.) | br : 1@ ( and) 1! ( byte fetch and store, byte address.) : 2@ ( and) 2! ( halfcell fetch/store, byte adr.) : swab ( and) swa4 ( 2-way and 4-way byte swaps.) : a-b ( and) b-a ( convert cells to+from bytes.) | br : bofs ( and) ofs ( make byte and cell offset adrs in a structure given byte posn and byte width.) : create ( used after) [ align ( to exit with word adr of cell following in dictionary.) note that writing into such allocations invalidates nearby instruction cache! ] : rez ( allots n bytes in the dictionary.) : ?zero ( classical zero-equal returning 0 or -1 with indicators.) | br : ntgt ( indices for active paths, 1 for adjacent.) : act ( number of selected path, to which) vport ( leads.) : cold ( sets no active paths.) : user ( test code before canonicals.) {block 102} ( find/open/close onspec) : nam ( -a) align create ( //./) [ $2f2e2f2f , ( d') $3a47 , ] : obuf ( -a) align create [ 512 rez :var len [0x64] : spq ( -a) align create [ 0 , 0 , 0 , ] : inq ( -ok) [ len ] 512 obuf 12 spq $2d1400 [ dh ] @ fioctl ; | br : -sea [ dh ] @ [ 0 ] + if fclose 0 then [ dh ] ! ; : ?sea ( -t) obuf dup [ 3 ] + @ b-a + dup @ [ $66414553 ] or swap [ 1 ] + @ [ $6874726f ] or +or ?zero ; : +sea ( -ok) $3a44 [ nam 1 + ] ! 20 for nam r/w fopen [ dh ] ! if inq drop if ?sea if pop drop ; ] then drop then then -sea 1 [ nam 1 + ] +! next 0 ; {block 103} : nam ( pathname buffer) : spq ( argument for inquiry) : obuf ( buffer for inquiry return) : len ( bytes returned from fioctl calls) | br : inq ( makes device inquiry, returns true if ok) : ?sea ( true with indic if reply vendor seaforth) | cr : +sea ( finds a forthdrive. true if found, handle in dh.) : -sea ( closes the handle.) {block 104} ( scsi operations) : /sdb ( -n) [ 28 16 + 32 + 16 1024 * + ] ; | br : sdb align create [ /sdb rez ( struc) sdb a-b ] : nsdb ( -b) [ 2 bofs ] ; ( sstat) 1 + 3 + ] : ncdb ( -b) [ 1 bofs ] ; ( nsns) 1 + ] : i/o ( -b) [ 1 bofs ] ; 3 + ] : ndata ( -a) [ 4 ofs ] ; : nto ( -a) [ 4 ofs ] ; : 'data ( -a) [ 4 ofs ] ; : 'sns ( -a) [ 4 ofs ] ; : cdb ( -b) [ 16 bofs ] ; ( sns) 32 + ] : sdat ( -b) [ 16 1024 * bofs ] ; drop | br : !cdb ( an) 0 sdb [ 28 16 + 32 + b-a ] fill [ 28 16 + dup ] nsdb 2! [ dup ] 'sns ! [ 32 + ] 'data ! 20 [ nto ] ! dup [ ncdb ] 1! [ cdb b-a ] swap b-a move ; : !xfer ( ni) [ i/o ] 1! [ ndata ] ! ; : /scsi ( -ok) [ len ] /sdb sdb over over $4d004 [ dh ] @ fioctl ; {block 105} : /sdb ( total length of scsi structure, bytes) | br : sdb ( scsi structure word adr unless -b) : nsdb ( -b length in bytes thru cdb) : ncdb ( -b length of cdb in bytes) : i/o ( -b 0 out 1 in 2 no data) : ndata ( -a length in bytes of data transfer) : nto ( -a timeout in seconds) : 'data ( -a offset in bytes to sdat) : 'sns ( -a offset in bytes to sns) : cdb ( -b scsi command) : sdat ( -b scsi data) | br : !cdb ( initializes sdb for cmd whose word adr and byte lng are given. data xfer params must be set before /scsi.) : !xfer ( sets length in bytes and direction of data transfer.) : /scsi ( executes scsi command returning api status not necessarily scsi status.) {block 106} ( onspec vendor unique ops) : /lok ( f-ok) push [ len ] 0 0 0 0 pop [ dh ] @ fioctl ; : lok [ $90018 ] /lok drop ; : -lok [ $9001c ] /lok drop ; : scsi ( -ok lok) /scsi ( -lok) [ 0 ] + ; | br : /os align create [ $fa20 , $0 , $0 2, ] : wos align create [ $fb20 , $0 , $0 2, ] : wos! align create [ $2fb20 , $0 , $0 2, ] : ros align create [ $1fb20 , $0 , $0 2, ] : !nbits ( h) swab [ cdb 7 + ] 2! ; | br : /sea ( -ok) /os 10 !cdb 0 2 !xfer scsi drop ; : tosea ( wbo) 10 !cdb !nbits 2* 0 !xfer scsi drop ; : insea ( w) ros 10 !cdb [ 18 ] * dup !nbits [ 14 ] + [ 16 ] / 2* 1 !xfer scsi drop ; : mute -lok -sea ; {block 107} : lok ( and) -lok ( perform the lock and unlock volume functions that are apparently required around a scsi command.) : scsi ( executes a scsi passthrough command with proper lock protection.) | br ( onspec custom scsi command blocks-) : /os ( cycles chip power and resets it.) : wos ( writes synch to chip) : wos! ( writes and leaves lines tristate.) : ros ( reads synch from chip.) : !nbits ( sets bit count field in command, limit 32 or 64k) | br : /sea ( resets the chip.) : tosea ( transmits w halfwords, b bits with op) [ wos ( or) wos! ( as you wish.) : insea ( receives w g18 words from the sync boot node. the data in our memory are in onspec format both directions.) : mute ( properly closes the handle.) {block 108} ( onspec bitstream) :var bi [0xb4] macro ] : 4@ ( b-n) $8b 2, ; : 4! ( nb) [compile] a! $289 2, [compile] drop ; : swah ( n-n) $c1 1, $10c8 2, ; forth ] : lsh ( ni-n) 0 + if for 2* next ; ] then drop ; : rsh ( ni-n) 0 + if for 2/ next ; ] then drop ; | br : -stream 0 [ bi ] ! ; : stream ( -wb) [ bi ] @ dup [ 15 ] + [ 16 ] / swap ; : /str ( -bi) [ bi ] @ [ 16 ] /mod 2* [ sdat ] + swap - [ 15 ] + ; | cr : @18 ( -n) /str push 4@ swah pop rsh [ $3ffff ] and : +wd 18 [ bi ] +! ; : !18 ( n) [ $3ffff ] and /str swap push i 4@ swah push push i lsh $fffc0000 pop lsh pop and or swah pop 4! +wd ; {block 109} ( onspec data are a continuous stream of bits in consecutive bytes, left to right, except that bytes are swapped in halfcell units. cell fetched on any halfcell boundary and half-swapped has continuous bits running from hi to lo.) | br : 4@ ( and) 4! ( full cell on byte address.) : lsh ( and) rsh ( left and right arith shifts.) : swah ( swaps hi and lo halfcells of a number.) | br : -stream ( clears bit index) bi ( in sdat buffer.) : stream ( halfcells and bits within index.) : /str ( cell addr, shift count for next 18.) | br : @18 ( returns the next 18 bits from the stream.) : !18 ( appends 18 bits to the stream. no higher order bits may be present!) {block 110} ( node) # 300 ( sync boot frames) : /frame ( nw xfr jmp) -stream [ $10000 ] + !18 !18 [ 1 ] + 2/ ( words) 2* ( actual) # -1 ( +) !18 ; : +frame ( wn) for dup @ !18 [ 1 ] + next drop ; : +ram ( w n node) nn-n 2* [ $8000 ] + block u+ for dup @ [ $15555 ] or !18 [ 1 ] + next drop ; : !frame ( op) push stream pop tosea ; | br : exec [ $b6 ] ; : talk cold mute +sea if lok drop /sea $40 0 [ exec ] /frame $0 $40 # 17 300 +ram [ wos ] !frame ( good) ; ] then ( bad) -sea ; | br : exch ( w n f n) push push dup [ $2 ] + [ -2 ] and [ vport ] @ pop /frame [ vport ] @ [ $12000 ] + !18 dup - [ $1 ] and drop if [ vport ] @ [ $10000 ] + !18 then +frame wos! !frame pop insea -stream ; | br : ok [ $18 ] ; : fet [ $1c ] ; : stat [ $23 ] ; : bstk [ $25 ] ; {block 111} ( boot frames begin with a 3 word header;) | indent ] 100xx ( jump to xx when done) | indent ddd ( mem/port adr to store payload) | indent nnn ( transfer length) | indent [ nnn+1 * $ 2 ( words of payload) : /frame ( heads a new given) [ even ( words of payload, destination addr, final jump addr.) : +frame ( appends words to payload.) : +ram ( appends a string of code from binary produced by) compile ( for the given) [ node. : !frame ( transmits frame given) [ wos ( or) wos! | br : talk ( prepares chip for control thru node 19.) : exch ( performs a transaction with target given addr and length of port stream, stream end action in node 19, and number of words reply.) | br : ok ( stream end to simply ack completion;) fet ( pumps one word from target;) bstk ( shepherds stack dump;) stat ( pumps ten.) exec ( is next boot frame.) {block 112} ( route lists) : 0pa align create [ 300 , 400 , 17 , 27 , 37 , 36 , 35 , 34 , 33 , 32 , 31 , 30 , 20 , 10 , -1 , | br : 1pa align create [ 300 , 301 , 17 , 16 , 15 , 14 , 13 , 12 , 11 , 21 , 22 , 23 , 24 , 25 , 26 , -1 , | br : 2pa align create [ 300 , 200 , 17 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 11 , 10 , 20 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 27 , 26 , 25 , 24 , 23 , 22 , 12 , 13 , 14 , 15 , 16 , 17 , -1 , | br {block 113} : 0pth 1pth 2pth ( are manually set route lists for using the north, south, and west ports of node 19. end list is marked by -1) | br ( this block has plenty of extra room so that you may customize the available lists without changing the reference versions.) {block 114} ( windows async) 114 orgn ! macro ] : 1@ ( b-c) $8a 2, ; | -cr : 1! ( cb) [compile] a! $288 2, [compile] drop ; : 2@ ( b-h) $8b66 3, ; | -cr : 2! ( hb) [compile] a! $28966 3, [compile] drop ; : 4@ ( b-n) $8b 2, ; | -cr : 4! ( nb) [compile] a! $289 2, [compile] drop ; : swab ( h-h) $c486 2, ; : swa4 ( n-n) $c80f 2, ; forth ] : a-b ( a-b) 2* 2* ; | -cr : b-a ( b-a) [ 3 ] + 2/ 2/ ; : create ( -a) pop b-a ; | -cr : rez ( n) h +! ; : ?zero ( n-n) [ 0 ] or if dup or ; ] then ( -) [ -1 ] or ; | br :var act :var vport [0x175] :var 0tg [0x1] :var 1tg [0x1] :var 2tg [0x1] : cold 1 [ 0tg ] ! 1 [ 1tg ] ! 1 [ 2tg ] ! 0 [ act ] ! ; | br ( ser) 116 2 loads ( routes) 120 load | cr ( generic) 122 6 loads ( panel) 134 load | cr ( user) 136 load 142 load 94 load ( canon) 138 load {block 115} ( talk to chip via onspec usb.) | br : 1@ ( and) 1! ( byte fetch and store, byte address.) : 2@ ( and) 2! ( halfcell fetch/store, byte adr.) : swab ( and) swa4 ( 2-way and 4-way byte swaps.) : a-b ( and) b-a ( convert cells to+from bytes.) | br : bofs ( and) ofs ( make byte and cell offset adrs in a structure given byte posn and byte width.) : create ( used after) [ align ( to exit with word adr of cell following in dictionary.) note that writing into such allocations invalidates nearby instruction cache! ] : rez ( allots n bytes in the dictionary.) : +or ( inclusive or.) : ?zero ( classical zero-equal returning 0 or -1 with indicators.) | br : ntgt ( indices for active paths, 1 for adjacent.) : act ( number of selected path, to which) vport ( leads.) : cold ( sets no active paths.) : user ( test code before canonicals.) {block 116} ( async umbilical) :var sport [0x4] 4 sport ! ] : rsh ( ni-n) 0 + if for 2/ next ; ] then drop ; : sdat align create [ 24576 rez :var bi [0x3] : -stream 0 [ bi ] ! ; : stream ( -b) [ sdat a-b ] ; : /str ( -b) [ bi ] @ [ stream ] + ; | br : @18 ( -n) /str 4@ [ $3ffff ] and : +wd 3 [ bi ] +! ; : !18 ( n) [ $3ffff ] or [ $40 ] * [ $12 ] + /str 4! +wd ; | br : snam ( -a) align create ( //./) [ $2f2e2f2f , ( com) $6d6f63 , $0 , ] : !nam [ sport ] @ 10 over - + drop -if 256 * 2560 /mod + $3000 + then $30 + snam a-b 7 + 4! ; !nam ] : +sea ( -ok) snam r/w fopen [ dh ] ! if 1 ; ] then 0 ; : -sea [ dh ] @ [ 0 ] + if fclose 0 then [ dh ] ! ; : ctl! ( n) [ dh ] @ fesc drop ; : reset ( lo) [ 4 ] ctl! [ 500000 ] for next ( hi) [ 3 ] ctl! ; : tosea ( bn) [ dh ] @ fwr drop ; : insea ( w) stream swap [ 3 ] * [ dh ] @ frd drop ; {block 117} ( async data are 18 bits per 3 bytes. to chip word inverted, shifted up 6, '12' inserted, then sent low order byte first. from chip are tbd.) | br : sport ( comp com port number) : snam ( null terminated string //./comx) : !nam ( sets port number in snam.) : +sea ( opens serial; true if good, handle in dh.) : -sea ( closes the handle.) : reset ( resets chip. no inversion in rx line.) : tosea ( transmits) [ n ( bytes from byteadr) b ] : insea ( receives w f18 words from the sync boot node.) | br : -stream ( clears byte index) bi ( in) sdat ( buffer.) : stream ( byte adr of buffer.) : /str ( byte adr of next 18-bit slot in buff.) | br : @18 ( returns the next 18 bits from the stream.) : !18 ( appends 18 bits to the stream. no higher order bits may be present!) {block 118} ( node) # 708 ( boot frames) : wos ( -n) 0 ; : /frame ( nw xfr jmp) -stream [ $10000 ] + !18 !18 [ 1 ] + 2/ ( words) 2* ( actual) # -1 ( +) !18 ; : +frame ( wn) for dup @ !18 [ 1 ] + next drop ; : +ram ( w n node) nn-n 2* [ $8000 ] + block u+ for dup @ [ $15555 ] or !18 [ 1 ] + next drop ; : !frame ( f) drop stream [ bi ] @ tosea ; | br : exec [ $ae ] ; : talk cold -sea +sea if drop reset $40 0 [ exec ] /frame $0 $40 # 33 708 +ram [ wos ] !frame ( good) ; ] then ( bad) -sea ; | cr : exch ( w n f n) push push dup [ $2 ] + [ -2 ] and [ vport ] @ pop /frame [ vport ] @ [ $12000 ] + !18 dup - [ $1 ] and drop if [ vport ] @ [ $10000 ] + !18 then +frame [ wos ] !frame pop insea -stream ; | br : ok [ $12 ] ; : fet [ $15 ] ; : stat [ $1b ] ; : bstk [ $1d ] ; {block 119} ( boot frames begin with a 3 word header;) | indent ] 100xx ( jump to xx when done) | indent ddd ( mem/port adr to store payload) | indent n ( transfer length) | indent [ n ( words of payload, none if) n ( is 0.) : /frame ( heads a new given) [ even ( words of payload, destination addr, final jump addr.) : +frame ( appends words to payload.) : +ram ( appends a string of code from binary produced by) compile ( for the given) [ node. : !frame ( transmits frame given) [ wos ( or) wos! | br : talk ( prepares chip for control thru node 19.) : exch ( performs a transaction with target given addr and length of port stream, stream end action in boot node, and number of words reply.) | cr : ok ( stream end to simply ack completion;) fet ( pumps one word from target;) bstk ( shepherds stack dump;) stat ( pumps ten.) exec ( is next boot frame.) {block 120} ( node) # 708 ( route lists) : 0pa align create [ 708 , 707 , 706 , 705 , 704 , 703 , 702 , 701 , 700 , 600 , 500 , 400 , 300 , 200 , 100 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 117 , 217 , 317 , 417 , 517 , 617 , 717 , 716 , 715 , 714 , 713 , 712 , 711 , 710 , 709 , 708 , -1 , ] : 1pa align create [ 708 , 608 , -1 , ] : 2pa align create [ 708 , 709 , 710 , 711 , 712 , 713 , 714 , 715 , 716 , 717 , 617 , 517 , 417 , 317 , 217 , 117 , 17 , 16 , 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , | cr ( rest) 140 load {block 121} : 0pth 1pth 2pth ( are manually set route lists for using the north, south, and west ports of node 19. end list is marked by -1) | br ( this block has plenty of extra room so that you may customize the available lists without changing the reference versions.) {block 122} ( boot target adjacent) : wall ( nn-i) over over or [ 1 ] and drop if or [ 2 ] and ; ] then # 10 [ 100 ] / swap # 10 [ 100 ] / or [ 2 ] and [ 1 ] + ; | br : do! align create ( @p+a!.@p+) [ $4ab7 , | indent $0 , $0 , ( !;;;) $b555 , ] : do@ align create ( ...@p+) [ $2c9b7 , | indent $0 , ( a!@!p+;) $2be35 , ] : doi align create [ $10000 , ] : dopu align create ( @p+;) [ $5555 , $0 , ] : dostk align create ( !p+dup-push!p+) [ $cdbe , | br : aa@ ( a-n) [ do@ 1 + ] ! do@ [ 3 ] fet [ 1 ] exch @18 ; : aa! ( na) [ do! 1 + ] ! [ do! 2 + ] ! do! [ 4 ] ok [ 1 ] exch ; : acall ( a) [ $10000 ] + : ains ( w) [ doi ] ! doi [ 1 ] ok [ 1 ] exch ; : apsh ( n) [ dopu 1 + ] ! dopu [ 2 ] ok [ 1 ] exch ; : astk dostk [ 1 ] bstk [ 10 ] exch ; {block 123} ( this code supports boot node controlling one of its immediate neighbors directly.) these all begin with focusing call and each must return! | cr : port ( returns port for 0-3 rdlu ndx, then edges) : wall ( is index for port between two nodes) | br : doxxx ( port execution templates for target.) : aa@ ( fetches from memory or port in target onto our stack here.) : aa! ( stores a value from our stack here to port or memory in target.) : ains ( executes an arbitrary instruction word which must end by returning.) : acall ( executes a target word which must return or jump to ports.) : apsh ( pushes a number onto target stack.) : astk ( queries target stack nondestructively.) {block 124} ( stream components) :var 'pth [0x4065d91] : nstream ( an-n'w) swap [ 'pth ] ! [ -2 ] + -if [ 0 ] pop drop ; ] then ( pre) [ 2 ] ; : ?path ( i-n) [ 'pth ] @ + @ ; : side ( n-a) [ 'pth ] @ + dup @ swap [ 1 ] + @ wall port ; : /hdr ( w-w) dup [ -2 ] and [ 0 ] side [ exec ] /frame ( pre) [ 0 ] side [ $12000 ] + !18 [ -1 ] + dup [ 1 ] and drop if [ 0 ] side [ $10000 ] + !18 then [ -1 ] + ; | br : +pump ( nw-nw) [ -8 ] + ( @p+b!@p+@p+) [ $4b17 ] !18 | cr [ $1 ] side dup !18 dup [ $10000 ] + !18 [ $12000 ] + !18 | cr ( !b!b.@p+) [ $9bb7 ] !18 ( w) dup [ -1 ] + !18 | cr ( dup-push-if) [ $24861 ] !18 ( @p+!b.unext) [ $5bb4 ] !18 ; : +load ( w n nb nd) push push ( @p+a!.@p+) [ $4ab7 ] !18 ( a) over !18 ( n) [ -1 ] + !18 ( dup-push-if) [ $24861 ] !18 | cr ( @p+!+.unxt) [ $58b4 ] !18 pop pop +ram ; : +post ( p @p+b!.@p+) [ $4bb7 ] !18 [ 1 ] side !18 [ 0 ] side !18 ( a!@p+push;) [ $2bdbd ] !18 ( p) !18 ; {block 125} ( templates and load streams) : 'pth ( current posn in path list of nodes.) : nstream ( given addr of path tbl, nodes away, gives no of wire nodes and total stream length) : ?path ( returns node number relative to current posn in selected path.) : side ( gives adr of) $ 0 ( near,) $ 1 ( far side next node) : /hdr ( starts a stream of given length; if odd, we leave out jump after waking 1st node.) | br : +pump ( makes port pump thru next node; its ram load and init postamble must be out of w.) : +load ( builds a program load from binary given node ram addr, word count, words to take from binary, and node number. caller must append any words not taken from binary.) : +post ( follows a node's ram load to set b to out, a to in, and jump to) p. {block 126} ( umbilical plumbing) : using ( nn) wall port [ vport ] ! ; : avail ( n-p) nn-n idle ; | br : +path ( n'wn-n'w) dup [ 'pth ] +! negate u+ ; | br : rip ( nw-nw) [ 0 ] u+ if ( post) [ -5 ] + +pump [ 1 ] +path rip [ -1 ] +path then [ 1 ] ?path avail +post ; : rips ( an-n'w) nstream over [ 13 ] * + [ 5 ] + /hdr rip : hose ( nw) drop drop 0 ?path 1 ?path using [ wos ] !frame ; | br : wire ( nw-nw) [ 0 ] u+ if ( wire) [ $16 10 + negate ] + +pump [ 1 ] +path wire [ -1 ] +path ( wire) $0 [ $16 ] dup # 7 17 +load [ 0 ] side +post ; ] then ( last) $0 [ $20 ] dup [ -1 ] + # 6 16 +load [ 1 ] side [ $12000 ] + !18 [ 0 ] side +post ; : wires ( an-n'w) nstream over [ 18 ( lwire) $16 + ] * + [ 10 ( llast) $20 + ] + nop /hdr wire hose ; {block 127} ( this block creates and destroys umbilical wiring within the chip.) | br : using ( sets) vport ( between given pair of nodes.) : avail ( is idle pc val for given node.) | br : +path ( steps) pos ( to,) neg ( away from target.) | br : wires ( builds wire for path table) [ a. ( entry zero is boot node.) n ( is number of nodes away from boot in path;) ] $ 0 ( no uut,) $ 1 ( no wire, uut is meighbor,) $ 2 ( neighbor is last guy,) $ 3 [ n-2 ( wire nodes then last guy. generates call at end of last guy pgm that last guy sends target for focus.) : rips ( rips out a wire built by) wire {block 128} ( routing control) : targets ( -a) [ act ] @ align tbl [ 0tg , 1tg , 2tg , ] : paths ( -a) [ act ] @ align tbl [ 0pa , 1pa , 2pa , | br : path ( i) [ act ] ! paths dup @ swap [ 1 ] + @ wall port [ vport ] ! ; : node ( n) [ 3 ] for i [ -1 ] + path paths targets @ + @ over or drop while next drop ; ] then pop drop drop ; | br : -hook ( i) path targets @ [ 1 ] or drop if paths targets @ rips [ 1 ] targets ! then ; : hook ( i n) swap -hook [ 2 ] begin over over paths + @ or drop while dup paths + @ [ 0 ] + drop -if drop drop ; ] then [ 1 ] + end then dup targets ! paths swap wires drop ; | br : ?adj pop [ 1 ] + dup 4@ swap [ 4 ] + targets @ 1 or drop if push drop ; ] then + push ; {block 129} ( these functions support route setup and selection for internal wiring.) | br : targets ( table of target index variables.) : paths ( table of route lists.) | br : path ( selects active path) [ i ( 0,1,2) : node ( selects path whose target is node) [ n | br : -hook ( rips out any wiring on path) [ i : hook ( hooks up path) [ i ( to node) n ( ripping out any old wiring on that path.) | br : ?adj ( executes following word and exits defn if selected path is to adjacent node, otherwise skips following word.) {block 130} ( target anywhere) : dor! align create [ $12005 , $0 , $0 , ] : dor@ align create [ $12000 , $0 , ] : dori align create [ $1200a , $0 , ] : dorp align create [ $1200d , $0 , ] : dorst align create [ $12010 , ] : stak align create [ 40 rez | br : r@ ( a-n) ?adj aa@ [ dor@ 1 + ] ! dor@ [ 2 ] fet [ 1 ] exch @18 ; : r! ( na) ?adj aa! [ dor! 1 + ] ! [ dor! 2 + ] ! dor! [ 3 ] ok [ 1 ] exch ; : call ( a) [ $10000 ] + : rins ( w) ?adj ains [ dori 1 + ] ! dori [ 2 ] ok [ 1 ] exch ; : lit' ( n) ?adj apsh [ dorp 1 + ] ! dorp [ 2 ] ok [ 1 ] exch ; : aupd astk : @stk @18 ( s) [ stak 1 + ] ! @18 ( t) [ stak ] ! [ stak 2 + ] 8 for @18 over ! [ 1 ] + next drop ; : upd ?adj aupd dorst [ 1 ] stat [ 10 ] exch @stk ; : lit lit' upd ; : boot ( a n nd) nn-n swap push 2* 32768 + block over + swap begin over @ [ $15555 ] or over r! [ 1 ] + [ 1 ] u+ next drop drop ; {block 131} ( these operations work on any target node.) | br : dorx ( port templates for remote target.) | br : r@ r! rins lit call ( are the specific names for the primitives using appropriate sequences for adjacent or remote target nodes.) | br : boot ( loads code into current remote node from binary image for node) [ nd ( from addr) a ( in both image and ram for) n ( words.) {block 132} ( remote instructions) : compile recompile ; : focus paths targets @ + dup @ swap -1 + @ wall port call ; : virgin paths targets @ + @ avail call ; | br : rop ( n) [ $a ] or [ 13 ] for 2* next ( ;s) [ $1555 ] + rins upd ; : @+ [ $9 ] rop ; | -cr : !+ [ $d ] rop ; | -cr : !b [ $e ] rop ; : r+* [ $10 ] rop ; : r2* [ $11 ] rop ; | -cr : r2/ [ $12 ] rop ; : r- [ $13 ] rop ; | -cr : r+ [ $14 ] rop ; : rand [ $15 ] rop ; | -cr : ror [ $16 ] rop ; : rdrop [ $17 ] rop ; | -cr : rdup [ $18 ] rop ; : rover [ $1a ] rop ; : ra! [ $1f ] rop ; | -cr : ra@ [ $1b ] rop ; : rb! [ $1e ] rop ; | br : io $15d ; | -cr : data $141 ; | -cr : up $145 ; : down $115 ; | -cr : left $175 ; | -cr : right $1d5 ; {block 133} ( single instruction words that may be executed by the target. these must end with return for s40 restriction compliance.) | br ( the following won't work on s40 due to bug 1.) : r@p+ [ $c ] rop ; : psh ( n) r@p+ ( value) rins ; {block 134} ( indicator panel) 135 load ( node stack / upd) | .s | br ( path, via, hops, tgt - green selected) | .pth | br ( mem dump / ?ram or ?rom) | .ram {block 135} ( code for panel) : panel [ 134 ] list ; : .s silver cr cr [ stak 6 + ] 4 for dup @ 5 h.n space [ 1 ] + next [ -5 ] + cr 6 for dup @ 5 h.n space [ -1 ] + next drop ; : ?color ( nn-nn) over over or drop if silver ; ] then green ; : .pth [ act ] @ cr 3 for cr i [ -1 ] + path [ act ] @ ?color . paths dup [ 1 ] + @ . targets @ dup . + @ . next path ; | br : /ram align create [ 64 a-b rez ] : rsp ( n dup) 1 and drop if sp/2 then ; : .ram silver cr [ /ram ] 64 for i [ 7 ] and ?zero drop if cr space then i rsp dup @ 5 h.n i 1 and drop if space then [ 1 ] + next drop ; {block 136} ( tester) : ent 0 ; : n6tst 0 64 6 boot ent call 0 r@ dup 123 + dup 0 r! 0 r@ or if abort then drop 0 r! ( upd) ; : rot ( n-n) [ $3ffff ] and 2* [ $40000 ] /mod + ; : sto ( n) dup [ 63 ] for rot dup i r! -next drop | cr [ 63 ] for rot i r@ over over or | indent drop if i abort then drop -next drop ; : pat ( n) [ 18 ] for dup sto rot next drop ; : ramtst 0 sto $3ffff sto 1 pat $3fffe pat ; : one ( n) 2 swap hook pause ( n6tst) ramtst ; : ?ok ( n-t) [ 0pa @ nn-n ] or ; : all ( n) nn-n [ 1 ] + for i [ -1 ] + ?ok drop if i [ -1 ] + n-nn one then next ; : !dac ( n i) 2 swap hook $155 or io r! ; : !dacs ( n) dup 709 !dac dup 713 !dac dup 717 !dac dup 617 !dac 117 !dac ; : nn ( n-n) -1 + dup !dacs ; : ms 100000 * for next ; : watch begin upd pause 1000 ms key? end ; : ?ram 0 | -cr : suck ( a) [ /ram ] 64 for over r@ over ! [ 1 ] + [ 1 ] u+ next drop drop ; | -cr : ?rom [ $80 ] suck ; {block 137} ( this test routine tester loads and runs the code compiled for node 6 on all other nodes except the root, stopping if a node crashes or, possibly, other failure criteria are met) | br : one ( runs the test routine from node 6 compilation, entry point) ent ( , on node) [ n ( . aborts if we cannot write and read back memory.) : all ( tries the test starting with node n and going down to node zero, skipping node 19.) | br : watch ( displays live stack from current node. this and other interactive functions can be enabled in a running program by placing a definition like this in outer loop...) : poll @b $200 and if up b! @b push ;' $15d b! then drop ; | br : !dac ( sets given output value in node i) : !dacs ( sets given value in all dacs.) {block 138} ( canonical words) : @ ( a-n) r@ ; : ! ( na) r! ; ( call lit upd rins boot !b already ok) : +* r+* ; : 2* r2* ; : 2/ r2/ ; : - r- ; : + r+ ; : and rand ; : or ror ; : drop rdrop ; : dup rdup ; : over rover ; : a! ra! ; : a ra@ ; : b! rb! ; {block 139} ( the final step in loading the ide is to redefine the canonical forth words to operate on the target node. this is done as a separate step so that you may define any sort of exerciser before losing access to host colorforth words.) {block 140} ( node) # 708 ( route lists contd) | cr 216 , 215 , 214 , 213 , 212 , 211 , | cr 210 , 209 , 208 , 207 , 206 , 205 , | cr 204 , 203 , 202 , 201 , 200 , | cr 300 , 301 , 302 , 303 , 304 , 305 , | cr 306 , 307 , 308 , 309 , 310 , 311 , | cr 312 , 313 , 314 , 315 , 316 , | cr 416 , 415 , 414 , 413 , 412 , 411 , | cr 410 , 409 , 408 , 407 , 406 , 405 , | cr 404 , 403 , 402 , 401 , 400 , | cr 500 , 501 , 502 , 503 , 504 , 505 , | cr 506 , 507 , 508 , 509 , 510 , 511 , | cr 512 , 513 , 514 , 515 , 516 , | cr 616 , 615 , 614 , 613 , 612 , 611 , | cr 610 , 609 , 608 , 607 , 606 , 605 , | cr 604 , 603 , 602 , 601 , 600 , | cr 700 , 701 , 702 , 703 , 704 , 705 , | cr 706 , 707 , 708 , -1 , {block 141} {block 142} ( all-nodes tester) : fwall ( -n) paths targets @ + dup @ swap [ -1 ] + @ wall ; : fport ( -a) fwall port ; : fbit ( -n) fwall align tbl | cr ( r) [ $8000 , ( d) $2000 , ( l) $800 , ( u) $200 , ] : nodes ( -n) 0 begin [ 1 ] + | cr dup paths + [ 1 ] + @ [ 0 ] + drop -until paths @ | cr over paths + @ or drop if ; ] then [ -1 ] + ; : !one ( i) 2 path 2 swap paths + @ hook | cr 0 64 15 boot fbit 2 r! # 6 14 call ; : !all nodes # 40 for pause i !one next ; : ?one ( i-f) 2 path 2 swap paths + @ hook pause | cr $3e r@ # $1e100 $8d00 or $3f r@ # $17d $430e or +or drop if upd ?ram 0 dup or drop ; ] then 1 dup and drop ; : ?all 0 nodes # 40 for 1 + pause dup ?one while next drop ; ] then pop drop ; : zz for i next ; : z 1 ?one upd ; {block 143} ( manage running a test in all nodes) : fwall ( returns rdlu for feeding node) : fport ( returns port from feeding node.) : fbit ( returns io mask bit for feed node write.) : nodes ( returns number of nodes in current path.) : !one ( programs and starts the node whose index is given in 1..nodes) : !all ( programs all nodes in the current path.) {block 144} ( arrayforth tm and okad tools and designs) | cr ( copyright 2009-2010 greenarrays, inc.) | cr :var first [0xffffffff] -1 first ! | cr :var cur [0x2750ea0] ( config) 148 load | br : .s ; ( defaults for blue words) : .pth ; : .ram ; | br : ray ( i-a) pop 2/ 2/ + ; :var ntbl 0 ntbl ! ] : aray ( n) [compile] align call ray [ 4 ] * [ h ] +! ; : uatbl ( i-a) [ 1000 aray ] : nil 0 [ ntbl ] ! ; | br ( png screen capture) png | cr ( chip design) 900 load {block 145} ( main load block for okad2 applications) : cur ( cursor position) : first ( execution of hardsim. initializes least-squares variables) | br : ray ( defines i-a array usage) align ray : aray ( use after red to make ray of n cells) : uatbl ( lists transistor table addresses of the devices so far found to be conducting current.) : ntbl ( is number of active uatbl entries.) : nil ( clears the table.) {block 146} {block 147} {block 148} ( configuration blocks) :var orgn 0 orgn ! ] : exit 7pop 7pop ; : tbl ( i-n) pop 2/ 2/ + @ ; : assign ( a) pop swap ! ; : xqt ( a) @ push ; : cfuse 648 ; ( active) cfuse load ] : cfchip 650 ; : cfpins 654 ; : cfstart 656 ; : cfpads 658 ; : cfprobe 660 ; : cfsim 662 ; : cfstep 664 ; : cfscale 666 ; : cftape 756 ; ( tapeout default) : readme [ cfuse block ] nop [ cfuse 18 / ] 2 @cyls ; : tapeout [ cftape block ] nop [ cfuse block ] nop [ 36 256 * ] move ; : recompile 940 load [ orgn ] @ load lis ; {block 149} ( names for blocks that are customized to configure tools while designing and testing.) : cfuse ( two cylinders on cylinder boundary - 18 blocks plus shadows - actively loaded and used) : cftape ( default image of config area under change control in base) | br : exit ( terminates interpretation of a block.) : tbl ( self fetching cell array. usage') : squared ( i-n) align tbl [ 0 , 1 , 4 , 9 , 16 , ] : assign ( places addr of following code in the location given and exits current definition.) : xqt ( calls the code whose adr is in the var given.) {block 150} ( redact okad disk) audit | br ( to arm this block, make) | cr ( this word white...) exit | br ( okad) 146 148 obliterate 190 cfuse obliterate cfpins 890 obliterate | cr ( chip) 902 940 obliterate 944 1248 obliterate | br ( type save to commit changes) {block 151} ( load this block to redact an okad disk for public release or extensive programming.) {block 152} {block 153} {block 154} ( c-a-c - ascii for gds only!) macro ] : 1@ $8a 2, ; forth ] : string pop ; : cf-ii string [ $6f747200 , $696e6165 , $79636d73 , $7766676c , $62707664 , $71757868 , ( 336a7a6b) $33323130 , $37363534 , ( 2d313938 - 2d7a3938) $5f7a3938 , ( 2f322e30) $2f6a2e6b , ( 2b213a3b) $24213a3b , $3f2c2a40 , ] : ch $fffffff0 and unpack [ cf-ii ] + 1@ $ff and ; : ii-cf string [ $2a00 , ( 0 +) $2b , $2b2d0000 , $2725232e , ( zjk 1b262224) $1b1a1918 , $1f1e1d1c , $28292120 , $2f000000 , $3a43355c , $3d3e3440 , ( 02 484a3744 kj) $54523744 , $3336393c , $38314742 , $3f414632 , ( 1 493b45 z) $563b45 , ( -) $23000000 , $a13052c , $d0e0410 , ( 02 181a0714 kj) $24220714 , $306090c , $8011712 , $f111602 , ( 1 190b15 z) $260b15 , ] : chc $ffffffe0 + [ ii-cf ] + 1@ $ff and ; {block 155} ( colorforth to/from ascii w/gds specifics) | br : cf-ii ( otr inae ycms wfgl bpvd quxh) | indent ( 3210 7654 -j98 /z.k +!'; ?,*@) : ii-cf ( ! +* /.-, 3zjk 7654 ;'98 ?) | indent ( cba@ gfed 02ih onml srqp wvut) | indent ( 1yx cba@ gfed 02ih onml srqp wvut 1yx) : notice [ j and z transposed in cf-ii; - converts to underscore, + to dollar. {block 156} ( big letters) macro ] : *byte $c80f 2, ; forth ] : clr [ aper 2 + ] ; :var sz [0xe] :var cur [0x5de400] 14 sz ! ] : ptab ( xy) 1024 * + [ aper @ 4 / ] + [ cur ] ! ; : center ( n) [ sz ] @ -24 * 768 + 2/ ptab ; : table 12 * [ 12 block ] + ; : 1line ( a) [ sz ] @ for [ clr ] @ over ! 1 + next drop ; : pix ( a) [ sz ] @ for dup 1line 1024 + next drop ; : row ( an-an) 16 for dup and -if over pix then [ sz ] @ u+ 2* next 1024 [ sz ] @ * [ sz ] @ -16 * + u+ ; : !emit table [ cur ] @ 12 for over @ *byte row row drop 1 u+ next drop drop [ sz ] @ 18 * [ cur ] +! ; : !digit 24 + !emit ; : 2. ( nn) /mod !digit !digit ; : 4. ( n) 100 /mod 10 2. 10 2. ; {block 157} {block 158} ( big clock) empty 40 load 156 load ] : hm sec 60 / : sex ( n) 60 /mod 100 mod 10 2. 10 2. ; :var t0 [0x7eca] : ?beep if ; ] then beep ; : till [ t0 ] @ sec negate + green -if negate red then ?beep sex ; : set ( n) 60 * sec + [ t0 ] ! : ok show black screen blue 0 center hm ( till) ; : run dup pause drop key? run ; ok run {block 159} {block 160} ( compare) empty 30 load ] : n18 ( i-a) [ 3018 block ] + ; : unpk abs [ 1 n18 ] ! [ 3036 ] block [ 5000 ] block [ 1404 ] blks move [ 5000 block ] 3036 [ 3 n18 ] @ [ -36 ] + range ; : check [ 3000 ] @back [ 0 n18 ] @ [ 18 block @ ] or drop if ; ] then [ 1 n18 ] @ dup and -if unpk ; ] then drop ; : blink dup 3000 + [ blk ] ! edit ; : var push push 1 + 1 u+ pop pop : *1 or ; : *2 var push over @ over @ or pop + ; : tag ( nn-n) dup $f and jump *1 *1 *2 *1 *1 *2 *1 *1 *1 *1 *1 *1 var *1 *1 *1 : co ( naa-n) 256 for over @ over @ tag drop if drop drop pop drop pop drop dup 2 u+ ( i) pop swap blink ; ] then 1 + 1 u+ next drop drop ; : com ( n) dup block over 3000 + block co ; : q ( nn) for com 2 + next drop ; : all 18 [ 1439 -18 + 2/ ] q ; : old [ blk ] @ 3000 mod dup 3000 + [ blk ] ! copy ; {block 161} : check ( reads backup to) # 3000 ( and decompresses if appropriate) : blink ( displays the given block with its other set as the editor's 'other' block) : var ( compares a variable name, advancing pointers to skip its value.) : *1 ( compares garden variety words.) : *2 ( compares large literals.) : tag ( compare compares the two source cells given, returning true if they differ. ignores variable differences.) : ?nul ( ends the loop in co when nuls are found in both blocks.) : co ( given the addresses of the two blocks does the work of com.) : com ( invokes editor to blink the given block if it differs from the other, leaving stack set to continue the scan by typing q. otherwise returns.) : all ( scans the whole usable area of the disk.) : q ( scans for differences given starting block and number of source blocks skipping shadows.) : note! ( return stk probably grows!) {block 162} {block 163} {block 164} ( timing) empty macro ] : out $e1e6 2, ; forth ] : tare time - 1000 for next time + ; : tare+ time - push 1000 for dup next c pop time + ; : test tare time + - 1000 for out next time + ; ( next 3 loop 5.7 /next 2 /swap 25 swap 7.2) macro ] : c! $c88b 2, [compile] drop here ; : loop $49 1, $75 1, ( e2) here - + 1, ; forth ] : try time - 1000 c! loop time + ; {block 165} {block 166} {block 167} {block 168} ( png empty) :var w [0x400] :var hh [0x300] :var d [0x1] : frame # $1d0000 [ aper @ 4 / ] ; 172 load 174 load ] : -crc ( a) here over negate + crc .. ; : here/4 ( -a) here 3 and drop if 0 1, here/4 ; ] then here 2 2/s ; : bys ( nn-b) .. here swap , ; | cr ( pallettes) 170 load | br : !png ( awh-an) [ d ] @ / [ hh ] ! [ d ] @ / [ w ] ! here/4 swap $474e5089 , $a1a0a0d , ( ihdr) $52444849 13 bys [ w ] @ .. [ hh ] @ .. $304 , $0 1, -crc ( plte) pallette ( idat) $54414449 0 bys swap deflate -crc ( iend) $444e4549 0 bys -crc here/4 over negate + ; | br : 'at ( xy-a) 1024 * + [ frame ] + ; : full 1 [ d ] ! 0 dup 'at 1024 768 !png ; : png full wgds ; {block 169} : d ( is reduction factor) {block 170} ( pallettes) : paper $45544c50 48 bys | cr $ffffff 3, $c00000 3, $c000 3, $c0c000 3, | cr $c0 3, $c000c0 3, $c0c0 3, $404040 3, | cr $c0c0c0 3, $ff0000 3, $ff00 3, $ffff00 3, | cr $ff 3, $ff00ff 3, $ffff 3, $0 3, -crc ; | br : crt $45544c50 48 bys | cr $0 3, $c00000 3, $c000 3, $c0c000 3, | cr $c0 3, $c000c0 3, $c0c0 3, $404040 3, | cr $c0c0c0 3, $ff0000 3, $ff00 3, $ffff00 3, | cr $ff 3, $ff00ff 3, $ffff 3, $ffffff 3, -crc ; | br : pallette ( paper) crt ; {block 171} {block 172} ( crc) :var ad1 [0x5bee] :var ad2 [0xfbee] macro | br : 2/s ?lit $e8c1 2, 1, ; | -cr : 1@ $8a 2, ; forth ] : bit ( n-n) 1 ? if 1 2/s $edb88320 or ; | indent ] then 1 2/s ; : ,crc ( nn) for dup 8 for bit next , | indent 1 + next drop ; : table ( -a) align array [ 0 256 ,crc ] : crc ( bn-n) -1 swap for over 1@ over or $ff and table swap 8 2/s or 1 u+ next - nip ; | br : +adl ( n) $ff and [ ad1 ] @ + dup [ ad2 ] @ + : adl! [ ad2 ] ! [ ad1 ] ! ; : +mod [ ad1 ] @ 65521 mod [ ad2 ] @ 65521 mod adl! ; {block 173} : 2/s ( shift right by literal) : 1@ ( fetch byte, address in eax) : array ( return word address in dictionary) : bit ( process 1 bit with standard 32-bit crc) : fill ( construct crc table for bytes) : table ( said table) : crc ( compute crc for a byte string) : ad1/ad2 ( adler checksums) : +adl ( add a byte to both checksums) : adl! ( store checksums) : +mod ( truncate checksums) {block 174} ( lz77) macro | -cr : *byte $c486 2, ; : !bx [compile] a! $289 2, [compile] drop ; forth | br : *bys dup 16 2/s *byte swap $ffff and *byte $10000 * + ; | -cr : .. *bys , ; : 0/1 $80 ? if $7e and $7e or drop if 7 ; ] then $f ; ] then 0 and ; : 4b dup 0/1 $9 and over 8 2/s 0/1 $a and +or swap 16 2/s 0/1 $c and +or ; : pix dup @ [ d ] @ u+ 4b ; : row 1, dup [ w ] @ 2/ dup 1 + dup 2, - 2, 0 dup 1, +adl for pix 16 * push pix pop or dup 1, +adl next drop +mod [ d ] @ 1024 * + ; | br : deflate $178 2, 1 0 adl! [ hh ] @ -1 + for 0 row next 1 row drop [ ad2 ] @ *byte 2, [ ad1 ] @ *byte 2, here over 4 + negate + *bys over -4 + !bx ; {block 175} : 0/1 ( 0, f or 7 for dark, bright or dim) {block 176} ( cf-html) empty 74 load | cr :var pad [0x1030e000] 3000 block 4 * pad ! | cr :var hld [0x1030e000] pad @ hld ! 178 6 loads ] : estyle ,link ,t1cr ( cfhtml.css '?) ; : .hdr [ pad ] @ [ hld ] ! ,t1cr ( @html? @head?) istyle | cr ( estyle) ,t1cr ( @/head? @body? @table?) ; : .blk ( n) 0 [ pos ] ! crlf ,t1 ( @td*class+cf?) | cr dup even? if dup .dec ,t1cr ( *list) then | cr .cr block ,t1 ( @code) 0 [ class ] ! 0 [ --cr ] ! | cr begin @+ dup and while .token end then | cr [ class ] @ eq? if ,t1 ( ?) then drop drop | cr begin -eol? while .nb end then .cr | cr ,t1 ( @/code?) .cr ,t1cr ( @/td?) ; : .sep ,t1 ( @td?) .nb .nb ,t1 ( @/td?) ; : .blks ( first last+2) over negate + 2/ for | cr ,t1 ( @tr?) dup 1 or .blk .sep dup .blk | cr ,t1cr ( @/tr?) [ 2 ] + next drop ; : .tlr ,t1cr ( @/table? @/body? @/html?) sav ; : run ( first last+2) .hdr .blks .tlr ; | br named ( cf.html) exit 18 1440 run {block 177} ( colorforth to html utility) | br ( the html is created between) pad ( and) hld | cr ( by) ] .html ( and its factors) .hdr .blks ( and) .tlr ( , then written to the file last) [ named ( .) | br ( uncomment) ] estyle ( in) .hdr ( to use an external) | cr ( stylesheet, maybe for printing.) | br ( pairs of blocks are formatted 2-up using html tables, with the odd/even blocks used to invoke) [ .html ( or) .blks ( displayed on the right. 'n list' is shown above the even block.) | br 176 188 .html ( puts shadows on left, while) | cr 177 189 .html ( puts them on the right.) | br seeb ( toggles blue-word visibility.) | br ( the last line of each block is filled) | cr ( with) ] nbsp ( for column alignment. the) [ class ] @ | cr ( line closes the) [compile] code ( tag of an empty block.) {block 178} ( generate html details) | cr : eq? ( nn-n) over or if drop -1 then - ( nz? ;) : nz? ( n) dup and drop ; : even? ( n) $1 or $1 and drop ; | br : @+ ( a-an) dup 1 + swap @ ; : @tag ( a-at) dup @ $f and ; | br : sc $3b ( semicolon) : ch, ( c) [ hld ] @ 1! 1 [ hld ] +! ; : lb $7b ( left-brace) ch, ; : rb sc $7d ( right-brace) ch, : crlf 13 ch, 10 ch, ; | br : ,token ( n) ch if ch, ,token ; ] then drop drop ; : ,word ( a-a) begin @+ ,token @tag drop until ; | cr ( loop) ] begin ,word : ,comments ( a) @tag 9 or drop until drop ; macro | cr : ,t ( words) 7push pop [compile] ,lit call ,comments nop ; : ,trb ( words) [compile] ,t call rb nop ; : ,t1 ( words) call set1 [compile] ,t call set0 nop ; : ,t1cr ( words) [compile] ,t1 call crlf nop [ forth {block 179} : eq? | -cr : nz? | -cr : diff? | -cr : even? ( leave only flags) | cr : @+ | -cr : @tag ( are common factors) | br ( the following words generate ascii text only for html tags and source formatting; it will not be visible in the html display.) | br : sc | -cr : ch, | -cr : lb | -cr : rb | -cr : crlf ( punctuation output) | br ( the macros enable in-line output from the) | cr ( standard cf-ascii table using) [ set0 ( default or the extended table using) set1 | br : ,token ( output ascii characters for one token) : ,word ( output a token and any extension tokens) : ,comments ( output contiguous comment words) | br : ,t ( output from current set, don't change set.) : ,trb ,t ( output followed by) rb : ,t1 ( output from) set1 ( , return to) set0 ( at end) : ,t1cr ,t1 ( output followed by) crlf {block 180} ( translate text and numbers) :var pos : -bol? [ pos ] @ nz? ; : -eol? [ pos ] @ 46 or drop ; : .cr ,t1 ( @br?) 0 [ pos ] ! ; | cr ( loop) ] begin .cr | -cr : emit ( c) ch, 1 [ pos ] +! ; : .ch ( c) -eol? until emit ; : .sp -eol? if -bol? if $20 emit ; ] then then ; : .2sp .sp ( .nb ;) : .nb $26 ( ampersand) .ch ,t ( nbsp) sc ; | br : .sp.tn ( n) .sp ( .tn ;) : .tn ( n) ch if .ch .tn ; ] then drop drop ; | br : .hd ( n) [ -10 ] + -if [ $3a ] + .ch ; ] then [ $41 ] + .ch ; : .dec ( n) .sp [ 0 ] + -if $2d .ch negate then [ -1 ] swap begin [ 10 ] /mod dup and while end then drop : spit ( -1 ...) begin .hd [ 0 ] + -until drop ; | br : hd ( n-nn) dup [ $f ] and swap 2/ 2/ 2/ 2/ ; : .hex ( n) .sp [ -1 ] swap begin hd $fffffff and while end then drop spit ; : .3hex ( n) hd hd hd drop .sp .hd .hd .hd ; {block 181} :var pos ( character display) pos ( ition in line) : -bol? | -cr : -eol? ( test position) : .cr ( visible crlf) : emit ( visible character) : .ch | -cr : .sp | -cr : .2sp | -cr : .nb ( quirky characteristics) | cr [compile] note [ .sp ( does nothing at left margin) | cr [compile] note .ch ( does) .cr ( after 46th character) | cr [compile] note .2sp ( takes only one space at left margin) | cr [compile] note .nb ( takes only one character position.) | br : .tn | -cr : .sp.tn ( display a token.) | br : .hd | -cr : hd | -cr : spit ( are number-output factors) : .dec | -cr : .hex | -cr : .3hex ( display numbers) {block 182} ( translate cf token details) | cr :var class [0x2d800009] :var --cr : ,class ( a) @ [ class ] @ over or drop ( diff?) if | cr [ class ] @ nz? if ,t1 ( @/code? @code) then | cr ,t1 ( *class+) dup [ class ] ! ,token ,t1 ( ?) ; | cr ] then drop ; macro ] : ,c 7push pop [compile] ,lit call ,class nop ; forth | br : .quirks ( n) [ --cr ] @ nz? if .2sp drop 0 [ --cr ] ! ; | cr ] then ( class) nz? if -bol? if .cr then then ; : .space -eol? if .nb then ; : .indent .cr 4 for .nb next ; | br : .blue ( n) $9080000e ( cr) eq? if .cr drop ; | cr ] then $e721000e ( -cr) eq? if 1 [ --cr ] ! drop ; | cr ] then $8625920e ( space) eq? if .space drop ; | cr ] then $76c08c4e ( indent) eq? if .indent drop ; | cr ] then $c620000e ( br) eq? if .cr .cr then drop ; {block 183} :var class ( current class) | cr :var --cr ( true suppresses) cr ( before next red word) | cr : ,class | -cr : ,c ( class defining words, cf style) | br : .quirks ( handle the spacing before red words) | br : .space ( blue spaces are ignored at eol!) : .indent # 4 ( + html leading space) | br : .blue ( generate most of the blue-word effects) {block 184} ( translate cf tokens) : sh? ( n-n) 2/ 2/ 2/ 2/ dup 2/ swap 1 and drop ; : lh? ( an-an) push @+ pop $10 and drop ; | br : .t1 ( n) ,c ( t1) .sp.tn ; : .t2 ( an-a) lh? if ,c ( h2) .hex ; ] then ,c ( d2) .dec ; : .t3 ( n) [ class ] @ ,c ( t3) .quirks ( .sp.tn) .tn ; : .t4 ( n) ,c ( t4) .sp.tn ; : .t5 ( an-a) lh? if ,c ( h5) .hex ; ] then ,c ( d5) .dec ; : .t6 ( n) sh? if ,c ( h6) .hex ; ] then ,c ( d6) .dec ; : .t7 ( n) ,c ( t7) .sp.tn ; : .t8 ( n) sh? if ,c ( h8) .hex ; ] then ,c ( d8) .dec ; : .t9 ( n) ,c ( t9) .sp.tn ; : .ta ( n) ,c ( ta) .sp.tn ; : .tb ( n) ,c ( tb) .sp.tn ; : .tc ( an-a) ,c ( tc) .sp.tn ,c ( dc) @+ .dec ; : .td ( n) sh? ,c ( hd) .3hex ; : .te ( n) ,c ( te) ?seeb if dup .sp.tn then .blue ; : .tf ( n) sh? if ,c ( hf) .hex ; ] then ,c ( df) .dec ; | br : .token ( an-a) dup $f and jump | cr .tn .t1 .t2 .t3 .t4 .t5 .t6 .t7 | cr .t8 .t9 .ta .tb .tc .td .te .tf {block 185} : sh? ( extract short number, true flag if hex) : lh? ( extract long number, true flag if hex) | br ( tag ------- cf class ------- html class) | cr [compile] .t0 ( extension token ........) [compile] same [compile] as [compile] last : .t1 ( execute word ...........) [ t1 : .t2 ( execute long number ....) [ h2, d2 ] : .t3 ( define word ...........) | -cr : t3 : .t4 ( compile word ...........) t4 : .t5 ( compile long number ....) h5, d5 : .t6 ( compile short number ...) h6, d6 : .t7 ( compile macro ..........) [compile] t7 : .t8 ( execute short number ...) [ h8, d8 ] : .t9 ( lowercase text comment . t9) : .ta ( capitalized text comment ta) [compile] deprecated : .tb ( uppercase text comment . tb) [compile] deprecated : .tc ( variable ...............) :var tc dc : .td ( target address ......... hd) : .te ( editor command .........) [compile] te : .tf ( short number comment ... hf, df) | br : .token ( translate tag-by-tag) | indent [compile] note ( address may be incremented) {block 186} ( stylesheet details and file output) : vat ,t ( *vertical-align; top) sc ; : bcw crlf ,t ( *background-color; white) sc ; : wsn crlf ,t ( *white-space; nowrap) sc ; : fo ,t ( *font-) ; : ffm crlf fo | indent ,t ( family; lucida*console,monospace) sc ; : fwb crlf fo ,t ( weight; bold) sc ; : fz fo ,t ( size;) ; : fc lb ,t ( *color;) $23 ( sharp) ch, ; : fsi sc fo ,t ( style; italic) rb ; : tt sc ,t ( *text-transform;) ; | br : ,link ,t1 ( @link *rel+stylesheet) | indent ,t1 ( *type+'text/css' *href+') ; | br : fopen ( af-h) push push 0 32 ( exist) 2 0 0 | indent pop pop swap fcreate ; : sav [ 0 fnam ] w/o fopen dup push | indent [ pad ] @ dup negate [ hld ] @ + pop | indent fwr drop fclose ; {block 187} : vat | -cr : bcw | -cr : wsn | -cr : fo | -cr : ffm | -cr : fwb | -cr : fz | -cr : fc | -cr : fsi | -cr : tt | cr ( space-saving factors of internal stylesheet) | br : ,link ( most of the external stylesheet link) | br : fopen | -cr : sav ( open, write, close html file) | cr [compile] note ( byte addresses throughout) {block 188} ( internal stylesheet) : istyle ,t1cr ( @style*type+'text/css'?) set1 | cr ,t ( td) lb vat bcw wsn ffm fwb fz ,trb ( x-large) ,t ( code) lb fz ,t ( large) tt ,trb ( lowercase) | cr ,t ( .t1) fc ,trb ( ddaa00) | cr ,t ( .h2) fc ,t ( aa7700) fsi | cr ,t ( .d2) fc ,trb ( ddaa00) | cr ,t ( .t3) fc ,trb ( ff0000) | cr ,t ( .t4) fc ,trb ( 00cc00) | cr ,t ( .h5) fc ,t ( 009900) fsi | cr ,t ( .d5) fc ,trb ( 00cc00) | cr ,t ( .h6) fc ,t ( 009900) fsi | cr ,t ( .d6) fc ,trb ( 00cc00) | cr ,t ( .t7) fc ,trb ( 00cccc) | cr ,t ( .h8) fc ,t ( aa7700) fsi | cr ,t ( .d8) fc ,trb ( ddaa00) | cr ,t ( .t9) fc ,trb ( 444444) | cr ,t ( .ta) fc ,t ( 000000) tt ,trb ( capitalize) | cr ,t ( .tb) fc ,t ( 000000) tt ,trb ( uppercase) | cr ,t ( .tc) fc ,trb ( ff00ff) | cr ,t ( .dc) fc ,trb ( 00ff00) | cr ,t ( .hd) fc ,t ( bbbbbb) fsi | cr ,t ( .te) fc ,trb ( 0000ff) | cr ,t ( .hf) fc ,t ( 777777) fsi | cr ,t ( .df) fc ,trb ( 444444) ,t1cr ( @/style?) ; {block 189} : istyle ( internal styles are aimed toward) | cr ( providing code examples for stand-alone use in other documents. although it's black-on-white, it faithfully displays the colorforth screen.) | br ( some cf-html rendering tests) | br [ load 2147483647 $80000000 ] : t1 ; ] 2147483646 $80000001 87 $57 [compile] ?lit [ 87 $57 ( rtoeani rtos ascii) :var var [0x7b] | cr | -cr : quirky = $5 | indent # 87 # $57 [ -87 ( end) $0 ] $0 # $0 {block 190} {block 191} {block 192} {block 193} {block 194} {block 195} {block 196} {block 197} {block 198} {block 199} {block 200} {block 201} {block 202} {block 203} {block 204} {block 205} {block 206} {block 207} {block 208} {block 209} {block 210} {block 211} {block 212} {block 213} {block 214} {block 215} {block 216} {block 217} {block 218} {block 219} {block 220} {block 221} {block 222} {block 223} {block 224} {block 225} {block 226} {block 227} {block 228} {block 229} {block 230} {block 231} {block 232} {block 233} {block 234} {block 235} {block 236} {block 237} {block 238} {block 239} {block 240} {block 241} {block 242} {block 243} {block 244} {block 245} {block 246} {block 247} {block 248} {block 249} {block 250} {block 251} {block 252} {block 253} {block 254} {block 255} {block 256} {block 257} {block 258} {block 259} {block 260} {block 261} {block 262} {block 263} {block 264} {block 265} {block 266} {block 267} {block 268} {block 269} {block 270} {block 271} {block 272} {block 273} {block 274} {block 275} {block 276} {block 277} {block 278} {block 279} {block 280} {block 281} {block 282} {block 283} {block 284} {block 285} {block 286} {block 287} {block 288} {block 289} {block 290} {block 291} {block 292} {block 293} {block 294} {block 295} {block 296} {block 297} {block 298} {block 299} {block 300} {block 301} {block 302} {block 303} {block 304} {block 305} {block 306} {block 307} {block 308} {block 309} {block 310} {block 311} {block 312} {block 313} {block 314} {block 315} {block 316} {block 317} {block 318} {block 319} {block 320} {block 321} {block 322} {block 323} {block 324} {block 325} {block 326} {block 327} {block 328} {block 329} {block 330} {block 331} {block 332} {block 333} {block 334} {block 335} {block 336} {block 337} {block 338} {block 339} {block 340} {block 341} {block 342} {block 343} {block 344} {block 345} {block 346} {block 347} {block 348} {block 349} {block 350} {block 351} {block 352} {block 353} {block 354} {block 355} {block 356} {block 357} {block 358} {block 359} {block 360} {block 361} {block 362} {block 363} {block 364} {block 365} {block 366} {block 367} {block 368} {block 369} {block 370} {block 371} {block 372} {block 373} {block 374} {block 375} {block 376} {block 377} {block 378} {block 379} {block 380} {block 381} {block 382} {block 383} {block 384} {block 385} {block 386} {block 387} {block 388} {block 389} {block 390} {block 391} {block 392} {block 393} {block 394} {block 395} {block 396} {block 397} {block 398} {block 399} {block 400} {block 401} {block 402} {block 403} {block 404} {block 405} {block 406} {block 407} {block 408} {block 409} {block 410} {block 411} {block 412} {block 413} {block 414} {block 415} {block 416} {block 417} {block 418} {block 419} {block 420} {block 421} {block 422} {block 423} {block 424} {block 425} {block 426} {block 427} {block 428} {block 429} {block 430} {block 431} {block 432} {block 433} {block 434} {block 435} {block 436} {block 437} {block 438} {block 439} {block 440} {block 441} {block 442} {block 443} {block 444} {block 445} {block 446} {block 447} {block 448} {block 449} {block 450} {block 451} {block 452} {block 453} {block 454} {block 455} {block 456} {block 457} {block 458} {block 459} {block 460} {block 461} {block 462} {block 463} {block 464} {block 465} {block 466} {block 467} {block 468} {block 469} {block 470} {block 471} {block 472} {block 473} {block 474} {block 475} {block 476} {block 477} {block 478} {block 479} {block 480} {block 481} {block 482} {block 483} {block 484} {block 485} {block 486} {block 487} {block 488} {block 489} {block 490} {block 491} {block 492} {block 493} {block 494} {block 495} {block 496} {block 497} {block 498} {block 499} {block 500} {block 501} {block 502} {block 503} {block 504} {block 505} {block 506} {block 507} {block 508} {block 509} {block 510} {block 511} {block 512} {block 513} {block 514} {block 515} {block 516} {block 517} {block 518} {block 519} {block 520} {block 521} {block 522} {block 523} {block 524} {block 525} {block 526} {block 527} {block 528} {block 529} {block 530} {block 531} {block 532} {block 533} {block 534} {block 535} {block 536} {block 537} {block 538} {block 539} {block 540} {block 541} {block 542} {block 543} {block 544} {block 545} {block 546} {block 547} {block 548} {block 549} {block 550} {block 551} {block 552} {block 553} {block 554} {block 555} {block 556} {block 557} {block 558} {block 559} {block 560} {block 561} {block 562} {block 563} {block 564} {block 565} {block 566} {block 567} {block 568} {block 569} {block 570} {block 571} {block 572} {block 573} {block 574} {block 575} {block 576} {block 577} {block 578} {block 579} {block 580} {block 581} {block 582} {block 583} {block 584} {block 585} {block 586} {block 587} {block 588} {block 589} {block 590} {block 591} {block 592} {block 593} {block 594} {block 595} {block 596} {block 597} {block 598} {block 599} {block 600} ( dc characterization code added march 2011.) | br block 602 ( is code run in a node to measure power.) | br blocks 604 ( thru) 636 ( are ide load blocks to set up various measurement conditions.) {block 601} {block 602} ( custom test code) 609 node $0 org ] : t1 = $0 begin begin begin begin | cr unext unext unext unext t1 ; : t2 = $2 begin begin begin | cr . unext unext unext t2 ; : t3 = $4 begin begin . . unext unext t3 ; : t4 = $6 begin . . . unext t4 ; : t5 = $8 begin begin begin begin | cr next next next next t5 ; : t6 = $d begin begin begin begin | cr . . . . next next next next t6 ; : s++ = $13 $15555 dup | -cr : s.. dup dup dup dup dup dup dup dup ; | -cr : s+- $15555 $2aaaa s.. ; : t7 = $1c s++ | -cr : t78e begin begin begin drop unext unext unext t78e ; | -cr : t8 = $1f s+- t78e ; : t9 = $21 io b! -1 !b begin . drop @b -until ; : txx = $28 ( s++) s+- : txxx begin drop drop drop unext txxx ; = $2b {block 603} ( this load block, and the following) # 25 ( source/shadow pairs, are yours to do with as you please!) {block 604} ( set all high z for leakage test) talk | br 0 200 hook 0 io ! | cr 0 300 hook 0 io ! | cr 0 9 hook 0 io ! | cr 0 7 hook 0 io ! | cr ( serdes already in input just focus it) | cr 0 701 hook focus | cr 2 709 hook $155 io ! {block 605} {block 606} ( set all weak pd for wpd test) talk | br 0 200 hook $15555 io ! | cr 0 300 hook $15555 io ! | cr # 0 # 9 ( hook) # 0 ( io !) | cr # 0 # 7 ( hook) # 0 ( io !) | cr ( serdes already in input just focus it) | cr # 0 # 701 ( hook focus) | cr # 2 # 709 ( hook) # $155 ( io !) {block 607} {block 608} ( set all high for several tests) talk | br 0 200 hook $30003 io ! | cr 0 300 hook $30003 io ! | cr 0 9 hook $3ffff data ! | cr 0 7 hook $3ffff data ! | cr ( serdes already in input just focus it) | cr # 0 # 701 ( hook focus) | cr 2 709 hook $aa io ! {block 609} {block 610} ( set all low for several tests) talk | br 0 200 hook $20002 io ! | cr 0 300 hook $20002 io ! | cr 0 9 hook $0 data ! | cr 0 7 hook $0 data ! | cr ( serdes already in input just focus it) | cr # 0 # 701 ( hook focus) | cr 2 709 hook $155 io ! {block 611} {block 612} ( t04 all node access) talk | br ?rom pause upd pause | cr 2 708 hook pause 2 707 hook pause | cr ?ram pause upd pause | cr 1 lit pause 2 lit pause 3 lit pause | cr + pause + {block 613} {block 614} ( vt+- node) # 217 compile talk 2 217 hook upd | cr : dak ( n a) $5bb2 over r! swap $155 or swap r! ; : try ( n) up dak ; : h $20000 io r! $0 try 100 ms 0 io r! | cr 0 begin dup $200 or $200 and drop while | cr dup try 1 + io r@ $20000 and drop until then ; : l $30000 io r! 511 try 100 ms 0 io r! | cr 255 begin dup $100 or $100 and drop while | cr dup try -1 + io r@ - $20000 and drop until then ; {block 615} {block 616} ( vt+- node) # 517 compile talk 0 517 hook upd | cr : dak ( n a) $5bb2 over r! swap $155 or swap r! ; : try ( n) up dak ; : h $20000 io r! $0 try 100 ms 0 io r! | cr 0 begin dup $200 or $200 and drop while | cr dup try 1 + io r@ $20000 and drop until then ; : l $30000 io r! 511 try 100 ms 0 io r! | cr 255 begin dup $100 or $100 and drop while | cr dup try -1 + io r@ - $20000 and drop until then ; {block 617} {block 618} ( vt n7/8) compile talk | cr 2 7 hook $0 io ! data lit ra! focus | cr 2 8 hook $20000 io ! focus upd | cr : rd ( a-n @!p) $39b2 over r! r@ ; : git ( -n) left rd ; : go key? git 1 and drop if $30000 io r! go ; | cr ] then $20000 io r! go ; go {block 619} {block 620} ( vt n9/8) compile talk | cr 0 9 hook $0 io ! data lit ra! focus | cr 0 8 hook $20000 io ! focus upd | cr : rd ( a-n @!p) $39b2 over r! r@ ; : git ( -n) right rd ; : go key? git $20000 and drop if $30000 io r! go ; | cr ] then $20000 io r! go ; go {block 621} {block 622} ( t10 schmitt power) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! upd | cr 0 300 hook $15555 io ! upd | cr 0 9 hook ( input) 0 io ! upd | cr 0 7 hook ( output) $15555 io ! upd | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd | cr {block 623} {block 624} ( t11 suspended power) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr ( susp boot-) $0 $0 ( warm) $a9 /frame wos !frame {block 625} {block 626} ( study single node + boot power) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 609 boot ?ram {block 627} {block 628} ( t12a boot power) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 609 boot ?ram | cr {block 629} {block 630} ( t12b boot pwr + drop same) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 609 boot ?ram | cr # 19 $1c call {block 631} {block 632} ( t12c boot pwr + drop alternating) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 609 boot ?ram | cr # 28 $1f call {block 633} {block 634} ( t12d boot pwr + greg test) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 15 boot ?ram | cr 14 call {block 635} {block 636} ( t12e boot pwr + unext) talk | br ( no boot) 0 709 hook upd 0 -hook | cr 0 200 hook $15555 io ! pause | cr 0 300 hook $15555 io ! pause | cr 0 9 hook ( input) $15555 io ! $0 data ! pause | cr 0 7 hook ( output) $15555 io ! $0 data ! pause | cr ( serdes to output) | cr 0 701 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! pause | cr 0 $1 hook focus $3fffe lit $3fffe data ! | indent $20000 io ! upd pause | cr 1 608 hook upd 0 64 609 boot ?ram | cr 0 call {block 637} {block 638} {block 639} {block 640} {block 641} {block 642} {block 643} {block 644} {block 645} {block 646} {block 647} {block 648} ( active config global) :var fov [0x200] :var cuco [0x5] :var testb :var ps/ [0x4] 4 ps/ ! :var sim [0x1] 1 sim ! :var dh 0 dh ! | br : compile [ 940 ] load ; : tether | -cr : te [ 944 ] load ; : simrec ; ( default nop) : logger winver drop if [ 554 ] 3 loads then ; : -tape [ 1 ] 1 and ; qwerty seeb {block 649} ( these parameters are globally resident and should not be overloaded. use) warm ( after changing any but variables marked hot.) : sim ( is) $ 0 ( for full hi lvl integrator,) $ 1 ( for faster hand coded,) $ 2 ( for fastest partial sim,) $ 3 ( no sim for tare.) : fov ( abstract display scale) : ps/ ( picosec per display step in hardsim) : dh ( holds drive handle we are responsible for.) : testb ( nonzero to enable testbeds.) : compile ( compiles rom for layout and ram for optional initialization via) [ pram ( in hardsim.) : simrec ( defined here as nop in case not loaded) : logger ( compiles log file generator in windows systems) : -tape ( the) [ yellow ( literal must be 0 for tapeout, 1 for testing.) : saying [ qwerty ( at the end of the block enables the qwerty keyboard mode till next boot.) {block 650} ( cfchip definition active) : 6row 600n 601n 602n 603n 604n 605n 606n 607n 608n 609n 610n 611n 612n 613n 614n 615n 616n 617n ; : 5row 500n 501n 502n 503n 504n 505n 506n 507n 508n 509n 510n 511n 512n 513n 514n 515n 516n 517n ; : 4row 400n 401n 402n 403n 404n 405n 406n 407n 408n 409n 410n 411n 412n 413n 414n 415n 416n 417n ; : 3row 300n 301n 302n 303n 304n 305n 306n 307n 308n 309n 310n 311n 312n 313n 314n 315n 316n 317n ; : 2row 200n 201n 202n 203n 204n 205n 206n 207n 208n 209n 210n 211n 212n 213n 214n 215n 216n 217n ; : 1row 100n 101n 102n 103n 104n 105n 106n 107n 108n 109n 110n 111n 112n 113n 114n 115n 116n 117n ; {block 651} ( define chip to lay out, loaded from 998) : 3..0row ( lay out all the nodes. comment those you do not wish to work with; make active nodes green. make sure cuco numbers a valid node that you are laying out before doing extract) : chip ( top-level gds cell) : chip0 ( octagon before global - well before wc) : warnings ( nodes 3 or 5 require 4.) | cr ( change) offset ( to reflect offset) {block 652} ( cfchip definition) # 2 ( active) : 7row 700n 701n 702n 703n 704n 705n 706n 707n 708n 709n 710n 711n 712n 713n 714n 715n 716n 717n ; : 0row 000n 001n 002n 003n 004n 005n 006n 007n 008n 009n 010n 011n 012n 013n 014n 015n 016n 017n ; : logo poly cpr m1 cpr m2 cpr m3 cpr m4 cpr ; : chip0 power octagon dummy global pcps 0row 1row 2row 3row 4row 5row 6row 7row ; : chip seal origin v chip0 120 [ gy -169 + ] v logo ; {block 653} ( define chip to lay out, loaded from 998) : 3..0row ( lay out all the nodes. comment those you do not wish to work with; make active nodes green. make sure cuco numbers a valid node that you are laying out before doing extract) : chip ( top-level gds cell) : chip0 ( octagon before global - well before wc) : warnings ( nodes 3 or 5 require 4.) | cr ( change) offset ( to reflect offset) {block 654} {block 655} {block 656} {block 657} {block 658} {block 659} {block 660} {block 661} {block 662} {block 663} {block 664} {block 665} {block 666} {block 667} {block 668} {block 669} {block 670} {block 671} {block 672} {block 673} {block 674} {block 675} {block 676} {block 677} {block 678} {block 679} {block 680} {block 681} {block 682} {block 683} {block 684} {block 685} {block 686} {block 687} {block 688} {block 689} {block 690} {block 691} {block 692} {block 693} {block 694} {block 695} {block 696} {block 697} {block 698} {block 699} {block 700} ( windows async) 700 orgn ! macro ( replaces) # 114 : 1@ ( b-c) $8a 2, ; | -cr : 1! ( cb) [compile] a! $288 2, [compile] drop ; : 2@ ( b-h) $8b66 3, ; | -cr : 2! ( hb) [compile] a! $28966 3, [compile] drop ; : 4@ ( b-n) $8b 2, ; | -cr : 4! ( nb) [compile] a! $289 2, [compile] drop ; : swab ( h-h) $c486 2, ; : swa4 ( n-n) $c80f 2, ; forth ] : a-b ( a-b) 2* 2* ; | -cr : b-a ( b-a) [ 3 ] + 2/ 2/ ; : create ( -a) pop b-a ; | -cr : rez ( n) h +! ; : ?zero ( n-n) [ 0 ] or if dup or ; ] then ( -) [ -1 ] or ; : s1+ ( nm-mn') swap [ 1 ] + ; | br :var act :var vport [0x175] :var 0tg [0x7] :var 1tg [0x6] :var 2tg [0x1] : cold 1 [ 0tg ] ! 1 [ 1tg ] ! 1 [ 2tg ] ! 0 [ act ] ! ; | br ( ser) 116 2 loads ( routes) 702 load | cr ( generic) 122 5 loads ( rops+ports) 706 load | cr ( panel) 134 load ( user) 136 load 142 load | cr ( eforth ide) 760 3 loads | br : re4th talk ( e4th) compile 700 load ; : e4go ( from206) 0 206 hook ( focus) [ right ] call | cr ( start106) $11575 ( 'left ;') [ up ] r! ; : reload [ 704 ] load ; reload {block 701} ( talk to chip via sram windows async) | br : 1@ ( and) 1! ( byte fetch and store, byte address.) : 2@ ( and) 2! ( halfcell fetch/store, byte adr.) : swab ( and) swa4 ( 2-way and 4-way byte swaps.) : a-b ( and) b-a ( convert cells to+from bytes.) | br : create ( used after) [ align ( to exit with word adr of cell following in dictionary.) note that | cr writing into such allocations invalidates | cr nearby instruction cache! ] : rez ( allots n bytes in the dictionary.) : ?zero ( classical zero-equal returning 0 or) | cr ( -1 with indicators.) | br : act ( number of selected path, to which) vport | cr ( leads.) : cold ( sets no active paths.) : reload ( reset and resend all nodes to chip) : re4th ( recompile ide and nodes, then reload) | br [compile] ***no [compile] canonical [compile] opcodes*** | cr [ use the ] 'remote' [ ones {block 702} ( node) # 708 ( route lists -- stack -- replaces) # 120 : 0pa align create ( serial+e4core) [ 708 , 707 , 607 , 507 , 407 , 307 , 207 , 206 , 106 , 105 , 104 , 204 , 203 , 202 , 201 , 200 , 100 , 101 , 102 , 103 , -1 , ] : 1pa align create ( sram) [ 708 , 608 , 508 , 408 , 308 , 208 , 108 , 107 , 7 , 8 , 9 , -1 , ] : 2pa align create [ 708 , 709 , 710 , 711 , 712 , 713 , 714 , 715 , 716 , 717 , 617 , 517 , 417 , 317 , 217 , 117 , 17 , 16 , 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , ( rest) 140 load {block 703} : 0pa ( winds through serial, bitsy, and stack) | cr ( nodes for ide access.) : 1pa ( goes directly to sram.) : 2pa ( is the default, touching every node on the chip.) {block 704} ( eforth stack load script) | br ( initialize ide) talk 2 708 hook 2 -hook | cr ( panel upd exit) | br ( load sram driver) 714 load ( exit) | cr ( load serial terminal) 716 load ( exit) | br ( node105 bitsy) 0 105 hoot ( focus) left call | cr ( start104) right # 104 start | cr ( init105) right lit ra! left lit rb! | indent $ffe0 lit ( rp) 'cold lit ( ip) | br ( node106 stack) 0 106 hoot ( focus) up call | cr ( start105) $1142a ( 'bitsy ;') left r! | cr ( init106) right lit rb! ( io lit ra!) | indent 0 lit ( sp) 0 lit ( s) 0 lit ( t) | br ( copy eforth.bin !e4th) | br panel upd exit | br ( start eforth) e4go {block 705} ( eforth load script runs after ...) | br ( first,) empty ( just in case.) | cr ( next,) compile ( code from script in block) ] 718 | cr ( then, compile ide) [ 700 load ( and) reload ( chip) | br ( during development various functions are) | cr ( commented out so they can be done by hand.) | br ( the load order leaves the ide in the stack) | cr ( node for access to memory and single stepping.) {block 706} ( remote instructions -- replaces block) # 132 : compile recompile ; : focus paths targets @ + dup @ swap -1 + @ wall port call ; : virgin paths targets @ + @ avail call ; | br : rop ( n) [ $a ] or [ 13 ] for 2* next ( ;s) [ $1555 ] + rins upd ; : @+ [ $9 ] rop ; | -cr : !+ [ $d ] rop ; | -cr : !b [ $e ] rop ; : r+* [ $10 ] rop ; : r2* [ $11 ] rop ; | -cr : r2/ [ $12 ] rop ; : r- [ $13 ] rop ; | -cr : r+ [ $14 ] rop ; : rand [ $15 ] rop ; | -cr : ror [ $16 ] rop ; : rdrop [ $17 ] rop ; | -cr : rdup [ $18 ] rop ; : rover [ $1a ] rop ; : ra! [ $1f ] rop ; | -cr : ra@ [ $1b ] rop ; : rb! [ $1e ] rop ; : @b [ $a ] rop ; | -cr : @a [ $b ] rop ; | -cr : !a [ $f ] rop ; | br : 'rd-- $195 ; | -cr : 'r-l- $1f5 ; | -cr : 'r--u $1c5 ; : '--lu $165 ; : io $15d ; | -cr : data $141 ; | -cr : up $145 ; : down $115 ; | -cr : left $175 ; | -cr : right $1d5 ; {block 707} ( single instruction words that may be executed by the target. these must end with return for s40 restriction compliance.) | br ( the following won't work on s40 due to bug 1.) : r@p+ [ $c ] rop ; : psh ( n) r@p+ ( value) rins ; | br ( additional opcodes and ports were added) {block 708} {block 709} {block 710} {block 711} {block 712} {block 713} {block 714} ( download sram nodes) | br ( node9 address-bus) 1 9 hoot | br ( node8 control-pins) 1 8 hoot right # 9 start | br ( node7 data-bus) 1 7 hoot left # 8 start | br ( node107 interface) 1 107 hoot down # 7 start | br ( node108 user) 1 108 hoot left # 107 start | cr ( init108) left lit rb! | br panel upd {block 715} {block 716} ( download serial nodes) | br ( putchar wires) | cr 0 103 hook left right wire! | cr 0 102 hook right left wire! right # 103 start | cr 0 101 hook left right wire! left # 102 start | cr ( node100 putchar) | cr 0 100 hoot ( focus) up call right # 101 start | cr ( node200 getchar) | cr 0 200 hoot ( focus) right call up # 100 start | cr ( getchar wires) | cr 0 201 hook right left wire! right # 200 start | cr 0 202 hook left right wire! left # 201 start | cr 0 203 hook right left wire! right # 202 start | cr 0 204 hook left up wire! left # 203 start | cr ( node104 interface) | cr 0 104 hoot ( focus) 'rd-- call up # 204 start | br ( node105 user) exit ( unless testing without e4th) | cr 0 105 hoot ( focus) '--lu call right # 104 start | cr ( init105) right lit ra! | br panel upd {block 717} {block 718} ( compile eforth.16 from) # 1302 | cr host | -cr : h' ' ; | -cr : ' h' 6 + 4@ ; target | br ( sram.16) | indent ( address) 720 load | indent ( control) 722 load | indent ( data) 724 load | indent ( interface) 726 load | indent ( user) 108 node 728 load | cr ( exit for testing only sram) | cr ( term.16) | indent ( ide loads wire nodes; see) # 730 | indent ( putchar) 100 node 732 load | indent ( getchar) 200 node 734 load | indent ( interface) 104 node 736 load | indent ( user) # 105 ( node) # 738 ( load) | cr ( exit for testing without eforth) | cr ( e4core.16) | indent ( stack) 106 node 728 load 740 2 loads | indent ( bitsy) 105 node 744 2 loads {block 719} {block 720} ( sram.16 address-bus) 9 node | cr = $aa $20 org ( here boot) : start = $20 right b! .. data a! .. $3 ( mask) : cmd ( m) = $26 @b ( a16) 2* 2* over @b -if | indent = $28 - ( p04) and or ( a18) ! cmd ; | indent = $2a ] then ( p04) and or .. ( a18) ! cmd ; = $2c {block 721} ( notes-) | indent ( node) # 9 ( suspends while waiting for a16. it uses the two lower page bits to output an) | cr ( 18-bit address.) | cr | indent ] a16 ( xx.aaaa.aaaa.aaaa.aaaa) | indent p04 ( 00.0000.0000.0000.pppp) | indent a18 ( aa.aaaa.aaaa.aaaa.aapp) | cr | indent ( the code is written to minimize/equalize the time to output the address, which must be stable when node8 stores the 'start' command.) {block 722} ( sram.16 control-pins) 8 node host ] : 'r-l- $1f5 lit ; target $0 org | cr ( 'start' pin control table 0-7) | cr = $0 $2556e ( r00) , $2557e ( r01) , | cr = $2 $3556e ( r10) , $3557e ( r11) , | cr = $4 $3557a ( w11) , $3556a ( w10) , | cr = $6 $2557a ( w01) , $2556a ( w00) , | cr = $8 $20 org ( here boot) : start = $20 'r-l- b! io a! : cmd = $24 @b ( stop) ! a push $7 ( mask) .. | indent @b ( a16) !b @b ( +p/-p) dup !b | indent 2/ 2/ and ( i3) a! .. @ ( ctrl) pop a! | indent ( start) ! cmd ; = $2c {block 723} ( notes-) | indent ( node8 is fed a stop command during start-up, then suspends while waiting for a16. after starting the read or write, it again suspends while waiting for the stop command.) | indent ( bits 4..2 of the /possibly inverted/ page value are used 'as-is' to index into the start table, setting two address bits, write enable, and chip enable.) ** note that reads and writes are swapped if the page 'overflows' into bit4, with disastrous results ** | cr | cr ( cmd index) .lit. ( pin17 pin05 pin03 pin01) | cr ( w00 .0111) $2556a ( a19-0 a18-0 /we-0 /ce-0) | cr ( r00 .0000) $2556e ( a19-0 a18-0 /we-1 /ce-0) | cr ( w01 .0110) $2557a ( a19-0 a18-1 /we-0 /ce-0) | cr ( r01 .0001) $2557e ( a19-0 a18-1 /we-1 /ce-0) | cr ( w10 .0101) $3556a ( a19-1 a18-0 /we-0 /ce-0) | cr ( r10 .0010) $3556e ( a19-1 a18-0 /we-1 /ce-0) | cr ( w11 .0100) $3557a ( a19-1 a18-1 /we-0 /ce-0) | cr ( r11 .0011) $3557e ( a19-1 a18-1 /we-1 /ce-0) {block 724} ( sram.16 data-bus) 7 node host ] : in $14555 lit ; | -cr : out $15555 lit ; : stop $3557f lit ; target | cr | cr = $aa $20 org ( here boot) : start = $20 left b! out io data stop | indent out io data stop in io a! ( in) ! | indent down a! ( stop) !b : cmd ( /soid/) = $31 @ ( a16) !b @ ( +p/-p) -if | br : w16 ( /soid/p-) = $33 ( +p/-p) !b | cr ( /- setup + 45ns) @ ( w) a push push ( data) a! | cr pop ! ( io) a! ( out) ! 40 for unext ( stop) !b ( -/) | cr in ! pop a! cmd ; | br : r16 ( /soid/p-) = $3c then ( +p/-p) !b | cr ( /- setup + 55ns) a push ( data) a! | cr ( io) drop ( out) drop 50 for unext ( stop) !b ( -/) | cr @ ( w) pop a! ! cmd ; = $43 {block 725} ( notes-) | indent ( node) # 7 ( suspends waiting for a16, then) | cr ( passes it and page/r/w to nodes) # 8 ( and 9. then it controls the data transfer and timing until sending the stop command.) | indent ( the literals needed for writing are) | cr ( loaded onto the stack and used circularly) | cr ( to save time. /read's drops are free./) | br ( ----) ] .lit. ( pin17 pin05 pin03 pin01) | cr ( stop) $3557f ( a19-1 a18-1 /we-1 /ce-1) {block 726} ( sram.16 interface) 107 node $0 org ] : cx ( wp-) = $0 over push @ dup ( a) !b | indent over ( p) !b @b ( w) pop - ( w1) or if | cr ( uneq) @ ( w2) dup or ( ff) ! pop a! ; | cr ( equal) ] then drop ( a) !b - ( -p) !b @ ( w2) !b | indent $ffff ( tf) ! pop a! ; | br : e@ ( p-) = $a @ ( a) !b ( p) !b @b ( w) ! pop a! ; | br : cmd ( n-) = $d a push a! | indent @ ( p/w) [ ' e@ ] -until @ ( a/p) [ ' cx ] -until : e! ( pa-) = $10 - ( a) !b ( -p) !b @ ( w) !b pop a! ; | br = $13 $20 org ( here boot programmed with abandon) : start = $20 down b! io a! : poll = $24 @ $8000 and if right cmd then | indent @ $800 and if left cmd then | indent @ $200 and if up cmd then poll ; = $34 {block 727} ( notes-) | indent ( node) # 107 ( polls to select one of its three neighbors' requests. it passes on) ] ex@ ( and) ex! ( requests and implements) cx? ( as passed-on reads and writes plus the required logic.) | indent ( each request is uninterruptible.) {block 728} ( sram.16 user node 106, 108, or 207.) $39 org ] : x! ( wa-) = $39 dup dup or : ex! ( wap-) = $3a - !b - !b !b ; : x@ ( a-w) = $3c dup dup or : ex@ ( ap-w) = $3d !b !b @b ; : cx? ( wapw-f) = $3e - !b !b !b !b @b ; | br : args ( wa-waxa) = $40 over over or over ; : n2x ( wapn-wa'p) = $42 for push args | cr pop dup push ex! 1 . + pop next ; : nqx ( wapn-wa'xpn'/wa'ppp) = $4a for push args | cr pop dup push ex@ or if pop pop ; ] then | cr drop 1 . + pop next dup dup ; | br = $54 $20 org ( here boot) : start = $20 ( right) left ( up) b! ; ( softsim fall-thru) : test = $22 ( loop for no-testbed softsim) | indent $abcd $1234 $0 ex! $1111 $f ex@ test ; = $2c {block 729} ( notes-) | indent ( memory-access words assume that addresses and data are 16-bit parameters with the upper two bits zero and pages are 4-bits with the) | cr ( upper) # 14 ( bits zero. the three memory commands are encoded in the first one or two parameters used, marked with '+' and '-' below.) | indent | -cr : ex@ [ a +p ] w ( fetch) | indent | -cr : ex! [ w -a -p ( store) | indent | -cr : cx? [ w2 a +p -w1 ] f ( comp-and-exch) | cr ( the three words access all available memory) | cr ( with the 20-bit p.a address.) | indent cx? ( compares value at p.a to w1. if same, writes w2 to p.a and returns true. otherwise, only returns false.) x@ ( and) x! ( are 16-bit addr. versions to access the lowest 64k of available) | cr ( memory.) | indent n2x nqx ( and) test ( were used in development and may be overwritten by user code.) {block 730} {block 731} {block 732} ( serial.16 out) $0 org ] : !bit ( im-i) = $0 over and | indent if $25555 # 0 !b drop ; | indent ] then $35555 # 1 !b drop ; : putc ( dc-d) = $5 - : putchar ( di-d) = $6 $ff or 2* | cr 10 for = $a ( 1-start, 8-data, 2-stop bits) | indent 1 !bit 2/ over for . unext | cr next = $e drop ( weak-pulldown) $15555 !b ; | br = $10 $20 org ( programmed with abandon) : start io b! right a! 2400 ( est.) # 115200 ( baud) : wait ( d-.d) = $25 @ -if ( tx!) putchar wait ; | indent ] then ( !io) up a! ! .. @ right a! wait ; | br : send ( cd) = $2d over putc send ; : send/ ( d) = $2f $40 begin dup push putc | indent pop 1 . + $5f and end = $37 {block 733} ( notes-) | indent tx ( is inverted for compatibility with the boot node conventions, i.e. mark hi, space lo, data1 lo, data0 hi, start hi, stop lo.) | br : putchar ( takes a clean inverted octet and transmits it low bit first via p17.) | br : wait ( suspends while waiting for inverted character or a new delay value.) | cr | indent [ the first terminal operation must set | cr the delay! | indent ] send ( and) send/ ( test the bit timing using external loop-back.) {block 734} ( serial.16 in) $28 org ] : @bit ( cm-c) @b - over - and push and pop or ; : getc ( d-dc) = $2b dup begin drop @b -until : getchar ( dx-dc) = $2d over 2/ for . unext ( 1/2 bit) 9 for ( 1-start, 8-data, 1-stop bits) | indent $1ffff @bit 2/ over for . unext | cr next 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ $ff and ; | br : baud ( n-dd) = $3a if dup ; ] then - push | cr = $3d begin @b . -until ( at start-bit of space) | cr = $3e begin @b - -until ( at 1-bit) | cr = $3f begin @b . zif then . -until ( at 0-bits) | cr = $41 begin @b - zif then . -until ( stop-bit) | cr pop - ( n) dup 2/ . + ( 1.5n) dup ; | br : auto = $46 a push up a! @ baud ! pop a! dup ! : idle ( d) = $4c @b -if getchar - | indent @b 2* - -if over ! then drop drop idle ; ] then $200 and .. if auto ; ] then drop idle ; | br = $58 $20 org ( programmed with some abandon) : start io b! $5555 !b right a! 2400 idle ; = $27 {block 735} ( notes-) | indent rx ( is inverted for compatibility with the boot node conventions, i.e. mark hi, space lo, data1 lo, data0 hi, start hi, stop lo.) | br : getchar ( called after seeing leading edge of start bit. returns clean inverted character.) | br : baud ( space is 1...1'0010.0000'0) | indent ( stop bits ---' .hex..20. '--- start) | br : idle {block 736} ( serial.16 interface) | br $20 org ( programmed with abandon) : start io b! right a! ahead : rx? = $24 $400 and .. if ( avail) up a! @ then : rtn ( w-) = $29 $ffff and right a! ! | cr : idle = $2d then @b 2* .. [ ' rx? ] -until | indent ( not read) 2* [ ' idle ] -until | indent ( write) @ 2* 2* 2/ 2/ .. -if : tx! ( c-) = $33 @b $1000 and if ( full) drop rtn ; | indent ( room) ] then left a! over ! rtn ; : iox ( c-) = $3a then left a! ! | indent up a! begin @ - -until - rtn ; = $40 {block 737} ( notes-) | indent ] idle ( is a polling loop waiting for) | cr [ right ( reading -) rx? ( returns) ] 16-bit inv | indent character ( from recv queue or) 0 ( if) | indent ( queue is empty.) | cr [ right ( writing - do) tx! ( for) ] 16-bit inv | indent character ( or) [ iox ( for) ] 16-bit pos | indent bit delay ( input.) | cr | indent [ tx! ( returns the) ] 16-bit inv character ( when the xmit queue is full and) 0 ( otherwise.) | cr | indent [ iox ( suspends until it puts the) ] 16-bit pos bit delay ( in the xmit queue and again while it discards any) inv characters ( in the recv queue before the new) pos bit delay ( arrives.) {block 738} ( serial.16 user) $3c org ] : rx? ( -*) = $3c @ ; ( * is) # 0 ( or -c) : tx? ( *-*) = $3d ! @ ; ( * see shadow) | br = $3e $20 org ( programmed with some abandon) : start right a! ; ( serial test code) : key ( -c) = $22 dup begin drop rx? until $ffff or ; : emit ( c-) = $27 begin - tx? - -until drop ; : echo = $2a key dup emit $20 or if echo ; ] then ; : send ( c-c) = $30 dup emit send ; : test ( c-cf) = $32 dup emit key over or ; : testing ( cn-c/ccn) = $35 for test | indent if over or pop ; ] then drop next ; = $3b {block 739} ( notes-) | indent ] bpopw ( and) bpshw [ orgs ( must match bitsy) | indent ] tx? [ *-* ( is used to send characters and to set status values, controlled by the sign bit. all data are 16-bit values.) | cr | cr ] tx? status values | indent [ in ( 0/autobaud, +n/bit delay) | indent out ( +n/bit delay) | cr ] tx? characters | indent [ in ( inverted character -c) | indent out # 0 ( if sent, -c if not sent) | cr | indent ( user code must initialize) ] a ( register with port address of terminal node.) {block 740} ( e4.16 stack 1of2) | cr | -cr ' x@ org ] : 'au@ ( a-w) = $3c [ $0 org ] : '1+ ( w-w) = $0 1 . + | -cr : mask ( w-w) = $2 $ffff and ; : *2/ ( w-w) = $4 2* 2* 2/ 2/ 2/ mask ; : popt ( p-pt) = $6 dup '1+ over x@ ; : 'au! ( pst-p43) = $8 x! : popst ( p-pst) = $9 popt : pops ( pt-pst) = $a push popt pop ; : pop43 ( pst-p43st) = $c push push popst pop pop ; : '1- ( w-w) = $e -1 . + mask ; = $11 here $37 org ] : psht ( pt-p) = $37 push '1- pop over ( x! ;) = $39 ( *) [ org : pshs ( pst-pt) = $11 push psht pop ; : pshw ( pstw-ptw) = $13 push pshs pop ; : 'sp@ ( pst-ptp) = $15 pshs psht dup pops ; : 'sp! ( ptp-pst) = $18 pshs popst ; : 'drop ( pst-p3s) = $1a drop pops ; : 'over ( pst-pts) = $1b over pshw ; | br : .ex! ( pst-p54) = $1c pop43 ex! pops ; : .ex@ ( pst-p3w) = $1f ex@ pops ; : .cx? ( pst-p5f) = $21 pop43 cx? pops ; {block 741} ( notes-) | indent ( the e4th stack node must abut the memory driver to have fast bidirectional access to) | cr ( external memory.) | indent ( the code must not overwrite the sram user code compiled from block) # 728 | indent ] psht ( is placed so it falls into) x! | indent ( naming conventions) | cr : 'name ( for) code.e4 ( words) | cr : *name ( for) usercode.e4 ( optimizations) | cr : .name ( for) usercode.e4 ( additions) : others ( are internal words) | indent ( e4th's external data stack grows down) | cr ( with pre-dec writes and post-inc reads.) | indent ( the stack-node's stack keeps the e4th) | cr [ stack pointer ( and cached) s ( and) t | indent ( 16-bit words are) 00.nnnn.nnnn.nnnn.nnnn {block 742} ( e4.16 stack 2of2) : *2* ( w-w) = $24 2* mask ; : 'or ( pst-p3w) = $25 over - and : 'xor ( pst-p3w) = $26 or pops ; : 'and ( pst-p3w) = $27 and pops ; : *neg ( n-n) = $28 ( '1-) : *inv ( w-w) = $28 ( begin) - mask ; : *zeq ( w-f) = $29 ( until) begin dup or ; : 'zlt ( n-f) = $2a 2* 2* -until dup or *inv ; : 'um+ ( uu-uc) = $2c + $10000 over and if or 1 ; : 'nop = $31 then ( begin) ; : *qdup ( pst-pst/ptt) = $32 ( until) : 'dup ( pst-ptt) = $32 dup pshw ; : 'swap ( st-ts) = $33 over push push drop pop pop ; : *- ( pst-p3n) = $35 ( *neg) : *+ ( pst-p3n) = $35 + mask pops ; | cr = $37 exit ( start is run in ide) : start right b! 0 dup dup ( sp.s.t) --l- ; {block 743} ( notes-) | indent ( the initial sp is reset by) cold | indent ( code must fit before block 740's) ] psht | indent ( some optimizations are commented out) | cr ( so as not to lose the code for use later when/if some code is put in rom.) {block 744} ( e4.16 bitsy 1of2) $0 org ] : rp-- ( r-r) = $0 -1 : +mask ( nn-w) = $2 + $ffff and ; : btc@ ( ii-ix) = $4 @p !b !b dup ( /) . @p drop . ( /) : 'ip@ | -cr : bx@ ( a-w) = $6 @p !b !b . ( /) @p x@ ( /) | indent @p !b @b ; ( /) ] . . . !p ( /) : 'rp@ ( ri-ri) = $a over rp-- : bpshw ( w-) = $b @p !b !b ; ( /) ] @p pshw ( /) | br : *con ( ri-ri) = $d 'ip@ : *var ( ri-ri) = $e dup bpshw : 'exit ( ri-ri) = $f drop rp-- dup bx@ ; | br : 'r@ ( ri-ri) = $11 over rp-- : @2tos ( a-) = $12 bx@ bpshw ; : 'rfrom ( ri-*ri) = $14 over rp-- over over @2tos ; : bpopw ( -w) = $16 @p !b @b ; ( /) ] !p pops ( /) : bx!++ ( aw-a) = $18 @p !b !b dup ( /) . . . @p ( /) | indent @p !b !b . ( /) @p x! ( /) : rp++ | -cr : ip++ ( a-a) = $1c 1 +mask ; {block 745} ( notes-) | indent ( the bitsy node keeps the return-stack) | cr ( pointer and the interpreter pointer on its) | cr ( stack.) | indent ( memory access gets done only through the stack node.) | indent ] btc@ ( is included only to provide a unique marker for the stack node's ide single-stepper routine, incurring some overhead on every xt.) {block 746} ( e4.16 bitsy 2of2) : 'exe ( ri-ri) = $1e bpopw : xxt ( rix-ri) = $1f 2* 2* -if | cr ( code rix-ri) = $20 2* 2/ 2/ 2/ -if | cr ( code.b rix-ri) = $22 push ; | cr ( code.s rix-ri) = $23 ] then $12000 or !b ; | cr ( list rix-ri) = $25 ] then push bx!++ pop 2/ ; : step ( ri-ri) = $27 dup btc@ push ip++ pop xxt ; : bitsy ( ri) = $2a step bitsy ; | br : 'tor ( ri-ri) = $2c push bpopw bx!++ pop ; : 'rp! ( ri-*ri) = $2f push bpopw rp++ pop ; : *lit ( ri-ri) = $32 dup @2tos ip++ ; : 'if ( ri-ri) = $34 bpopw if drop ip++ ; | indent ] then drop 'ip@ ; | cr = $38 $3c org ] : .rx? = $3c @ bpshw ; : .tx? = $3d @p !b @b . ( /) !p . . @p ( /) ! @ !b ; | br = $40 exit ( start is run in ide) : start right ( terminal) a! left ( stack) b! | indent $ffe0 $5 ( rp.ip) bitsy ; {block 747} ( notes-) | indent ( the bit-threaded code technique confines execution to the) ] bitsy ( loop and a small number of code words. it uses one or more bits of the execution token to select the class-) | indent [ 00.100x.xxaa.aaaa.aaaa ( code.s-xt) | indent 00.110x.xxaa.aaaa.aaaa ( code.b-xt) | indent 00.0aaa.aaaa.aaaa.aaaa ( list-xt) | cr ( -and process the token. code tokens are called while list tokens are interpreted.) | indent ( the ide can single-step the bitsy node by calling) ] step ( instead of executing) bitsy. | indent ( the terminal i/o words) rx? ( and) tx? ( are) | cr ( here because they don't fit in the stack node.) [ note ( that they must be in the same location) | cr ( here as they are in block) # 738 ( for the ide test words to work.) {block 748} html ( eforth documentation) | br named ( sram.html) .hdr 720 730 .blks | indent 714 716 .blks 760 762 .blks .tlr | cr | cr named ( serial.html) .hdr | indent 732 740 .blks | indent 716 718 .blks 764 766 .blks .tlr | cr | cr named ( e4core.html) .hdr | indent 728 730 .blks 740 744 .blks | indent 738 740 .blks 744 748 .blks | indent 762 764 .blks .tlr | cr | cr named ( eforth.html) .hdr 700 766 .blks | indent 1300 1304 .blks .tlr | cr exit | cr named ( e4ide.html) .hdr 700 702 .blks | indent 116 120 .blks 122 132 .blks | indent 706 708 .blks 1372 1374 .blks | indent 1376 1380 .blks 1424 1428 .blks | indent 134 138 .blks 142 144 .blks | indent 760 766 .blks # 138 # 140 ( .blks) .tlr {block 749} {block 750} {block 751} {block 752} {block 753} {block 754} {block 755} {block 756} {block 757} {block 758} {block 759} {block 760} ( sram user code from nodes 106, 108,) # 207 : 2lit' ( nn-) swap lit' lit' ; : sm ( wa-) 2lit' [ $39 ( x!) ] call ; : sem ( wap-) push 2lit' pop lit' [ $3a ( ex!) ] call ; : fm ( a-w) lit' [ $3c ( x@) ] call : get ( -w) upd [ stak ] @ rdrop ; : fem ( ap-w) 2lit' [ $3d ( ex@) ] call get ; : 4lit' ( nnnn-) push push 2lit' pop pop 2lit' ; : cxm ( wapw-f) 4lit' [ $3e ( cx?) ] call get ; | br exit ( sram test code) : fmem ( ap-...) 8 for push dup i fem | indent s1+ pop next drop drop ; : smem ( wapn-) for push over over i sem | indent s1+ s1+ pop next drop drop drop ; : n2x ( wapn-) 4lit' [ $42 ( n2x) ] call ; : nqx ( wapn-) 4lit' [ $4a ( nqx) ] call ; | br {block 761} ( this tester code assumes the ide is hooked to one of the sram user nodes.) {block 762} ( eforth.bin file copy to sram) :var fh : e4* ( -a) [ $0 # $8000 ] ; ( eforth base address) : 'cold ( -a) [ $5 ] ; ( eforth cold-start vector address) : e4nam ( -a) align create | indent ( efor) [ $726f6665 , ( th.b) $622e6874 , ( in) $6e69 , ] : e4buf ( -a) align create [ 32768 rez | br : +e4th ( -i) e4nam r/w fopen if [ fh ] ! ; ] then drop ; : -e4th [ fh ] @ [ 0 ] + if fclose 0 then [ fh ] ! ; : !img ( n) push [ e4buf ] e4* begin over @ over | indent sm s1+ s1+ next drop drop ; : !e4th +e4th if [ e4buf a-b ] dup 4 [ fh ] @ frd | indent + [ e4buf ] @ ( here) [ e4* - ] + a-b [ fh ] @ frd | indent -e4th b-a [ 1 ] + !img then ; {block 763} ( this tester code assumes the ide is hooked to one of the sram user nodes. it copies the file) ] eforth.bin ( into ram starting at) e4* ( . the) | cr ( first cell of the file contains the length of the file in cells.) | br : e4* ( constant eforth base address) : fh ( is file handle used locally.) : e4nam ( is name of file) : e4buf ( buffer for reading the file.) : +e4th ( returns nz indicator if good file open.) : -e4th ( closes the file.) : !img ( stores) [ n ( cells of image in) e4buf ( to memory at) e4* ( .) : !e4th ( does the whole operation.) {block 764} ( ide serial user words) : start ( a) $11420 # $20 ( org start /start ;/) swap r! ; : wire! ( io) dup call lit' ( out) rb! ( lit' in ra!) | cr # $20 ( org start) $3b40 ( /@ !b start ;/) $20 r! | cr lit' ( in) ra! ; : hoot ( pn) dup push hook 0 64 pop boot ; {block 765} : start ( send 'jump to) # $20 ( ' opcode to neighbor) : wire! ( initialize a wire node - store opcode at m.0 and a+b registers.) : hoot ( combine) [ hook ( and) boot {block 766} {block 767} {block 768} {block 769} {block 770} {block 771} {block 772} {block 773} {block 774} {block 775} {block 776} {block 777} {block 778} {block 779} {block 780} {block 781} {block 782} {block 783} {block 784} {block 785} {block 786} {block 787} {block 788} {block 789} {block 790} {block 791} {block 792} {block 793} {block 794} {block 795} {block 796} {block 797} {block 798} {block 799} {block 800} {block 801} {block 802} {block 803} {block 804} {block 805} {block 806} {block 807} {block 808} {block 809} {block 810} {block 811} {block 812} {block 813} {block 814} {block 815} {block 816} {block 817} {block 818} {block 819} {block 820} {block 821} {block 822} {block 823} {block 824} {block 825} {block 826} {block 827} {block 828} {block 829} {block 830} {block 831} {block 832} {block 833} {block 834} {block 835} {block 836} {block 837} {block 838} {block 839} {block 840} {block 841} {block 842} {block 843} {block 844} {block 845} {block 846} {block 847} {block 848} {block 849} {block 850} {block 851} {block 852} {block 853} {block 854} {block 855} {block 856} {block 857} {block 858} {block 859} {block 860} {block 861} {block 862} {block 863} {block 864} {block 865} {block 866} {block 867} {block 868} {block 869} {block 870} {block 871} {block 872} {block 873} {block 874} {block 875} {block 876} {block 877} {block 878} {block 879} {block 880} {block 881} {block 882} {block 883} {block 884} {block 885} {block 886} {block 887} {block 888} {block 889} {block 890} ( ga144 chrt .18 design specific) : gdsnos [ 440 ] ; : nnx # 8 [ 18 ] ; | -cr : nny # 4 [ 8 ] ; | -cr : nns [ nnx nny * ] ; : nnc ( nns) [ nns 18 + ] ; : nn-n ( n-n) # 10 [ 100 ] /mod [ nnx ] * + ; : n-nn ( n-n) [ nnx ] /mod # 10 [ 100 ] * + ; | br : gapl [ 2 ( strap) 5 + ( pwr) 0 + ( chans) 20 2 * + ] ; : gapr [ 2 ( strap) 5 + ( pwr) 0 + ( chans) 24 2 * + ] ; : gapb [ 2 ( strap) 5 + ( pwr) 0 + ( chans) 28 2 * + ] ; : gapt [ 2 ( strap) 5 + ( pwr) 0 + ( chans) 18 2 * + ] ; : ray0 ( -xy) gapl [ 199 ] + gapb [ 199 ] + ; : rayn ( -xy) nnx [ 350 ] * nny [ 759 ] * -1 + ray0 v+ ; | br : gx [ rayn drop gapr + 199 + ] ; : gy [ rayn nip gapt + 199 + ] ; | br : origin # 164 # 89 26 26 ; : cx [ origin drop 2 * gx + 2 + ] ; : cy [ origin nip 2 * gy + 2 + ] ; : -cx [ cx negate ] ; | -cr : cx*y [ cx cy * ] ; | br : gfx [ 8 ] ; | -cr : gfy [ 16 ] ; {block 891} : gdsnos ( block for gds layer numbers) : nnx ( and nny number of nodes/row and /column) : nnc ( number of nodes compiled) : nn-n ( and) n-nn ( convert yx notation to and from linear node numbers) : gapl, r, b, t ( distance in tiles between inner edge of padring bus and outer edge of core pwr) : ray0 ( and) rayn ( are gxy relative phys origin and upper right corner of node array. source of constants is) [ xtab ( and) ytab. ] : gx ( and) gy ( bounds of pad ring.) [ always remember to check ] global [ reset wiring when size or placement of node array or pad ring are changed! ] : cx ( and) cy ( bounds of seal ring.) : -cx ( negative tiles/row) : origin ( origin of 'die' i.e. pad ring within seal ring. c coords rel to seal; g rel to 'die') : gfx ( and) gfy ( fill cell grid) {block 892} ( ga144 pads, ports and resets) | br : port ( i-pa) align tbl [ $1d5 , $115 , $175 , $145 , $195 , $185 , $1b5 , $1a5 , ] : idle ( n-p) [ nnx ] /mod [ nny -1 + ] mod [ 1 ] min [ 4 ] + swap [ nnx -1 + ] mod [ 1 ] min 2* + port ; : rstadr align tbl [ $aa , $195 , $185 , $1b5 , $1a5 , ] : rstdef strings ( p0aa p13f p12f p11f p10f) : ?rst ( pa-i) [ 4 ] for dup i rstadr or while drop -next abort then drop drop pop ; {block 893} : port ( returns port for 0-3 rdlu then edges) : idle ( is idle p value for given node.) : rstadr ( and) rstdef ( number values and white names of p straps rom, corn, side, top/bot, mid.) : ?rst ( returns index of valid reset or aborts.) {block 894} ( ga144 node types) | br : laid [ nns aray | -cr : resets [ nns aray ] : kinds [ nns aray | br : 0's ( n) for 0 , next ; : +roms ( -ia) align ray [ nns 0's ] : iz ( nn i) swap nn-n +roms ! ; | cr 701 2 iz 705 10 iz 708 6 iz | indent 709 14 iz 713 14 iz 717 14 iz | cr 117 14 iz 617 14 iz | cr 1 2 iz 200 18 iz 300 4 iz | cr ( eforth) 105 20 iz 106 20 iz ( sdram...) | cr 7 20 iz 8 20 iz 9 20 iz 107 20 iz 108 20 iz ] : @rom ( nn-n) nn-n +roms @ [ 22 ] less if drop [ 1418 ] + ; ] then drop [ 100 ] mod [ 1301 ] + ; | br : bedtab ( -serbed) [ cuco ] @ nn-n kinds @ ; : ?serbed [ testb ] @ 0 or drop if bedtab ; ] then 0 ; {block 895} : laid ( nz if node laid out) : resets ( index of reset address) : kinds ( kind for testbeds) : +roms ( and) @rom ( are here only as temporary kludges. we will eventually load a table from the node defns for default kind and prom source.) : +roms ( array indexed by linear node number returning code number for rom load block.) : iz ( sets node) [ nn ( to use rom load block) n ( codes- 0-arith 2-serdes 4-syncboot 6-async 10-spi 14-analog 18-1wire) : @rom ( returns block number for production rom code applicable to the given node.) : ?serbed ( 0-none 1-async 2-sync 3-1wire 4-spi 5-strap 6-serdes 7-servers for) [ cuco ( if) testb ( nz.) {block 896} {block 897} {block 898} {block 899} {block 900} ( okad tools compile is in cfuse) : c-a-c 154 ; ( gds ascii) : softsim | -cr : so 942 load ; : tile 910 load ; ( layout tiles) 146 load ] : place | -cr : pl tile ( layout and display) : flat | -cr : fl 912 load ; ( 2d display) : cover 914 load ; : gds 916 load ; ( construct gds file) : @gds 918 load ; ( display gds) : ?gds 920 load ; ( examine gds) : extract | -cr : ex 922 load ; ( build tables) : hardsim | -cr : ha 924 load ; ( integrate i and v) : hilo 926 load ; ( mark nets above vdd/2) : lite 928 load ; : lit 908 load ; : pram 934 load ; : calc 930 load ; ( tsmc calculation app) : prism 932 load ; ( tsmc spectrum) 890 3 loads ( design specific) mark empty {block 901} ( design load block for okad2 applications) : ex : extract ( netlist for simulation and go into) : flat ( view of layout - keys) : . : .... [ ludr ( big left up down right) : .432 [ ludr ( toggle metal 2-4 , move ludr) : .... [ +g1- ( zoom in, toggle gates, toggle metal1, zoom out) : . ( exit flat view or simulator with) [ space e space ( to enter block editor and get new key menu on bottum right) : ha : hardsim ( virtual scope) [ g ] n ( go till number) [ h ( go till key) b ( go 1000 counts , exit with) e ] : gds ( consruct gds file image and display) : @gds ( view file records) : ?gds : lite ( brighten the net pointed to - metal-1) : lit ( brighten an additional net) {block 902} {block 903} {block 904} {block 905} {block 906} {block 907} {block 908} {block 909} {block 910} {block 911} {block 912} {block 913} {block 914} {block 915} {block 916} {block 917} {block 918} {block 919} {block 920} {block 921} {block 922} {block 923} {block 924} {block 925} {block 926} {block 927} {block 928} {block 929} {block 930} {block 931} {block 932} {block 933} {block 934} {block 935} {block 936} {block 937} {block 938} {block 939} {block 940} ( g18 compiler) empty c | cr 0 0 laid nns fill 0 0 kinds nns fill | br 1400 load | br : reset ( a) ?rst [ com ] @ resets ! ; : kind ( n) [ com ] @ kinds ! ; : node ( nn) nn-n nns mod dup [ com ] ! | cr n-nn @rom load ; : bin ( nn) 0 memory swap nn-n [ com ] ! 0 memory 512 move ; | br : program [ nns -1 + ] for i [ com ] ! | cr i idle reset i n-nn @rom load -next | cr ( special rom's) [ 1304 ] load | cr -tape drop if [ 1300 ] load then ; | br 1402 6 loads target 1380 load host ] : reclaim remember [ target program empty {block 941} ( compiles all relevant g18 code.) | br : laid ( is cleared for setting as nodes laid out) : resets ( is set to default multiport executes for all nodes and may be overridden in source code using) reset : kinds ( is set to default testbed none and may be overridden with) kind ( to 0-none 1-async 2-sync 3-1wire 4-spi 5-strap 6-serdes 7-servers) : program ( compile code for multicomputers. always compiles standard rom; if not tapeout, the load block at) # 1300 ( defines test environment which may be in rom, ram, or both.) | br : node ( starts random compilation for node) [ nn ( by compiling node) nn's ( rom) : bin ( saves the binary just generated in the bin for node) [ nn, ( which must be outside chip) # 0 # 0 ( .) {block 942} ( g18 software simulator) compile empty | cr ( prelude) 1250 load ( engine) 1252 8 loads | cr ( opcodes) 1268 4 loads | cr ( display) 1276 6 loads 1248 load 1288 2 loads | cr ( preserve variables) :var nmem :var n2mem [0x20] : nm2m [ nod ] @ !node [ nmem ] @ mem ! | indent [ nod2 ] @ !node [ n2mem ] @ mem ! ; :var big [0x64] : /softsim power [ first ] @ 1 + if drop nm2m ; ] then # 0 [ first ] ! 100 [ big ] ! 0 [ time ] ! 1 [ gap ] ! | indent -1 [ wind? ] ! ; : puka ( nn-a) nn-n 2* $8000 + block ; : code ( nn nn) puka push puka pop 64 move ; | cr ( keyboard) 1292 2 loads | cr ( ports and pins) 1296 2 loads | cr ( interactive) # 1002 # 2 ( loads) | br ( smtm) 0 0 enter | cr ( creeper) # 801 # 707 ( code) | br ( start) /softsim ok h {block 943} {block 944} {block 945} {block 946} {block 947} {block 948} {block 949} {block 950} {block 951} {block 952} {block 953} {block 954} {block 955} {block 956} {block 957} {block 958} {block 959} {block 960} ( app conway's game of life) empt 962 load :var colr : draw dup old @ 1 and jump nocell cell : cells [ 1023 ] for i draw -next ; : gen [ 1023 ] for i tick swap new ! -next [ 1023 ] for i new @ i old ! -next ; : loc [ row ] @ 32 * [ col ] @ + ; : cur loc dup old @ $ff * $ff0000 + color cell ; : back black screen $303010 color 40 40 at 583 dup box ; : colour [ colr ] @ jump green blue : g 0 [ colr ] ! ( falls through) : gg gen pause key? gg ; : s 1 [ colr ] ! gen show back colour cells [ colr ] @ 0 or drop if cur then keyboard ; : clear 1500 8 erase 16 [ row ] ! 16 [ col ] ! s ; : t loc old dup @ 1 or ( xor) swap ! ; : l -1 [ col ] +! [ col ] @ 31 and [ col ] ! ; : u -1 [ row ] +! [ row ] @ 31 and [ row ] ! ; : d 1 [ row ] +! [ row ] @ 31 and [ row ] ! ; : r 1 [ col ] +! [ col ] @ 31 and [ col ] ! ; : h pad nul nul accept nul nul nul nul nul l u d r nul nul nul nul glide glid2 glid3 glid4 clear s g t nul nul nul nul [ $2500 , 0 , $110160c , 0 , $1c1b1a19 , $20d0815 , 0 , clear glide h g {block 961} : s ( stop) : g ( go) : t ( toggle the square) : ludr ( left up down right) : . ( press s to stop then draw a shape using ludr and t to toggle) : . ( then press g to go or s to single step) : 1234 ( create gliders which move to the four corners counting clockwise from the top left) {block 962} ( conway's game of life) :var row [0x10] :var col [0x10] : adj swap 17 * 40 + ; : cell 32 /mod adj adj over over at 16 u+ 16 + box ; : nocell drop ; : old [ 1500 block ] + ; : new [ 1504 block ] + ; : pos swap 32 /mod swap ; : val 32 * + swap over old @ 1 and + ; : up pos swap 31 + 31 and val ; : dn pos swap 1 + 31 and val ; : lt pos 31 + 31 and swap val ; : rt pos 1 + 31 and swap val ; : n [ 0 ] ; : s dup old @ 1 and ; : y [ 1 ] ; : tick dup 0 up lt dn dn rt rt up up nip jump n n s y n n n n n : st ( rc-) [ col ] @ + swap [ row ] @ + 32 * + old 1 swap ! ; : glide 0 2 st 0 1 st 0 0 st 1 0 st 2 1 st ; : glid2 0 0 st 0 1 st 0 2 st 1 2 st 2 1 st ; : glid3 0 2 st 1 2 st 2 2 st 2 1 st 1 0 st ; : glid4 0 0 st 1 0 st 2 0 st 2 1 st 1 2 st ; {block 963} {block 964} {block 965} {block 966} {block 967} {block 968} {block 969} {block 970} {block 971} {block 972} {block 973} {block 974} {block 975} {block 976} {block 977} {block 978} {block 979} {block 980} {block 981} {block 982} {block 983} {block 984} {block 985} {block 986} {block 987} {block 988} {block 989} {block 990} {block 991} {block 992} {block 993} {block 994} {block 995} {block 996} {block 997} {block 998} {block 999} {block 1000} {block 1001} {block 1002} {block 1003} {block 1004} {block 1005} {block 1006} {block 1007} {block 1008} {block 1009} {block 1010} {block 1011} {block 1012} {block 1013} {block 1014} {block 1015} {block 1016} {block 1017} {block 1018} {block 1019} {block 1020} {block 1021} {block 1022} {block 1023} {block 1024} {block 1025} {block 1026} {block 1027} {block 1028} {block 1029} {block 1030} {block 1031} {block 1032} {block 1033} {block 1034} {block 1035} {block 1036} {block 1037} {block 1038} {block 1039} {block 1040} {block 1041} {block 1042} {block 1043} {block 1044} {block 1045} {block 1046} {block 1047} {block 1048} {block 1049} {block 1050} {block 1051} {block 1052} {block 1053} {block 1054} {block 1055} {block 1056} {block 1057} {block 1058} {block 1059} {block 1060} {block 1061} {block 1062} {block 1063} {block 1064} {block 1065} {block 1066} {block 1067} {block 1068} {block 1069} {block 1070} {block 1071} {block 1072} {block 1073} {block 1074} {block 1075} {block 1076} {block 1077} {block 1078} {block 1079} {block 1080} {block 1081} {block 1082} {block 1083} {block 1084} {block 1085} {block 1086} {block 1087} {block 1088} {block 1089} {block 1090} {block 1091} {block 1092} {block 1093} {block 1094} {block 1095} {block 1096} {block 1097} {block 1098} {block 1099} {block 1100} {block 1101} {block 1102} {block 1103} {block 1104} {block 1105} {block 1106} {block 1107} {block 1108} {block 1109} {block 1110} {block 1111} {block 1112} {block 1113} {block 1114} {block 1115} {block 1116} {block 1117} {block 1118} {block 1119} {block 1120} {block 1121} {block 1122} {block 1123} {block 1124} {block 1125} {block 1126} {block 1127} {block 1128} {block 1129} {block 1130} {block 1131} {block 1132} {block 1133} {block 1134} {block 1135} {block 1136} {block 1137} {block 1138} {block 1139} {block 1140} {block 1141} {block 1142} {block 1143} {block 1144} {block 1145} {block 1146} {block 1147} {block 1148} {block 1149} {block 1150} {block 1151} {block 1152} {block 1153} {block 1154} {block 1155} {block 1156} {block 1157} {block 1158} {block 1159} {block 1160} {block 1161} {block 1162} {block 1163} {block 1164} {block 1165} {block 1166} {block 1167} {block 1168} {block 1169} {block 1170} {block 1171} {block 1172} {block 1173} {block 1174} {block 1175} {block 1176} {block 1177} {block 1178} {block 1179} {block 1180} {block 1181} {block 1182} {block 1183} {block 1184} {block 1185} {block 1186} {block 1187} {block 1188} {block 1189} {block 1190} {block 1191} {block 1192} {block 1193} {block 1194} {block 1195} {block 1196} {block 1197} {block 1198} {block 1199} {block 1200} {block 1201} {block 1202} {block 1203} {block 1204} {block 1205} {block 1206} {block 1207} {block 1208} {block 1209} {block 1210} {block 1211} {block 1212} {block 1213} {block 1214} {block 1215} {block 1216} {block 1217} {block 1218} {block 1219} {block 1220} {block 1221} {block 1222} {block 1223} {block 1224} {block 1225} {block 1226} {block 1227} {block 1228} {block 1229} {block 1230} {block 1231} {block 1232} {block 1233} {block 1234} {block 1235} {block 1236} {block 1237} {block 1238} {block 1239} {block 1240} {block 1241} {block 1242} {block 1243} {block 1244} ( spi testbed) :var clk :var btcnt | cr :var cmd [0x300024b] 0 cmd ! :var spbit [0x511d765e] : setmem ( b) $ffffff and 8 * [ comb ] @ nnc | indent !inode swap 0 my 18 * + [ spbit ] ! [ comb ] ! ; 0 setmem | cr : 'cmd ( -a) [ cmd ] dup @ p5v @ low? -if | indent 2* over ! ; ] then - 2* - over ! ; : ?bit [ btcnt ] @ -1 + 0 max dup [ btcnt ] ! | indent dup and drop if 'cmd @ setmem | indent pop drop ; ] then ; : bitn ( n-nn) dup @ swap over 1 + swap ! | indent 18 /mod @ p-n swap 1 + ; : bit17 0 [ spbit ] bitn for 2* next | indent $40000 and drop if drop [ vdd @ ] then | indent p17v ! ; {block 1245} ( spi testbed) | cr boot stream is assembled starting at nnc ] : setmem ( adds an offset and converts to bits) : ?bit ( reads command or allows data write) | br : spi ( assigns initial behavior to softbed) | cr [ first waits for select high , | cr then waits for select low , then watches spi | cr clock and accumulates data until select | cr goes high , at which point it starts over {block 1246} ( spi testbed) : threshold ( -v) [ vdd @ 2 / negate ] ; : clk? ( -n) p1v @ threshold + - 0 max 1 min ; : hi? ( a) @ threshold + 0 max dup and drop ; : lo? ( a) @ threshold + - 0 max dup and drop ; : spi [ 705 ] !node : desel -1 [ cmd ] ! 33 [ btcnt ] ! | cr softbed assign p3v lo? if ; ] then | cr softbed assign clk? [ clk ] ! p3v lo? if | cr softbed assign p3v hi? if desel ; ] then | indent [ clk ] @ clk? dup [ clk ] ! or | indent drop if [ clk ] @ dup and drop | indent if ; ] then ?bit bit17 then then ; {block 1247} ( spi testbed) | cr boot stream is assembled starting at nnc ] : setmem ( adds an offset and converts to bits) : ?bit ( reads command or allows data write) | br : spi ( assigns initial behavior to softbed) | cr [ first waits for select high , | cr then waits for select low , then watches spi | cr clock and accumulates data until select | cr goes high , at which point it starts over {block 1248} ( show directions) :var arrow [0x5c] 92 arrow ! ] : magenta $ff00ff color ; : .dir ( o) [ xy ] @ dup push + [ xy ] ! | indent [ arrow ] @ emit pop [ xy ] ! ; : ?dir ( n-n) dup 1 and drop if pop drop then ; : .ndir 2/ ?dir $160000 .dir ; : .sdir 2/ ?dir $1600a5 .dir ; : .wdir 2/ ?dir $fff5004b .dir ; : .edir 2/ ?dir $37004b .dir ; : .eswn ( a) magenta .ndir .wdir | indent red .sdir .edir drop ; : .wsen ( a) magenta .ndir .edir | indent red .sdir .wdir drop ; : .enws ( a) magenta .sdir .wdir | indent red .ndir .edir drop ; : .wnes ( a) magenta .sdir .edir | indent red .ndir .wdir drop ; : which 92 dbus @ [ wrq ] and drop | indent if -2 + then [ arrow ] ! ; : .drs abus @ dup - $100 and drop | indent if drop ; ] then which $a0 or 8 / | indent [ comb ] @ [ $8000 block negate ] + [ $200 ] / | indent dup 9 / 2 and swap 1 and or | indent jump .enws .wnes .eswn .wsen {block 1249} : which dbus @ dup wrq and drop | indent if drop 90 [ arrow ] ! ; ] then | indent rrq and drop if 92 [ arrow ] ! then ; {block 1250} ( prelude) :var comb [0x480fe00] : xqt? ( a) @ ( b) dup and if push ; ] then drop ; : nodes ( i-n) 2* blks ; : inode ( i-a) nodes [ $8000 block ] + ; : !node ( n) nn-n | -cr : !inode ( i) inode [ comb ] ! ; : my ( o-a) [ comb ] @ + ; ( node variables) : memory ( o-a) $bf and my ; | -cr : rombit ( -m) $80 ; | cr ( 40-7c defined later) : bp [ $7d ] my ; | -cr : entry [ $7e ] my ; | -cr : pins [ $7f ] my ; : nnxmod ( -n) [ 100 ] ; | br : enter ( a nn) !node entry ! ; {block 1251} ( prelude) : comb ( base address of node vars for this node) : xqt? ( execute code starting at adr in preceding variable) {block 1252} ( softsim node variables) | cr ( cpu -pattern- buses and registers) : dbus $40 my ; : uport $41 my ; | -cr : udest $4e my ; : lport $42 my ; | -cr : ldest $4d my ; : dport $44 my ; | -cr : ddest $4b my ; : rport $48 my ; | -cr : rdest $47 my ; | cr ( pins and testbed) : p17v $50 my ; | -cr : p5v $51 my ; : p3v $52 my ; | -cr : p1v $53 my ; : bus $54 my ; | -cr : ios $55 my ; : softbed $56 my ; | cr ( cpu -number- buses and registers) : abus $57 my ; | -cr : ioc $58 my ; : ar $59 my ; | -cr : b $5a my ; : t $5b my ; | -cr : pc $5c my ; | -cr : ir $5d my ; : s $5e my ; | -cr : ss ( i) 7 and $60 my + ; : r $5f my ; | -cr : rs ( i) 7 and $68 my + ; {block 1253} ( softsim node variables) | br ( some node variables make more sense as hardware patterns, others as numbers) {block 1254} ( softsim node variables and shared code) | cr ( variables) : 'tik $43 my ; | -cr : 'tok $45 my ; : sp $46 my ; | -cr : slot $49 my ; : cnt $4a my ; | -cr : pre $4c my ; : cy $4f my ; | -cr : 'op $70 my ; : rp $71 my ; | -cr : mem $72 my ; : pwv $73 my ; | -cr : vis $74 my ; : ip $75 my ; | -cr : bp' $76 my ; : rqs $77 my ; ( 78-7c available) : rrq $80000 ; | -cr : wrq $40000 ; | -cr : brq $c0000 ; | br :var vdd [0x708] 1800 vdd ! macro ] : 2/s ?lit $f8c1 2, 1, ; : 2*s ?lit $e0c1 2, 1, ; forth ] : @10 @ | -cr : 10bit $3ff and ; : p-n | -cr : n-p $15555 or ; : 18bit $3ffff and ; | -cr : 8bit $ff and ; : !18 ( na) push 18bit i @ $fffc0000 and or pop ! ; : !10 ( na) push 10bit i @ $3fc00 and or pop ! ; {block 1255} ( softsim node variables and shared code) | cr ( variables) : 'tik 'tok ( defered execution) : sp slot ( stack and slot pointers) : cnt pre ( timers) : cy 'op ( carry) : rp mem ( return stack pointer , mem dump pointer) : pwv vis : ip bp' ( instruction pointer ,) | indent ( alternate breakpoint) : rqs ( requests from all ports accumulated here) : rrq wrq brq ( read , write , both requests) | br vdd ( is 1.8v) : 2/s ( right shift macro) : 2*s ( left shift macro) : @10 10bit ( mask and store 10 bit address) : p-n n-p ( convert pattern to/from numbers) : 18bit 8bit ( mask address bits) : !18 ( store masked off 18 bit address) : !10 ( store masked off 10 bit address) {block 1256} ( softsim all tiks) : out ( apm) and if drop [ vdd @ ] then swap ! ; : low? ( v-) [ vdd @ 2 / negate ] + drop ; | indent ] begin drop drop ; : ?1p bus [ brq ] over @ over and drop until | indent ioc @ p17v @ low? -if - then $800 | indent and drop if - over @ and swap ! ; | indent ] then over @ or swap ! ; : ?18p p17v [ 8 !node ioc ] @ pwv @ out ?1p ; : ?sp ; : ?ap p17v pwv @ @ $20000 out ?1p ; : ?pins pins @ jump | indent nul ?1p ?1p ?1p ?18p ?sp ?ap | br : @dest ( a-p) $f or @ @ ; : +ours ( pa-p) dup @ swap @dest +or | indent [ brq ] and or 2/ 2/ ; : @ours [ 0 ] uport +ours lport +ours | indent dport +ours rport +ours 2/ rqs ! ; | br : status ?pins @ours ; {block 1257} ( softsim all tiks) : out ( output is zero or 1.8v) : low? ( output negative if voltage is low) | br : @ours ( accumulate r/w requests into) rqs {block 1258} ( softsim all toks) : v-b ( mn-mb) low? -if 0 ; ] then dup ; : @pin ( mpmv-mp) @ v-b v+ ; : @4p ( mp-mp) $20 p5v @pin $8 p3v @pin : @2p ( mp-mp) $2 p1v @pin : @1p ( mp-mp) $20000 p17v @pin ; : @sp ( mp-mp) ; : @pins ( mp-mp) pins @ jump | indent nul @1p @2p @4p @1p @sp @1p | br : !pin ( vm) ioc @ over over and drop if 2* out | cr ; ] then ( in) 2* - and drop if ( tri) drop ; ] then | cr ( weak0) dup @ dup 2/ 2/ negate + swap ! ; : !4p p5v $20 !pin p3v $8 !pin : !2p p1v $2 !pin | -cr : !1p p17v $20000 !pin ; : !18p abus @ $100 or $110 and drop if ; | indent ( up) ] then dbus @ cnt @ - 2* drop | indent -if 18bit then p-n bus ! ; : !sp ; : !ap ; : !pins pins @ jump | indent nul !1p !2p !4p !18p !sp !ap {block 1259} ( softsim all toks) {block 1260} ( softsim suspended tiks and toks) : cnt? cnt @ dup and drop ; | br : -hand ( mp-mp) 2* 2* over over over and or drop ; : -shake [ brq ] rqs @ 2* -hand if -hand if | indent -hand if -hand then then then drop drop ; : wait? cnt? if -shake ; ] then ; | br : +mine ( pa-p) @ [ brq ] and or 2/ 2/ ; : @mine [ 0 ] uport +mine lport +mine | indent dport +mine rport +mine 2/ rqs ! ; : !port ( mo-mo) over over and | indent if drop dbus @ then over dbus + ! 2/ ; : !ports abus @ $155 or dup 4 2/s $8 | indent 4 for !port next drop drop | indent $14 or drop if -1 cnt ! then @mine ; {block 1261} ( softsim suspended tiks and toks) | br : @mine ( accumulate r/w requests into) rqs {block 1262} ( softsim tik/tok and power) :var op [0x10192a04] | cr :var bail 0 bail ! ( breakpoint) : update !pins softbed xqt ios $1fe00 0 @pins | cr push - over @ and pop or rqs @ or swap ! ; : 0ports [ 0 ] cnt ! [ 0 ] dbus ! pc @ abus ! [ 0 ] rqs ! | cr [ 0 ] uport ! [ 0 ] lport ! [ 0 ] dport ! [ 0 ] rport ! ; : ipower ( i) !inode 'tok assign | cr [ 0 ] p17v [ p17v negate softbed + ] fill | cr [ 0 p-n ] abus [ softbed negate 7 rs + ] fill | cr 0 mem ! entry @ pc ! [ $15d ] b ! 4 slot ! [ $a9 ] ip ! : newop 0ports update [ op ] @ 'tik ! 2 pre ! ; : ?bp ip @ slot @ or bp @ or drop if ; | indent ] then [ comb ] @ [ bail ] ! ; : itik ( i) !inode | -cr : tik ?bp 'tik xqt ; : itok ( i) !inode | -cr : tok 'tok xqt ; : tiks [ nns -1 + ] for i itik -next ; : toks [ nns -1 + ] for i itok -next ; : power [ nns -1 + ] for i ipower -next toks tiks ; : /enter [ nns -1 + ] for i dup !inode resets @ | cr rstadr entry ! -next ; /enter {block 1263} ( opcode ---tick--- ---tock---) | cr ( -alu-- ..update.. .!results.) | cr ( ...... ..........) | cr ( -addr- .upd,bus,? /) | br ( alu ops don't have to change tick;) | cr ( addr ops set abus,dbus in tick, then check for completion; if not done, tock writes dbus to ports and tick checks again, repeated til done. when done, tock clears ports and resumes opcode.) {block 1264} ( softsim read/write access) : @port ( mop-mop) push over over and | indent if dbus + @dest then pop +or over u+ ; : pr/o dbus @ [ wrq ] ? drop if ; ] then | cr abus @ 4 2/s $15 or $1 0 | cr 4 for @port next nip nip 18bit dbus ! ; | br : ir/w abus @ $15d or drop if ; ] then | indent dbus @ [ wrq ] ? if 18bit p-n ioc ! ; | indent ] then drop ios @ dbus ! ; | br : ram! ( w) abus @ [ rombit ] ? if drop drop ; | indent ] then memory ! ; : mr/w dbus @ [ wrq ] ? if 18bit ram! ; | indent ] then drop abus @ memory @ dbus ! ; {block 1265} ( softsim read/write access) {block 1266} ( softsim port, register, and memory access) | cr ( tik0) | -cr : por@! status 'tok assign | cr ( tok0) !ports update -1 cnt +! 'tik assign | cr ( tiki) status wait? if 'tok assign | cr ( toki) update -1 cnt +! ; | cr ( tike) ] then pr/o 'tok assign : toke 'op xqt pre xqt newop ; | br ( tike) | -cr : reg@! status 'tok assign | cr ( toke) update ir/w toke ; | br ] begin 'tik assign | -cr | cr ( tiki) : mem@! status cnt? while 'tok assign | cr ( toki) update -1 cnt +! end | cr ( tike) then 'tok assign | cr ( toke) mr/w toke ; | br : access ( apc) pop ( group) pre ! pop ( op) 'op ! | indent cnt ! dbus ! $1ff and dup abus ! | indent $100 ? if $155 or $f0 ? if | cr ( ports m) drop 1 cnt ! por@! ; | cr ( regs) ] then ( 0) cnt ! reg@! ; | cr ( mem) ] then ( x) drop mem@! ; | br {block 1267} ( opcode ---tick--- ---tock---) | cr ( -alu-- ..update.. .!results.) | cr ( ...... ..........) | cr ( -addr- .upd,bus,? /) | br ( alu ops don't have to change tick;) | cr ( addr ops set abus,dbus in tick, then check for completion; if not done, tock writes dbus to ports and tick checks again, repeated til done. when done, tock clears ports and resumes opcode.) {block 1268} ( softsim ops common code) : ++@ ( a-n) dup push @ 1 + dup pop ! ; : @-- ( a-n) dup push @ dup -1 + pop ! ; : +t ( n) t @ s @ sp ++@ ss ! s ! t ! ; : -t ( -n) t @ s @ t ! sp @-- ss @ s ! ; : +r ( n) r @ rp ++@ rs ! r ! ; : -r ( -n) r @ rp @-- rs @ r ! ; : bin ( -nn) -t t @ ; : @19 ( -n) @ dup $20000 and 2* or ; | br : 3bit ( a-a) $7 and pc @ $f8 and or ; : addr ( a-a) slot @ jump | indent 10bit 8bit 3bit nul nul | br : ++abus ( -n) abus @ $100 ? if ; ] then $7f : /++/ ( nm-n) over dup 1 + or and or ; : pc++ ++abus pc ! ; : ar++ ++abus ar !10 ; | br : ?s+ ( n-n) ar @ 1 ? if push s @19 + pop then | cr 2/ over 1 and drop if $20000 or then ar ! ; : ?+c ( n-n) pc @ - $200 and drop if ; ] then | indent cy @ + dup 18 2/s cy ! ; {block 1269} ( softsim ops common code) | br : @19 ( fetch then extend sign into bit 18) {block 1270} ( softsim ops control) : /f/ ( a) [ rrq ] 2 : /p/ ( adc) access abus @ 2* 2* ip ! | indent dbus @ p-n ir ! pc++ : 0/ 0 slot ! ; : /u status pop 'op ! 'tok assign | indent update 'op xqt 2 pre ! ; : +/ 1 slot +! ; | br : ret r @ /f/ -r drop ; : ex r @ /f/ pc @ r !10 ; : jmp ir @ addr /f/ nop ; : call ir @ addr /f/ r @ +r pc @ r !10 ; | br : ur r @ dup and drop if | indent ( slot0) /u -1 r +! 0/ ; | indent ( slot+) ] then /u -r drop +/ ; : jr r @ dup and drop if | indent ( jump) ir @ addr /f/ -1 r +! ; | indent ( fall) ] then pc @ /f/ -r drop ; : jz $3ffff | -cr : jc t @ and drop if | indent ( fall) | -cr : fetch pc @ /f/ nop ; | indent ( jump) ] then jmp ; : jp $20000 jc ; {block 1271} ( softsim ops control) {block 1272} ( softsim ops read/write and alu.1) : /w/ ( r) @ t @ n-p [ wrq ] or 1 access -t drop +/ ; : /r/ ( r) @ [ rrq ] 1 access dbus @ p-n +t +/ ; | br : @a ar /r/ nop ; | -cr : !a ar /w/ nop ; : @b b /r/ nop ; | -cr : !b b /w/ nop ; : @+ ar /r/ ar++ ; | -cr : !+ ar /w/ ar++ ; : @p pc /r/ pc++ ; | -cr : !p pc /w/ pc++ ; | br : /a/ slot @ 3 or drop if ( slot0-2) | indent status pop 'op ! 'tok assign | indent update 'op xqt -1 pre +! +/ ; | cr ] then ( prefetch) pc @ [ rrq ] pre @ 0 max /p/ ; | br : +* /a/ t @19 ?s+ 2/ t ! ; : 2*x /a/ t @ 2* 18bit t ! ; : 2/x /a/ t @19 2/ t ! ; : -x /a/ t @ $3ffff or t ! ; | br : +x /a/ bin + ?+c 18bit t ! ; : andx /a/ bin and t ! ; : orx /a/ bin or t ! ; : t! /a/ -t drop ; {block 1273} ( softsim ops read/write and alu.1) {block 1274} ( softsim ops alu.2 and jump table) : t@ /a/ t @ +t ; | -cr : .x /a/ nop ; : r@ /a/ -r +t ; | -cr : r! /a/ -t +r ; : s@ /a/ s @ +t ; | -cr : b! /a/ -t 10bit b ! ; : a@ /a/ ar @ +t ; | -cr : a!x /a/ -t ar ! ; | br : s0 ( p-o) 13 2/s $1f and ; : s1 ( p-o) 8 2/s $1f and ; : s2 ( p-o) 3 2/s $1f and ; : s3 ( p-o) 2* 2* $1f and ; : s4 ( p-o) drop $20 ; : @op ( ps-o) jump s0 s1 s2 s3 s4 | br : !op [ op ] assign ir @ n-p slot @ @op jump | indent ret ex jmp call ur jr jz jp | indent @p @+ @b @a !p !+ !b !a | indent +* 2*x 2/x -x +x andx orx t! | indent t@ r@ s@ a@ .x r! b! a!x | indent fetch [ !op {block 1275} {block 1276} ( softsim display ops) :var ?op [0x10193435] : tab/2 ( xy) push [ 11 ] * [ 3 ] + pop [ 15 ] * [ 3 ] + | indent over lm at ; : cr/2 cr -15 [ xy ] +! ; : emit/2 ( c) [ 48 ] + emit : -sp/2 [ -11 $10000 * ] nop [ xy ] +! ; | br : v- ( xyxy-xy) push negate pop negate v+ ; | br : 'ops align strings ( ; ex jump call unext next if -if @p @+ @b @ !p !+ !b ! +* 2* 2/ - + and or drop dup pop over a . push b! a! fetch) | br : .op ( i) 'ops @ [ $fffffff0 ] and | indent begin dup and while unpack emit/2 | indent end then drop sp/2 ; : ?more ( o) [ $18 ] ? if drop ( t) ; | indent ] then [ $3 ] ? if dup or drop ( f) ; | indent ] then [ $4 ] and drop ( t/f) ; : .ops ( p) 0 4 for [ ?op ] xqt | indent over over @op dup .op | indent ?more while [ 1 ] + next ; ] then | indent pop drop ; {block 1277} ( softsim display ops) {block 1278} ( softsim display numbers) :var base [0x10] : hex 16 [ base ] ! ; : dec 10 [ base ] ! ; : digits ( i-n) 1 + 0 max 17 min align tbl | indent [ 47 , 24 , 25 , 26 , 27 , | indent 28 , 29 , 30 , 31 , | indent 32 , 33 , 5 , 19 , | indent 10 , 16 , 4 , 14 , 48 , ] : digit ( i) digits emit/2 ; : .n ( nc) dup push -1 + | indent for [ base ] @ /mod next | indent begin digit next ; | br : awake cnt? -if -shake | indent if silver pop drop ; ] then then ; : ?blue awake | -cr : blue $4040ff color ; : ?cyan awake | -cr : cyan $ffff color ; : yellow $e0e000 color ; : ?white awake white ; : ?green awake | -cr : green $d000 color ; : ?red awake red ; : ?brk [ comb ] @ [ bail ] @ or drop | indent if ; ] then [ xy ] @ $10000 /mod | indent 56 + swap 136 + $3f3f color box ; {block 1279} ( softsim display) : base ( radix for small character number display) : digits ( table of character values) : digit ( display digit as small character) | cr ( ? if too low, pacman if too high, for debug) : .n ( display) c ( digits of) n ( in the current) [ base : hex ( change) [ base ( to hex) : dec ( change) [ base ( to decimal) : nod nod2 ( focus on two nodes) : switch ( swap focus nodes) : wake? ( a node is awake if) slp ( is) # 3 : ?white : ?green : ?blue : ?red ( change to named color if awake) : me? ( red if this node number has focus) {block 1280} ( softsim display directions) | cr : .some ( p- -sp/2) $80 ? if ( r) 1 emit/2 then | indent $40 ? if ( d) 16 emit/2 then | indent $20 ? if ( l) 12 emit/2 then | indent $10 ? if ( u) 22 emit/2 then | indent drop pop drop ; : .rdlu ( p-) $f0 over over or and drop | indent if .some ; ] then ( a) 5 emit/2 | indent ( l) 12 emit/2 ( l) 12 emit/2 drop pop drop ; : .iocs ( p- i) 7 emit/2 ( o) 3 emit/2 | indent drop pop drop ; : .adirs ( a-?) $100 over over or and drop if ( -n) ; : .dirs ( a-?) dup n-p if $15400 or $3fd00 and | indent while then drop ( -n) ; | indent ] then drop sp/2 sp/2 | indent then 8bit $55 or $f0 ? if .rdlu ; | indent ] then $8 ? if .iocs ; | indent ] then sp/2 ( ?) 47 emit/2 drop pop drop ; : noadr ( w) drop ; | -cr : .10b ( w) p-n $3ff and 3 .n ; : .8b ( w) p-n $ff and 2 .n ; : .3b ( w) 43 emit/2 p-n 7 and digit ; : .adr ( wi) over over @op -2 + drop | indent -if drop drop ; ] then | indent jump .10b .8b .3b noadr noadr {block 1281} ( softsim display directions) | cr {block 1282} ( softsim display registers) : adr. abus @10 .adirs 3 .n ; : db. dbus @ p-n 5 .n ; : tr. t @ 5 .n ; : sr. s @ 5 .n ; : ar. ar @ .dirs 5 .n ; : br. b @10 .adirs 3 .n ; : ioc. ioc @ 5 .n ; : ios. ios @ p-n 5 .n ; : rqs. rqs @ 9 2/s $ff and $2 .n ; : ir. ir @ 5 .n ; : op. ir @ n-p slot @ @op .op ; : pc. pc @10 .adirs 3 .n ; : rr. r @ 5 .n ; : sl. slot @ digit ; : rp. rport @ 5 .n ; : dp. dport @ 5 .n ; : lp. lport @ 5 .n ; : up. uport @ 5 .n ; | br : ?+- ( -c) -shake if ( -) 35 ; ] then white ( +) 43 ; : cnt. cnt @ dup and | indent -if drop ?+- emit/2 ; ] then digit ; {block 1283} ( softsim display registers) | br ( building blocks for the 2d display, com.) {block 1284} ( softsim display pins) : i/o ( m) cyan ioc @ and drop if yellow then ; : .io ( m) dup i/o ios @ and if drop $1 then digit ; : .1p $20000 .io ; | -cr : .2p .1p $2 .io ; : .4p .1p $20 .io $8 .io $2 .io ; : .18p $1000 i/o bus @ 5 .n ; : .sp | -cr : .ap ( dummy) red [ 0 ] 2 .n ; : .pns pins @ jump | indent nul .1p .2p .4p .18p .sp .ap : .pins [ comb ] @ [ $8000 block negate ] + [ $200 ] / | indent dup -17 + drop -if drop 165 [ xy ] +! | indent .pns ; ] then 18 mod -17 + drop | indent -if .pns ; ] then $2c0000 [ xy ] +! .pns ; : mv. ( ab) i/o @ sp/2 4 .n ; : .mvs p17v $20000 mv. p5v $20 mv. | indent p3v $8 mv. p1v $2 mv. ; : ?pex [ ?op ] assign ( n-n) | indent dup slot @ or drop if white ; ] then red : /?op [ ?op ] assign white ; /?op ] : ?pc ( n-nf) dup pc @ or [ $40 - ] and drop | cr if dup 2* 2* ip @ or [ $100 - ] and drop | cr if [ 1 ] ; ] then red ?pex [ 0 ] ; ] then yellow [ 0 ] ; : ?ip ( nf-n) dup and drop | indent if ?green /?op ; ] then ; {block 1285} ( softsim display pins) {block 1286} ( softsim display big nodes) :var nod [0x6b] :var nod2 [0x91] | cr ] begin drop red ; : me? ( i) dup [ nod ] @ or drop until | indent [ nod2 ] @ or drop if ; ] then yellow ; : .focus ( i) dup me? n-nn dec 3 .n hex ; : stack sp @ 8 for dup ss @ 5 .n | indent cr/2 -1 + next drop ; : return rp @ 8 for 1 + dup rs @ 5 .n | indent cr/2 next drop ; : stacks white return ?red rr. cr/2 | indent ?green tr. cr/2 sr. cr/2 white stack ; : /mem. ( i) mem @ + dup white ?pc swap 2 .n | indent sp/2 ?ip memory @ dup p-n 5 .n | indent sp/2 .ops .adr cr/2 ; : mem. mem @ $b0 and mem ! 15 for i /mem. -next ; : .pex ip @ dup $400 and drop if | indent red -sp/2 2/ 2/ $3ff and 3 .n sp/2 | indent ir. sp/2 ir @ p-n ?pex .ops .adr ; | indent ] then drop ; : .big ( hvn) dup push !inode hex | indent over 30 + over tab/2 stacks | indent tab/2 pop .focus sp/2 white ar. | indent cr/2 space space space br. | indent cr/2 .pex cr/2 mem. cr/2 | indent ( cmd @ h. cr spbit @ h. cr) ; {block 1287} ( softsim display big nodes) {block 1288} ( softsim display small nodes) | cr :var xo :var yo :var xs [0x8] 8 xs ! :var ys [0x4] 4 ys ! ] : com. ( i) hex [ xy ] @ push .drs .pins pop [ xy ] ! cr/2 -sp/2 silver ( i) .focus white adr. cr/2 ?brk | cr -sp/2 ?white sl. ?green op. cr/2 | indent ?white ir. cr/2 | indent ?green cnt. sp/2 ?white pc. cr/2 | indent ?white ar. cr/2 | cr ( -sp/2 ?cyan ?blue rqs.) space ?white br. | cr cr/2 ?cyan ioc. cr/2 ?red rr. cr/2 | cr ?green tr. cr/2 sr. ; : ?com ( i) dup !inode vis @ dup and | indent if [ $10000 ] /mod tab/2 com. ; | indent ] then drop drop ; : coms. nnx [ xs ] @ negate + [ xo ] @ [ yo ] @ [ nnx ] * + | cr [ ys ] @ for [ xs ] @ for dup ?com 1 + next | cr over + next drop drop ; : out? ( i-xy) [ nnx ] /mod [ xo ] @ [ yo ] @ v- | indent over over +or push over over | indent [ xs ] @ [ ys ] @ v- and - pop +or drop ; : loc ( i-l) dup !inode out? -if drop drop 0 ; | cr ] then push ( x) [ 7 ] * [ 1 ] + | indent pop ( y) - [ ys ] @ + # 11 [ 12 ] * ( hv) [ 16 ] 2*s + ; : !vis [ comb ] @ [ nns -1 + | indent ] for i loc vis ! -next [ comb ] ! ; {block 1289} ( softsim display small nodes) {block 1290} ( softsim display map and screen) | cr :var gap [0x64] :var wind? [0xffffffff] :var time [0x5483] : xm ( -n) nnx [ xs ] @ negate + ; : ym ( -n) nny [ ys ] @ negate + ; : .vis ( hv) 2/ [ yo ] @ - ym + [ 2 ] + + [ 30 ] * push | indent 2/ [ xo ] @ + [ 22 ] * pop over over at | indent [ xs ] @ [ 22 ] * [ ys ] @ [ 30 ] * v+ blue box ; : .node ( n) nn-n dup !inode ?green 48 emit | indent me? $ffea0000 [ xy ] +! 21 emit ; : .line ( n) cr 17 for dup .node 1 + -next drop ; : .map ( hv) over over .vis tab/2 | indent 7 for i [ nnxmod ] * .line -next ; : .wind ( hv) [ wind? ] @ dup and drop if .map ; | indent ] then 1 1 v+ [ nod2 ] @ .big ; : bg $1f1f1f color | indent 25 for 46 for 48 emit next cr next ; : .so ( bg) [ comb ] @ coms. | indent 56 0 .wind 57 22 [ nod ] @ .big cr/2 | indent white [ time ] @ . cr [ gap ] @ . [ comb ] ! ; : ok !vis show black screen text .so keyboard ; {block 1291} ( softsim display map and screen) {block 1292} ( softsim keyboard handler) : wtog [ wind? ] @ -1 or [ wind? ] ! ; : we 1 | -cr : dx ( n) [ xo ] swap over @ + xm : dw ( ann) min 0 max swap ! !vis ; : ww -1 dx ; : wn 1 | -cr : dy ( n) [ yo ] swap over @ + ym dw ; : ws -1 dy ; : wy+ [ ys ] @ 1 + 4 min [ ys ] ! 0 dy ; : wy- [ ys ] @ -1 + 1 max [ ys ] ! 0 dy ; : wx+ [ xs ] @ 1 + 8 min [ xs ] ! 0 dx ; : wx- [ xs ] @ -1 + 1 max [ xs ] ! 0 dx ; : ftog [ nod2 ] @ [ nod ] @ [ nod2 ] ! | indent [ nmem ] @ [ n2mem ] @ [ nmem ] ! [ n2mem ] ! : nod! ( n) dup !inode [ nod ] ! mem @ [ nmem ] ! ; : fw -1 : +nod [ nod ] @ + [ 0 ] max [ nns -1 + ] min nod! ; : fn [ nnx ] nop : ++nod [ nod ] @ over +nod swap over + | indent [ nod ] @ or drop if nod! ; ] then drop ; : fs [ nnx negate ] ++nod ; | -cr : fe 1 +nod ; : mh [ 16 64 + ] nop : mhl [ comb ] @ swap [ nod ] @ !inode | cr mem @ + [ $bf ] and dup [ nmem ] ! mem ! [ comb ] ! ; : ml [ -16 ] mhl ; {block 1293} ( softsim keyboard handler) {block 1294} ( softsim keyboard handler) : gtog [ big ] @ 1 or [ gap ] @ or [ gap ] ! ; : +gap 1 | -cr : +g [ big ] @ + 2 max dup [ big ] ! [ gap ] ! ; : ++gap 100 +g ; | -cr : --gap -100 +g ; | -cr : -gap -1 +g ; | br : brk? [ bail ] @ dup and drop ; : break ( san) bp @ bp' ! !node 2* 2* or bp ! ; : btog ( n) !node bp @ bp' @ bp ! bp' ! ; : restart 0 [ time ] ! [ comb ] @ power nm2m [ comb ] ! ; : step 1 [ time ] +! [ comb ] @ toks tiks [ comb ] ! ; : quick [ gap ] @ | -cr : steps ( n) 0 [ bail ] ! for | indent step brk? if pop drop ; ] then next ; : upto ( n) [ time ] @ negate + 0 max steps ; : go quick pause brk? if ; ] then key? go ; | br : h pad ( -n.alt) nul nul accept nul ( ur) ww wn ws we ( mr) fw fn fs fe ( lr) ftog mh ml wtog | cr ( ul) wy+ wx+ --gap ++gap | cr ( ml) restart gtog go quick ( ll) wy- wx- -gap +gap ( n.alt) [ $2500 , ( ur) $110160c , $110160c , $f0c1403 , ( ul) $2b230f02 , $80d0e12 , $2b230608 , {block 1295} ( softsim keyboard handler) | br : h ( keyboard handler) | indent [ ++ ( fastest faster) | indent fgs ( fast go step) | indent -- ( slowest slower) | cr | indent ludr ( left up down right) window | indent ludr ( left up down right) focus | indent oudw ( other up down window) memory dump | cr | indent . ( quit) | br note/ ] pad ( other-keys del-key space-bar alt-key) [ also, 1st chars are ( del-key space-bar alt-key) right-to-left {block 1296} ( softsim connect node ports) :var edge 0 edge ! ] : !dests ( onn-on) !inode over dbus + push | indent dup !inode over dbus + pop | indent ( onaa) over over $f or ! swap $f or ! ; : row ( on-o) [ nnx ] for dup [ nnx ] + !dests 1 + | indent next drop ; : rows ( non) for over row [ nnx 2 * ] u+ | indent next drop drop ; : col ( on-o) [ nny ] for dup 1 + !dests [ nnx ] + | indent next drop ; : cols ( non) for over col 2 u+ next drop drop ; | br dbus negate ] : rights 0 [ dup rport + ] nop [ nnx 2/ ] cols ; : lefts 1 [ dup lport + ] nop [ nnx 2/ -1 + ] cols ; : downs 0 [ dup dport + ] nop [ nny 2/ ] rows ; : ups nnx [ uport + ] nop [ nny 2/ -1 + ] rows ; : edges [ nns -1 + ] for i !inode | indent 0 pins ! [ ' nul ] softbed ! | indent [ edge ] dup ldest ! udest ! -next ; : connect edges rights lefts ups downs ; | cr connect {block 1297} ( softsim connect node ports) | br edge ( is the dummy destination for unassigned) | cr ( left and up ports) : !dests ( using a port index /1,2,4,8/ and two) | cr ( nodes, node numbers, stores both port) | cr ( addresses in the other's *dest variable) : row | -cr : rows | -cr : col | -cr : cols ( calc neighbors and assign *dest) : rights | -cr : downs | -cr : lefts | -cr : ups : edges : connect {block 1298} ( softsim assign node pins and wake-up) : !l ( nn) swap !node pins ! bus ldest ! ; : !u ( nn) swap !node pins ! bus udest ! ; : l1, ( n) 1 !l ; | -cr : u1, ( n) 1 !u ; : l2, ( n) 2 !l ; | -cr : u2, ( n) 2 !u ; : u4, ( n) 3 !u ; | -cr : u18, ( nm) swap 4 !u pwv ! ; : us, ( n) 5 !u ( dummy) ; : !an ( nn) !node ios swap !node pwv ! 6 pins ! ; : la, ( nn) !an bus ldest ! ; : ua, ( nn) !an bus udest ! ; | br ( assign pins) | cr ( single) 100 l1, 317 l1, 417 l1, 500 l1, 600 l1, 217 l1, 517 l1, 715 u1, | cr ( serdes) 1 us, 701 us, ( spi) 705 u4, | cr ( async) 708 u2, ( 1wire) 200 l1, ( sync) 300 l2, | cr ( parallel) 7 $200 u18, 8 u4, 9 $80 u18, | cr ( analog) 117 217 la, 617 517 la, 709 715 ua, | cr 713 715 ua, 717 715 ua, {block 1299} ( softsim assign node pins and wake-up) {block 1300} ( test code for chip) reclaim | br ( custom code) 1302 load ( exit) | cr ( creeper) # 707 ( node) # 1346 ( load) # 801 ( bin) | cr ( ats async) # 708 ( node) # 1330 ( load) # 802 ( bin) | br ( ide serial) 708 node 1372 load | indent ( sync) 300 node 1374 load | indent ( wire) 17 node 1376 load | indent ( end) 16 node 1378 load | cr ( allnodes) 15 node 1350 load | br ( e/exforth) # 718 ( load) | cr ( smtm test) 0 node 1342 load exit | br ( */ exerciser) 402 node 1354 load | indent 401 node 1356 load 400 node 1358 load | cr ( serdes) 1 node 1360 load 701 node 1362 load | cr ( spi flash write) 702 node 1364 load | cr ( ana) 715 node 1366 load 717 node 1368 load | cr {block 1301} ( this block is loaded to compile test code for any desired nodes. write *nnn node* either here before loading a node's source, or in the source itself. the *node* phrase compiles the appropriate rom for the given node so that test code may reference the rom.) | br ( things like ide and common tests are loaded here, and this base code is presently assigned up at the top of this area just below 1380. to simplify base maintenance, please use) # 1302 ( for your own testing and load it from here. when we begin using personal space above) # 1440 ( your own tests can go there.) {block 1302} ( custom test code) {block 1303} ( this load block, and the following) # 25 ( source/shadow pairs, are yours to do with as you please!) {block 1304} ( eforth rom code) | br ( sdram addr) 9 node 1320 load | indent ( ctrl) 8 node 1322 load ( ram) | indent ( data) 7 node 1324 load | indent ( idle) 108 node 1326 load | indent ( user) 107 node 1328 load | br ( eforth stack) 106 node 1310 2 loads | indent ( bitsy) 105 node 1306 2 loads | br {block 1305} ( load block for rom resident sdram and eforth in the ga144. loaded by) # 940 ( even for tapeout.) {block 1306} ( e4 bitsy 1of2) | cr $aa org ] : rp-- ( a-a') = $aa -1 . + ; : bs@ | -cr : 'else ( a-w) = $ac | indent @p+ !b !b . ( ') @p+ x@ ( ') | indent @p+ !b @b ; ( ') ] . . . !p+ ( ') : rp@ ( ri-ri) = $b0 over rp-- : pshbs ( w-) = $b1 @p+ !b !b ; ( ') ] @p+ pshw ( ') : 'r@ ( ri-ri) = $b3 over rp-- : @w ( a-) = $b4 bs@ pshbs ; : rfrom ( ri-r'i) = $b6 over rp-- over over @w ; : popbs ( -w) = $b9 @p+ !b @b ; ( ') ] !p+ pops ( ') : pshr ( aw-a) = $bb | indent @p+ !b !b dup ( ') @p+ . . @p+ ( ') | indent !b @p+ !b . ( ') x! ( ') : rp++ | -cr : ip++ ( a-a') = $bf 1 . + ; : tor ( ri-r'i) = $c1 push popbs pshr pop ; : rp! ( i-ri) = $c4 push popbs rp++ pop ; | br : 'con ( ra-r'i) = $c7 bs@ : 'var ( ra-r'i) = $c8 dup pshbs : 'exit ( rx-r'i) = $c9 drop rp-- dup bs@ ; {block 1307} ( e4 bitsy shadow 1of2) : rp-- ( internal) : x@ ( internal) | -cr : 'else ( eforth microcode) : rp@ ( eforth microcode) : pshw ( internal) : 'r@ ( eforth microcode) : @w ( internal) : rfrom ( eforth microcode) : popw ( internal) : pshr ( internal) : rp++ ( internal) | -cr : ip++ ( internal) : tor ( eforth microcode) : rp! ( internal) : 'con ( eforth microcode) : 'var ( eforth microcode) : 'exit ( eforth microcode) {block 1308} ( e4 bitsy 2of2) | br = $cb ] begin dup 2* -if | indent ( code.s-xt) drop !b ahead [ swap ] then | indent ( code.r-xt) drop push ;' | cr : bitsy = $ce then dup bs@ push ip++ : xxt = $d0 pop -until | indent ( list-xt) push pshr pop bitsy ; | br ( execute) : 'ex = $d3 ( xt--) popbs push xxt ; : 'lit = $d5 ( --w) dup bs@ push ip++ pop pshbs ; : 'if = $d8 ( f--) popbs if | indent drop ip++ ; ] then drop 'else ; | br = $dc exit ( start is run in ide) : start right a! ( terminal) left b! ( stack) | indent -32 0 ( rp.ip) bitsy ; {block 1309} ( e4 bitsy 2of2 shadow) : 'con ( runtime constant) : 'var ( runtime variable) : 'exit ( runtime end call) | br : btc ( label e4 interpreter) | cr ( bitsy main interpreter entry) : xxt ( internal) | br : 'ex ( runtime execute) : 'lit ( runtime literal) : 'if ( runtime conditional branch) | cr : @io ( return the serial bit delay) : !io ( init serial 0-autobps n-fixedbps) : t!io ( internal) : tx! ( transmit one character) : ttx! ( internal) : trx? ( internal) : rx? ( test recieved char - 0 if no char else 18bit inverted char) {block 1310} ( e4 stack 1of2) | cr $3c org ] : xa@ ( a-) = $3c @p+ !b !b ; ( ') ] @p+ sd@ ( ') : xa! ( a-) = $3e @p+ !b !b ; ( ') ] @p+ sd! ( ') | cr = $40 [ $aa org ] : 'c@ | -cr : '@ | -cr : x@ ( a-w) = $aa xa@ @b ; : sp++ | -cr : char+ | -cr : cell+ : 1+ ( w-w') = $ac 1 . + ; : popt ( p-xp't) = $ae dup sp++ over x@ ; : sp-- | -cr : char- | -cr : cell- : 1- ( w-w') = $b0 -1 . + ; : psht ( pt-p') = $b2 push sp-- pop over : x! ( wa-) = $b4 xa! !b ; : 'c! | -cr : '! ( pwa-p'st) = $b6 x! : popts ( p-p'st) = $b7 popt : pops ( pt-p'st) = $b8 push popt pop ; : pshs ( pst-p't) = $ba push psht pop ; : page@ ( pst-p'tw) = $bc @p+ !b @b . ( ') dup !p+ ; ( ') : pshw ( pstw-p'tw) = $be push pshs pop ; : page! ( ptw-p'st) = $c0 @p+ !b !b . ( ') drop @p+ ; ( ') ] pops ; : sp@ = $c3 ( -a) pshs psht dup pops ; : sp! = $c6 ( a-) pshs popts ; {block 1311} ( e4 stack 1of2 shadow) : 'c@ ( runtime c@) : '@ ( runtime @) : x@ ( inline external ram) : sp++ ( increment data stack pointer) : char+ ( increment address by char size) : cell+ ( increment address by cell size) : 1+ ( increment by one) : popt ( internal) : sp-- ( decrement data stack pointer) : char- ( decrement address by char size) : cell- ( decrement address by cell size) : 1- ( decrement by one) : psht ( internal) : x! : 'c! ( runtime c!) : '! ( runtime !) : popts ( internal) : pops ( internal) : pshs ( internal) : page@ ( inline external ram) : pshw ( inline external ram) : page! ( inline external ram) {block 1312} ( e4 stack 2of2) : 'drop = $c8 ( w-) drop pops ; : 'over = $c9 ( ww-www) over pshw ; : 'dup = $ca ( w-ww) dup pshw ; : 'swap = $cb ( ab-ba) over push push drop pop pop ; : '2/ = $cd ( w-w) 2/ ; | -cr : '2* = $ce ( w-w) 2* ; : um+ = $cf ( uu-uc) over or -if | indent = $d0 over or . + -if : 'nc = $d2 ( -0) dup dup or ; : 'cy = $d3 ( -1) then 1 ; | indent = $d5 ] then over or -if + 'cy ; ] then + 'nc ; : zless = $d8 ( n-f) -if dup or - ; ] then dup or ; : 'or = $db ( ww-w) over - and : 'xor = $dc ( ww-w) or pops ; : 'and = $dd ( ww-w) and pops ; : negate = $de ( w-w) 1- : invert ( w-w') = $df begin ( .) - ; : zeq ( w-f) = $e0 until dup or ; : '+ ( pww-p'sw') = $e2 + pops ; = $e3 ( exit) : swap- = $e3 ( ww-w) - . + - pops ; = $e5 | br = $e5 exit ( start is run in ide) : start right b! ( sdram) | cr 0 dup dup ( sp.s.t) --l- ; ( bitsy) {block 1313} ( e4 stack 2of2 shadow) : pshw ( internal) : sp@ ( get data stack pointer) : sp! ( set data stack pointer) : 'drop ( runtime drop) : 'over ( runtime over) : 'dup ( runtime dup) : 'swap ( runtime swap) : zless ( runtime zero less) : um+ ( add with carry) : 'nc ( no carry is 0) : 'cy ( carry set is 1) : 'xor ( runtime exclusive or) : 'and ( runtime and) : 'or ( runtime inclusive or) : negate ( runtime negate) : invert ( runtime invert) : zeq ( runtime zero equals) : '+ ( runtime +) : '2/ ( runtime 2/) : '2* ( runtime 2*) {block 1314} ( e4th bitsy) | br : @io = $31 ( --u) @p+ ! @ . ( ') push t'@io ( ') pshw ; | cr ( init io device 0-autobps n-fixedbps) : !io = $34 ( u--) popw : t!io = $35 ( u-) @p+ ! ! ; ( ') ] @p+ t'!io ; ( ') : tx! = $37 ( c--) popw : ttx! = $38 ( c-) @p+ ! ! ; ( ') ] @p+ - ; ( ') : trx? = $3a ( -c'0) @p+ ! @ ; ( ') ] !p+ t'rx? ; ( ') : rx? = $3c ( --c'0) trx? pshw ; {block 1315} {block 1316} ( e4 terminal 1of2 - serial i/o) | br : getchar = $0 ( delay in'0 f - delay -char f) push over 2/ for . unext .. ( middle of start-bit) | cr 7 for ( 8-data bits) | indent over for . unext .. | indent $1ffff @b ( middle +/-) | indent over - and push and pop or | cr 2/ next | cr 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ .. $ff and - dup | cr begin drop @b -until drop pop ; | br : putchar = $13 ( delay in'0 c - delay in'0) | cr push over pop | cr 2* $3fe00 dup push - and pop or | cr 10 for ( 1-start, 8-data, 2-stop bits) | indent 2 over over 2/ and or !b | indent over for . unext .. | cr 2/ next drop drop ; = $21 {block 1317} ( note. both tx and rx are completely in stock rs232 polarity, i.e. mark lo space hi, data low start low. ultimately we need to invert the whole thing for compatibility with s40 boot node conventions but for testing purposes we will leave it as is and invert the rs232 board.) | br : getchar ( called after seeing leading edge of start bit. returns clean inverted character.) | br : putchar ( takes a dirty octet of data and transmits it as startbit, eight data bits no parity one stop bit.) {block 1318} ( e4 terminal 2of2 - bitsy commands) | br : baud = $21 ( 0-d) - push ( space is 0'0000.0100'1) | cr = $22 begin @b - -until ( at start-bit) | cr = $23 begin @b -until ( at 1-bit) | cr = $24 begin @b zif then - . -until ( at 0-bits) | cr = $26 begin @b zif then . -until ( at stop-bit) | cr pop - ( n) dup 2/ . + ( 1.5n) ; | br : @io = $2a ( delay - delay in'0 0) | indent pop a! push dup or baud ! | indent pop pop dup dup or ; | indent ] begin baud : !io = $2f ( delay in'0 u - delay 0 0) | indent until ( abandon old values) : rx? = $30 ( delay - delay 0 0) 0 dup ; | br : terminal = $32 ( delay in'0 x) | cr begin drop @b - -if getchar then | indent - 2* 2* -if drop .. r--- ( bitsy) then | cr -until ( delay in'0 -c) - putchar dup terminal ; = $3c {block 1319} : @io ( return the serial bit delay) | br : !io ( sets nonzero baud rate delay over garbage. if zero, waits for a space character to autobaud with.) | br : rx? ( test for received char) | br : tx! ( send one character) | br : terminal ( polling loop for character receive or send) {block 1320} ( sdram address-bus) | cr ( copy command to address bus) | br $aa org ] : cmd ( c-) = $aa $3d555 ( nop.xxx) !b .. | indent @ ( sleeps) !b cmd ; | br = $ad exit ( start is run in ide) : start right a! data b! cmd ; {block 1321} {block 1322} ( sdram control-pins) | cr ( each word runs the requested rise..fall cycle 12+11 ticks per cycle is a 42ns period) | cr $0 org ] : nooop ( rfr-rfr) = $0 ( 'nooop') . .. !b | indent .. over over .. . . !b ; : rcol1 ( rf-rfrf) = $4 . . !b | indent .. $2b .. !b ( transfer) | indent . $22e .. . . !b ; | cr = $a $10 org ( 8-word page accessible to down port) : cmmd ( rfr-rfr) = $10 ( '@p+ ! cmmd') !b | indent .. over over .. . . !b ; : rcol ( rfr-rfr) = $13 ( '@p+ ! rcol') !b | indent over over .. rcol1 ; : wcol ( rfr-rfr) = $15 ( '@p+ ! wcol') !b | indent $2003e $2002e .. !b | indent .. $3022b .. !b ( transfer) | indent $3023b !b .. . . !b | indent $2002e .. !b $2b !b ( recover) | indent .. over over .. . . !b ; | br = $23 exit ( start is run in ide) : start right a! io b! $2e ( cmd-fall) -d-- ; {block 1323} {block 1324} ( sdram data-bus) | br ( db@ isn't used with 7j chip!) | cr $aa org ( called with 'db@' '...!p+') : db@ ( -w) = $aa @ ; ( wakeup when data ready) | br ( db! called with '@p+ db!') : db! ( w-) = $ab $15555 !b ( .. set output state) | indent ! ( wakeup when data taken) : inpt = $ad $14555 !b ; ( restore input state) | br = $af exit ( start is run in ide) : start up a! io b! down push inpt ; {block 1325} {block 1326} ( sdram idle-loop) | cr $aa org ] : noop ( -) = $aa @p+ ! ; ( ') ] nooop ( ') : cmd ( c-) = $ac $5a48 ! ! ; ( '@p+ ! cmmd') | cr : idle ( m-m) = $ae @p+ ! .. ( ') nooop ( ') $8003 cmd noop 120 for ( 7.8us 42ns/ 5- is 181) | indent @p+ ! .. ( ') nooop ( ') | indent begin = $b7 @b and if | indent ( ...) @ .. @ ! ! ( user to ctrl) | indent ( ...) *next idle ; = $bc | indent ] then drop | cr next @p+ ! .. ( ') nooop ( ') idle ; | cr : init ( m-m) = $c0 ( run only at power-up/reset) | indent 4761 for ( 200us 42ns/ 1-) noop next | indent noop $10400 ( pre.all) cmd noop | indent $8001 ( rfr.123) cmd noop noop | indent $8002 ( rfr.123) cmd noop noop | indent $21 ( std.mode) cmd noop noop | indent $4000 ( ext.mode) cmd noop idle ; | br = $d8 exit ( start is run in ide) : start $135 ( '-dl-) a! io b! | cr $800 ( n13w?) dup dup dup dup dup dup | cr dup dup dup init ; {block 1327} {block 1328} ( sdram user interface) | cr $aa org ( user cmds+data from/to up or right) : a2rc ( pa-pbc) = $aa dup ( 2* 16mw) push 2/ ( 32mw) | cr 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ -if : row! ( pr-pbc) = $af $7fff ( row.mask) and dup .. | cr $18000 ( activate) or .. ! $5a48 ! .. ( '@p+ ! cmmd') $6000 ( bank.mask) and pop .. $3ff ( col.mask) and ; ] then over + row! ; : sd@ ( pa-p) = $bb a2rc $28400 ( read+pre) or or | cr ! $5a4b ! .. ( '@p+ ! rcol') down b! .. | cr @p+ !b @b ( ') @ !p+ .. ( ') pop b! !b ; : sd! ( pa-p) = $c5 a2rc $20400 ( write+pre) or or | cr ! $5a4d ! .. ( '@p+ ! wcol') pop b! @b .. | cr down b! .. @p+ !b !b ; ( ') ] @p+ db! ( ') : poll ( ru-ru) = $cf io b! @b | cr 2* 2* -if push over .. r--- over pop then | cr $800 and . if push .. ---u pop then | cr drop poll ; | br = $dc exit ( start is run in ide) : start left ! 0 0 ( r.u) poll ; {block 1329} ( configure for sdram wiring as follows) | cr ] 2* ( 16mw) push ( 2/ 32mw) [ for 16 mw wiring | cr ( 2* 16mw push) ] 2/ ( 32mw) [ for 32. {block 1330} ( async ats interface) 0 org ] : obit ( dwn-dw) = $0 !b over push delay ; : word ( dw-d) = $2 leap drop leap drop leap drop drop ; : obyt ( dw-dwx) = $6 then then then 3 obit drop 7 for dup 1 and 3 or obit drop 2/ next 2 obit ; : -out = $11 ser-exec ( rdl-) ; = $12 | br : ok = $12 $31416 word -out ; : fet = $15 0 : pump ( n) for @+ word next -out ; : stat = $1b 9 pump ; : bstk = $1d @ push .. @ word pop dup push word .. ( @p+.push) $49ba ! 7 .. dup push ! .. @p+ ! .. ( /+) begin !p+ . . unext .. begin @ word .. next .. @p+ ! pop .. ( /+) pop @p+ ; ] .. ! -out ; = $2c {block 1331} ( this code is loaded on top of ide boot node.) : obit ( sends one bit 0-3/hi 1-2/low) : word ( sends a word as) # 3 ( octets.) : obyt ( sends and discards) # 8 ( lsb of w, lsb first, with one start bit hi and one stop bit low.) {block 1332} {block 1333} {block 1334} {block 1335} {block 1336} {block 1337} {block 1338} {block 1339} {block 1340} {block 1341} {block 1342} ( smtm test) $32 org ] : go a! $1557f !b $1556a !b . pop @p+ | indent ( ') @p+ dup 2/ . ( ') a ! ! $43 for | indent $3f !+ . unext | indent ( ') 2* a! push . ( ' ') begin @p+ !+ . unext ( ') | indent ( ') @p+ push ; ( ') ] ! warm ; | cr # $12 $2a org ] : r @p+ go ; ] r--- : d @p+ go ; ] -d-- : l @p+ go ; ] --l- : u @p+ go ; ] ---u | cr [ 0 org ( avoid node1) ] d r l : path r l r l d l r l r d path ; {block 1343} ( smtm test) | br ( steven's crawling memory tester) {block 1344} # 14 ( word ga144 creeper test frame 3/25/11) | cr ( see db007 for detailed discussion.) | br $36 org ] : focus = $36 ( jport) dup dup a! dup ! @p ! dup | cr ( ') @p b! . ! or !b ; : creep = $3a # 67 dup !b push | cr begin @p ! unext . = $3c | cr ( ') $3f push dup ( ') or a! | cr ( ') begin @b !+ unext = $40 | cr : wire begin @b ! @b ! @ : rip = $42 dup !b -until = $43 warm ; : test = $44 ( n1) {block 1345} ( creeper input side data flow iio) | cr ( @p call to focus, creep, wire, rip, or) | cr ( anywhere in the test package from) # $4 ( to) # $35 | cr ( with any n1 on the stack) | br : focus ( prepares to use neighbor thru) [ jport ( sets a forward and neighbor pc and b back. result is zero.) : creep [ 67 ( returned as early sync. crawl to focused node, make it active, we become wire. copies) # 68 ( words to neighbor) | cr ( fallthrough after copy to wire must be at) = $40 : wire ( passes iio messages until result negative at which time this node and all before it return to warm.) : rip ( argument and result must be negative to restore all nodes to warm state.) : test ( can call any address from) # $4 ( to) # $35 ( and can do what it wants with) [ n1. ( result must be positive,) # 0 ( normally means ok.) {block 1346} ( fill neighbor's memory fake test) | cr ( creeper) 1344 load ] : ping = $45 @p ! ! . ( ' @p) @b 2/ ( !p) !b . | cr @ !b ; = $48 exit ] : why -1 . + down a! ! ; exit ] : nulltest = $45 1 . + !b ; = $48 exit ] : test = -10485760 ( n1) 63 @p ! . ( ') dup or a! @p | cr ! @p ! @p ( ') push ( ') begin a !+ unext . | cr ! dup dup or !b drop ; = -26214400 {block 1347} {block 1348} ( extensive neighbor's memory test 005-035) | cr $29 org | -cr : err [ $5 org ] : test ( n1) @p ! @p dup ( ') $3f push dup dup | cr ! @p ! ( ') or dup a! . | cr @p ! ( ') begin dup !+ unext . ( erased) | cr for | cr | cr $19999 @p ! dup ( ') @p ! @ . | cr ! @p ! . ( ') !b @p ! | cr @ or if = $13 pop err ; ] then = $14 ( test1) | cr $cccc dup ! @p ( ') @ !b dup dup | cr ! @ or if = $19 pop err ; ] then = $1a ( 0 test2) | cr @p ! . ( ') or ! . ( erased) | cr | cr drop @p ! @p ( ') dup ( 0 0) - # $3ffff ! $3e | cr ! @p ! ( ') @+ !b push # $0 | cr @ - if = $22 pop err ; ] then = $23 ( test3) | cr drop @p ! ( ') begin @+ !b unext . # $0 | cr $3e for @ if pop pop : err = $29 1 + !b ; ] then ( test4) | cr drop next | cr @p ! . . ( ') dup !+ . next ( erased) | cr dup dup or !b ; = $31 ( 3/5/11) | cr {block 1349} ( test tests neighbor's memory) | cr ( 19999 cccc test shorts to bits two bits away) | cr ( 3ffff) # $0 ( test shorts to bits one bit away) | cr ( tests for shorts between two addresses) | cr ( by reading) # 64 ( words after each) # $3ffff ( !) | cr {block 1350} ( all nodes template) 0 org ] : poll io b! @b ( mask) $aa00 = $3 and if ( drop) warm ; ] then drop ; = $6 : incr poll if 1 . + ; ] then drop 1 . + 1 ; : run = $e -1 0 # 9999 99999 for # 9999 44999 for incr next next $3e a! !+ !+ $600d warm ; : run = $1d 0 1 begin begin while poll 1 . + end then drop 1 . + 1 end ; {block 1351} {block 1352} {block 1353} {block 1354} ( hardware multiply test) 0 org +cy ] : clc = $200 dup dup or dup . + drop ; : d2* ( hl-hl) = $202 dup . + push dup . + pop ; : um+ ( hln-hl) = $205 . + push dup dup or . + pop ; = $208 -cy ] : h* ( nu-hl) = $8 dup a! dup or 17 for +* unext a ; : abs ( n-n) = $c -if : neg ( n-n) = $d - 1 . + then ; = $10 +cy ] : u/mod ( hld-rq) = $210 clc neg : -u/mod = $212 a! 17 push begin begin dup . + push dup . + dup a . + -if drop pop *next dup . + ; ] then over or or pop next dup . + ; = $21e -cy ] : try = $21e right b! ( ba) @b @b h* ( r) @b um+ ( a) @b u/mod ( b) !b ( r) !b try ; = $226 {block 1355} : h* ( is simplest multiply; first arg is a signed number and second, the multiplier, is a full) # 18 ( bit unsigned number.) : try ( slaves this node to another by the port given. it expects to receive numbers b a r and calculates b*a+r then receives a and returns b and r. the multiply is done using the h* here which is why b is signed and a is unsigned.) {block 1356} ( soft multiply test) 0 org +cy ] : clc = $200 dup dup or dup . + drop ; : d2* ( hl-hl) = $202 dup . + push dup . + pop ; : um+ ( hln-hl) = $205 . + push dup dup or . + pop ; : u* ( nn-hl) = $208 a! clc dup push dup or dup pop 17 for begin push d2* a -if 2* a! pop dup push . + push 0 . + pop pop *next drop ; ] then 2* a! pop next drop ; = $219 -cy ] : abs ( n-n) = $19 -if : neg ( n-n) = $1a - 1 . + then ; : *. ( ff-f) = $1d over over or push abs swap abs u* d2* d2* drop pop -if drop neg ; ] then drop ; = $26 +cy ] : u/mod ( hld-rq) = $226 clc neg : -u/mod = $228 a! 17 push begin begin dup . + push dup . + dup a . + -if drop pop *next dup . + ; ] then over or or pop next dup . + ; = $233 ( -cy) : try = $233 right b! @b @b u* @b um+ @b u/mod !b !b try ; = $23a {block 1357} {block 1358} ( multiply exerciser) $0 org ] : dec ( n-n) -1 . + ; : +or ( nn-n) over - and or ; : try ( abr-ab bad) = $4 right a! ( 12033 !) push dup ! over ! pop dup ! push over ! dup @ or @ pop or +or ; : test ( abr-abr) dup push try if pop ; ] then drop pop : poll @b $200 and if up b! @b push ;' io b! then drop : run ( abr-abr) = $1a if dec test ; ] then drop if dec over dec test ; ] then drop dec if ( -1) $1ffff over dec test ; ] then drop $600d ; = $29 : go = $29 io b! ( 20000) $1ffff ( -1) $1ffff over dec run ; | br : -u/mod ( old) = $2f a! 17 push dup . begin begin | cr + push dup . + dup a . + -if drop pop dup *next + ; ] then over or or pop dup next + ; = $3c {block 1359} : try ( exercises slave node given a test vector. for the hardware version a is unsigned and b is signed. but the divide is unsigned so b is limited to the largest positive number.) {block 1360} ( serdes test) $aa org ] data a! $3fffe dup ! up a! begin @ drop unext ( rdlu) [ 0 org ] : try io b! $20000 !b $147 a! 0 10000 for 1 + dup a! next ; : start @ io b! : test $2aaaa @b or ! test . . . . down a! . . start {block 1361} {block 1362} ( serdes test) # 2 $aa org ] data a! $33333 dup ! up a! $20000 !b begin dup . . . . . . . . . . . . . . . . . . . . . ! unext . . . . . . . {block 1363} {block 1364} ( spi flash writer michael + greg 2.1) 0 org ] : 2o ( dw-dw') = $0 obit 2* obit ; : wait ( dw-dw) = $2 select dup begin drop @b -until drop select ; : 2cmd ( dw-d) = $6 select 8obits : cmd ( dw-d) select : !8 ( dw-d) 8obits drop ; : set ( -d) = $b io b! ( fast) 5 ; : fet ( ah al-d) = $e push push set ( read) $c00 cmd pop !8 pop 8obits !8 ; : +wr ( -d) = $14 set ( wren+wrsr) $1804 2cmd | indent ( hi8 zero) dup !8 ( ebsy) $1c000 cmd ; : aaip ( d-d) = $1a $2b400 wait !8 ; : x8p ( hln-d asrc) = $1d +wr ( wren+aaip) $1ab4 2cmd | cr drop push push push set pop !8 pop 8obits | cr !8 ahead begin aaip [ swap ] then 7 for | indent pop dup push push @+ | indent begin 2o 2* next push aaip pop | indent 7 pop dup push or push | indent begin 2o 2* next drop next next | cr ( wrdi+dbsy) $1200 wait 2cmd rdl- ; = $39 : ers = $39 +wr ( wren+eras) $1980 2cmd dup select ; = $3d {block 1365} ( run by an adjacent node through a port.) | cr ] $ 24 bit addresses ( are represented in two) # 18 ( bit words. for continuous bit sync, all operations must start on) # 0 ( mod) # 18 ( byte boundaries.) | cr [ high ( word contains the most significant) # 8 ( bits of the address shifted left) # 10 ( bits.) | cr low ( word contains the least significant) # 16 ( bits shifted left two bits.) | br : x8p ( writes) [ n ( words into flash starting at address whose) high ( and) low ( parts are given. the data are read from wherever) a ( points; to feed a stream through a port,) a ( must be focused to the port before starting.) | br : fet ( starts a read operation) : 18ibits ( reads one word; take care with) [ 'd' {block 1366} ( take adc data) 0 org ] : sam+ ( -n) = $0 # $155 $2155 # $6155 : s+- ( k-n) io b! !b up b! !b @b ; : sam- ( -n) = $6 # $955 $2955 # $6955 s+- ; | br : sam = $8 $20 a! sam+ sam- 11 2* for | cr push sam+ dup - pop . + ( !+) push | cr push sam- dup - pop . + pop + !+ next ; = $16 | br exit ] sam+ drop {block 1367} ( this block supports taking of data manually for a/d transfer function. to use it, put a/d in the desired mode by editing the constants in sam+ and - then set desired voltage and execute sam. you will find a sequence of samples stored in ram at) # 32 | br ( original version sampled each half cycle of the incoming clock.) {block 1368} ( generate dac waves) 0 org ] : dly = $0 100 for unext ; : sano ( n-n) $3ffdf and ; ] $10 or ; : tri ( n) = $7 push $155 0 begin | cr 510 for over or dup sano !b | indent dly over or 1 . + next | cr 510 for over or dup sano !b | indent dly over or -1 . + next next drop drop ; : try = $1c io b! : sing = $1e 1000 tri : poll = $20 @b $2000 and if down b! @b push ;' io b! then drop sing ; : haul = $29 io b! -1 dup push dup push dup push dup push dup push dup push dup push dup push push $155 $aa over over over over over over ( /) dup dup : spin = $36 begin !b ( . .) unext ( !b !b !b !b !b !b !b !b) spin ; = $37 exit | cr ] $155 $1d5 $55 $d5 $aa $d5 $55 $1d5 ( /) {block 1369} {block 1370} {block 1371} {block 1372} ( ide via async boot) 0 org ] : obit ( dwn-dw) = $0 !b over push delay ; : word ( dw-d) = $2 leap drop leap drop leap drop drop ; : obyt ( dw-dwx) = $6 then then then 3 obit drop 7 for dup 1 and 3 or obit drop 2/ next 2 obit ; : -out = $11 ser-exec ( rdl-) ; = $12 | br : ok = $12 $31416 word -out ; : fet = $15 0 : pump ( n) for @+ word next -out ; : stat = $1b 9 pump ; : bstk = $1d @ push .. @ word pop dup push word .. ( @p+.push) $49ba ! 7 .. dup push ! .. @p+ ! .. ( /+) begin !p+ . . unext .. begin @ word .. next .. @p+ ! pop .. ( /+) pop @p+ ; ] .. ! -out ; = $2c {block 1373} {block 1374} ( ide via sync boot) 0 org ] : 1bit ( wx-w'x) drop -if 3 ahead [ swap ] then 2 | cr then !b 2* dup ; : word ( w) = $6 8 dup for begin drop @b -until 1bit begin drop @b - -until 1bit next drop drop ; : +out ( x) = $f begin drop @b - -until drop 3 !b ; : -out ( x) = $13 begin drop @b -until | cr drop 2 !b 1 !b ser-exec ; | br : ok = $18 dup +out $31416 word dup -out ; : fet = $1c 0 : pump ( n) dup +out for @+ word next dup -out ; : stat = $23 9 pump ; : bstk = $25 +out @ dup push . @ word word ( / @p+.push) $49ba ! 7 . ( /) dup push ! . ( /) @p+ ! . . ( /+) begin !p+ . . unext ( /) begin @ word ( /) next ( /) @p+ ! pop . ( /+) pop @p+ ; ( /) ] ! -out ; = $34 {block 1375} {block 1376} ( ide wire node) 0 org ] : fet = $0 @p+ !b @ . fet !b @b ! ; = $3 5 org ] : sto = $5 @p+ !b @ . sto !b @ !b ; = $8 $a org ] : ins = $a @p+ !b @ . ins !b ; = $d $d org ] : psh = $d @p+ !b @ . psh !b ; = $10 $10 org ] : stk = $10 @p+ !b . . stk 9 for @b ! unext ; | cr = $15 {block 1377} {block 1378} ( ide last guy) $1e org ] : focus ( i0) = $1e @p+ !b !b ; ( /) ] focus ; 0 org ] : fet = $0 @p+ focus ( /+) @p+ a! @ !p+ ( /) @ !b @b @p+ ( /+) ; ( /) ] !b ! ; : sto = $5 @p+ focus ( /+) @p+ a! . @p+ ( /) @ !b @ . ( /) !b @p+ !b ; ( /+) ] ! ; : ins = $a @ focus ; ( /) ] ins ins : psh = $d @p+ focus ( /+) @p+ ; ( /) ] @ !b ; : stk = $10 @p+ focus ( /+) !p+ dup push !p+ ( /) @b @b ! dup ( /) ! ( @p+.push) $49ba !b 7 ( /) dup push !b . ( /) @p+ !b ( /+) begin !p+ . . unext ( /) begin @b ! unext . ( /) @p+ !b !b ; ( /+) ] pop @p+ ; | cr ( if past size-2 not ok-) = $1c {block 1379} {block 1380} ( common) | cr $1d5 org | -cr : r--- | cr [ $115 org | -cr : -d-- | cr [ $175 org | -cr : --l- | cr [ $145 org | -cr : ---u | cr [ $1a5 org | -cr : rdlu ( right down left up) | cr [ $1b5 org | -cr : rdl- ( right down left) | cr [ $185 org | -cr : rd-u ( right down up) | cr [ $195 org | -cr : rd-- ( right down) {block 1381} {block 1382} ( polynomial approximation) : poly ( xn-xy) pop a! push @+ a begin | indent push *. pop a! @+ + a next push ; {block 1383} : poly ( xn-xy) | cr ( evaluation of chebyshev polynomials using) | cr ( the horner scheme.) | br ( x is the input value. n is the length of) | cr ( the coefficient table minus 2. coefficient) | cr ( table follows inline, and execution) | cr ( continues after the final table entry. x is) | cr ( left on the stack under the result, y.) | br ( for example...) : cos ( f-f') | cr ( hart 3300) | cr ( -0.0043 0.0794 -0.6459 0.5708) | indent 2* 2* . triangle dup *. 2 poly | indent [ -281 , 5203 , -42329 , 37407 , | indent ] push drop pop *. + ; {block 1384} ( interpolate) : interp ( ims-v) dup push push over | indent begin 2/ unext a! | indent and push @+ dup @+ - . + - | indent pop a! dup dup or | indent begin +* unext push drop pop . + ; {block 1385} : interp ( ims-v) | cr ( to determine values for m and s ...) | cr ( let l be number of meaningful input bits.) | cr ( let n be power of 2 where 2**n + 1 is the) | cr ( number of table entries.) | br ( s equals l-n-1) | cr ( m equals 2** l-n - 1) | br ( so for example if you have an 8 bit adc,) | cr ( l equals 8. let n equal 2 for a 5 entry table. the table is expected to be at address 0,) | cr ( so to represent 0 to 1800 millivolts...) | br [ $ 0 org $ 0 , $ 450 , $ 900 , $ 1350 , $ 1800 , | cr : mv ( i-n) $3f $ 5 interp ; | br 0 mv ( gives) 0 | cr 128 mv ( gives) 900 | cr 256 mv ( gives) 1800 | cr ( and intermediate values are interpolated.) {block 1386} ( fir or iir filter) : taps ( yxc-y'x') pop a! push begin | indent @+ @ push a push *.17 pop a! | indent push !+ pop . + pop next @ a! ; {block 1387} : taps ( yxc-y'x') | cr ( for example...) | br : fir ( yx-y'x') 15 taps [ -53 , 0 , 2276 , 0 , 382 , 0 , -1706 , 0 , -1158 , 0 , 2014 , 0 , 2406 , 0 , -1977 , 0 , -4206 , 0 , 1289 , 0 , 6801 , 0 , 678 , 0 , -11109 , 0 , -6250 , 0 , 23531 , 0 , 54145 , 0 , | br ( 16 taps, 16 coefficients with intermediate) | cr ( storage interleaved.) {block 1388} ( routing; called with 'a relay') : relay ( a) pop a! @+ push @+ zif | indent drop ahead ( done) [ swap ] then | indent pop over push @p+ ( ') a relay ( ') | indent !b !b !b begin @+ !b unext : done then a push a! ; {block 1389} ( relay moves a port executable packet down) | cr ( a sequence of nodes linked by their b) | cr ( registers. the packet consists of a 1-cell) | cr ( index, a 1-cell count) less one ( of body) | cr ( size, and the body cells.) | br ( a packet) may ( be started from memory within) | cr ( a node, or it may simply be fed to a port.) | br ( relay assumes that b points to the next) | cr ( node in the chain. uses one return stack) | cr ( location and four data stack locations.) | cr ( it must be at the same location in every) | cr ( node.) {block 1390} ( multiply) : *.17 ( a b - a a*b) a! 16 push dup dup or | indent begin +* unext - +* a -if | indent drop - 2* ; ] then drop 2* - ; {block 1391} : *.17 ( multiplies a fraction by a fraction,) | cr ( giving a fraction, or an integer by a) | cr ( fraction, giving an integer. note that f1) | cr ( is left in s to be ignored, dropped, or) | cr ( reused. note that the definition of) *. | cr ( contains a call to this word.) | br ( 17 bit fractions --- s.i ffff ffff ffff ffff) {block 1392} ( lshift rshift) : lsh push begin 2* unext ; : rsh push begin 2/ unext ; {block 1393} {block 1394} ( triangle) : triangle ( x-y call with; 2* 2* triangle) | indent $10000 over -if drop . + ; ] then | indent drop - . + - ; {block 1395} : triangle ( assuming an angle expressed as a) | cr ( 16 bit fraction of a revolution,) | cr [ 2* 2* triangle ( produces a triangle wave) | cr ( approximation to the cosine of that angle.) {block 1396} ( fractional multiply) : *. = $b7 ( f1 f2 - f1 f1*f2) *.17 | indent a 2* -if drop - 2* - ; ] then | indent drop 2* ; {block 1397} : *. ( multiplies a fraction by a fraction,) | cr ( giving a fraction, or an integer by a) | cr ( fraction, giving an integer. note that f1) | cr ( is left in s to be ignored, dropped, or) | cr ( reused.) | br ( 16 bit fractions --- si. ffff ffff ffff ffff) {block 1398} ( divide) | cr +cy = $2d3 ( enter ea mode) : clc dup dup or dup . + drop ; : --u/mod clc : -u/mod ( hld-rq) a! 17 push begin begin | indent dup . + . push dup . + | indent dup a . + -if | indent drop pop *next dup . + ; ] then | indent over or or . pop next dup . + ; | cr -cy = $e1 ( exit ea mode) {block 1399} : clc ( clears the carry bit for addition in) | cr ( ea mode.) | br ( the following defines u/mod in ram ...) | cr : u/mod ( hld-rq) - 1 . + --u/mod ; | br ( if the divisor is a constant, just negate) | cr ( it at edit or compile time.) {block 1400} ( g18 compiler) :var h [0xe] :var ip [0xd] :var slot [0x4] :var call? [0x6000] :var cal [0x10191cc3] :var com macro ] : !7 $bd0489 3, $fffffffc , [compile] drop ; : 2*s ?lit $e0c1 2, 1, ; : call ( nn) [compile] ?dup $b8 1, , $e9 1, [ cal ] @ here 3 + - + , ; forth ] : swap swap ; : eras ( an) push $61fc ( call a9) swap block pop blks fill ; : memory ( n-a) [ $240 - ] and [ com ] @ 2* $8000 + block + ; $8000 nnc 2 * eras ] : org ( n) dup [ h ] ! [ ip ] ! : break 4 [ slot ] ! ; : o ( n) 6 for 10 /mod next 6 for 8 * + next : p, ( n) [ h ] @ memory ! [ h ] @ 1 over + over or $7f and or [ h ] ! ; : s4 [ h ] @ [ ip ] ! 13 2*s dup [ call? ] ! p, 1 [ slot ] ! ; : s0 13 2*s : sn dup [ call? ] ! [ ip ] @ memory +! 1 [ slot ] +! ; : s1 8 2*s sn ; : s2 3 2*s sn ; : s3 dup 3 and drop if 7 sn s4 ; ] then 4 / sn ; : i, [ slot ] @ jump s0 s1 s2 s3 s4 {block 1401} ( g18 target compiler) includes support for g18 addressing see 1404 ] : h ( address of next available word in target memory here) : ip ( address of current instruction word) : slot ( next available instruction slot) : call? ( was last instruction a call ?) : call a ( compile a call) : eras ( fills g18 memory with call 155 number) : 2*s n ( shift left n bits) : memory n-a ( host address for target memory) : org n ( set current target memory location) : break ( break in emulator only) : p, n ( compile pattern into target memory) : s0-s4 ( assemble opcode into slot 0-3) : i, ( assemble opcode into next slot *note** simple code jump table using) [ jump {block 1402} ( target) : cnt 2/ -1 + ; : defer ( -b) pop ; : execute ( b) push ; : f! ( bn) [ sp ] + ! ; : f@ ( n-b) [ sp ] + @ ; : class ( b) [ last 1 + ] ! ; : empty empt : host 0 class [ 6 f@ ] nop [ 4 f@ ] nop [ 13 f@ ] nop : functions ( bbb) 13 f! 4 f! 6 f! ; : . $1c i, ; ( nop) : hhere here ; : .. [ slot ] @ 4 or drop if . .. ; ] then 0 [ call? ] ! ; : here .. [ h ] @ $3ff and ; hhere ] : report here 32 * [ 13 16 + ] + !7 ; : g18 ( b) 1 f@ [ 0 + ] functions ; : +cy here $200 over - and or org ; : -cy here [ $200 - ] and org ; : await [ com ] @ idle [ cal ] @ execute ; {block 1403} : defer -a ( byte address of the compiled code that follows -- used for forward referencing) : execute a ( code at this address) : f! an ( store address of code executed when a word with this function is interpreted) : f@ n-a ( fetch address of function code) : class a ( store address of code to be executed for each word subsequently defined) : empty ( redefine empty to restore altered functions) : host ( change context back to colorforth) : functions aa ( store functions in kernel specific way) : c18 ( save green word and number functions. set green short-number to n, compile to call. target words are executed to assemble instructions) : . ( nop used to fill instruction words) : nops ( fills rest of word with nops) : here -a ( starts new instruction word. leaves target address as number) : await ( generates call to node's idle ports.) {block 1404} ( g18 jump instructions) : 9same ( axa-ax) push over pop - or [ $200 ] and drop ; : j3 . : j0 i, [ ip ] @ memory +! break ; : j1 [ h ] @ 9same if over $100 and drop if swap $ff and swap j0 ; ] then then . . j3 ; : j2 over $155 or [ h ] @ or $3f8 and drop if . j3 ; ] then swap 7 and swap j0 ; : -adr ( an) swap $155 or swap [ slot ] @ jump j0 j1 j2 j3 j0 : adr ( n-n) [ slot ] @ 3 or drop if i, [ ip ] @ 8 * [ h ] @ [ ip ] @ negate + + 8 * [ slot ] @ + break ; ] then . adr ; : @h ( n-a) 8 /mod + ; : f3 ( an) over $155 or over @h or $2f8 and drop if abort ; ] then swap 7 and swap 8 / memory +! ; : f2 dup @h 9same if over $100 and drop if swap $ff and swap : f1 8 / memory +! ; ] then then abort ; : then ( n) here $155 or swap 8 /mod swap jump f1 f1 f2 f3 {block 1405} the g18 uses adr bit 9 for mode; 8 for i/o; 7 for rom. incrementer maintains bits 0-6, rest are left alone except for return and slot 0 jumps. | br : 9same ( is true if the two addresses match in bit 9 - the extended arithmetic mode bit.) : -adr an ( assembles jump to known address) : adr n-a ( assembles forward jump in slot 0,1,2. value left on stack is instr addr * 64 + here-ip + slot.) : @h ( given that vlue value / 8 returns p at time the jump executes.) : then a ( insert address for forward jump) {block 1406} ( complex instructions) : def defer here [compile] call ; : call defer ( a) 3 -adr ; call cal ! ] : ; [ call? ] @ dup $6000 or drop if dup $300 or drop if dup $18 or drop if 0 and i, break ; ] then then then dup 2/ and negate [ ip ] @ memory +! ; : -if ( -a) 7 adr ; : if ( -a) 6 adr ; : -until ( a) 7 -adr ; : until ( a) 6 -adr ; : -while ( a-aa) 7 adr swap ; : while ( a-aa) 6 adr swap ; : zif ( -a) 5 adr ; : *next ( aa-a) swap : next ( a) 5 -adr ; : unext ( a) 4 i, drop ; : n defer 8 f@ execute : lit 8 i, $3ffff and ( ok in slot 3) : , ( n) $15555 or p, ; : for $1d i, : begin here ; : ahead ( -a) 2 adr ; : end ( a) 2 -adr ; : leap ( -a) 3 adr ; {block 1407} : def -a ( deferred to class. executed for every target definition to compile host code that compiles target call) : call a ( compile target call) : ; ( will be executed as a target word. the pentium macro has precedence while compiling) : if/-if ( leaves address of jump on stack) : -until a ( jump if positive to) begin : zif ( forward) next ( decrements r and jumps if r! else pops and falls thru) : next/for : n ( executed for green short-numbers. all 18-bit target numbers are short. executes white short-number to put interpreted number on stack. then assembles literal instruction with number in next location. inverted for rom) : , n ( compile number into target memory) : ?lit -n ( retrieve previously compiled number) : begin -a ( starts new instruction word. leaves properly formatted target address) : ahead ( compiles fwd ref jump resolve w/then) : leap ( like ahead but compiles a call) {block 1408} ( instructions) : target n g18 def class ; : ex | -cr : ;' 1 i, break ; : rx : @p | -cr : @p+ 8 i, ; : @+ 9 i, ; : @b $a i, ; : @ $b i, ; : !p | -cr : !p+ $c i, ; : !+ $d i, ; : !b $e i, ; : ! $f i, ; {block 1409} ( words being redefined for the target computer. these host words can no longer be executed. although pentium macros take precedence during compilation, they will no longer be used.) : g18 ( instructions) : 0 ( ;) ....8 ( n) ..10 ( +*) ..18 ( dup) : 1 ( ;') ...9 ( @+) .11 ( 2*) ..19 ( pop) : 2 ( j) ....a ( @b) .12 ( 2/) ..1a ( over) : 3 ( call) .b ( @) ..13 ( -) ...1b ( a) : 4 ( unext) c ( !p+) $ 14 ( +) ...1c ( .) : 5 ( next) .d ( !+) .15 ( and) .1d ( push) : 6 ( if) ...e ( !b) .16 ( or) ..1e ( b!) : 7 ( -if) ..f ( !) ..17 ( drop) 1f ( a!) {block 1410} ( port literals and constants) : right [ $1d5 ] lit ; ( 0101111111 register bits) : down [ $115 ] lit ; ( 0110111111) : left [ $175 ] lit ; ( 0111011111) : up [ $145 ] lit ; ( 0111101111) : warp [ $157 ] lit ; ( 0101010111) : io $15d lit ; ( 0111110111) : data $141 lit ; ( 0111101011 port calls) : center $1a5 lit ; : top $1b5 lit ; : side $185 lit ; : corner $195 lit ; : /mod /mod ; : spispeed 497 ( 0) lit ; $0 ( 24-bit adrs) 4 * 262144 /mod ( al ah) $3 ( read cmd) 256 * + 4 * ] : spicmd ( c.ah) [ 0 + ] lit ; : spiadr ( al) [ 0 + ] lit ; {block 1411} {block 1412} ( more instructions) : +* $10 i, ; ( slot 3 ok) : 2* $11 i, ; : 2/ $12 i, ; : - $13 i, ; : + $14 i, ; ( slot 3 ok) : and $15 i, ; : or $16 i, ; ( exclusive-or) : drop $17 i, ; : dup $18 i, ; ( slot 3 ok) : pop $19 i, ; : over $1a i, ; : a $1b i, ; : push $1d i, ; : b! $1e i, ; : a! $1f i, ; {block 1413} : o ( replaces top-of-stack with 0. g18 instructions can't be used in macros - forth macros take precedence) {block 1414} {block 1415} {block 1416} {block 1417} {block 1418} ( math rom anywhere) 0 kind | br $a1 org | cr = $a1 1388 load ( relay) | cr = $a9 | -cr : warm await ; | br $b0 org | cr = $b0 1390 load ( multiply) | cr = $b7 1396 load ( fractional multiply) | cr = $bc 1386 load ( taps) | cr = $c4 1384 load ( interpolate) | cr = $ce 1394 load ( triangle) | cr = $d3 1398 load ( -u/mod) | br $aa org | cr = $aa 1382 load ( polynomial approximation) | cr = $b0 {block 1419} {block 1420} ( serdes boot top/bot) 6 kind $aa reset | br $a1 org | cr = $a1 1388 load ( relay) | cr = $a9 | -cr : warm await ; | cr : cold = $aa $3141 a! $3fffe dup ! rdlu cold ; | br = $b0 1390 load ( multiply) | cr = $b7 1396 load ( fractional multiply) | cr = $bc 1386 load ( taps) | cr = $c4 1384 load ( interpolate) | cr = $ce 1394 load ( triangle) | cr = $d3 1398 load ( -u/mod) | cr = $e1 {block 1421} {block 1422} ( sync serial boot side) 2 kind $aa reset | cr # $bf $be org | -cr : sget | cr [ $a1 org | cr = $a1 1388 load ( relay) | cr = $a9 | -cr : warm await ; | cr : cold = $aa $31a5 a! @ @b . . -if ( 0pin) | cr $3fd85 ( 'rd-u 3fc00 +) dup push dup begin | cr drop @b . -if ( /pin) *next [ swap ] then | cr $185 ( 'rd-u) push drop push ; ] then : ser-exec = $b6 ( x-x) sget push sget a! sget : ser-copy = $b9 push zif ; ] then | cr begin sget ( push sget pop !+) !+ next ; : sget = $be ( -4/3-w) dup leap leap : 6in = $c0 then then leap leap : 2in = $c2 then then 2* 2* dup begin | cr . drop @b . - -until - 2 and dup begin | cr . drop @b . . -until 2 and 2/ or or ; | br = $cc 1390 load ( multiply) | cr = $d3 1386 load ( taps) | cr = $db 1394 load ( triangle) | cr = $e0 {block 1423} ( sync serial boot side) | br : ser-exec ( reads and processes a boot frame.) : ser-copy ( receives) [ n ( words at a, nop if n zero.) | cr : sget ( receives) # 18 ( bits, first bit on falling clock edge, second bit on rising, and so on. ends with clock line high. data line must be stable by the time clock edge is seen. spins the whole time, no suspension.) {block 1424} ( async serial boot top/bot) 1 kind $aa reset | cr # $cf $cb org | -cr : 18ibits | cr [ $a1 org | cr = $a1 1388 load ( relay) | cr = $a9 | -cr : warm await ; : cold = $aa $31a5 ( 'rdlu) a! @ @b .. -if : ser-exec = $ae ( x-d) 18ibits drop push . | cr 18ibits drop a! . 18ibits : ser-copy = $b3 ( xnx-d) drop push zif ; | cr ] then begin 18ibits drop !+ next ; | cr ] then drop $1b5 ( 'rdl-) push push ; : wait = $bb ( x-1/1) begin . drop @b -until . drop ; : sync = $be ( x-3/2-d) dup dup wait or - push | cr begin @b . -if . drop *next await ; | cr ] then . drop pop - 2/ ; : start = $c5 ( dw-4/2-dw,io) | cr dup wait over dup 2/ . + push : delay = $c8 ( -1/1-io) | cr begin @b . -if then . drop next @b ; | br = $cb 1426 load ( 18ibits) | cr = $d9 1392 load ( lsh rsh) | cr = $dd {block 1425} ( async serial boot.) | cr : cold ( reads) # 4 ( ports, falls thru if pin high. else assumes a focusing call received, simulates its execution as though from warm.) | br : ser-exec ( reads and processes a boot frame.) : ser-copy ( receives) [ n ( words at a, nop if n zero.) | cr : delay ( waits one bit time and samples io. enter via jump with) [ d ( in r.) : wait ( waits for input pin to be high.) : start ( waits for rising edge of a normally start bit, delays 1.5 bit times and samples io.) | br : sync ( waits for rising edge then measures high time, designed to be) # 2 ( bit-time start, followed by falling edge. returns) [ d ( for) # 1 ( bit time. times out after approx) # 3 ( ms, going warm.) {block 1426} ( more async serial) : 18ibits = $cb ( x-4/6-dwx) | indent sync sync dup start leap ( 2bits) leap : byte = $d0 then drop start leap : 4bits = $d2 then leap : 2bits = $d3 then then leap : 1bit = $d4 ( nw,io-nw,io) then | indent push 2/ pop over or | indent $20000 and or over push delay ; | cr = $d9 {block 1427} {block 1428} ( spi boot top/bot) 4 kind $aa reset host ] : --- [ $2a ] lit ; : --+ [ $2b ] lit ; : +-- [ $3a ] lit ; : +-+ [ $3b ] lit ; : -++ [ $2f ] lit ; target | cr $a1 org 1388 load ( relay) | br $c2 org ] : 8obits ( dw-dw') 7 for leap ( obit) 2* *next ; : ibit = $c7 ( dw-dw') | indent @b . -if drop - 2* ; ] then drop 2* - ; : half = $ca ( dwc-dw) !b over for . . unext ; : select = $cc ( dw-dw) -++ half --+ half ; : obit = $d0 ( dw-dw) then | indent -if +-- half +-+ half ; ] then : rbit = $d5 ( dw-dw) --- half --+ half ; : 18ibits = $d9 ( d-dw) dup 17 for rbit ibit - next ; | cr : u2/ 2/ $1ffff and ; | cr $a9 org | cr = $a9 | -cr : warm await ; | cr = $aa 1430 load ( the rest) | cr = $c1 {block 1429} {block 1430} ( more spi) : cold = $aa @b - .. [ $1b5 ( 'rdl-) ] -until | indent spispeed spiadr push spicmd : spi-boot = $b0 ( dly adrh . adrl - dly x) | indent select 8obits 8obits | indent drop pop . 8obits 8obits : spi-exec = $b6 ( dx-dx) drop 18ibits | indent $1e000 . + [ $1b5 ( 'rdl-) ] -until | indent push 18ibits a! 18ibits : spi-copy = $bc ( dn-dx) push zif ; ] then begin | indent 18ibits ( push 18ibits pop !+) !+ next dup ; = $c1 ( was) # $c2 {block 1431} ( more spi) | br ( spi-copy reads one word per loop and the loop counter is the actual number of words being) | cr ( sent ie a count of zero means no words sent) {block 1432} ( analog) 0 kind | br $a1 org | cr = $a1 1388 load ( relay) | cr = $a9 | -cr : warm await ; | br $b0 org | cr = $b0 1390 load ( multiply) | cr = $b7 1396 load ( fractional multiply) | cr = $bc 1434 load ( -dac) | cr = $c4 1384 load ( interpolate) | cr = $ce 1394 load ( triangle) | cr = $d3 1398 load ( -u/mod) | br $aa org | cr = $aa 1382 load ( polynomial approximation) | cr = $b0 {block 1433} {block 1434} ( dac) : -dac ( legacy entry name below) : dac27 = $bc ( mcpaw-mcp) dup push push | indent over pop - . + push push $155 | indent pop over or a | indent begin unext !b . | indent begin unext !b !b ; {block 1435} {block 1436} ( 1-wire) 3 kind $aa org | br $9e org ] : rcv ( s-sn) = $9e a push dup dup a! 17 for begin : bit = $a1 @ drop @b -if | indent drop - 2* - *next pop a! ; ] then | indent drop 2* next pop a! ; = $a8 | br $a9 org ] : warm = $a9 await ; : cold = $aa left center a! . io b! | indent dup dup $b7 ( rest) dup push push 16 push | indent @ drop @b [ $185 ( side) ] -until | indent drop a! . bit ; = $b7 ( rest) | indent ] push rcv a! rcv push zif ; ] then | indent begin rcv !+ next ; = $be | br = $be 1394 load ( triangle) # 5 | cr = $c3 1390 load ( multiply *.17) # 7 | cr = $ca 1396 load ( fractional multiply *.) # 5 | cr = $cf # 1384 ( load interpolate interp) # 10 | cr = $cf 1398 load ( -u/mod) # 14 | cr = $de ( equals) # $9e {block 1437} {block 1438} ( null rom anywhere) 0 kind | br $a9 org | cr ( warm) = $a9 ] await ; {block 1439} ( default code for null rom, or for special rom to be loaded out of sequence.) | br : warm ( is assumed by crawlers, and is also the destination of the call instruction that rom is initialized with.) [ avoid clobbering this word since steven's test code will not work in its absence.