{block 0}
noc yw t nnnon o t9s 1073799170 y8 0 fs psrt t r ri?m 1 0 ?@ qud ?@ qhs fc73e105wr?ord riwtyd w trya 638635329 21195867 drmnn; -60416949 m5wr4bpayn -12176309stws wt r adnn:s s -661782528 t8f r ; 4 -1342175232m5mrvwyetof l 04oted 52896551 *og ttn -ta4 1703 e98e stu7 iaeeeeo sritu w2a:y 20386 si0to8ic !tea+d ?yr oe 4ktm d 25574389th so0;so1 ft iik s 1340604416ic ti abis tft + 263igstj 31e8v,a8 2074067 0i :w -1913031712 25158d09m -8216 z rwy8 /anif8 -7923953 mnrs2 rf?.* d!o?8 iy??@ 8:wnisknr8 s -1312556679 ,ofml -930609527 2069971 gws:w abfnd 1 -1628961871 nn??, tn adi efttin -921 ta 4e@vs -585 kioas; ???/ 37750219 -1281 8:wnis !ogeye?uiln p4o?8 -1321 wtu; -387262 /ani?d 61493007 gegi , eeeeeee -59339520 weu ns 7510a8e1 -389808129???, eikag k rio8 ???: ststfg 36864p!o d an??, dseins -55099369 a/??8 fo09; ki??8 ???j oftr+ -2233 ?naieis v3i?8 mff8n sle5ie gw??;,ofmw fwl oe gw??;,ofmw n.sns oor t4im0bs 16640p t9d nw o 299240oaz!ecrt td 21e8 y?k rm06ns zias mo@ins -35321168 79725344 mnfosis twcmcggis0mx3 tmt 4ee6a5sn rr8 8669223 t1aknr3e d tb; 109706358 qien rs ki??8 o r 46142975rtke o ex+f; vs y8 ip nd 4es il ih nd 4es 61 if rf 4es il -1408398397 mt ifg rftd mt ihlsontd mt ipw wrd vs ip ndmgad iheny 250281984 ih ndmgad wdmld -218300416 vg?js ome rwd oie kig.0 ???* -5423243 tr mls abs il as -1979943283 -35117992 ???? -386867069 ???+ 21008d24o4es o.
mtrr7d o.ers ws abs in 1131 ii ad ads abs ii 125306311 aiat*dk or oent8ndtbd vs -89 p np, ?s -1928557312 id -622323477 mi??@ ihh t?d ml whml 344653824 ???cd ;irer@ ramnto if rarhmscorl rar -1996297535 bc258900 bs 332032w w6 ?s ie??, -37670920 vs if tframt if -5438778 361480960 if wsaejs ia gl. 361301877 iff tft; bs 71485065 -41931752 a,ofmw mw d0 344fe3 kenses vs -1513 rh 9, ff000005 75073792 -1913 rh 9, ff000005 75073792 ra?80 il 0enses .sl tw,e mn wl.lil tw,t mn ??t! @n ?, -1012072448 il w arreok mi??@ c0158900 mn bc158900 b -1341816063 al tw?s mn ??t! 8er?,,7weis s.?@ mlci,s 231 -4609 mlrtt, tr ? eets rami?; if iwsan tb 3019807 etmol s f tftid -1392508921l tw?s mn ??t! 8er?,,f/eis emi?; rqeeb7igs 363520,ofml emn 0 ???cd a@n @l wr; ms 109706358 wlrtei ewosramn if nmn a mleeat ac4823 if rwos9ias tfwof*n ramigos ifoc wge 80087500 oiakrs bnrst; 503813tamosd if 128980363vres -42993020wscpi ml 344fe3 ifreramisd if oy+ats 80337500 t-gw n mo@ins 4064520wcms mn -59339269 mtrnks fdb2e900 asi?; if fe918e1fidorq -54721289 ;i??8 ia??, -1916665510 o asel 8e0c1e2 gwr9tl wlatei?s?re in clezias 57 649 en ad 1397 nr nt io io io at io io io as 46 n r k r k 50 r ok 1064550 t n;dup?dupdropthenbeginswap0if-ifaa!2*
gevc gemaxvc gevckey getlogov c2922310 getev get1@cedxwedxkbp@@esiwami fst0 fsnrtsks 1774067712 fspuallpoallsvrstcs@ef@srstnsdstnint201ldp!lidtsticli2pus2popforth/fortclear8cleai;4@4!dev t8st1 seww@w!*byte1@1!moveds ijfr ijb!proto m nep melel c18e9d00 -1774553984 lanfc 1280bnfc 1280offset llbs l 1992687616 ltmp c4f2c5f0tp!picp0ifp@p!@bblknr elsbootwarmpausemacroforthcstop
gevc gemaxvc gevckey getlogov c2922310 getev getbytekbdrekeya,idtwami fst0 fsnrtsks 1774067712 fscellallotdtvtskiorstsovectsofbsofosobrdskf@kf!kfnskfnsvfbrefbkfo@kfo!svforefosvvecrevecsvbrdibrdrebrdidtvinctnrztnrnxttnrrstndstnyieldneg+mtskisefscssipsrtsdtsorstitsk!idtinterrfillignoreignoreignore0divdev t8snbsbagpessricwinatiaddqendvregsdevspciokudtestt1 seemptyaddrjhthb.hwhtpfb1ususrrom3romtxrxds ijfr ijnsendfirstlastresetinit/intrcvdn@2!n!n,stringpackelength3!ethern+ethec.n..messagmetosendertargetdiripararp-arpme?queryheademetolength+id0csumsumchecksourcedestinsetdip+ip
melel 833d8000dblk -1774553984 lanfc 1280bnfc 1280offset llbs l 1992687616 lnultmp 86000000edetesbfbfsboptactackdpak1+ackascdedestbbcounuoussoptardrqmvit?mvitsackwrrqsbkscblksclosendblkjacktftp-tftp.receiv+get...getputarchi@elcntdmpokdservemtemptyclisti!pit0pic0picpic1pic2!picpicsttimer0umamartcartc@rtc!hilobcdhmsymddaycalvc@vc!at?vcsnpexecvc1vc2vc3vc4vc5dtdddrregregsokalphagraphnumbrsoctalsgrap0grap1alph0alphekbdekb0numb0numbgetcfoureight3rows.brd.histvstknvstk0jstck.stckkpdkpdtjbrdjtktkeyskeyckeybokeybgfbgvidrefressw?refscreenbscrshowmlogoshtsht2edekbdekeyseokekbdgekstgkeykeyk1?chvmkeymtkeyg4bytpadpa1tmtcbkspemitwecapnuldigedigodighexnumexgwcwywwwysshortlongyngsgnxrcrrwvarcapacapblknr elsword?ringtnoknuldigedigodighexnumexgwcwywysshortlongyngsgnxrcrrwvarcapacapword?ringtnok
4f9 e0 38 35 nd r ie 803a r in r ii 1007a6 1007e4 r i8 32833 r m r mt r ms r ml r m8 32840 r cn r cl r cd 804b r y 1051035 1051047 r yn 804e 1051129 r y8 r lt 1051281 r ge r gl r gd r f 1051439 r fn r fs 556 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a r k r ks r .s r /s 1052437 2a 2a 2a 2a 2a 2a 2a 2a 1014a4 r ref r red r re0 r re8 r ra r rar r rni 80b4 r rnf 1054420 r rn8 101701 r rit r rit 80b9 80ba r ri; 1366 2a 2a 2a 80d0 r rle 80d1 r rls r rll r rld 1366 2a 2a 2a r ttn 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a r tft r tfn r tfn r t8 102e24 81db 2a
ot 728 ee 1126 oo rs tr to otc 616 te ti 315 1743 n0 ns ns ni nn it 39 ome eta ot otr oe 13278 oft oer 15165 ofe 3413 1ab e o 13836 onr 410 oea 12868 onr ont otl 3347 3477 ooo ono otf 406 ot0 ot0 ot8 ot; ot; oi8 owl 32859 r fd r f8 r w r w 100b9d r we 32861 r we r wn 1051600 r wl 1051630 r d r d r v 100c44 r ps 1051761 r h r h r hs r u 1052017 r 8s 1052212 r j 100e61 r -s r -s r -s ar r in ar 1303 r if ar r i8 ar r se ar 1303 r sd r : r :s r + r +s r @ ar r c ar r cn ar 804b ar r y8 r @ 807c r *s r ,s r r r r t r r e r r n r r s r rrn r rri 808b 808c 1053133 r rr; r rr; r rt 101258 r rts 101326 r roe r rof r ro; r re r rer 101471 101542 r rae r ra0 r ra8 80af r rn r rnt 10165a 1054576 r rif 80be r ri0 r ri8 r ri8 ar r 7 r rst r rse r rse r rsn 1054800 r rsl 32963 r rs8 r rm r rme 1054992
r ry 1019e8 r ry8 r ry8 ar r rr8 r rl 32980 r rg 1055412 80d9 r rw r rvs r rp r rb r rb r rbs r rxs 1303 32928 ar r rer r ru r rus r r0 1056097 r r5 r r6 r r8s 33009 r r- 80f3 r r-s 33012 r rk 80f4 r r. 80f5 1056515 r r; r r; r r;s 80f8 1056559 r r:s r r:s 1056587 r r!s r r@ r r*s r r,s 10207b r t s 1056912 r t c r t l r t d r t 8 r trr r trs r trs 810c r trd r tt r tto 33044 r tts r ttc 517 r rgl 33046 r tt0 r tt8 r tot r toe 10239f 811e ar r rwd ar r rp r to; 1303 r rps ar r rhs ar 80e9 ar r r2 ar r r6 ar r r9s ar 80f2 r ter ar r tet r tet r teo 33058 r ten r tef r te; r tar r tar 1058088 33066 r taf r ta0 r tn 1058339 r tna r tnn 1058489 1058640 r tii 1058829 r tsl 8146 r tc r tct 1059143 r tcd r tc8 r tc8 814d r tys r ty8 102a29 r tge 1059561 r tf r tf r tft r tft r tfs 1059690 102b7a 1059853 r t0s r t6 33135 8171 1060438 r tjs r t-s 8174 r tz r t: r t+s 817c 1060814 817e 10304a 103099 r o c 1061046 r o 0 r o 8 r or r orr r orn 33164 r orl 818e 1061416 1061474 r oti r otc 1061541 r otl r otf r otd r ot0 33175 r ot8 8197 r oo r oot 1061730 r ooc r oo0 r oo8 r oo8 1061909 1062075 r oed 1062193 r oal r oaf 1035d3 r onf r ond 1062721 r oia 33212 33212 r oif r oi8 r omt r omn r oc r oct r oce 1063244 r oc8 33228 r oyt r oye r oyl 1063427 r oln 1063553 33236 33239 r oft 1063772 1063837 81dd r owl 81de r owd 1063964
r ovs r ops r ops r obs 1064089 r ox r oxs 103cfa r o0 81e8 r o1 r o2 r o2s r o3s 81ec r o5s ar r on8 r o6 r o9s r o9s r ojs 81f3 r ois 1062798 1062842 r oi0 r oi8 r os 103829 r osn r osl r osl r os8 r omt r ome r omn 1063115 r omd r om8 r oct r ocn r ocl r oc8 r oyl 1063409 81d0
dpi*d gltos8 d99tl drm gdggi.i8 qp ; 0;8e bpi?8 an gqd o.ergs-n s r wtlwu o.eargv3e otm w t1sinml lt 0y8 713 :iers; -60293120 344fe3 473f42inml lt 0y8 722 18119,ofml ;eesns myoscrtrt 1875991 o; 196611 ef mo@ins 28096mw d 344fe3 6515inmw d w 0y8 3238,ofmw 4adrl vs mo@ins 1011136mw d 344fe3 661dinmw d w 0y8 3269,ofmw t w 0 vs mo@ins 361920mw d 344fe3 6fb5crtrsd rk4 ?; 28 23 nn mco dstkn -12189642 wso e,ofmw ?6 rl k i?d???, oorelgw .loamngf oo 272468823wt n naj,c@ ?-6id m ift, c98566f9 hyr ti ??@o 4es oor 134269289?8eor tict rsiftidml d o0rwcn 13068s23on xq0fnnn oio8 bdp; -2035456317 r wos8nmmturai aimtur 2048 1358923 -65536000 iaec y ?!o @ an doagta frrld -12582910 ???/ oorerasrmitar
-825 knodid ac ag8iae soagics 201326592aianvs 4800b08donk mi??@ 18b900ktm fc0c781ecfe 8805815e ad001800?nykn ab?, ots 3 otc w o,atks k ???6 8keol dpioh oorelgnu:s otm wdgffs?na!o ro7?dis -1047986176 oordncori8 e rok nis e ndrmettc n -36645904 e 9nmrnt oorel kagr rgnu; iaecfie v3nf@ mo@ins -576em1 mw??; 344fe3 fff807fd?rqls inmw?8 w 0y8 12632256 ??mai ,ofmwd ?6 rlks e e ???v mo@ins 1472 qes ; mw??; 344fe3 7f805,?ild ?@rr a s gitgsml oao9s riimllewgtis 426 inmw k wt 0y8 11 oao9zdrmv3ngis mo@ins -36793976 0 0ee@id i?a8lramt 404 1962934272 mw 0 344fe3 mreis d fffffd8b mo@ins 2098624inml w 0y8 768 ??fni msont, c18310e1m rfte 32940dmnuvs otme 15y otc 6c58cb ots 1712382401 otm rfddd fc406c48 328ca3lis.l otc lnuv0 404 maenul 50166c3 404 a rnnl ots inmw k w 0y8 67 slrral 45689da rnof tn eoe ti uod; 71,3il /d?? ewttmgee 344fe3 eimas d a?etos ay??@ v!6g ykeefhmamn -1928236230 344fe3 /dd; e3!j!d,3*rs o4a?, om mo@ins 29656328iqe b??? 3313669 o,msrird c7000003 -1811767296?wik itki?d ki??8 ???z -2033 m f id 8b003000 om sd uodd of?f k ab?, ots 3 -61854149 ff5ee800 bfn?@ -1929179136 oaoln witt?es 7??8 re d s 303107849 a i 8rirn e rct tls rd 4e r;disstcajrt 20013393 421735207 rd 4e r;diss trtrc rd 4e r;diss trt 918544od mnrt; 2048a00rtrrr d e r 335544320 a090800 rloto d s r ;ic e n oi8 oi4 g;mw d 344fe3 k!o d ji??s ie rg d 3cef74f0 ma3ioo
ome ome ome ogt a oye ocn oct 1d5 38a4 ome oln 2957568 oye ocn oct ogs 38a4 465 og oyd 8tc ole ol og ole 373b oss oye ??d 952 io bmn.0 3682304ofifoe mt n om n?mg0 eoq?d trwrtramn om m eeydftlo t odn!dfo.ior ie marsnm e upo l 1c69869 s-ttitkns ;iajid nortn0 29792361masd omld eddknrcn0 ???, kienr0 ???? -754596352 e00001 297926170ees mo@ins 18826776 lo??@ 14496 gfrmls ??3ad , skis ab?, ome omtsri rinml bsnmo8 61sab e00001 -3817 mnrt:; 8224ff00 raiede mo@ins -2252992 e ki?d ???? 904441088 .??? m wr; 500001bs 3692544s wrd 3580001 vs o omr w r abs om 1c2 om woisnsosd 6100nlnf 1780001 omrsaidt7as lr1gfs /??8 d 0 is f e o t 631373833 .s o ?a3a omrsaid ab -390057728 ffffffec -5449 mnrt:; 8224ff00 2wede ol i r a+ -150834145 78b45e omr tfsv s b3eal 3697664gf:3 omosaidrm1 gw??; om sriosno4ns oio abm 8 om 448 oiaoo4k3e ???wd om sriosmo4ns oio abm 8 om ost 928202125o4es om ??g-s ssrn , a00001 -3353 y tw?8 ff480001 ???fs d8d0c8 r;;iee 319103264 8t s mo@ins -66825592 og8 -474648 d83o8inmlro sn 0y8 -1983705120 213121213e.knti -655884288 ki??8 -1376553655 iwospie ia??, iaeyale e8ffffff -386697911 ???rt .lrv0 m if @ 500001 1179d285 inmwnws w 0y8 35 -15825 mio80ees oe+kms ok eiadets/oxtee 0eemo8 oe+kms ok e?lg0 icci?8 knsmod???k -15849 mw .wd 344fe3 -10566925438ersed 8nmvs 1360863 872931459 20319768 ndn stv?se
?snmo8 -1405273850 ia o 87752704 o. 108595828 o.lo4v3e o.so4t4 s 404 d mo@ins 33555904!ie i fdc7ffff o -61838245 32900d3br is -17425 m af id c3000c00 ?*5ws 4afn; ots -60790309 f96ce805 cwli?d ff4fffff c -15145 cwl@eak ff4fffff s mo@ins -522816 mr0 ; ff5fffff m af ad f7000c00 ??t! ?@o?8 noia?@ w ifta k rs ??,- -1745 k3anws ???os -19897 ,ofmwd emn 0 ???cd ;i er@ -2377 krs e; ??,5 tnkrbs fc6fffff 344fe3 ,akrt si??@fylis8 ie??, krs et ffffffb5 tkis8 fc6fffff 344fe3 ,akrt si??@cr0;i ie??, +elk :ia?, -18921 v3nf@ ,akat d??? rt.sa; -17289 ?9ilis remi?; finmgrd w 0y8 63488 o.trzow eonie 60005mna,f ??t!t *n ?, 48404mgrd 344fe3 fffff805ls+ t se n ie o 2028470464 689fc76 ta?kt o. -120313 +9ilis ig0?@ fc6fffff 344fe3 o.pso.slndrm o.erz-8e -39719864 +s o wl ; aie -4209 wlatt, lsrir0 se n + rs 1050936775ofle9ers clao, oj crtrsis 3ca4 o4s obs ohs o3 o2s ohs o4 o1 oq 488 o3 io io io n 31 tir rs2 !rt yrt0 a!;eowoacs 74 n 19044 el8 4b81 io er; e c 16595 o@ 16265 e o o? 1ff e o? e r o*s o@s 737 3f91 o@ io io io io io io io io 2d0d010f rr rn 722077987 toli ??d ?s d ?@ ??, ??, ??, sr r8 .srf ff581d80 eb09b00e .sgn -10986112 16256 em lrt bs o 4287232omtrenggn ?,ogi s wrws d rs fff807fdy wrd fea80001 .s o ,ofmwe -1070528887 ome wdsyls ?s o.n?snic 763609856 o. -955614968
0 asisd o. 92521224 501 -1472363581 rl n 16c1853 501 -1472887869 r ovsrons lnnr3l 501 ,ofmfs gret 0 bs o 4293120e ab 1280001 osnsrie odnrk b??? 4136960s wrd 1800001 bs o -65536+lg0 re??, -236212992 fe3d6d6a 243712ysrird 1b80001 b 96927744 osn ome omt w?s 2ies ; mi??@ fa8100ia c8 .er8d 2249816 ome rfinml mn 0y8 82477826 si-iae 16060 o.don 0rs omeo.doed8de???8 4asf8 ome ,ogeyeoamngf 1f5 mtywms l il , fe080001 1ast8 o.s ff36083b -272539908 16044 ome rfmtyd wleyal ffffff94 o@ nd vs f+caks a+i?d o@ gl ylsosle8 -2130152196 ; dciia; 36963808o@ rzie e 3704893 tie l abm o ome inmfc; w 0y8 1o@ rzie e 3704893 tie l ns9 o ome w tieks ki??8 t o.lo4 4as 1f5 -8ije 16048 :st-n -1912602627 344fe3 o.slfsregs ie o casntes fd81ac5a ml d ??t2n o4a?, o.s -1409503747 ca:iae ws+roe a8 rs mtffr0 8cc28100mt 10ea8300 om sannrk 3f7c15mw s s o asel e7ebd2
8o? rs 38103 n n n n n n n n c000 s i; o c000 c000 c000 fe00c600 is dr, en n 8osn n n nn n n n8osn n s o@ o dr, en n n n8o*so n 8osn n n s o, o d , en n8 *s n n 8rsn n n n n r? rs doidrs 3038303n n n nn n n nn n n nn n n n n 0 8 12288 12288 12288 12288 ; dr, en n n n o8 os d d en n 8o s o@ o do6 rd 50541315 50541315 50541315 50541315 50529027 dr, en n n n n n n nn n n n s o@ on n n nn n n n8o o o 8o ;rs n r- rsn n ndr*so s t 8 12288 12288 12288 12288 12288 12288 12288 s o; r dr, en n n ns ?8o o odr@ d n n 8osdr*so s t8 o; 12288 12288 s o; r 12288 12288 12288 12288 12288n nnn n 50541315 50541315 50541315 50541315 s oos dn nn nn n 8r*s sn n 8on n n nn n n nn n n n n r? rsn n n nn n n ndrsn ns oos d @ s n do, rsn n n in n n nn n n ndo*sos n s d n n n n n n n n n do, rsn n n in n n nn n n nn i n n s 7dos n n n n n n do, rsn n n in n n nn n n nn n n nn n n n8osn n
s oos d ; ; dru en n 8osn n n nn n n nn n n nn n n nn n n n s o@ o 8r*s sn n 8on n n nn n n n8r?so n n rn n n dr, e8o i osn nr8o n ntn n 1617453156 505617958osn i s o@ o 28672 r8 s 12288 12288 12288 12288 12288 12288 s o; r dr, en n 8osn n8 o s is 8 os t 6291568 8o?sos dr, en n 8osn nn n d i8n nn n8osn n s o@ od o8 -33528320 d b -1070546920do n os 8o?sosd nd nd n 8o?sos n n n n do, rdn 8n nn n8osn n s o@ o dr, en n 8os n n do, rsn n 8osn n n nn n n n8osn n s o@ o 8o?sosd os os os n 24576 rs 3145752 n o dr, en n 8osn n n ndrsn n s o; rn n drsn n n n8osn n s o@ o dr, en n 8osn n n n8o o o n r? rsd os os os 8 n 0 12288 12288 12288 12288 12288 12288 126977 r 0 8o?sos n n n n n n8o ;rs nis d id o ni ido drsn n 8o 8 8 8o?soss os n rs 6291504 8o?sosn nd n s o o 12288 d 1572888 o o n n 8 8 8 12 8 8 8 e 8 8 8 8 e 8
8 12288 12288 8o?sos 12288 12288 dr@n n drsn nin n n ncdn n ncdn n n+ o do ;rs o n d i8 d 50540544 fc00ff03 ; 8ofs t 13059 8 8 12 dr,n n 8rsn n nd r; ns 12288 0 n 12288 s ? i do? rd 8r?sos 8 i; e 8 r; 8 r; 8 i; 8r?s s do?sos s ?dos i do, rdn n 8on n n n8o o o s ?dos no n s vs ddo n on n n n 8o?sos 12288 12288 12288 12288 12288 12288 12288 12288 dr, en n 8osn n n nn n n nn n n nn n n nn n n n8osn n s o@ o 8o?sos n n n n n n 8o?sos n n n n n n 8o?sos 12288 ; s oo t drss tdrsdrs dr? ddrsdrsn n n nn n n n 303c303 n nb o 1617322086n non n 8o ;rsn n n nn n n nn n n nn n n n s o; r 12288 12288 12288 12288 12288 12288 12288 s o; r dr, en n 8os n n i n d , dn 8n n8osn n s o@ o8osn n8oqsos n n? os n nnn n 50529027n n n nn n n nn n n nn n n n dr, en n 8os n n n n n n n n n n8osn n s o@ on n n ndrsdrs s oo t ; 12288 12288 12288 12288 12288 n n n n n n n n n n n n n n n n 8o?sos dr, en n 8os n n n n n n 8o ;rsn n n n8osn n s o@ o 8o?sos n n n n i8 o n i n n n n n n n nn n n nn n n nn n n nn n n nn nnn n 50541315 50541315 50541315 s oos d
do@ rdn n don n n nn n n nn n n nn n n nn n n ndo o o i, osn n n nn n n nn n n nn n n nn n n ndrsdrs s oo t ; 12288 do, rdn n 8on n n n8o o o s ?dos n n n n n n n n do, rdn n 8on n n n8o o o do? rdn n 8on n n n8o o o s ?dosn n n nn n n nn n n nn n n n 8o?sosn n n nn n n nn n n nn n n nn n n ndrsdrs s oo t ; 12288 ; s oo tdrsdrsn n n no n o no n o no n o no n o no n o no n o no n o ni i o n d ?srs dr, en n 8osn n n nn n n nn n n nn n n nn non ndom8o n r? rs dr, e8o i osn nr8o n ntn n 1617453156 505617958osn i s o@ o 28672 r8 s 12288 12288 12288 12288 12288 12288 s o; r dr, en n 8osn n8 o s is 8 os t 6291568 8o?sos dr, en n 8osn nn n d i8n nn n8osn n s o@ od o8 -33528320 d b -1070546920do n os 8o?sosd nd nd n 8o?sos n n n n do, rdn 8n nn n8osn n s o@ o dr, en n 8os n n do, rsn n 8osn n n nn n n n8osn n s o@ o 8o?sosd os os os n 24576 rs 3145752 n o dr, en n 8osn n n ndr o o s o; rn n drsn n n n8osn n s o@ o dr, en n 8osn n n n8o o o n r? rsd os os os 8 s o s o s o s o s o s o s o is id os 8o?sos8o o o s bdo n8 o is 8 7340144 3e003 ni ndo drsn n 8o
8 8o?sosd n s o o 12288 d 1572888 o o 8o?sosn nd n s o o 12288 d 1572888 o o n n 8 8 8 12 8 8 8 e 8 8 8 8 e 8 8 12288 12288 8o?sos 12288 12288 dr@n n drsn nin n n ncdn n ncdn n n+ o do ;rs o n d i8 d 50540544 fc00ff03 ; 8ofs t 13059 8 8 12 ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ; ; rs ; is ;r@ di@ ?so , is ;r@ di@ ?s , ; ; , ?s di@ ;r@ , is ?so di@ ;r@ ; is ; rs ; s t 8 os 8 os ; is ; is 8 os 8 os s t ;i?, ;i?, ;i?, ;i?,8 osd iss o8 o; i8 , @ s ; rs 8 os d is s o8 o; i8 , @ ; ;i?, ;i?, ;i?, ;i?,i;; s8 rsd oss r8 r; o8 id @ ; s 8 rs d os s r8 r; o8 id @ ; 8 d s
;i?, ;i?, ;i?, ;i?, d rs d rs d rs d rs d rs d rs d rs d rs d rs d rs ??ddi?, 8i?, 8i?, ; d ; ; ;is ; ;idid ;idid ;rdi ;rdi ;rdi ;rhi 8i@id 8i@id sr? ; ; d 8i?, 8i?,di?, ??d s t s t s t d rs d rs d rs 8 os 8 os ;i?, ;i?,di?, ??d ,r@ @ @ @ @ ,r@ ,r@ i-; o-8 r-d i8 od s n d os d os d os s n s n ; 8di?, @i?,t od rs 234881136 ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? 8 os s n 134744072 4210752
macroswap 687 2, ;0 ?dup c031 2, ;if 74 2, here ;-if 79 2, here ;a ?dup c28b 2, ;a! ?lit if ba 1, , ; then d08b 2, drop ;2* e0d1 2, ;a, 2* 2* , ;@ ?lit if ?dup 58b 2, a, ; then 85048b 3, 0 , ;! ?lit if ?lit if 5c7 2, swap a, , ; then 589 2, a, drop ; then a! 950489 3, 0 , drop ;nip 4768d 3, ;+ ?lit if 5 1, , ; then 603 2, nip ;or 633binary ?lit if swap 2 + 1, , ; then 2, nip ;and 623 binary ;u+ ?lit if 681 2, , ; then 44601 3, drop ;? ?lit a9 1, , ;
pentium macros: 1, 2, 3, , compile 1-4 bytesdrop lodsd, flags unchanged, why sp is in esiover sp 4 + @swap sp xchg0 0 0 xor, macro 0 identical to number 0a 2 0 mov, never used?a! 0 2 mov, unoptimized@ eax 4 *, unoptimized! edx 4 *nop used to thwart look-back optimization- ones-complement2*2/if jz, flags set, max 127 bytes, leave address-if jns, samethen fix address - in kernelpush eax pushpop eax popu+ add to 2nd number, literal or value? test bits, set flags, literal only!
macrosover ?dup 4468b 3, ;push 50 1, drop ;pop ?dup 58 1, ;- d0f7 2, ;for push begin ;*next swapnext 75240cff0next , here - + 1, 4c483 3, ;-next 79240cff 0next ;i ?dup 24048b 3, ;*end swapend eb 1, here - + 1, ;+! ?lit if ?lit if 581 2, swap a, , ; then 501 2, a, drop ; then a! 950401 3, 0 , drop ;nop 90 1, ;align here - 3 and drop if nop align ; then ;or! a! 950409 3, 0 , drop ;* 6af0f 3, nip ;*/ c88b 2, drop f9f72ef7 , nip ;/mod swap 99 1, 16893ef7 , ;/ /mod nip ;mod /mod drop ;
for n push count onto return stack, falls into beginbegin -a current code address - byte*next aa-aa swap for and if addressesnext a decrement count, jnz to for, pop return stack when done-next a same, jns - loop includes 0i -n copy loop index to data stackend a jmp to begin+! na add to memory, 2 literals optimizedalign next call to end on word boundaryor! 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 quotientmod nd-r remaindertime -n pentium cycle countegas 15240000 to get actual clock rate
compiled macros2/ f8d1 2, ;time ?dup 310f 2, ; forth@ @ ;! ! ;+ + ;*/ */ ;* * ;/ / ;2/ 2/ ;dup dup ; arithmeticnegate - 1 + ;min less if drop ; then swap drop ;abs dup negatemax less if swap then drop ;v+ vv-v push u+ pop + ;writes acn for write next drop drop ;reads acn for read next drop drop ;oadf qwertysave 0 dup nc @ writes stop ;
these macros may be white, others may not@ etc arithmeticnegate n-n when you just cant use -min nn-n minimumabs n-u absolute valuemax nn-n maximumv+ vv-v add 2-vectorsnc -a number of cylinders bootedsave write colorforth to bootable floppyoadf save as spelled by qwerty. for typing with blank screen
colors etcblock 100 * ;white ffffff color ;red ff0000 color ;green ff00 color ;blue ff color ;silver bfbfbf color ;black 0 color ;magenta ff00ff color ;screen 0 dup at 1024 768 box ;5* 5 for 2emit next ;cf 25 dup at red 1 3 c 3 a 5* green 14 2 1 3 3e 5* ;logo show black screen 800 710 blue box 600 50 at 1024 620 red box 200 100 at 700 500 green box text cf keyboard ;empty empt logo ;
block n-a block number to word addresscolors specified as rgb: 888screen fills screen with current colorat xy set current screen positionbox xy lower-right of colored rectangledump compiles memory displayprint compiles screen printicon compiles icon editorlogo displays colorforth logoshow background task executes following code repeatedlykeyboard displays keypad and stack
dump x 0 y 2106432one dup @ h. space dup h. cr ;lines for one -1 + next drop ;dump x !r show blue 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 h. 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 orbyte 4 / dump ;fix for 0 over ! 1 + next ; dump
does not say empty, compiles on top of applicationx -a current addressone a-a line of displaylines andump a background task continually displays memoryu increment addressd decrementati address of agp graphic registersbyte a byte address dumpfix an-a test word
icons macro@w 8b66 3, ;!w a! 28966 3, drop ;*byte c486 2, ; forth ic 44 cu 207sq xy @ 10000 /mod 16 + swap 16 + box 17 0 +at ;loc ic @ 16 24 8 */ * 18 block 4 * + ;0/1 8000 ? if green sq ; then blue sq ;row dup @w *byte 16 for 0/1 2* next drop -17 16 * 17 +at ;ikon loc 24 for row 2 + next drop ;adj 17 * swap ;cursor cu @ 16 /mod adj adj over over at red 52 u+ 52 + box ;ok show black screen cursor 18 dup at ikon text ic @ h. keyboard ; 36 load ok h
draw big-bits icon@w a-n fetch 16-bit word from byte address!w na store same*byte n-n swap bytesic -a current iconcu -a cursorsq draw small squarexy -a current screen position, set by atloc -a location of current icons bit-map0/1 n-n color square depending on bit 15row a-a draw row of icon+at nn relative change to screen positionikon draw big-bits iconadj nn-nn magnify cursor positioncursor draw red box for cursorok background task to continually draw icon, icon number at top sr 4210752 4210752 4210752
edit+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 toggled 16wrap cu @ + 16 24 * dup u+ /mod drop cu ! ;tu toggleu -16 wrap ;tr toggler 1 wrap ;tl togglel -1 wrap ;nul ;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 , 110160c , 2b000023 , 0 , 0 , 0 ,
edit icon
png empty w 54 h 32 d 4frame 1e80000 ; file 42 load 40 load-crc a here over negate + crc . ;crc -crc ;wd -a here 3 and drop if 0 1, wd ; then here 2 2/s ;bys n-a . here swap , ;plte 45544c50 48 bys 0 3, ff0000 3, ff00 3, ffff00 3, ff 3, ff00ff 3, ffff 3, ffffff 3, 0 3, c00000 3, c000 3, c0c000 3, c0 3, c000c0 3, c0c0 3, c0c0c0 3, crc ;png awh d @ / h ! d @ / w ! wd swap 474e5089 , a1a0a0d , ihdr 52444849 13 bys w @ . h @ . 304 , 0 1, crc plte idat 54414449 0 bys swap deflate crc iend 444e4549 0 bys crc wd over negate + ;at 1024 * + 2* frame + ;full 4 d ! 0 dup at 1024 768 png ;pad 1 d ! 46 -9 + 22 * nop 25 -4 + 30 * at 9 22 * nop 4 30 * png ;
lz77 9jro@w a 8b66 3, ;*byte c486 2, ;!b a! 289 2, drop ; forth*bys dup 16 2/s *byte swap ffff and *byte 10000 * + ;. *bys , ;+or over - and or ;0/1 10 ? if 1e and 1e or drop if 7 ; then f ; then 0 and ;4b dup 0/1 9 and over 6 2/s 0/1 a and +or swap 11 2/s 0/1 c and +or 8 or ;pix dup @w d @ 2* 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 2 * * + ;deflate 178 2, 1 0 adl! h @ -1 + for 0 row next 1 row drop ad2 @ *byte 2, ad1 @ *byte 2, here over 4 + negate + *bys over -4 + !b ;
crc macro2/s ?lit e8c1 2, 1, ;1@ 8a 2, ; forth ad1 48546 ad2 48600array -a pop 2 2/s ;bit n-n 1 ? if 1 2/s edb88320 or ; then 1 2/s ;fill nn for dup 8 for bit next , 1 + next drop ;table -a align array 0 256 fillcrc an-n -1 swap for over 1@ over or ff and table + @ swap 8 2/s or 1 u+ next - nip ;+adl n ff and ad1 @ + dup ad2 @ +adl! ad2 ! ad1 ! ;+mod ad1 @ 65521 mod ad2 @ 65521 mod adl! ;
dos fileblks 256 * ;w/c 18 blks ;buffer 604 block ;size -a buffer 0 1 reads buffer 98f + ;set n ! buffer 0 1 writes ;cyls n-nn 1 swap w/c -1 + + w/c / ;put an dup 2* 2* size set cyls writes stop ;get a size @ 3 + 2/ 2/ cyls reads stop ;.com 0 63 blocks put ;
blks n-n size in blocks to wordsw/c -n words per cylinderbuffer -a 1 cylinder required for floppy dmasize -a locate size of 2nd file. floppy has first filler then file allocated. filler is 2048 bytes, to fill out cylinder 0. names at most 8 letters, all caps. directory starts at buffer 980 +set n size. file must be larger than your file.cyls n-nn starting cylinder 1 and number of cylindersput an write file from addressget a read file to address
north bridge macro4@ dup ed 1, ;4! ef 1, drop ; forth dev 14336nb 0 dev ! ;sb 3800 dev ! ;agp 800 dev ! ;ess 6800 dev ! ;ric 7800 dev ! ;win 8000 dev ! ;ati 10000 dev ! ;add cf8 a! 4! cfc a! ;q 80000000 + add 4@ ;en 8004 q -4 and or 4! ;dv dup 800 * q swap 1 + ;regs dev @ 19 4 * + 20 for dup q h. space dup h. cr -4 + next drop ;devs 0 33 for dup q dup 1 + drop if dup h. space drop dup 8 + q dup h. space over h. cr then drop 800 + next drop ;pci q ;ok show black screen text regs cr devs cr dev @ h. cr 6800 pci h. keyboard ;u 40 dev +! ;d -64 dev +! ;test ff00 + a! 4@ ; ok
ascii macro1@ 8a 2, ; forthstring pop ;cf-ii string 6f747200 , 696e6165 , 79636d73 , 7766676c , 62707664 , 71757868 , 336a7a6b , 37363534 , 2d313938 , 2f322e30 , 2b213a3b , 3f2c2a40 ,ch fffffff0 and unpack cf-ii + 1@ ff and ;ii-cf string 2a00 , 0 , 2b2d0000 , 2725232e , 1b262224 , 1f1e1d1c , 28292120 , 2f000000 , 3a43355c , 3d3e3440 , 484a3744 , 3336393c , 38314742 , 3f414632 , 493b45 , 0 , a13052c , d0e0410 , 181a0714 , 306090c , 8011712 , f111602 , 190b15 ,chc ffffffe0 + ii-cf + 1@ ff and ;
clock macrop@ ec 1, ;p! ee 1, drop ; forthca 70 a! p! 71 a! ;c@ ca 0 p@ ;c! ca p! ;hi 10 c@ 80 and drop if ; then hi ;lo 0 p@ 80 and drop if lo ; then ;bcd c@ 16 /mod 10 * + ;hms0 4 bcd 100 * 2 bcd + 100 * 0 bcd + ;hms hms0 2 ms dup hms0 or drop if drop hms ; then ;ymd 9 bcd 100 * 8 bcd + 100 * 7 bcd + ;day 6 c@ -1 + ;cal hi lo time - hi lo time + 748 ;
lan empty 3f8 54 load initno 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 ;
4210752 4210752 4210752
serial 3f8 2e8 1050 macrop@ a! dup ec 1, ;p! a! ee 1, drop ;1@ 8a 2, ;1! a! 288 2, drop ; forthr 0 + + ;9600 12 ;115200 1 ;b/s 83 3 r p! 9600 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 ;
p@ p-n fetch byte from portp! np store byte to port1@ a-n fetch byte from byte address1! na store byte to byte addressr n-p convert relative to absolute port address. base port on stack at compile time. compiled as literal at yellow-green transition9600115200 baud-rate divisors. these are names, not numbersb/s set baud rate. edit to changeinit initialize uartxmit n wait for ready and transmit bytects n wait for clear-to-send then xmitst -n fetch status bytexbits n-n exchange status bitsst! n store control byte?rcv fetch byte if ready. set flag to be tested by ifrcv -n wait for ready and fetch byte
hexagon col 14712896 del 2105376lin dup 2/ 2/ dup 2* line ;hex xy @ 7 and over 2/ for lin 7 + next over for lin next swap 2/ for -7 + lin next drop ;+del del @ noppetal and col @ + f8f8f8 and color 100 hex ;-del del @ f8f8f8 or 80808 + ;rose 0 +del -176 -200 +at f80000 -del petal 352 -200 +at f80000 +del -264 -349 +at f800 -del petal 176 -200 +at f8 +del -176 98 +at f8 -del petal 176 -200 +at f800 +del ;ok show black screen 512 282 at rose text col @ h. space del @ ff and . keyboard ; 58 load ok h
draws 7 hexagons. colors differ along red, green and blue axes.col color of center hexagondel color differencelin n draws 1 horizontal line of a hexagonhex n draws top, center and bottom. slope 7 x to 4 y is 1.750 compared to 1.732+del n increment color-del npetal n draw colored hexagonrose draw 7 hexagonsok describe screen. center color at top
panin del @ 2* 404040 min del ! ;out del @ 2/ 80808 max del ! ;r f80000+del del @+col and col @ + f8f8f8 and col ! ;g f800 +del ;b f8 +del ;-r f80000 -del +col ;-g f800 -del +col ;-b f8 -del +col ;nul ;h pad nul nul accept nul -r -g -b nul r g b nul out nul nul in nul nul nul nul nul nul nul nul nul nul nul nul 250000 , 130d01 dup , , 2b000023 , 0 , 0 , 0 ,
in increment color differenceout decrement itrgb increment center color-r-g-b decrement it+del redefine with ;+col change center colornul ignoreh describe keypad -7326896
colorforth jul31 chuck moore public domain 24 load 26 load 28 load 30 loaddump 32 load ;icons 34 load ;print 38 load ;file 44 load ;north 46 load ;colors 56 load ;mtcfl 170 load ; mark empty
timing empty macroout e1e6 2, ; forthtare 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 macroc! c88b 2, drop here ;loop 49 1, 75 1, e2 here - + 1, ; forthtry time - 1000 c! loop time + ;
audio ess tech maestro2e ac-97 empty macro2@ dup a! ed66 2, ;2! a! ef66 2, drop ;4@ dup ed 1, ;4! ef 1, drop ; forthus 100 * for next ;nb cf8 a! 4! cfc a! ;ess! 80006800 + nb 4! ;on 5 4 ess! 0 c4 ess! ;wind 1240 40 ess! 9a840058 50 ess! 100 58 ess! 3810 60 ess! ;r@ 1400 + 2@ ;r! 1400 + 2! ;rdy 1430 2@ 1 and drop if 2 us rdy ; then ;ac@ rdy 80 + 1430 2! 21 us rdy 1432 2@ ;ac! rdy swap 1432 2! 1430 2! ;rb@ 1434 a! 4@ ;rb! 1434 a! 4! ;ac0 8000000 rb! 2 us 30000000 rb! 21 us ;ac1 ff6 64 ess! 9 68 ess! 0 60 ess! 2 us 1 60 ess! 1 us 9 60 ess! 500000 us 9 68 ess! 84 us 10000000 rb! ;try 80 1430 2! 61 us 1430 2@ ;version 7c ac@ ; on 66 load
audio test x 0wpa 1402 2! 1400 ;wp@ wpa 2@ ;wp! over over wpa 2! over 1400 2@ or drop if wp! ; then drop drop ;aa 1 wp! 0 ;apu@ aa wp@ ;apu! aa wp! ;wca 1410 2! 1412 ;wc@ wca 2@ ;wc! wca 2! ;h.s h.4 space ;ac? dup ac@ h.s dup h.s dup 2/ dup wp@ h.s dup apu@ h.s dup wc@ h.s h.s ;regs x @ 20 + 11 for dup r@ h.s ac? cr -2 + next drop ;ok show black screen text regs keyboard ;u 20 x +! ;d -32 x +! ;agg0 9240 40 ess! 1000c0 50 ess! 4000 18 r! 10000 us 0 18 r! 500 7 wp! 140 14 r! 1fc 4 for 200000 1000 / over wp! 1 + next drop ac0 ;
editor empty macro forth blk 0 cur 0 prev 0nul ; 70 loadedit blk !e ;ok show black screen keyboard ;h pad nul nul accept nul nul nul nul nul -w -l +l +w -b nul nul +b nul nul nul nul nul nul nul nul nul nul nul nul 2500 , 0 , 0 , 2b000023 , 0 , 0 , 0 ,
keys+w 1 cur +! ;-w prev @ cur ! ;+l 8 cur +! ;-l -8 cur +! ;+b 1 +*b dup blk ! ;-b -1 + 24 max *b ;
editor display macro@b 8a 2, ; forthbksp xy @ 12 10000 * negate + xy ! ;emitw unpack if emit emitw ; then space drop drop ;ecap unpack if 48 + emit ecap ; then space drop drop ;nul drop ;dig pop + @b ff and emit ;edig dig 1b1a1918 , 1f1e1d1c , 13052120 , e04100a ,odig dup f and swap 2/ 2/ 2/ 2/ fffffff and ;hex odig if hex edig ; then drop edig ;num if c0c000 and color hex space ; then color . ;ex bksp emitw ;gw ff00 color emitw ;cw ffff color emitw ;yw ffff00 color emitw ;ww ffffff color emitw ;ys ffff00short push dup 2/ 2/ 2/ 2/ 2/ swap 10 and drop pop num ; 74 load
long push 1 u+ 10 and drop dup @ pop num ;yn ffff00 long ;gs ff00 short ;gn ff00 long ;x xy @ 10000 / ;rcr x 3 or drop if cr then ;rw rcr ff0000 color emitw ;var ff00ff color emitw 0 gn ;cap ffffff color unpack 48 + emit emitw ;acap ffffff color ecap ; blknr 174word dup -16 and swap f and jump ex yw yn rw gw gn gs cw ys ww cap acap var nul nul nul?ring dup 1 u+t blknr @ block textn dup @ -1 ? if word 1 + n ; then drop drop ;ok show black screen t keyboard ; ok
mandelbrot set dep 24o 0 0 dep @ 1 max for vndup itr vdup vlen f0000000 + drop -if *next drop drop 0 ; then drop drop pop hue ;mh x @ swap 1024 for o wf+ inc @ u+ next nip ;mv y @ 768 for mh inc @ negate + next drop ;+d 2 dep +!-d -1 dep +! dep @ 1 max dep !draw drop 1e80000 frame ! mv dep @ ;ok show keyboard ;l inc @ 1023 8 */ negate x +! draw ;u inc @ 767 8 */ y +! draw ;d inc @ 767 8 */ negate y +! draw ;r inc @ 1023 8 */ x
test test test
spy empty 3f8 54 load initry 5 r p@ ; 82 load initbuffer 2000 block ; 2000 1 erase buf 73 0 buf !b! swap ff and + buf @ buffer + ! 1 buf +! ;dev r2 if dup xmit 100 b! dev ; then ;pc ?rcv if dup x2 0 b! pc ; then ;relay s2 st s2! st! dev pc ;.1 f and digit ;.byte dup 10 / .1 .1 ;traffic text buffer buf @ 1 max 400 min for dup @ green 100 ? if red then .byte 1 + next drop ;ok show black screen relay traffic keyboard ;k show black screen relay keyboard ;q 6000 for relay next ;test st! st ; 84 load
serial 2r 2f8 + ;b/s 83 3 r p! 9600 0 r p! 0 1 r p! 3 3 r p! ;init b/s 16550 1 2 r p! 0 4 r p! ;x2 5 r p@ 20 and drop if 0 r p! ; then x2 ;c2 6 r p@ 30 and 30 or drop if c2 ; then x2 ;s2 6 r p@ xbits ;s2! 4 r p! ;r2 5 r p@ 1 and drop if 0 r p@ ; then ;
dynapulse 200msend pop swap for dup 1@ x2 1 + next drop ;reset 2 send 2323 ,1st 12 send 37269a12 , 39027afd , 23c75680 ,
format floppy empty macrop@ 0 ec 1, ;p! ee 1, drop ; forth hd 1array pop 2/ 2/ ;com align array 1202004d , 6c 2,done 3f4 a! p@ d0 or drop if done ; then ;byte n ready p! ;sectors nn-n 18 for over byte hd @ byte dup 18 mod 1 + byte 2 byte 1 + next drop ;head nn-n dup hd ! 400 * 1202004d + com ! seek com 6 command dup 2* - 1801 + sectors done ;cylinders n 0 swap for 0 head 1 head 1 + next stop drop ;format 12 cylinders ;
increase speed from 2 cylinders/s to 3p@ read byte from port in ap! write byte to port in aarray -a return next word addresscom -a address of command stringdone wait till last sector formatted. till ready to readbyte n send byte to fdc when readysectors nn-n send 4 format bytes to each of 18 sectors. sector number from 1 to 18head nn-n set head number. issue seek and format commands. starting sector number depends on cylinder, allowing 2 sector times to step heads. cylinder 1: 17 18 1 2 ... 16. 1801 + adjusts for 1s complement and for unsigned modcylinders n format both heads of each cylinder, starting at 0format standard number of cylinders. smaller is faster
hard disk empty macro2/s ?lit f8c1 2, 1, ;p@ dup a! ec 1, ;p!+ 42ee 2, ;1! 91 1, drop ;insw 1! 97 1, 6df266 3, 97 1, ;outsw 1! 96 1, 6ff266 3, 96 1, ; forth2dup over over ;bsy 1f7 p@ 80 and drop if bsy ; then ;rdy -n 1f7 p@ 8 and drop if 1f0 a! 256 ; then rdy ;sector 1f3 a! swap p!+ 8 2/s p!+ 8 2/s p!+ 8 2/s e0 or p!+ drop p!+ drop 2* 2* ;read an 20 sector 256 for rdy insw next drop ;write an bsy 30 sector 256 for rdy outsw next drop ; 92 load
boot: 3f fat0: 5f fat1: 25a5 dir: 2 cl forth: 8e6d clreg dup p@ ff and 2 h.n space 3 h.n cr ;regs 7 for i 1f0 + reg -next ;ok show blue screen text regs keyboard ;cl 20 * 4aab + ;buffer 2000 block ;?fort dup @ 54524f46 or drop ;cl0 dup 5 + @ 10000 * swap 6 + @ 16 2/s ffff and or ;find -n buffer dup 2 cl read 256 for ?fort if 8 + *next drop ; then cl0 pop drop ;fort 8e6d cl ;+2 8000 u+ 100 + ;reads for 2dup read +2 next drop drop ;writes for 2dup write +2 next drop drop ;get buffer fort 9 reads ;cf! 0 fort 2 writes ;
deskjet empty 40 loadnb 768 3 * ; 42 loadpixels for pix next drop drop ;drow string 33622a1b , 622a1b4d , 5730 2,rpt drow 10 type drop ;columns for 264 2 erase dup buffer 8 * 768 pixels line rpt rpt 2 + next drop ;res 300 2, 300 2, 2 2, ;esci string 306c261b , 6f2a1b4c , 1b4d312e , 3033742a , 2a1b5230 , 55342d72 , 32672a1b 4025736 res res res res 32722a1b , 53343033 , 30722a1b , 722a1b41 , c4362 3,print esci 37 type f0000000 767 1024 * 2 * + 1024 columns 6 type drop ;tx string 3f and if 3f or if ; then c0 or ; then ;text tx map ! print ;it table map ! print ;
printer macrop@ ec 1, ;p! ee 1, ;@w 8b66 3, ;@b 8a 2, ;+a c2ff 2, ;bts 10ab0f 3, drop ;2/s ?lit f8c1 2, 1, ; forthready p@ 80 and if ; then ready ;delay for next ;emit 378 a! p! +a ready +a 8d or p! 30 delay 1 or p! drop ;type for dup @b emit 1 + next ;buffer 264 block 4 * ;string pop ;!b dup - 7 and a! dup 3 2/s bts 1 + ;three !btwo !bone !bnul drop ;white ffff and dup ffff or drop if - then ;
deskjet-nb nb negate u+ ;bcmy string 10243800 , 3033 , 200022 , 10000011 , c00f , 4003 , 0 , 0 , 8000a , 0 , 800002 , 0 , 4000005 , 0 , 0 , c0000001 ,ye nb 3 * u+all over over 3 and jump nul one two threema -nb 2 2/s all ;cy -nb 2 2/s all ;bl -nb 2 2/s all ; map 10509186b c618 and 3 2/s dup 3 2/s or 3c3 and dup 4 2/s or 3f and ;table string bcmy + @b ;ex map @ push ;pix over @w 6b ex ff and if ye ma cy bl then drop 3 + 1024 -2 * u+ ;arow string 30622a1b , 4d 1,trbp string 32622a1b , 563838 3,trbr string 32622a1b , 573838 3,color 7 type drop nb 8 / type ;line arow 5 type drop buffer 3 for trbp color next trbr color drop ;
x18 simulator empty macro2/s ?lit f8c1 2, 1, ; forthstate 1fff block ; 102 loadreset r 26 for 100000 over ! 1 + next drop 180 mem @ ir ! 181 pc ! 0 slot ! ;un. 5 for 37 emit next ;undef 100000 ? if drop un. ; then 5 h.n ;r. a-a dup @ undef cr 1 + ;stack sp @ 8 for dup ss r. drop -1 + next drop ;return rp @ 8 for 1 + dup rs r. drop next drop ;ok show black screen text green return r r. blue r. r. white r. r. green r. r. drop stack keyboard ; reset ok
2/s n shift right n bitsstate -a address of state vector for current computerreset set registers undefined, execute from romun. display undefined registerh.n nn display n hex digits of numberundef n bit 20 set means undefinedr. display registerstack display stack, top at topreturn display return stack, top at bottomok display registers, b a blue, pc ir white
registersr state ;b state 1 + ;ar state 2 + ;pc state 3 + ;ir state 4 + ;t state 5 + ;s state 6 + ;slot state 7 + ;ss 7 and 8 + state + ;rs 7 and 16 + state + ;rp state 24 + ;sp state 25 + ;mem 2000 block + ; 106 load 104 loads1 ir @ 8 2/s inst ;s2 ir @ 3 2/s inst ;s3 0 slot ! ir @ 4 and drop if ret then pc @ mem @ ir ! 1 pc +!s0 ir @ 13 2/s inst ;step slot @ jump s0 s1 s2 s3steps for step next ;
name 26 registers in state vectorar -a a register. cannot be named a because pentium macro takes precedences0-s3 execute instruction from slot 0-3step execute next instructionsteps n execute n instructions
instructionsnul ;call pc @ +rjmp ir @ 1ff and pc ! ;jz t @ dup orjc drop if 3 slot ! ; then jmp ;jns t @ 20000 and jc ;ret -r pc ! ;@b b @@x mem @ +t ;@+ ar @ 1 ar +! @x ;n pc @ 1 pc +! @x ;@a ar @ @x ;!b b @ 1 b +!!x -t swap mem ! ;!+ ar @ 1 ar +! !x ;!a ar @ !x ;inst n 1 slot +! 1f and jump jmp jmp call call jz jz jns jns @b @+ n @a !b !+ nul !a -x 2*x 2/x +* orx andx nul +x r@ a@ t@ s@ r! a!x nul t!
define action of each instructioninst n jump vector for 32 instruction codes
instructions+r n r @ rp @ 1 + dup rp ! rs ! r ! ;-r -n r @ rp @ dup rs @ r ! -1 + rp ! ;+t n t @ s @ sp @ 1 + dup sp ! ss ! s ! t ! ;-t -n t @ s @ t ! sp @ dup ss @ s ! -1 + sp ! ;-x t @ 3ffff or t ! ;2*x t @ 2* 3ffff and t ! ;2/x t @ dup 20000 and 2* or 2/ t ! ;+* t @ 1 ? if s @ + then 2/ t ! ;orx -t t @ or t ! ;andx -t t @ and t ! ;+x -t t @ + 3ffff and t ! ;r@ -r +t ;a@ ar @ +t ;t@ t @ +t ;s@ s @ +t ;r! -t +r ;a!x -t ar ! ;t! -t drop ;
+r n push onto return stack-r -n pop from return stack+t n push onto data stack-t -n pop from data stack-x some instructions named with terminal x to avoid pentium conflict
x18 target compiler empty h 2097547 ip 2097546 slot 3 macro2*s ?lit e0c1 2, 1, ; forthmemory 2000 block ;org n memory + dup h ! ip ! 0 slot ! ;, n h @ ! 1 h +! ;s3s0 h @ ip ! 13 2*s , 1 slot ! ;s1 8 2*ssn ip @ +! 1 slot +! ;s2 3 2*s sn ;i, slot @ jump s0 s1 s2 s325x 114 load ; 116 load 110 load 112 load n x18 call class 25x
prototype for target compilersh address of next available word in target memoryip address of current instruction wordslot next available instruction slot2*s n shift left n bitsmemory -a host address for target memoryorg n set current target memory location, n compile word into target memorys0-s3 assemble instruction into slot 0-3i, assemble instruction into next slot25x compile code for multicomputer
instructionsnop 1e i, ;adr n-a slot @ 2 or drop if nop then i, ip @ ;call defer a 2 adr +! ;if -a 4 adr ;-if -a 6 adr ;then a h @ 1ff and swap +! ;@+ 8 i, ;@b 9 i, ;n defer 8 f@ execute a i, , ;@ b i, ;!+ c i, ;!b d i, ;! f i, ;- 10 i, ;2* 11 i, ;2/ 12 i, ;+* 13 i, ;or 14 i, ;and 15 i, ;+ 17 i, ;
words being redefined for the target computer. these pentium words can no longer be executed. although pentium macros still take precedence during compilation, they will no longer be used.adr n-a assembles instruction, but not in slot 2, where address goes. instruction address left on stackcall deferred to class. executed for target defined wordsthen a puts address in low 9 bits of previous instruction wordn 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
instructionspop 18 i, ;a 19 i, ;dup 1a i, ;over 1b i, ;push 1c i, ;a! 1d i, ;drop 1f i, ;; 4 ip +! ;
more target instructions; since it will be executed, it does not conflict with the pentium macro
25x rom 180 org 0 dup - dup - dup - dup - dup - dup - dup - dup - dup push push push push push push push push push a! a nop
targetdefer -a pop ;execute a push ;class a last 1 + ! ;f! an sp + ! ;f@ n-a sp + @ ; ?com 1384 csho 1331empty empt 0 class csho @ ?com @functions aa 4 f! 6 f! ;x18 a 4 f@ ?com ! 6 f@ csho ! 1 f@ functions ;
defer -a byte address of the compiled code that followsexecute a code at this addressclass a store address of code to be executed for each word subsequently definedf! an store address of code executed when a word with this function is interpretedf@ n-a fetch address of function codeempty redefine empty to restore altered functionsfunctions aa store functionsx18 save compile and number functions. set green short-number to n, compile to execute. target words are executed to assemble instructions
lite-on c169b macroalign here 7 and 3 or drop if nop align ; then ; fortharray pop 2/ 2/ ;us n 550 3 / * for next ;r n-a ffaffe00 + 2/ 2/ ;rom a-n 600 + 98 r ! 100 us 48 r @ ;3rom 2 rom 1 rom 0 rom ;reset 1 0 r ! 1 us 4000000 0 r ! 1000 us ;frag 80000000 , 1000000 , 0 , here 40000004 + , ;tx align array frag frag frag 80000000 , c2000000 , 0 , tx 4 * 40000000 + , f 16n tx 1 + ;a tx 2 + ;fr! f @ + ! ;first an 0 f ! 20000000 orsend an 1000000 or n fr! 40000000 or a fr! 4 f +! ;last an c3000000 or send -1 8 r ! ;
move sdn move n bytes from source to destination. register 1 is used, 6 and 7 are savedarray -a returns word-aligned address in dictionaryus n delay n microseconds. edit cpu clock rater n-a word address of register. edit base address from north pci device configurationrom a-n fetch 2 1rces of ethernet id3rom nnn 3 byte-pairs of id. 54, 32 and 10reset controllertx -a transmit buffer. 1536 bytes. fragments must be assembled for transmissionrx -b receive buffer. 8k+16 bytesn -a tx status/length. writing starts transmissionsend an fragment into transmit bufferfirst an fragment. wait till buffer emptylast an fragment. start transmissioninit ialize controller. set tx/rx address/on and perfect match
receiverx align array 80000000 , 1000600 , 2000 block 4 * 40000000 + dup , here 40000004 + , 80000000 , 1000600 , 600 + , rx 4 * 40000000 + ,wait -a rx @ 0 or drop -if wait ; then rx 2 + @ 40000000 or 2/ 2/ ;init reset rx 10000000 + 2 * 2* 18 r ! 1 us tx 10000000 + 2 * 2* 20 r ! 1 us 2000 30 r ! 1 us -1 28 r ! ;reg dup r @ h. space 2 h.n cr ;regs b8 reg a0 reg 98 reg 90 reg 78 reg 60 reg 48 10 for dup reg -8 + next drop ;ok show red screen text regs keyboard ; ok
wait -b till packet receivedreg a display register and addressregs display interesting registersok diagnostic display
serial macrop@ a! ?dup ec 1, ;p! a! ee 1, drop ;1@ 8a 2, ; forthr 3f8 + ;115200 1 ;b/s 83 3 r p! 115200 0 r p! 0 1 r p! 3 3 r p! ;init b/s 16550 0 2 r p! b 4 r p! 1 1 r p! ;xmit n 5 r p@ 20 and drop if 0 r p! ; then xmit ; macro5@ ?dup c58b 2, ;5! c589 2, drop ;5!+ ec 1, 45004588 , ; forth c interruptrcv 2push 0 r a! 5!+ clear 2pop i;receive a 2* 2* 5! init ef 21 p! sti ;bytes an-a over + negatewait pause dup 5@ + drop -if wait ; then drop ;send an for dup 1@ xmit 1 + next drop ;
p@ p-n fetch byte from portp! np store byte to port1@ a-n fetch byte from byte addressr n-p convert relative to absolute port115200 -n baud-rate divisor. name, not numberb/s set baud rate. edit to changeinit initialize uart. fifo off, receive interrupt on, dtr rqs onxmit n wait for ready and transmit byte5! a load register 5. reserved as byte input pointer5@ -a fetch it5!+ n fetch port, store byte, increment pointerrcv receive interrupt. buffers byte in memory. must not use data stackreceive start input enabling only serial interrupt. keyboard off requires screen, suspend and standby off alsocount -n bytes receivedsend an message
interruptsa, a, ;idt 200 block ; macro1ld n ?lit b9 1, , ;p! na a! ee 1, drop ;lidt b 18010f 3, drop ;sti fb 1, ; enable interrupts somewherecli fa 1, ; add to empty!2push 5250 2, ;2pop 585a 2, ;forth 2push be5651 3, idt 100 + a, ;/forth 595e 2, 2pop ;clear 20e620b0 , ;8clear a0e620b0 , 20e6 2, ;i; cf 1, ; forth!idt a lidt ; here 3b7 2, idt a, !idtinterrupt n 2* idt + here ffff and 80000 + over ! here ffff0000 and 8e00 + swap 1 + ! ;fill an for dup interrupt 1 + next drop ; 0 70 fillignore i; 8 8 fillignore 2push clear 2pop i; 70 8 fillignore 2push 8clear 2pop i; 0 interrupt0div 7fffffff 1ld i;
idt -a table of 2-word interrupts. edit convenient block number1ld n load register 1 with literallidt load interrupt table register from byte address on stacksti enable device interruptscli disable them2push save registers 0 and 22pop restore 2 and 0forth save 1 and 6, load 6 as stack. interrupt may occur while its a source address/forth restore 6 and 1clear store 20 to port 20 to clear irq 0-78clear also 20 to port a0 to clear irq 8-fi; return from interrupt - restore flags!idt b execute lidtinterrupt n construct interrupt to here. avoid yellow-green literal with red commentfill an n entries in default interrupt tableignore clear the interrupt. doesnt clear the device0div make divisor +infinity, quotient 0
realtek rtl8139b macromove sdn c189 2, drop c78957 3, drop c68956 3, a4f3 2, 5f5e 2, drop ; forth1us 1us n 2144 3 / * for next ;r n-a 5800 14 + pci + 2/ 2/ ;rom a-n r @ ;3rom nnn 4 rom 0 rom dup 16 for 2/ next swap ;tx -b 2000 block 4 * ;rx -b tx 1536 + ; ds 3 fr 42n -a ds @ 10 r + ;send an fr @ tx + swap dup fr +! move ;first an n @ 2000 and drop if ds dup @ 1 + 3 and swap ! 0 fr ! send ; then first ;last an send tx ds @ 20 r + ! fr @ 60 max n ! ;reset 10000000 34 r ! 100 us ;init rx 30 r ! 1us reset c000000 34 r ! 1us 8a 44 r ! 3 ds ! fb dup 21 p! a1 p! sti/int ffff0001 3c r ! ;rcvd -b 38 r @ dup 10000 / 1fff and fffffff0 + 38 r ! 10 + 1fff and rx 4 + + ;
move sdn move n bytes from source to destination. register 1 is used, 6 and 7 are savedus n delay n microseconds. edit cpu clock rater n-a word address of registerrom a-n fetch 2 bytes of mac3rom nnn 3 byte-pairs of mactx -a transmit buffer. 1536 bytes. fragments must be assembled for transmissionrx -b receive buffer. 8k + 1532 byte overrunds -a must cycle thru 4 tx descriptorsfr -a must accumulate fragments in tx buffern -a tx status/length. writing starts transmissionsend an fragment into transmit bufferfirst an fragment. wait till buffer emptylast an fragment. start transmissionreset controllerinit ialize controller. set tx/rx address/on and mac/broadcast. enable irq10rcvd -b received packet. register 38 is 10 bytes before start of next packet. register 3a is end of current packet
display registersreg a dup r @ h. space 2 h.n cr ;regs 48 19 for dup reg -4 + next drop ;ok show red screen text regs picst keyboard ;
reg a display register and addressregs display interesting registersok diagnostic display48 counter. neat!44 rx configuration40 tx configuration3c interrupt38 rx count/address34 command30 rx 8k ring buffer2c-20 tx address1c-10 tx statusc-8 multicast id, unused4 mac 540 mac 3210
ethernet 188 load 46 load t1 51880empty cli empt logo ; macrow 66 1, ;w@ 8b 2, ;w! w 289 2, drop ;*byte c486 2, ; 142 load forth 126 loadn@ w w@ ffff and *byte ;2! a! w! ;n! a! *byte w! ;n, *byte 2, ;string pop ;packet string -1 dup dup 2, 2, 2, 3rom 2, 2, 2, 0 n,length n packet 12 + n! ;3! swap over 2! 2 + swap over 2! 2 + 2! ;ethernet n length packet 14 first ;+ethernet -a rcvd 14 + ; 132 load 140 load 136 load 138 load 2a interruptserve forth 1 t1 +! receive /int 8clear /forth i; init 1000 us 184 load 128 load ok
empty redefined to disable interruptsw 16-bit prefixw@ b-n fetch 16-bits from byte addressw! nb store 16-bits*byte n-n swap bytes 0 and 1n@ b-n fetch 16-bit network-ordered number2! nb store 16-bit numbern! nb store 16-bit number in network ordern, n compile 16-bit number in network orderstring -b returns byte addresspacket -b ethernet packet headerdest -b destination field in packetsrc -b source fieldlength n store length into packet3! nnnb store 3-word macethernet n send header with type/length@ethernet -b return payload address of received packet
arp for a single correspondentc.n. . ;. n 1, ;message string 1 n, 800 n, 6 . 4 . 1 n,me 3rom 2, 2, 2, ip 192 . 168 . 3 . 2 .to 0 0 0 2, 2, 2, ip 192 . 168 . 3 . 1 .sender 8 + ;target 18 + ;dir 6 + ;ip 6 + w@ ;ar n message dir n! 806 ethernet message 28 last ;arp cli -1 dup dup packet 3! 1 ar sti ;-arp b-b dup -2 + n@ 806 or drop if ; then pop dropme? dup target ip message sender ip or drop if ; then dup sender packet 6 movequery? dup dir n@ 1 or drop if ; then sender message target 10 move 2 ar ;
set ip addresses with edit. normal order, net bytes first. n compile byte. resembles url punctuationmessage -b 28-byte stringme comment marking my mac/ip addressto comment marking correspondentsendertargetdir -b fields in either message or received messageip b-n fetch ip addressar n send query 1, or reply 4arp broadcast query-arp b-b return if not arp. otherwise process and skip out.me? b return if broadcast not for me. save sender only in packetquery? b if a request, reply
ipv6header string 1000060 , 0 n, 11 . 64 .to 0 , 0 , 0 , ip 192 . 168 . 3 . 1 .me 0 , 0 , 0 , ip 192 . 168 . 3 . 2 .length n header 4 + n! ;dest header 20 + ;src header 36 + ;ip n 86dd ethernet length header 40 send ;+ip b-b dup -2 + n@ 86dd or drop if pop ; then 40 + ;
set ip addresses with edit. normal order, net bytes firstheader -a 40-byte ipv6 headerlength n store 2-byte length in headerdest -a 4-byte destination ip addresssrc -a source ipip n send ip header embedded in ethernet packet+ip b-b skip out if not ip. otherwise return payload address
udp macrob! a! 288 2, drop ; forthb@ b-n w@ ff and ;header align string 4444 n, 4444 n, 8 n, 0 n, 0 n,length n 8 + header 4 + n! ;udp n dup 8 + ip length ; proto 17setdp dup n@ header 2 + n! ; set udpdestportudport n header n! ; set udpsourceport+udp b-b dup -11 + b@ dup proto ! 11 or drop if pop ; then setdp 8 + ;
b@ b-n fetch byteheader -a 8-byte udp headerlength n store length in headerudp n send ip header for n-byte packet+udp b-b skip out if not udp. otherwise return payload address
blocks to/from serverpayload n-bn header 8 + n! header 10 ;udppay payload -2 + ; standard minimal udp header length+put nn 4444 udport 1026 udp over payload send + block 2* 2* 1024 last ;it b dup 2 + swap n@ 32768 + block 2* 2* 1024 move ;-got b-b dup -4 + n@ 2 8 + or drop if it pop ; then ; ep 8390162 el 208snif dup dup ep ! 2 + n@ el ! ; 160 loadreceive +ethernet snif -arp +ip +udp -tftp -got+get b n@ 32768 +put ;... interrupt-protect words that transmitget n 65535 min cli 4444 udport 2 udp payload last sti ;put n cli 0 +put sti ;archive 161 for i put 1000 us -next ;@el el @ 518 min ;cnt @el h. cr cr ;dmp cnt white @el 2 / for dup @el 2 / i negate + 2 * + n@ .hw space next drop ;okd show blue screen text ep @ dup red h. space dmp keyboard ;
client can get or put blocks to serverpayload n-bn 2 bytes were appended to udp header for block number+put nn send block number. append block as last fragment. packet length distinguishes two messagesit b move 1024 bytes from packet to offset block-got b-b if a 2-byte message, return. otherwise move block to archive - 300+ - and skip outreceive check and decode received packet. +test returns if true, -test returns if false. otherwise they pop - skip-out - return from receive. resulting stack need not be empty, since /forth will restore pre-interrupt stack. pop must be in a word called by receive, it cant be nested+get b send requested block from archiveget n send block number to request. interrupt disabled lest reply interferput n send blockarchive send blocks 0-161 - 9 cylinders
ipv4header align string 4500 n, 0 n, 1 n, 0 n, ff11 n, 0 n,me 192 . 168 . 3 . 2 .to 217 . 149 . 199 . 177 .length n header 2 + n! ;+id header 4 + dup n@ 1 + swap n! ;0csum 0 header 10 + n! ;msum dup ffff and swap 10000 / + ffff swap negate + ;checksum 0csum 0 9 for i 2 * header + n@ + -next msum header 10 + n! ;source header 12 + ;destination header 16 + ;setd dup -8 + dup n@ destination n! 2 + n@ destination 2 + n! ;ip n 20 + 800 ethernet length +id checksum header 20 send ;+ip b-b dup -2 + n@ 800 or drop if pop ; then 20 + setd ;oks show blue screen text destination dup n@ h. 2 + n@ h. keyboard ;
network hex print code macro1@ 8a 2, ;1! a! 288 2, drop ; forthaddr pop ;jht addr 1b1a1918 , 1f1e1d1c , 43352120 , 3e34403a ,hb jht + 1@ ff and ;.hw n dup dup dup 1000 / hb emit fff and 100 / hb emit ff and 10 / hb emit f and hb emit ;htp show red screen text f for i hb emit space -next cr 1234 .hw keyboard ;fb 1 + block 4 * 1024 for dup i negate + i swap 1! next drop ;
ir remote empty macro2/s ?lit f8c1 2, 1, ;p@ ec 1, ;p! ee 1, drop ;1@ 8a 2, ;1! a! 288 2, drop ; forthba 10 /mod 11f a! p! 118 + a! ;b@ ba 0 p@ ;b! ba p! ;us 748 * time + -till dup time + drop -if till ; then drop ;ms 1000 * us ;array pop 2 2/s ;nul ; onf 3 145 load 146 load 50 load 147 load 148 load 149 load 150 load 151 load 152 load 153 load 155 load 154 loadh pad nul nul accept bye +db -db mute nul +xx -ch jp vcr tv0 dvd cd fm nul nul nul nul nul nul nul nul nul nul nul nul 152500 , 91016 , 11001016 , e0a1002 , 0 , 0 , 0 ,
smsc ircc2.0 ir consumer mode 32 10 b! 0 12 b! 0 20 b!buffer 200 block 4 * ;reset 10 7 b! 80 4 b! ;on 40 5 b! ;off 2 4 b! 200 ms ;emit 6 b@ 40 and drop if emit ; then 0 b! ;rdy 6 b@ 80 and drop ;get 0 b@ over 1! 1 + ;bytes forbyte rdy if get dup buffer 4096 + or drop if byte ; then drop pop drop ; then next drop ;r 200 1 erase 80 dup 4 b! 5 b! buffer 1000000 bytes 0 5 b! ;word - 4 for dup emit 8 2/s next drop ;cmd for word next 1sp for 0 word next ;rate 22 b! 21 b! ;sync 80 20 b! ;
display codespaces for space next ;no dup @ - h. space -1 + ;line 3 + no no no no 4 + ;raw 20 for line cr next ;skip 0 or if for 2/ next ; then drop ;bit 32 /mod @ swap skip 1 and drop ;n 1 49 ; ph 0 1609s50 0 32 for 2/ 7fffffff and over bit if 80000000 or then n u+ next - h. space ;line 32 n * 3 * + 4 for s50 32 n * -2 * + next 32 n * 5 * + cr ;sample 32 * ph @ + 8 for line 10 i - + spaces next ;ok show black screen text buffer 4 / sample drop keyboard ;reg 7 for 0 i + dup b@ h. . cr next ;k show black screen text reg keyboard ;cur 11f a! 0 p@ 10 * ;
sony kv-32s16 tv2dup over over ;switch swap over @ or swap ! ;sony 39 59 rate on dup 1 cmd 1 cmd off ;+tv aad5ad6f sony ;vd aad6ad6f sony ;9sony align array 0 , 0 , 2ab5556f , 0 , 556aab6f , 2ab556af , 0 , 556aadaf , 0 , 2ab55aaf ,
optimus stav-3590 receiver st 0 sur 0opt0 39 55 sync rate on 2dup ;rpt 88a28a2a 28807fff 4 cmd ;opt opt0 rpt rpt off ; m 1 vol 6 aud 3sel 8a28a2 a28a28a2 opt ;+fm 888aa2 2a888aa2 opt ;mute m @ negate m ! 888a22 8aa2a2a2 opt ;-db vol @ -1 + 0 max vol ! 8888a2 aaa288a2 opt ;+db 1 vol +! 8888a2 8aa8a2a2 opt ;db dup vol @ negate + drop if -if -db db ; then +db db ; then drop ;cal 10 for -db next ;audio aud @ 2dup or drop if 1 + 5 mod aud ! sel 300 ms audio ; then drop drop ;rpt a2211145 4a807fff 4 cmd ;9opt align array 11555428 , 145554a8 , 15555028 , 445550a8 ,+st 8888 st @ 1 + 3 and dup st ! 9opt + @ opt0 rpt rpt off ;surr 8a2222 228aaaa2 opt ;
rca drd303ra satellitet0 1 sp 10ffff 1 cmd 3 sp ;t on 115455 0 19280003 3 cmd 5 for t0 next ;words 210900ff word 3 for dup @ word 1 + next drop ;4rca align array 49242124 , 12421248 , 30842 , 9242124 , 49084921 , 32108 , 21242124 , 49084921 , 30908 , 21242124 , 24212484 , 32421 , 24242124 , 49084921 , 30848 , 24242124 , 24212484 , 32121 , 84242124 , 24212484 , 30921 , 84242124 , 90849210 , 32484 , 24842124 , 49084921 , 30842 , 24842124 , 24212484 , 32109 , 84842124 , 0tess rtettrom@ r n rt,trte rsc rt,cet rcrscno; r n rt,eces 2194 rt,sces retr sfo; r n o, 1716425 ntn e erat?:mf e?@ nnwo ea r* 1004f600 s y ne s c- nnwo e esp 21das i8 c362a e 8393t o; 262144 32780489 e emss ostd elas e@m sp edr eifs ostd elasi0oil es co 262ad tis 8548t o; 262144 8393 ;
magnavox dvd501atmag 43 55 rate on 2a8a2a51 1100ffff 4 cmd 1 sp 10ffff dup 1 cmd 4 sp 1 cmd off ;+dvd 451111 150aaa2a mag ;play 451551 468888aa mag ;rev 451445 1428a8aa mag ;paus 451515 4688a22a mag ;fwd 200 ms 451445 50a2a22a mag ;down 455444 50088aaa mag ;slow rev 1000 ms paus fwd fwd ;
quasar vh4846xe vcrt0 1 sp 10ffff 1 cmd 3 sp ;t on 115455 0 19280003 3 cmd 5 for t0 next ;qua 26 84 rate on ;o0 511 11111144 5555450f 3 cmd ;p0 445 14444515 1455450f 3 cmd ;r0 444 45111145 5455450f 3 cmd ;vpl qua p0 p0 off ;+vcr qua o0 o0 off ;rew qua r0 r0 off ;
power w 140?sat 4 ? if +sat ; then -sat ;?dvd 8 ? if play ; then +dvd ;watts 25 onf @ 1 ? if 40 u+ then 2 ? if 75 u+ then 4 ? if 35 u+ then 8 ? if 15 u+ then 16 ? if 15 u+ then drop w ! ;power dup onf @ or 1 ? if +fm then 2 ? if +tv then 8 ? if swap ?dvd swap then 16 ? if +vcr then 4 ? if swap ?sat swap then drop onf ! watts 1000 ms ;bye 0 power ;fm 1 power 2 audio 5 db ;pst day 1000000 * hms + ;is over or drop if 0 ? ; then -1 ? ;
scrolling ch 11 v 0vid v @ 2dup or drop if vd 1 + 3 and v ! 200 ms vid ; then drop drop ;video 0 or if vid ; then 544210af sony v ! ;chs align array -4 , 280 , 256 , 530 , 269 , -2 , 264 , 254 , 258 , 249 , 527 , -9 , 242 , 253 , 526 , 247 , 245 , 532 , 529 , 244 , 240 , 528 , -5 , -7 , 0 , 829 , 209 , 206 , 355 , 362 , 202 , 356 ,vhf 3 power 6 db 0 video 9sony + @ sony aad56b6f sony ;set 0 or -if negate vhf ; then 7 power 5 db 1 video 100 /mod rca 10 /mod rca rca ;/ch ch @ + 31 andto dup ch ! chs + @ 0 or ;-ch -1 /ch if set ; then drop -ch ;+ch 1 /ch if set ; then drop +ch ;+xx aud @ 2 or drop if +ch ; then +st ;tv0 ch @ totv set 3 audio ;dvd 2 video 11dvd- power 4 audio 5 db ;cd 9 dvd- ;vcr 13 power 3 video 3 audio 5 db ;
displayd. 18 + 2emit ;?. 0 or if d. ; then drop ;. 1000 /mod ?. 100 /mod ?.2. 10 /mod d. d. ;clock at 10000 mod 100 /mod 2. 2. ;30s hi lo 3 16 * 0 c! ;v+ push u+ pop + ;pwr red onf @ and drop if green then -30 dup v+ 2dup at 20 dup v+ box ;sign 0 or -if negate 23 2emit ; then ;volume at vol @ m @ * sign d. ;channel at ch @ chs + @ abs . ;tvb 2dup at 400 dup v+ 2dup box 2 pwr ;vcrb push black 2dup at 220 70 v+ 2dup box pop pwr ;satb 2dup at 50 250 v+ 2dup box 4 pwr ;diag 100 380 16 vcrb 100 300 1 vcrb 100 220 8 vcrb black 25 200 satb black 400 50 tvb ;state show blue screen diag text timer 115 393 clock 115 313 volume 420 70 channel 115 153 at w @ . f 2emit keyboard ; state
timer j 6jp ch @ j @ to set j ! ;sur! dup sur @ or drop if sur @ 1 + 5 mod sur ! surr sur! ; then drop ;indoors 0 sur! ;outdoors surr 2 sur! ;chan ch @ j ! tv ;news is if -4 chan ; then ;seinfeld is if -2 chan ; then ;timer -n pst 190000 is if -9 chan then 1170000 is if 530 chan then 1190000 seinfeld 1200000 is if 280 chan then 2170000 news 2190000 seinfeld 2200000 is if -5 chan then 3170000 news 3190000 seinfeld 3210000 is if -4 chan then 4170000 news 4190000 seinfeld 5170000 news 5190000 seinfeld ;
ekbd byte 15 1, 1 1, 13 1, 45 1, 12 1, 22 1, 16 1, 1 1, 35 1, 9 1, 10 1, 43 1, 0 1, 56 1, 58 1, 2 1, 0 , 0 ,ekb0 byte 21 1, 37 1, 7 1, 0 1,
pad in cf source vector 1470336 ev 0 macro1@ 8a 2, ;cedx ff 1, d2 1, ;wedx c201 2, 582548d , fc5203 3, ad 1, cedx ; forthg4byt n- 0 ev ! 3 for dup i + 1@ ff and ev @ 256 * + ev ! -next drop ;pad pop dup vector ! 28 5 * + dup board ! 4 4 * negate + board 1 + !pa1 cmkey vector @ a! wedx pa1 ;tcmk 6 for cmkey next ;
tftpd dblk 10000 cblks 0 anfc 10000 bnfc 65535 offset 0 lbs 42767 inb 10000nul ; tmp 10000sd n 32768 + block dump ;ed n 32768 + edit ;et 160 edit ;esb 32768 65535 erase ;fb nb 512 for over over 512 i negate + 2* + n! next drop drop ;fsb esb 65535 for 65535 i negate + dup 32768 + block 2* 2* fb next ;optack align string 6 n, 626c n, 6b73 n, 697a n, 6500 n, 3130 n, 3234 n, 0 .tack align string 4 n, 0 n,dpak align string 3 n, 0 n,1+ack tack 2 + dup n@ 1 + swap n! ;ascdec 0 tmp ! 1 4 for over i + b@ -48 + over * tmp +! 10 * -next drop ;destb dup 2 + ascdec tmp @ dup dblk ! offset ! ;bcount dup 6 + ascdec tmp @ dup cblks ! inb ! ; 162 load
tftpduous udp over udppay send ;sopta cli 69 udport 15 uous optack 15 last sti ;rdrq destb bcount sopta ;mvit bnfc @ offset @ + 32767 + block 2* 2* 1024 move 1 dblk +! ;?mvit cblks @ bnfc @ negate + drop -if ; then mvit ;sack cli dup 2 + n@ bnfc ! dup 4 + ?mvit 69 udport tack 4 uous tack 4 last 1+ack sti ;wrrq destb bcount 1 tack 2 + n! sopta sack ;sbk n cli dup lbs ! offset @ + 69 udport 1028 uous dpak 4 send block 2* 2* 1024 last sti ;scblk inb @ anfc @ negate + cblks ! ;sclose cli 4 uous dpak 4 send 0 0 last sti ;ndblk dup 2 + n@ anfc ! scblk cblks @ 0 or drop if anfc @ 1 + dup dpak 2 + n! dup dblk ! 32767 + sbk ; then dblk @ dpak 2 + n! sclose ;jack n 6 min jump nul rdrq wrrq sack ndblk nul nultftp dup n@ jack ;-tftp dup -6 + n@ 69 or drop if ; then pop drop tftp ;. n. ; redefine . to print tos
cell pop 4 / ; heredata align cell 100 , 200 , 300 , 400 , 500 ,get n- data + @ ;put nn- 4 min data + ! ;display 4 for i get . cr -next ;sum 0 4 for i get + -next cr . ;line 10 for 35 emit next ;wipe 4 for 0 i put -next ;ok show black screen text display line sum keyboard ;
macro1@ 8a 2, ; forthbyte pop ;data byte 68 1, 4 1, 12 1, 12 1, 3 1, 0 1, 15 1, 3 1, 1 1, 12 1, 16 1, 42 1,get n- data + 1@ ff and ;display 12 dup for dup i negate + get emit -next drop ;ok show black screen text display keyboard ;
tv 5t! n- tv ! ;.tv 50 emit 65 emit space tv @ . ;d tv @ 72 + emit ;la 53 emit ;lb 67 emit ;lc 58 emit ;ld 64 emit ;le 52 emit ;lf 62 emit ;oor 0 emit ;decide tv @ 10 min jump d d d d d d d d d d la lb lc ld le lf oorok show red screen text .tv decide keyboard ;
main load screen tnr 0 0 tnr ! vc 0 0 vc ! maxvc 5 5 maxvc ! vckey 1063553 logov 1062889 vector 1513981 ev 0 172 loadrekey vkey 4 * 11 hcka + vkey ! ; 130 load 178 load 174 loadkbdget n-k kbd + 1@ ff and ;kst 0 64 kbp@ ;gkey vc @ tnr @ or drop if drop 0 ; then drop 0 60 kbp@ ;key 0 0 ork1 ?ref kst 1 and 1 or drop if k1 ; then gkey ;?chvc dup 7f and negate dup 64 + drop -if drop ; then 58 + -if abs -1 + vc ! ; then drop ;mkey key ?chvc 15 max 58 min dup -58 + drop if -15 + kbdget ; then drop mkey ; here vckey !mtkey mkey ;g4byt n- 0 ev ! 3 for dup i + 1@ ff and ev @ 256 * + ev ! -next drop ;pad pop dup vector ! 28 5 * + dup board ! 4 4 * negate + board 1 + !pa1 mkey vector @ a! wedx pa1 ;tm 6 for mkey next ;tc 6 for cmkey next ; vckey @ vkey ! sti
keyboard driver data macro1@ 8a 2, ;cedx ff 1, d2 1, ;wedx c201 2, 582548d , fc5203 3, ad 1, cedx ;kbp@ ?lit e4 1, 1, ;@esi 56 1, pop ; forthbyte pop ;kbd byte 0 1, 16 1, 17 1, 18 1, 19 1, 0 1, 0 1, 4 1, 5 1, 6 1, 7 1, 0 1, 0 1, 0 1, 0 1, 20 1, 21 1, 22 1, 23 1, 0 1, 0 1, 8 1, 9 1, 10 1, 11 1, 0 1, 0 1, 0 1, 0 1, 24 1, 25 1, 26 1, 27 1, 0 1, 1 1, 12 1, 13 1, 14 1, 15 1, 0 1, 0 1, 3 1, 2 1,
video frame buffer refreshgfb -n fr @ 2/ 2/ ;gvid -n fr 1 + @ 2/ 2/ ;refresh gvid gfb 1024 768 * 2 / 1 + for over over i + @ swap i + ! -next drop drop ;sw 56 1, 358b 2, 330c , 57 1, 3d8b 2, 3310 , b9 1, 60000 , a5f3 2, 5f 1, 5e 1, c3 1,?ref vc @ tnr @ or drop if yield ; then keyb keyb sw ;screenbscr 0 0 at 1024 600 box white ;show pop dtv vc @ + ! ; here logov ! idtvmlogo show black bscr 800 600 blue box 600 50 at 1024 600 red box 200 100 at 700 500 green box text cf keyboard ;sht show red bscr text 1 emit keyboard ;sht2 show blue bscr text 0 a! 10 for a 1 + a! a h. cr next keyboard ;ed e mlogo ;ekbd 3f34 4 / hcka board ! ;ekeys 3ec0 4 / hcka board 1 + ! ;eok show red bscr text 1 emit keyboard ;e ekbd ekeys eok ed ;
keyboard display dataalpha byte 13 1, 10 1, 1 1, 12 1, 20 1, 2 1, 6 1, 8 1, 19 1, 9 1, 15 1, 17 1, 18 1, 11 1, 14 1, 7 1, 5 1, 3 1, 4 1, 22 1, 23 1, 36 1, 21 1, 16 1,graph byte 25 1, 26 1, 27 1, 0 1, 28 1, 29 1, 30 1, 24 1, 31 1, 32 1, 33 1, 47 1, 41 1, 40 1, 42 1, 44 1, 38 1, 34 1, 37 1, 46 1, 45 1, 39 1, 43 1, 35 1,numbrs byte 25 1, 26 1, 27 1, 0 1, 28 1, 29 1, 30 1, 24 1, 31 1, 32 1, 33 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1, 0 1,octals byte 25 1, 26 1, 27 1, 0 1, 28 1, 29 1, 30 1, 24 1, 31 1, 32 1, 33 1, 0 1, 0 1, 5 1, 19 1, 10 1, 0 1, 16 1, 4 1, 14 1, 0 1, 0 1, 0 1, 0 1,grap0 byte 0 1, 0 1, 5 1, 0 1,grap1 byte 21 1, 37 1, 5 1, 0 1,alph0 byte 0 1, 33 1, 45 1, 0 1,alph1 byte 21 1, 37 1, 45 1, 0 1,
keyboard screen display 176 load 156 loadnumb0 byte 35 1, 5 1, 14 1, 0 1,numb1 byte 21 1, 37 1, 0 1, 0 1,getc n-c 1@ ff and ;four n-n+4 4 for dup getc emit 1 + next ;eight n-n+8 12 + four space -16 + four ;3rows n- 3 for eight cr next drop ;.brd board 9 for dup @ h. space 1 + next drop ;.hist 353e hcka 11 for dup getc emit 1 + next drop ;vstkn vc @ dstn ;vstk0 9f44c hcka ;jstck vc @ 1 min jump vstk0 vstkn.stck 0 740 at @esi negate jstck + 4 / -1 + if for @esi 4 / -1 + i + @ n. next ; then drop ;kpd vector @ 28 5 * + 4 + ;kpdt vector @ 28 5 * + ;jbrd board @ -14139 hcka + 24 / 0 max 5 min jump alpha graph numbrs octals kpd ekbdjtk board 1 + @ -14344 hcka + 20 / 0 max 7 min jump grap0 grap1 alph0 alph1 numb0 numb1 kpdt ekb0tkeys jtk four drop ;keyc board 4 + @ color ;keyboard ;keyb 0 600 at 1024 768 blue box 0 603 at keyc .brd cr jbrd 3rows 50 700 at tkeys 125 625 at magenta 65 emit 58 emit space vc @ n. space .hist .stck ;
wami 1061150 t0 448332210 nrtsks 6 6 nrtsks ! nyip 1 1 nyip !cell pop 2/ 2/ ;allot n- for 0 , next ;dtv align cell maxvc @ 1 + allottski align cell 11 allotorsts align cell nrtsks @ allotovects align cell nrtsks @ allotofbs align cell maxvc @ 1 + allotofos align cell maxvc @ 1 + allotobrds align cell maxvc @ 1 + 9 * allotkf@ -n fr @ ;kf! n fr ! ;kfn n-n 1 + 1024 768 * 2 * * negate 2000000 + ;skfn n kfn kf! ;svfb kf@ ofbs vc @ + ! ;refb ofbs vc @ + @ kf! ;kfo@ -n fo @ ;kfo! n fo ! ;svfo kfo@ ofos tnr @ + ! ;refo ofos tnr @ + @ kfo! ;svvec vector @ ovects tnr @ + ! ;revec ovects tnr @ + @ vector ! ;svbrd n- 9 * obrds + 9 for dup board 9 i negate + + @ swap ! 1 + next drop ;ibrd maxvc @ for i svbrd -next ; ibrdrebrd n- 9 * obrds + 9 for dup @ board 9 i negate + + ! 1 + next drop ;idtv maxvc @ for logov @ dtv i + ! -next ;
inctnr 1 tnr +! ;ztnr 0 tnr ! ;nxttnr nrtsks @ tnr @ negate + 1 min jump ztnr inctnrrstn n-n 2 * 301 + block 2* 2* ;dstn n-n 2 * 1 + 301 + block 2* 2* ; macropuall 60 1, ;poall 61 1, ;svrst -n ?dup c48b 2, ;cs@ -n e 1, pop ;ef@ -n 9c 1, pop ;srstn n e08b 2, drop ;sdstn n f08b 2, drop ;int20 cd 1, 20 1, ; forthyield 0 nyip ! int20 ;neg+ negate + ;mtski n dup rstn 4 / 11 for 11 i neg+ tski + @ over 11 i neg+ neg+ ! next drop ;sef ef@ 37002 and tski ! ;scs cs@ tski 1 + ! ;sip wami @ tski 2 + ! ;srt n dup rstn 12 + tski 7 + ! ;sdt n dup dstn tski 9 + ! ;sorst n dup rstn -40 + over orsts + ! ;itsk n sef scs sip srt sdt mtski sorst drop ;
timer interruptmtempty only works from vc0 cli rekey empt logo ;cli cli ;sti sti ; macropicp@ 0 ec 1, ;tp!picp! ee 1, drop ; forth!pit nn 43 a! 34 tp! 40 a! tp! tp! ; 100 100 !pit0pic1! 20 a! tp! ;0pic2! a0 a! tp! ;pic1! 21 a! tp! ;pic2! a1 a! tp! ;!pic cli init 11 dup 20 a! tp! a0 a! tp! irq 20 pic1! 28 pic2! master 4 pic1! slave 2 pic2! 8086 mode 1 dup pic1! pic2! mask irqs fb pic2! ed fb pic1! ; !picpicst white 700 575 at 21 a! picp@ h. space a1 a! picp@ h. 700 600 at a 0pic1! 20 a! picp@ h. space a 0pic2! a0 a! picp@ h. 700 625 at b 0pic1! 20 a! picp@ h. space b 0pic2! a0 a! picp@ h. ; 20 interrupttimer0 forth svrst orsts tnr @ + ! svfb svfo tnr @ svbrd svvec nyip @ t0 +! 1 nyip ! nxttnr revec tnr @ rebrd refo refb orsts tnr @ + @ srstn clear /forth i;uma 0 dup pic1! pic2! ;ma ff dup pic1! pic2! ; 186 load vcs uma
vcs init screen forth 196 load 198 loadvc@ -n vc @ ;vc! n vc ! ;at? xy @ 10000 /mod swap ;vcs show vc@ skfn at? 0 660 at 1024 768 blue box keyboard at ;n vc @ 1 + maxvc @ min vc ! ;p vc @ -1 + 0 max vc ! ;exec a- push ; here wami ! 1 itskvc1 sti 1 skfn accept vc1 ; here wami ! 2 itskvc2 sti 2 skfn accept vc2 ; here wami ! 3 itskvc3 sti 3 skfn accept vc3 ; here wami ! 4 itskvc4 sti 4 skfn accept vc4 ; here wami ! 5 itskvc5 sti 5 skfn accept vc5 ; here wami ! 6 itskdt sti vc @ skfn at? dtv vc @ + @ exec at yield dt ;dd n 2 * 1 + 301 + block dump ;dr n 2 * 301 + block dump ;
interruptsa, a, ;idt 200 block ; 180 load 182 load macro1ld n ?lit b9 1, , ;p! na a! ee 1, drop ;lidt b 18010f 3, drop ;sti fb 1, ; enable interrupts somewherecli fa 1, ; add to empty!2push 5250 2, ;2pop 585a 2, ;forth puall be 1, idt 100 + a, ;/forth poall ;clear 20e620b0 , ;8clear a0e620b0 , 20e6 2, ;i; cf 1, ; forth!idt a lidt ; here 3b7 2, idt a, !idtinterrupt n 2* idt + here ffff and 80000 + over ! here ffff0000 and 8e00 + swap 1 + ! ;fill an for dup interrupt 1 + next drop ; 0 70 fillignore i; 20 8 fillignore 2push clear 2pop i; 28 8 fillignore 2push 8clear 2pop i; 0 interrupt0div 7fffffff 1ld i;
serial 3f8 2e8 altered for interrupt useage macroserp@ a! dup ec 1, ;serp! a! ee 1, drop ;1@ 8a 2, ;1! a! 288 2, drop ; forthr 0 + + ;110 1047 ;300 384 ;2400 48 ;9600 12 ;115200 1 ;b/s 83 3 r serp! 115200 0 r serp! 3 3 r serp! ;init 1 1 r serp! 8 4 r serp! b/s 16550 1 2 r serp! 2 2 r serp! c1 2 r serp! ;xmit n 5 r serp@ 20 and drop if 0 r serp! ; then pause xmit ;cts 6 r serp@ 30 and 30 or drop if cts ; then xmit ;st 6 r serp@xbits 30 and 10 / dup 1 and 2* 2* + 2/ ;st! 4 r serp! ;?rcv 5 r serp@ 1 and drop if 0 r serp@ then ;rcv ?rcv if ; then rcv ;
keyboard scan codes dataaddr pop ;sc-ii addr 32311b00 , 36353433 , 30393837 , 9083d2d , 72657771 , 69757974 , 5d5b706f , 7361000d , 68676664 , 3b6c6b6a , 5c006027 , 7663787a , 2c6d6e62 , 2a2f2e , 20202020 ,ssc-ii addr 40211b00 , 5e252423 , 29282a26 , 82b5f , 52455751 , 49555954 , 7d7b504f , 5341000d , 48474644 , 3a4c4b4a , 7c007e22 , 5643585a , 3c4d4e42 , 3f3e ,csi-ii addr 1b00 , 1e000000 , 0 , 7f001f , 12051711 , 9151914 , 1d1b100f , 1301000a , 8070604 , c0b0a , 1c000000 , 1603181a , d0e02 ,si sc-ii + 1@ ff and ;ssi ssc-ii + 1@ ff and ;csi csi-ii + 1@ ff and ;
keyboard driver shft 0 eflag 1 192 load 3f8 190 load init macroior 60b binary ;kbp@ ?lit e4 1, 1, ; forthnul ;kst 0 64 kbp@ ;!shft shft ! ;@shft shft @ ;sshft @shft 1 ior !shft ;rshft @shft fffffffe and !shft ;sctrl @shft 2 ior !shft ;rctrl @shft fffffffd and !shft ;?shft dup dup 7f and ffffffd6 + drop if drop ; then 80 and drop if rshft ; then sshft 80 or ;?ctrl dup dup 7f and ffffffe3 + drop if drop ; then 80 and drop if rctrl ; then sctrl 80 or ;?chvc dup 7f and negate dup 64 + drop -if drop ; then 58 + -if abs -1 + vc! ; then drop ;key kst 1 and 1 or drop if key ; then 0 60 kbp@ ;seflag 1 eflag ! ;?seflag @shft 3 or drop if ; then seflag ;sendk @shft jump si ssi csi nul ;mkey key ?seflag ?shft ?ctrl ?chvc dup 80 and drop if drop ; then sendk 0 r serp! ; 21 interruptikey forth vc @ ffffffff and drop if mkey then clear /forth i;
added macros macro0if 75 2, here ; forth ywts
rtc macrop@ ec 1, ;p! ee 1, drop ; forthrtca 70 a! p! 71 a! ;rtc@ rtca 0 p@ ;rtc! rtca p! ;hi 10 rtc@ 80 and drop 0if hi ; then ;lo 10 rtc@ 80 and drop if lo ; then ;bcd rtc@ 16 /mod 10 * + ;hms lo 4 bcd 100 * 2 bcd + 100 * 0 bcd + ;ymd lo 9 bcd 100 * 8 bcd + 100 * 7 bcd + ;day lo 6 rtc@ -1 + ;cal hi lo time - hi lo time + ;