MZ@ !L!This program cannot be run in DOS mode. $PEL4bfY n3 @@ @ 3K@`  H.textt  `.rsrc@@@.reloc `@BP3H( }}}}*0>{o  8{ o X {?{b}*0{< (8T{,o %{X}{X{> (8{ o %{X}{rp o %{X}*0{< (8[{,o %{X}{Xo X{> (8{ o %{X}{rpo %{o X}*{*"}*{*"}*:( (*.rps z CrYp ( s zo*0[  8X d  A97YZ 8%_d_ > `  oY <*0 < 8X c ?8 8X c @<9;YZ 8) _c_ >  `o Y <*:( }*0H{9(?{o< *{o((XY*0@98 {( (  @ X 8 (X *"}*0Z:o *9{(  8 {( (  @ rps z(X*:( } *f98 { (*9{ ( 8 { (*r( } } } *0198 { ( { { oX[X*0e9{ ( 8 { ( { { oX[ rp{ { o( oX*V( } }*98 { ({(X*059{ ( 8 { ( {(X *V( }}*98 {({(X*059{( 8 {( {(X *{*"}*{*"}*{*( o(" }}*0K{X {i>3{ib(   {{( }*0!('{%{% X}*0>('{%{% X}cҜ{%{% X}Ҝ*0[('{%{% X}cҜ{%{% X}cҜ{%{% X}Ҝ*0x('{%{% X}cҜ{%{% X}cҜ{%{% X}cҜ{%{% X}Ҝ*0R( o iX('{{i( {{iX%{iXX}*r?{Y>s z*J(-{*F(-{*z(-{b{X`*(-{b{Xb`{X`*(-{b{Xb`{Xb`{X`*0ns 8^(4 :o * <o &8/ Y   cXo &  _Xo &80J{?s z{J% XT  ?  >* ?  _ 8 ?  _ 8 _ JX{>*88{JX ?  ?* b?_X X? >*JXT *0& 8{oX {?*( }}}*&{X*0; {sA }{}{}}}*{{}{{}{{}*0"{%{% Y}q*0W {i %{X% }@b {( }{{*f{{Yq*0U {{Yq {{YY{{Y( {{*0U {{q {{Y{{YY( {{Y*^{{q*b{{*j( }}*( * * * *.rps z.r#ps z * **"(C*:(P}*z{9 rps z}*6{oB*v{: rps z{*F{o8s*rCp{: rOp8 {o6( *:(P}* *6{o;*0' |{lu :*oo*0$ |{lu :8o*0|{l:|(s*|{lu 9-|{k9 reps zoo8s*|{lu 9|{koo#Xs*|{lu 9|{ks*rp|{lo o ( s zrrp|o ( *:(P} * *N{ o?o;*6{ s*ZrGp{ ( *2 (a*:(P}!*{!*R%{{!X}*{! ; r[ps z}!*VX{!Xo *(`*"(a* *0 o: (9(c*s*oR @rp*rpoR( *(`*"(a* *0 o: (:(c*s*oR @rp*rpoR( *(`*"(a**oR*s*oR @rp*r/poR( *:(P}"* *N{"o:o@*6{"s*ZrEp{"( * *(P*o9*s*rYp*{#*{$*6{#*f{#? {$+*<<}#}$*{#{#@{${$+*{#{#@{${$+*u9q(+*R{#Z{$ZX*0S(:rap*(9rqp{#( *rp{#{$( *0g(9 (:*{#{#>*(9*(9*{#{$Y{#{$Y*fs%s&*0p sb ( }s })(0 s1 }+s2 }.(0 s3 }/}0s }2s }3}6rep~&cs^(&rup~&ds^(&r}p~&es^(&rp~&fs^(&rps~:-s^:~:(&rpgs^(&rp~&~;-s^;~;(&rphs^(&rpis^(&rpjs^(&rpks^(&rpls^(}rpms^(}rpns^(&r%p~<-s^<~<(&r3pos^(&rQpps^(&rspqs^(&rprs^(&rp~=-s^=~=(&rps~>-s^>~>(&rpss^(&rpts^(&rpus^(&r#pvs^(&r/pws^(&r;pxs^(&rGpys^(&rYpzs^(&r_p{s^(&rkp|s^(&rup}s^(&rp~s^(&rps^(&rps^(&rps^(&rps^(&rps^(&rps^(&rps^(&rps^(&rYps^(&rps~?-s^?~?(&rps~@-s^@~@(&rps~A-s^A~A(&r ps~B-s^B~B(&r ps~C-s^C~C(&r ps~D-s^D~D(&r# ps~E-s^E~E(&r- ps~F-s^F~F(&r7 pss^(&rps~G-s^G~G(&r; ps~H-s^H~H(&rC ps~I-s^I~I(&rG ps~J-s^J~J(&rK ps~K-s^K~K(&rQ ps~L-s^L~L(&rU ps~M-s^M~M(&r[ ps~N-s^N~N(&r_ ps~O-s^O~O(&re ps~P-s^P~P(&ri ps~Q-s^Q~Q(&ro ps~R-s^R~R(&rs ps~S-s^S~S(&ry ps~T-s^T~T(&r ps~U-s^U~U(&r ps~V-s^V~V(&r ps~W-s^W~W(&r ps~X-s^X~X(&r ps~Y-s^Y~Y(&r ps~Z-s^Z~Z(&r ps~[-s^[~[(&r ps~\-s^\~\(&r ps~]-s^]~](&r ps~^-s^^~^(&r ps~_-s^_~_(&r p~&~`-s^`~`(&r ps~a-s^a~a(&r ps~b-s^b~b(&r p~&~c-s^c~c(&r ps~d-s^d~d(&*0s  s    8rpo : o Xrp( 9-8X%i?o 8*8 o rpo :=o   <+o   Xi< X8 8& o o o   Xo    9~9:ws   rpo  rpo  rpo  rpo  rpo  rpo  rpo  rpo  9~9 o! 9E5Z8 : :(X  9( ݫ : :(X   ݆ : :(X   %,o" 8+o o >o Xi? (Xi?to# :(:rp o# : rpo : s}6}7}8($ rpo% s& o9o' o( 8;() rp(* (+ o9o' (, :o'  o- oo (. (/ *Ad!/iwFQ 0Mrp(. rmp(. rp(. rp(. rp(. rp(. rp(. (/ *>~%(*0I{+o4 9r p( s zs[ o5o;{+o5 *0%{5% jX}5*0{( ? }(8) >Xe}( 8 {'o6  @A{(?{(  }(8 {'o6  ; }( *0^<*{(<'{( ; r% ps z}(8" ; rc ps z{(Xe}(*0{* 9 }**{)o7 8 ( <*(:88"@(*8:{)o &( ? (9({)o *80"( (9 r ps z*0( : r ps z*0~%8k( <*(:P(@2(9 (*((:*8{; (*88s  8M( <* {; };8X 8Y% :o *8 o &80    8(:~%*rp( 99~%* 8`r' p( 9#99 @  s*~%*9" :r+ p( 9 X 8X 8b0s "o &   8(< r/ ps z>I(<rc p( s z bX Y% :  o & 89[ uYE  ;8(8! 8 8(o &884";\; 8o * 8o &88rYEn;8  * * * **0Z8P( < r ps z @ r ps z(98"@*r ps z80o @o8 \;o8 *o ?o8 \@o8 x; u;-8Po @o ( ?*8Fo @o ( ?*8o @ o8 (*8r_ p( s z0>   8% o8 (<*bX X o ?*0A0? 9=0Y*A? F=7Y*a? f=WY**0Ks 8;( <r p( s z@o *o &8& *0}'}(r ps^s[ s6 %sC%ss }1o882{198'{%{%X} oT8*0( :{09 r ps z}1*( ( 9 9r p( s z{09V9{-o!8: 9( o49 oB8 {- o#8 {-o"859 o;8# 9 oB8r] p( s z*0{/o9 &*0 (0 s1 s;  8<  o4 98 (o6o5 o< X i?8qo= oCo> 87(? o6o4 9o6o5 o< (@ : o' oA ={69  8    oB   oFr p  o? o@(C  o?{7>rp r p(D s z o@{8>rp r p(D s z X   i?asE  oF oG 8ToH oDoI 8(J  o!oK (L :o' oM :9o'  oN oO 8oP o$o%XoM :9o' sQ sQ sR oF oG 8oH o6(:(u"9rpo6( s zݎoS 9>oT %%oU rQpo6((D oV 8)%XoW o6(oV o6oW o9oM :9o' oF oG !8B!oH   o6(9"%X" o6"oW  "o9!oM :!9!o' Y#%&8%%&$$(9 rUps z&X&&%i?sX '#(oF oG *8H*oH ))o6(9('oY +)'oE()o8Y'+oZ *oM :*9*o' 'o[ ,#X ?rp(. -8-.,i/8}08/0,0-o 0X00,i?128+,21o,2/2o1/2X12X22,i?1.@8 1.8~rp( (\ 33rpo] 3rprpo^ 3o 5685643rp4o_ 6X665i?3o 3rpo^ {2o( 888() 73o 3rp7o^ 8(, :8o' 3o 3rpo` 3Ns99o oN oO ;8;oP ::9o5;oM :;9;o' 3o 3rRpoa 3o 3rXpo` 3Ns9,=>8=><<9-o &>X>>=i?3o 3rRpoa 3o 3rpo` ?88?9 3,o 3o 3rp(?oo ?X??(i?3o 3rRpoa 3o 3rpo^ 3o 3rprBpo^ 3o 3rprpo^ 3o AB88AB@3r0pr\p@(D @oB o8o_ BXBBAi?3o -93rprjpo^ 83rprpo^ 3o 3r& poa 3r0 po^ 3rprZ po^ sb Coc od E8Eoe DCDoT Dof EoM :E9Eo' Cog oh G8.G(i F3r33pFFoU CFoj ok G(l :Go' 3r3poa {3o( I8I() H3o 3rpHo^ I(, :Io' 393o' J,LM8LMKJK-o XJMXMMLi?N oN oO P8PoP ONOo%XNPoM :P9Po' r4pJ(* r5p(* rH5p#X#(m *AT|M/j64jXo^'4[(1 # Dg  4 % * +U 0!( 9*r5p( s z0{+on &*:ss*0(r5po 9o (*r5po 9o ((* rpo 9 o 8r7 po 9 o  r5po :r5po 9 o 8+r5po :r5po 9  o o :*  \8Mo8 (? jn?*C Z YC X Xo ? 9 C  e 9 r5ps z ( *0+ (:r6po ( s z(*^{0: r@6ps z*0 s   8 o8 !?~=%; o &8 <rp6poo &8t <.r6pc `?_ `op &8;r6p c `c?_ `?_ `oq & X o ?-o r6pr6por *0j!o: {lu:r:p( s zo:( o:( o s( o;*.r<:ps zsx z0n"o: {lu : r8ps zo:( ?  >r69p( s zo{ko.*0E"o: {lu : r8ps zo{ko/ ( o;*"o:&*:o<o;*"o=*:o<o;*"o=*"o>*Jo:(o=*bo:(o<o;*0#o: o: {lu {lu 92 9,o o@{k{kYso;*(%{kY}ko;*0o:( e( o;*0'o:( o:( Z( o;*0'o:( o:( [( o;*0'$o:( o:( \( o;*0'o:( o:( ]( o;*0'$o:( o:( ^( o;*0(o:( o:( (o;*0+o:( o:( (o;*0(o:( o:( (o;*0+o:( o:( (o;*0"%o: o: ((o;*0%%o: o: ((o;*0.&o: ( o: ( so;*01&o: ( o: ( so;*0.&o: ( o: ( so;*0+$o:( o:( (o;*0'$o:( o:( _( o;*0'$o:( o:( `( o;*0'$o:( o:( a( o;*0'o:( f( o;*0D(o:( ?> rv:ps zo:( _b( o;*0Do:( ?> rv:ps zo:( _c( o;*0D(o:( ?> rv:ps zo:( _d( o;*0 r:po: o (y *0;)o7 Y 8#r:po< o (y Y <*Fo:((z *0 rpo: o (y *({ *0=*o: o o: o ( (o;*"(*( *0a{( : r6ps z{{/os 9r7p( s z{{/{(ot *0+s }{(}{: r6ps z{{s^( {{/{os 9r7p{( s z{{/{{(ot o;*r{{2{(o *r{{3{(o *0,{( : rB7ps z{( {( : r7ps z{( < r7ps z{(o s({{09{{- o!8 o;*0-{( : r6ps z{{09 {{.{{-ou 8 {}0{{s}-{( : r7ps zr,8p( 99{( (: r08ps z{{-o8 {}**0.o:( o:( o: {lu:rh8p( s zo {{09 {{.{{-ou 8 {}0{{ s}-{{-so*0/{{0: r8ps z{{-o o6 {{+o4 9r p( s z{{+o5 {},{{.ov > {{{.ow }-8{}-{}0*{{,: r8ps z{{,o5*{({{-o:o!*0* {({{-o: (o(*0${({( : r6ps z{( {( 9 9r p( s z9,{{-o!{{-{o#8 9X o49{{- o#82{{- sso!{{-{o#82{{-sso!{{-{o#*{{s&}4{{4sso;*00o: o o: {lu : r8ps z{ o{ksG{{+o4 9r p( s z{{+o5 {},*0G{{4: r 9ps z{{4o%{{4sso;*0b{{4: r 9ps zo:( ?  >r69p( s z{{4o(*00 {({{-o: o o%*00 {({{-o: o o&*r{({{-o**r{({{-o.*r{({{-o/*r{({{-o1*r{({{-o0*r{({{-o,*r{({{-o+*r{({{-o-*{({{-o:(o*{({{-o:(o*00{( : rj9ps z{(o;*0,1o:( {( {(o;*0+{( < r9ps z( o;*0{( sso;*0 o: {(*b{({}0*6{}0*00 {({{-o: o o'*r{({{-o)*0%o: o: {l: %{k(X}ko;8s{lu9F{lu95{o o ( (o;8r9p( s z*( *Zr9p{( s z( * *Zr:po ( s zr:p( o| {k( **{e*"}e*:((*~(s&((o,*N({ko3*0 u 9(o+*r(}f}g}h*.r:ps z:{k(*0D:{f*>r0;p{f( *r\;p{fje*( *0K2{gjjX {hjjX  j< (( j> ((  (} *0= j<8 X cj@88 X cj@*(* *r;p**u*{i*"}i*{j*"}j*V(((*j(o6((*z(:(o(*R((oB*Fr;p(( *0" u 9(o( +*>}k}l*>}k}l*n98}k}l*>}k}l*{l: {k*{lqo*{l:{k*r6po ( s z(*{l:rp{k( *{lqo*:(o*00 {lu :r:po ( s z*0T{k{k;*{l{l@*{l9 {l:*{l{lo*s*"is*s*s*s*s*s*s*"(*&(g*&(*&(h*&(*&(*"(*"(*{u*"}u*0\( }m}n}o}ps~ }qs }rsQ }s}t~%(*0{p; r;ps z{t:"{q{qo Yo oQ9(){m{n{so {qo {ro- sQ (o;*&(*{qo {ro }t*0C{o{pY {o{pYY{o{pY( {o{p*0{o{pY (*0N3{oi %{pX% }p@b {o( }o{o{p*0{o%{p% Y}p*J{qo (*V{qo eY(*0( < r;ps z*0( ? r;ps zeY*6sI(*0k4re po 9o  8  {so! 9(9sw(8 s[(8 sB(*:sC(*6sB(*06{so! 9s[(8r <p( s z*06{so! 9sw(8r <p( s z*{so 9r@<p( s z{s{so o *o:sBo(8osC(*2s}(*J(sr(*J(sf(*J(sl(*0/( {qo {qo YYoV}t*(*0"(  {qo YYss(*0"(  {qo YYsg(*0"(  {qo YYsm(*{v*"}v*{w*"}w*{x*"}x*{y*"}y*{z*"}z*( (3(7~%(;*{{*"}{*095(: (:*(9*((Y(} * **Zrv<p(6( s zs *s *.r<ps z*(<}|}~s(;*(<}}}~s(;*06{|9*{9r<p(6( s z}(2{}ou  :r@=p(6{}( s zoA{|}|%{~{~X}~}*oA{~{|sso;*07oAs {|o *oAso {|o#{~Xso so *{*"}*{*"}*(<(P}(N*6oF{*6oF{*0Z1{:* 81{ :8(O(2ooUX {i?}*foA(O(Mo8*0J8oAs (O  8% (2oW9o X i?*0J9oAs (O  8% (2oX9o X i?*0:oA(Oi   8(OoYX ? 8(O  oZ X ?(Mso 8o X?*0Z @*;<r=p%(6%%%( s z*0(;{ 9 ; 88*r>p(6rp(D s z}(Oi   8  X ?    8(O  oQ  u 9 (2oWoFo:(:rN>p(6o6( s z(9  8((Y o?X(   o@(   (Y(}  8 u9c @ 8F;=r>p%(6%%%( s z8 oS X(  X (}   oR9!XX%X(Y&X 9(Y:<%X888% }(MX X} @ e(8 e eX((:(9O(:(:8r(?p(6o (:o ( s z8(;}*B(<}*J([(;*6{o_*: \ `\n parse drop ; immediate \ This file defines the core non-native functions (mainly used for \ parsing words, i.e. not part of the generated output). The line above \ defines the syntax for comments. \ Define parenthesis comments. \ : ( `) parse drop ; immediate : else postpone ahead 1 cs-roll postpone then ; immediate : while postpone if 1 cs-roll ; immediate : repeat postpone again postpone then ; immediate : ['] ' ; immediate : [compile] compile ; immediate : 2drop drop drop ; : dup2 over over ; \ Local variables are defined with the native word '(local)'. We define \ a helper construction that mimics what is found in Apple's Open Firmware \ implementation. The syntax is: { a b ... ; c d ... } \ I.e. there is an opening brace, then some names. Names appearing before \ the semicolon are locals that are both defined and then filled with the \ values on stack (in stack order: { a b } fills 'b' with the top-of-stack, \ and 'a' with the value immediately below). Names appearing after the \ semicolon are not initialized. : __deflocal ( from_stack name -- ) dup (local) swap if compile-local-write else drop then ; : __deflocals ( from_stack -- ) next-word dup "}" eqstr if 2drop ret then dup ";" eqstr if 2drop 0 __deflocals ret then over __deflocals __deflocal ; : { -1 __deflocals ; immediate \ Data building words. : data: new-data-block next-word define-data-word ; : hexb| 0 0 { acc z } begin char dup `| = if z if "Truncated hexadecimal byte" puts cr exitvm then ret then dup 0x20 > if hexval z if acc 4 << + data-add8 else >acc then z not >z then again ; \ Convert hexadecimal character to number. Complain loudly if conversion \ is not possible. : hexval ( char -- x ) hexval-nf dup 0 < if "Not an hex digit: " puts . cr exitvm then ; \ Convert hexadecimal character to number. If not an hexadecimal digit, \ return -1. : hexval-nf ( char -- x ) dup dup `0 >= swap `9 <= and if `0 - ret then dup dup `A >= swap `F <= and if `A - 10 + ret then dup dup `a >= swap `f <= and if `a - 10 + ret then drop -1 ; \ Convert decimal character to number. Complain loudly if conversion \ is not possible. : decval ( char -- x ) decval-nf dup 0 < if "Not a decimal digit: " puts . cr exitvm then ; \ Convert decimal character to number. If not a decimal digit, \ return -1. : decval-nf ( char -- x ) dup dup `0 >= swap `9 <= and if `0 - ret then drop -1 ; \ Commonly used shorthands. : 1+ 1 + ; : 2+ 2 + ; : 1- 1 - ; : 2- 2 - ; : 0= 0 = ; : 0<> 0 <> ; : 0< 0 < ; : 0> 0 > ; \ Get a 16-bit value from the constant data block. This uses big-endian \ encoding. : data-get16 ( addr -- x ) dup data-get8 8 << swap 1+ data-get8 + ; \ The case..endcase construction is the equivalent of 'switch' is C. \ Usage: \ case \ E1 of C1 endof \ E2 of C2 endof \ ... \ CN \ endcase \ \ Upon entry, it considers the TOS (let's call it X). It will then evaluate \ E1, which should yield a single value Y1; at that point, the X value is \ still on the stack, just below Y1, and must remain untouched. The 'of' \ word compares X with Y1; if they are equal, C1 is executed, and then \ control jumps to after the 'endcase'. The X value is popped from the \ stack immediately before evaluating C1. \ \ If X and Y1 are not equal, flow proceeds to E2, to obtain a value Y2 to \ compare with X. And so on. \ \ If none of the 'of' clauses found a match, then CN is evaluated. When CN \ is evaluated, the X value is on the TOS, and CN must either leave it on \ the stack, or replace it with exactly one value; the 'endcase' word \ expects (and drops) one value. \ \ Implementation: this is mostly copied from ANS Forth specification, \ although simplified a bit because we know that our control-flow stack \ is independent of the data stack. During compilation, the number of \ clauses is maintained on the stack; each of..endof clause really is \ an 'if..else' that must be terminated with a matching 'then' in 'endcase'. : case 0 ; immediate : of 1+ postpone over postpone = postpone if postpone drop ; immediate : endof postpone else ; immediate : endcase postpone drop begin dup while 1- postpone then repeat drop ; immediate \ A simpler and more generic "case": there is no management for a value \ on the stack, and each test is supposed to come up with its own boolean \ value. : choice 0 ; immediate : uf 1+ postpone if ; immediate : ufnot 1+ postpone ifnot ; immediate : enduf postpone else ; immediate : endchoice begin dup while 1- postpone then repeat drop ; immediate \ C implementations for native words that can be used in generated code. add-cc: co { T0_CO(); } add-cc: execute { T0_ENTER(ip, rp, T0_POP()); } add-cc: drop { (void)T0_POP(); } add-cc: dup { T0_PUSH(T0_PEEK(0)); } add-cc: swap { T0_SWAP(); } add-cc: over { T0_PUSH(T0_PEEK(1)); } add-cc: rot { T0_ROT(); } add-cc: -rot { T0_NROT(); } add-cc: roll { T0_ROLL(T0_POP()); } add-cc: pick { T0_PICK(T0_POP()); } add-cc: + { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a + b); } add-cc: - { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a - b); } add-cc: neg { uint32_t a = T0_POP(); T0_PUSH(-a); } add-cc: * { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a * b); } add-cc: / { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSHi(a / b); } add-cc: u/ { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a / b); } add-cc: % { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSHi(a % b); } add-cc: u% { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a % b); } add-cc: < { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSH(-(uint32_t)(a < b)); } add-cc: <= { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSH(-(uint32_t)(a <= b)); } add-cc: > { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSH(-(uint32_t)(a > b)); } add-cc: >= { int32_t b = T0_POPi(); int32_t a = T0_POPi(); T0_PUSH(-(uint32_t)(a >= b)); } add-cc: = { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a == b)); } add-cc: <> { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a != b)); } add-cc: u< { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a < b)); } add-cc: u<= { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a <= b)); } add-cc: u> { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a > b)); } add-cc: u>= { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(-(uint32_t)(a >= b)); } add-cc: and { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a & b); } add-cc: or { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a | b); } add-cc: xor { uint32_t b = T0_POP(); uint32_t a = T0_POP(); T0_PUSH(a ^ b); } add-cc: not { uint32_t a = T0_POP(); T0_PUSH(~a); } add-cc: << { int c = (int)T0_POPi(); uint32_t x = T0_POP(); T0_PUSH(x << c); } add-cc: >> { int c = (int)T0_POPi(); int32_t x = T0_POPi(); T0_PUSHi(x >> c); } add-cc: u>> { int c = (int)T0_POPi(); uint32_t x = T0_POP(); T0_PUSH(x >> c); } add-cc: data-get8 { size_t addr = T0_POP(); T0_PUSH(t0_datablock[addr]); } add-cc: . { extern int printf(const char *fmt, ...); printf(" %ld", (long)T0_POPi()); } add-cc: putc { extern int printf(const char *fmt, ...); printf("%c", (char)T0_POPi()); } add-cc: puts { extern int printf(const char *fmt, ...); printf("%s", &t0_datablock[T0_POPi()]); } add-cc: cr { extern int printf(const char *fmt, ...); printf("\n"); } add-cc: eqstr { const void *b = &t0_datablock[T0_POPi()]; const void *a = &t0_datablock[T0_POPi()]; T0_PUSH(-(int32_t)(strcmp(a, b) == 0)); } BSJB v4.0.30319l.#~/t#StringsxF?#US(#GUID8#BlobW 3/%W;)9h  [Yovvvvvv#v,v9Yvv.vCLvvvAv \o v      {<  L vv(v5vMvA !!! 1 A U h |!!!6!A8B8I! P8 [8!`@"f@"l@"r8"w8#|#!'!e)`e6`fC`iP`i[kb!mn!v2s||G||M|[^!be ! "'"',@DHNT]f$j$p{(,0048<?4(=HILcTl\v\__f\~{   / > M \ k {           + ; K [ k {          f<<(.0j4n7<<rDJvO_~f\q0n\<q0<f<\0OFS`J)2;nJ <| P } t  }\!}! " "' "6 !"}0"E S ! ] & <"d - h"r -" ;[#}Jl# #S ! $E $] &~$}J$S !$] &$}T$S !,%] &%}\!%S !#%] &$&}b&3&S !(\&] &)& h+& l+& ,& ,&-&}q-& .H' /x' 0' 1,( 2( 3) 4+) 6>) 8P) 9o) :) ;)t<T* =@+] >r+}?+ ?+?+ A, AL, A,B,C0-#D-(E-1F-}H.}J.}J&.nKE.jLS.Mq.N.tN.}N.ZO.jO.P/Q4/R*0tR-}R- :lR- MR- ZRjR-nS-|T.U .VW . WG0}YV0ZZY0jZm0[{0t[0}[0}[0M\0j\0|]0 ^1}` 1}`1Za1jaC1bK1tbx1}b1}b1Zc1jc1d1td1}d1}d1:le2e 2te92}eH2ZfK2jf_2gm2tg2:lg2}g2jg2h2th2h2h2lh2lh2}h3'j*3'lU3/nv3o3to34o_4 p|4}p@@pxFGx,GNyGSyHSy0H^zIk{I~{J{4K|K|L}L~MsMM N O@OD[ t[ [ [T]&/]3]B4^QA_^A*_kA4_xA_A`A `A`A"`A1`A:`AC`AV`Ap`A`A$aAXa!Aa/Aa=AaKA(bYA\bgAbuAbAcA0cAdcAcAcAdATdAdAdAdAeAhe+Ae9AfGA4fUA{fcAfqAfAfA g=s}EsHs_stssss}s}stst}$t0tt@ttt1u}9upn?n@4oApo'Bo/Co7Do?EpGF pOG=pWHZp_IwpgJpoKpwLpM qNXqOqPqQqRqSrTDrUdrVs}W&sW"'"'...7TrJrrj77 J7 % JK % % K X 7K d K g 7j r z 777J M J 7      7    r   7  ...0rrrrrrrrr47   .r 77   7  7 7  7JO   K  7J 7% J      A}   QY}a}Q Q y(2BK}}At}QAQ }Q QQQ Q QQ}#"+Q34 9^;s@}F L[`fl pv {P$},}4}<1 <= #F M QZ D"+}L}L L [TL\[\lL9< Qd}< l t[|L[= #l)l  [}}1   = #= #}9 ^p d '  k  }3 y [= #3 [  l<"+P P P Q] D1 D= #, ,9, [a}`I y }9 ^9p1 = #T}|}|TQ Q y}.k333333!3A3 3@3`333!3A3a333333!3A3a33333 3! 3A 3a 3 3 3 3 3 3! 3A 3a 3 3 3 3 3 3! 3A 3a 3 3 3 3 3 3! 3A 3a 3 3 3! 3A 33333!3A3a33!33333 3@3`333333 3@3`333333 3@3`333333 3@3`333333 3@3`33333333333 3`"3"3@&3`&3&3&3&3&3'3 '3@'3`'3'3'3)3)3)3*34BOw~:F "9GPXdipy} +=      !&iq|i4 #2<#! " # $ % 7JQRS\bhnt!x#|%')+-//1133579;;2=3=4?5?6A7A8C9C:E;E=G>G?I@KMMNMOOPORQSSU#*2:BIPWr_v_ #"$%$BlobWriterCodeElementCodeElementJumpCodeElementUIntCodeElementUIntExprCodeElementUIntIntCodeElementUIntUIntConstDataCPUFrameOpcodeCallOpcodeConstOpcodeOpcodeGetLocalOpcodeJumpOpcodeJumpIfOpcodeJumpIfNotOpcodeJumpUncondOpcodePutLocalOpcodeRetSTypeT0CompTPointerBaseTPointerBlobTPointerExprTPointerNullTPointerXTTValueWordBuilderWordWordDataWordInterpretedWordNativeNativeRunwTextWriterSystem.IOmaxLineLenindentlineLen
k__BackingFieldk__BackingFieldjumpTypetargetvalcxoffval1val2k__BackingFieldbuflenipBufipOffstackBufstackPtrrspuppersavedIpBufsavedIpOfflocalsnumdispdindoutUNKNOWNBLANKcurrentInputTextReaderdelayedChartokenBuilderStringBuilderSystem.TextdelayedTokenwordsIDictionary`2System.Collections.GenericlastWordwordBuildersavedWordBuildersStack`1allCCodecompilingquitRunLoopextraCodeList`1extraCodeDeferdataBlockcurrentBlobIDenableFlowAnalysisdsLimitrsLimitk__BackingFieldexprminmaxk__BackingFieldk__BackingFieldxptrTCnamecfStackcfPtrcodetoResolveDictionary`2jumpToLastk__BackingFieldk__BackingFieldk__BackingFieldk__BackingFieldk__BackingFieldblobbaseBlobNameoffsetongoingResolutionk__BackingFieldk__BackingFieldflowAnalysismaxDataStackmaxReturnStackObjectSystem.ctorWriteLineWritebByteStringget_LengthCompilerGeneratedAttributeSystem.Runtime.CompilerServicesvalueExceptiononeByteCodebwUInt32FormatInt32ctxelenMathMaxArrayCopysEncodingget_UTF8GetBytesdlenIndexOutOfRangeExceptionvToStringAppendnumLocalsdepthcpuConcatGetTypeTypeget_FullNamegcodes1s2objargs<>f__switch$map0StartsWithAddop_EqualitySubstringIndexOfToLowerInvariantTrimTryGetValueCharSplitget_CountAssemblySystem.ReflectionGetExecutingAssemblyGetManifestResourceStreamStreamStreamReaderIDisposableDisposeEnumeratorGetEnumeratorget_CurrentConsoleFileOpenTextMoveNextToArrayEnvironmentExitc__AnonStorey1wliteralwcompile$thisStringComparerget_OrdinalSortedDictionary`2IComparer`1<>f__am$cache0<>f__am$cache1<>f__am$cache2<>f__am$cache3<>f__am$cache4<>f__am$cache5<>f__am$cache6<>f__am$cache7<>f__am$cache8<>f__am$cache9<>f__am$cacheA<>f__am$cacheB<>f__am$cacheC<>f__am$cacheD<>f__am$cacheE<>f__am$cacheF<>f__am$cache10<>f__am$cache11<>f__am$cache12<>f__am$cache13<>f__am$cache14<>f__am$cache15<>f__am$cache16<>f__am$cache17<>f__am$cache18<>f__am$cache19<>f__am$cache1A<>f__am$cache1B<>f__am$cache1C<>f__am$cache1D<>f__am$cache1E<>f__am$cache1F<>f__am$cache20<>f__am$cache21<>f__am$cache22<>f__am$cache23<>f__am$cache24<>f__am$cache25<>f__am$cache26<>f__am$cache27<>f__am$cache28<>f__am$cache29<>f__am$cache2AimmediatestackEffectContainsKeyset_ItemReadcset_Lengthtget_CharscttroutBasecoreRunentryPointsParamArrayAttributeQueue`1EnqueueDequeueget_ItemIEnumerator`1get_ValuesICollection`1IEnumerable`1IEnumeratorSystem.CollectionsCreateTextStreamWriterset_NewLineget_KeysKeyCollectiontttvAppendFormatReplacec__AnonStorey0<>f__ref$1PushPopcpu2xcpuvpMemberInfoget_NametpcdownerInt64MinoprefNamewtargetlnamextdstsajobjectmethodcallbackresultDoNLget_Addressset_Addressget_LastLengthset_LastLengthSetJumpTargetGetLengthEncodeEncodeOneByteEncode7EUnsignedEncode7ESignedget_JumpOffget_IDset_IDExpandAdd8Add16Add24Add32AddStringCheckIndexSet8Read8Read16Read24Read32DecodeUTF8get_DepthEnterPeekRotNRotGetLocalPutLocalget_MayFallThroughget_JumpDispget_StackActionRunResolveTargetResolveJumpGetReferenceGetDataBlockToCodeElementFixUpget_DataInget_DataOutget_IsKnownget_NoExitop_InequalityEqualsGetHashCodeIsSubOf.cctorValueTypeMainUsageAddNativeNextBlobIDNextCharUnreadNextParseCCodeParseCCodeNFParseStackEffectNFParseStringSingleCharEscapeSkipNLDecodeCharConstDecHexHexValReadTermIsWSProcessInputCompileStepGetCCodeGenerateLookupLookupNFStringToBlobTryParseLiteralParseIntegerCheckCompilingEscapeCCommentm__0m__1m__2m__3m__4m__5m__6m__7m__8m__9m__Am__Bm__Cm__Dm__Em__Fm__10m__11m__12m__13m__14m__15m__16m__17m__18m__19m__1Am__1Bm__1Cm__1Dm__1Em__1Fm__20m__21m__22m__23m__24m__25m__26m__27m__28m__29m__2Am__2B<>m__0<>m__1<>m__2<>m__3<>m__4<>m__5<>m__6<>m__7<>m__8<>m__9<>m__A<>m__B<>m__C<>m__D<>m__E<>m__F<>m__10<>m__11<>m__12<>m__13<>m__14<>m__15<>m__16<>m__17<>m__18<>m__19<>m__1A<>m__1B<>m__1C<>m__1D<>m__1E<>m__1F<>m__20<>m__21<>m__22<>m__23<>m__24<>m__25ToBoolExecuteget_Blobset_BlobToCExprGetMaxBitLengthBitLengthset_Nameget_Targetset_TargetResolveget_Boolget_Intget_UIntToXTop_Implicitget_StackEffectset_StackEffectBuildCSRollCSPickCSPushCSPopCSPushOrigCSPushDestCSPopOrigCSPopDestLiteralCallCallExtDefLocalRetAheadAheadIfAheadIfNotThenBeginAgainAgainIfAgainIfNotget_TCset_TCget_Immediateset_Immediateget_Slotset_Slotget_CCodeset_CCodeget_MaxDataStackget_MaxReturnStackGetReferencesGetDataBlocksGenerateCodeElementsAnalyseFlowget_NumLocalsset_NumLocalsget_Codeset_CodeMergeSAInvokeBeginInvokeIAsyncResultAsyncCallbackEndInvokeMulticastDelegatet0-kernelAddressLastLengthJumpOffIDLengthDepthStackActionMayFallThroughJumpDispDataInDataOutIsKnownNoExitBlobNameTargetBoolIntUIntStackEffectImmediateSlotCCodeMaxDataStackMaxReturnStackNumLocalsCodeRuntimeCompatibilityAttributemscorlibT0Comp.exe0x{0:X2}{0}=Code element accepts no targetCCannot encode '{0}' over one byte)Unresolved addressesT0_INT{0}({1})/Opcode already resolved-Unresolved call target call UNRESOLVEDECannot compile XT: non-zero offsetECannot embed constant (type = {0}) const #Not a call opcode#Not a jump opcodegetlocal +Jump already resolved#jumpif UNRESOLVEDjumpif disp=)jumpifnot UNRESOLVEDjumpifnot disp=jump UNRESOLVEDjump disp=putlocal retUNKNOWNin:{0},noexitin:{0},out:{1}---ooutrrunm mainnf noflow t0outt0-kernel [{0}]Qusage: T0Comp.exe [ options... ] file...options: -o file use 'file' as base for output file name (default: 't0out') -r name use 'name' as base for run function (default: same as output)) -m name[,name...]G define entry point(s)G -nf disable flow analysisadd-cc:cc:preamblepostamblemake-CXCXco:define-word;immediateliteralcompilepostpone exitvmnew-data-block!define-data-wordcurrent-datadata-add8data-set8data-get8%compile-local-read'compile-local-write ahead begin again untiluntilnotif ifnot thencs-pickcs-rollnext-word parse char'execute[](local) dropdup swap overrot -rot roll pick+neg*/u/%u%<<=>>==<>u<u<=u>u>=andorxornot<<>>u>>..s putc putscr eqstr-Word already defined: =Already two delayed characters7Cannot delay two charactersUStack effect forbidden in this declaration5Error while parsing C code)!3Unfinished literal string5not an hex digit: U+{0:X4}+EOF in literal stringGUnescaped newline in literal stringQInvalid newline escape in literal string/Invalid literal char: `7EOF reached before U+{0:X4}toplevel'EOF while compiling[Ambiguous: both defined word and literal: {0}'Unknown word: '{0}'%{0}: ds={1} rs={2}5' exceeds data stack limit9' exceeds return stack limit5No C code for native '{0}' 7Non-interpreted entry point9WARNING: more than 255 words.c /* Automatically generated code; do not modify directly. */ #include <stddef.h> #include <stdint.h> typedef struct { uint32_t *dp; uint32_t *rp; const unsigned char *ip; } t0_context; static uint32_t t0_parse7E_unsigned(const unsigned char **p) { uint32_t x; x = 0; for (;;) { unsigned y; y = *(*p) ++; x = (x << 7) | (uint32_t)(y & 0x7F); if (y < 0x80) { return x; } } } static int32_t t0_parse7E_signed(const unsigned char **p) { int neg; uint32_t x; neg = ((**p) >> 6) & 1; x = (uint32_t)-neg; for (;;) { unsigned y; y = *(*p) ++; x = (x << 7) | (uint32_t)(y & 0x7F); if (y < 0x80) { if (neg) { return -(int32_t)~x - 1; } else { return (int32_t)x; } } } } #define T0_VBYTE(x, n) (unsigned char)((((uint32_t)(x) >> (n)) & 0x7F) | 0x80) #define T0_FBYTE(x, n) (unsigned char)(((uint32_t)(x) >> (n)) & 0x7F) #define T0_SBYTE(x) (unsigned char)((((uint32_t)(x) >> 28) + 0xF8) ^ 0xF8) #define T0_INT1(x) T0_FBYTE(x, 0) #define T0_INT2(x) T0_VBYTE(x, 7), T0_FBYTE(x, 0) #define T0_INT3(x) T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0) #define T0_INT4(x) T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0) #define T0_INT5(x) T0_SBYTE(x), T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0) /* static const unsigned char t0_datablock[]; */ ?void {0}_init_{1}(void *t0ctx);5void {0}_run(void *t0ctx);[static const unsigned char t0_datablock[] = {};[static const unsigned char t0_codeblock[] = {Istatic const uint16_t t0_caddr[] = { {0}9#define T0_INTERPRETED {0}#define T0_ENTER(ip, rp, slot) do { \ const unsigned char *t0_newip; \ uint32_t t0_lnum; \ t0_newip = &t0_codeblock[t0_caddr[(slot) - T0_INTERPRETED]]; \ t0_lnum = t0_parse7E_unsigned(&t0_newip); \ (rp) += t0_lnum; \ *((rp) ++) = (uint32_t)((ip) - &t0_codeblock[0]) + (t0_lnum << 16); \ (ip) = t0_newip; \ } while (0)M#define T0_DEFENTRY(name, slot) \ void \ name(void *ctx) \ { \ t0_context *t0ctx = ctx; \ t0ctx->ip = &t0_codeblock[0]; \ T0_ENTER(t0ctx->ip, t0ctx->rp, slot); \ }+T0_DEFENTRY({0}, {1}) _init_S#define T0_NEXT(t0ipp) (*(*(t0ipp)) ++)g#define T0_NEXT(t0ipp) t0_parse7E_unsigned(t0ipp) void){0}_run(void *t0ctx){ uint32_t *dp, *rp; const unsigned char *ip; #define T0_LOCAL(x) (*(rp - 2 - (x))) #define T0_POP() (*-- dp) #define T0_POPi() (*(int32_t *)(-- dp)) #define T0_PEEK(x) (*(dp - 1 - (x))) #define T0_PEEKi(x) (*(int32_t *)(dp - 1 - (x))) #define T0_PUSH(v) do { *dp = (v); dp ++; } while (0) #define T0_PUSHi(v) do { *(int32_t *)dp = (v); dp ++; } while (0) #define T0_RPOP() (*-- rp) #define T0_RPOPi() (*(int32_t *)(-- rp)) #define T0_RPUSH(v) do { *rp = (v); rp ++; } while (0) #define T0_RPUSHi(v) do { *(int32_t *)rp = (v); rp ++; } while (0) #define T0_ROLL(x) do { \ size_t t0len = (size_t)(x); \ uint32_t t0tmp = *(dp - 1 - t0len); \ memmove(dp - t0len - 1, dp - t0len, t0len * sizeof *dp); \ *(dp - 1) = t0tmp; \ } while (0) #define T0_SWAP() do { \ uint32_t t0tmp = *(dp - 2); \ *(dp - 2) = *(dp - 1); \ *(dp - 1) = t0tmp; \ } while (0) #define T0_ROT() do { \ uint32_t t0tmp = *(dp - 3); \ *(dp - 3) = *(dp - 2); \ *(dp - 2) = *(dp - 1); \ *(dp - 1) = t0tmp; \ } while (0) #define T0_NROT() do { \ uint32_t t0tmp = *(dp - 1); \ *(dp - 1) = *(dp - 2); \ *(dp - 2) = *(dp - 3); \ *(dp - 3) = t0tmp; \ } while (0) #define T0_PICK(x) do { \ uint32_t t0depth = (x); \ T0_PUSH(T0_PEEK(t0depth)); \ } while (0) #define T0_CO() do { \ goto t0_exit; \ } while (0) #define T0_RET() goto t0_next dp = ((t0_context *)t0ctx)->dp; rp = ((t0_context *)t0ctx)->rp; ip = ((t0_context *)t0ctx)->ip; goto t0_next; for (;;) { uint32_t t0x; t0_next: t0x = T0_NEXT(&ip); if (t0x < T0_INTERPRETED) { switch (t0x) { int32_t t0off; case 0: /* ret */ t0x = T0_RPOP(); rp -= (t0x >> 16); t0x &= 0xFFFF; if (t0x == 0) { ip = NULL; goto t0_exit; } ip = &t0_codeblock[t0x]; break; case 1: /* literal constant */ T0_PUSHi(t0_parse7E_signed(&ip)); break; case 2: /* read local */ T0_PUSH(T0_LOCAL(t0_parse7E_unsigned(&ip))); break; case 3: /* write local */ T0_LOCAL(t0_parse7E_unsigned(&ip)) = T0_POP(); break; case 4: /* jump */ t0off = t0_parse7E_signed(&ip); ip += t0off; break; case 5: /* jump if */ t0off = t0_parse7E_signed(&ip); if (T0_POP()) { ip += t0off; } break; case 6: /* jump if not */ t0off = t0_parse7E_signed(&ip); if (!T0_POP()) { ip += t0off; } break;g case {0}: {{ /* {1} */ {2} }} break;? } } else { T0_ENTER(ip, rp, t0x); } } t0_exit: ((t0_context *)t0ctx)->dp = dp; ((t0_context *)t0ctx)->rp = rp; ((t0_context *)t0ctx)->ip = ip; }5code length: {0,6} byte(s)5data length: {0,6} byte(s)Gtotal words: {0} (interpreted: {1})'No such word: '{0}'"`0x0X0b0BEinvalid literal integer (overflow)!not an integer: /Not in compilation mode%{0:X2}%{0:X2}%{0:X2}+%{0:X2}%{0:X2}%{0:X2}*/ %2A/5EOF reached (missing name)1C code already set for: ?EOF reached (missing min value)?EOF reached (missing max value)-min/max in wrong order;EOF reached (while compiling)(7Invalid stack effect syntax'Not a string: '{0}'Not compiling'No word defined yet5Address is not a data area+No current data block3Byte value out of range: %No next word (EOF)/No next character (EOF)3Cannot add '{0}' to '{1}'C-only word: +'{0}' is not a string9No coroutine in compile mode'Invalid shift count {0})value is not an xt: {0}+{1}MCannot evaluate C-expr at compile time+(uint32_t)({0}) + {1}+(uint32_t)({0}) - {1} null <'{0}>?control-flow stack is not emptynot an origin#not a destinationno such local: 5local already defined: {0}Acannot run '{0}' at compile-timeCWord does not yield code elementsCcircular reference in blobs ({0})Ydata word '{0}' based on non-data word '{1}'yIn word '{0}', offset {1}: stack action mismatch ({2} / {3})9recursive call detected in 'ecall from '{0}' to '{1}' with unknown stack effects'{0}': exit stack action mismatch: {1} / {2} (offset {3})word '{0}': computed stack effect {1} does not match declared {2}{"6DQBO  h 8t,|tX  |xx$`\8      AAE     M         U Y Y ee ]  uy| }xy|  ||e| y $ | |$e$ $$$   y           8            h        \        8, t tt tt t , ( | |\ $\    pdpdhXX  X1\ e 1  X X X  X    |(88t|  Q|||||e|| $||$e$$$||||  || e$$  ye  $$ || t t      (tttd ttdd tt t t  ttt |XtXt| ttd| t \( t ` $ $ \    |  `  ptttttttt ttttttt t X 8 8 p \X | $  \$ \$ 8 8 \8|88|$88$    8|XXXX \ \X  ( (( (($((|( (X(\(8TWrapNonExceptionThrowsz\V4H3^3 P3_CorExeMainmscoree.dll% @0HX@4VS_VERSION_INFO?DVarFileInfo$TranslationStringFileInfo007f04b0Comments $CompanyName ,FileDescription 0FileVersion0.0.0.00InternalNameT0Comp(LegalCopyright ,LegalTrademarks @ OriginalFilenameT0Comp.exe$ProductName (ProductVersion 0 p3