NNNNNNap NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNM8O`͠  @`! #@%`')+-/1 3@5`79;=?A C@E`GIKMOQ S@U`W[]_a c@e`gikmoq s@u`wy{} @` O ` @ `  @ ` @ ` ǀ ɠ O ` ׀ ٠  @` @`Aa   !Aa/#A%a')+1!379;?A!CAEaGIKMOQ!SAUaWY[]_a!Oeagikmoq!sAoyO`͠  @`! #@%`')+-/1 3@5`79;=?A C@E`GIKMOQ S@U`W[]_a c@e`gikmoq s@u`wy{} @` O ` @ `  @ ` @ ` ǀ ɠ O ` ׀ ٠  @` @`Aa   !Aa/#A%a')+1!379;?A!CAEaGIKMOQ!SAUaWY[]_a!Oeagikmoq!sAoyC_LIB ֕AS TTPE NCC TTPHeDESKTOP INFNYFLIB A OZ-MAKEFILE UwMK TTPVQOSBIND H Y}STDIO H [TTP S ]PUE TTP`xC_UTILS 5:README_DOCc+AS DOCnjAUTODISKDOCuAUTODISKPRGwETERNAL2DOC"{ETERNAL2PRG$}. .. FMTIO C ؕ.GEM A ەjeGEM C `PGEM H OLIB C o9LIB DOCU MAKEFILE  wMATH C !OSBIND H (}PRG S -SETJMP H .STDIO H /STR C 0TTP S 4P/* C library - printf/scanf guts */ #define FILE char #define EOF -1 #define EOS 0 #define NULL 0L /* printf's (see below for the guts) */ char *_dopf(); fprintf(fp, fmt, args) FILE *fp; char *fmt; int args; { extern char _pfb[256]; _dopf(_pfb, fmt, &args); return fputs(_pfb, fp); } printf(fmt, args) char *fmt; int args; { extern char _pfb[256]; extern FILE *stdout; _dopf(_pfb, fmt, &args); return fputs(_pfb, stdout); } /* scanf routines */ fscanf(f, fmt, args) FILE *f; char *fmt; int *args; { extern char *_sfcp; extern FILE *_sffp; _sffp = f; _sfcp = NULL; return _dosf(fmt, &args); } scanf(fmt, args) char *fmt; int *args; { extern char *_sfcp; extern FILE *_sffp, *stdin; _sffp = stdin; _sfcp = NULL; return _dosf(fmt, &args); } sscanf(s, fmt, args) char *s; char *fmt; int *args; { extern char *_sfcp; extern FILE *_sffp; _sffp = NULL; _sfcp = s; return _dosf(fmt, &args); } /* the guts of the scanf's */ _dosf(fmt, args) char *fmt; int **args; { int assigned, wid, lng, skip, *ip, f, c, m, base; extern char _pfb[1]; long n, *lp, atof(); char *cp; assigned = 0; c = _sfget(); while ((f = *fmt++) && c != EOF) { if (f <= ' ') { /* skip spaces */ while (c <= ' ' && c != EOF) c = _sfget(); } else if (f != '%') { /* match character */ if (c != f) return assigned; c = _sfget(); } else { wid = lng = skip = 0; if ((f = *fmt++) == '*') { /* skip assignment */ skip++; f = *fmt++; } while (f >= '0' && f <= '9') { /* width of value */ wid = wid * 10 + f - '0'; f = *fmt++; } if (f == 'l') { /* long */ lng++; f = *fmt++; } else if (f == 'h') { /* short */ f = *fmt++; } switch (f) { /* conversion spec */ case '%': if (c != '%') return assigned; c = _sfget(); break; case 'c': if (wid == 0) { cp = *args++; if (!skip) { *cp = c; assigned++; } c = _sfget(); break; } case 's': cp = *args++; while (c <= ' ' && c != EOF) c = _sfget(); while (c > ' ' && c != EOF) { if (!skip) *cp++ = c; c = _sfget(); if (--wid == 0) break; } *cp = 0; if (!skip) assigned++; break; case 'D': case 'X': case 'O': lng = 1; f = f - 'A' + 'a'; case 'd': case 'x': case 'o': base = (f == 'x' ? 16 : f == 'o' ? 8 : 10); n = 0L; while (c != EOF && c <= ' ') c = _sfget(); if ((m = _sfnum(c, base)) < 0) return assigned; do { n = n * base + m; c = _sfget(); m = _sfnum(c, base); if (--wid == 0) break; } while (m >= 0); if (m >= 0) c = _sfget(); if (!skip) { if (lng) { lp = *args++; *lp = n; } else { ip = *args++; *ip = n; } assigned++; } break; case 'e': case 'f': case 'E': case 'F': while (c <= ' ' && c != EOF) c = _sfget(); if (!_sfflt(c)) return assigned; for (cp = _pfb; _sfflt(c); ) { *cp++ = c; c = _sfget(); } *cp = 0; if (!skip) { lp = *args++; *lp = atof(_pfb); assigned++; } break; default: return assigned; } } } return f == 0 ? assigned : EOF; } _sfnum(c, base) { if (c >= '0' && c <= '9') return c - '0'; else if (base == 16 && c >= 'a' && c <= 'f') return c - 'a' + 10; else if (base == 16 && c >= 'A' && c <= 'F') return c - 'A' + 10; else return -1; } _sfflt(c) { /* pretty lame parser for float numbers, but so it goes */ if (c >= '0' && c <= '9') return 1; if (c == '+' || c == '-' || c == '.') return 1; if (c == 'e' || c == 'E') return 1; return 0; } _sfget() { extern char *_sfcp; extern FILE *_sffp; if (_sffp) return getc(_sffp); if (_sfcp && *_sfcp) return *_sfcp++; return EOF; } char *_sfcp; /* char pointer for scanf input string */ FILE *_sffp; /* FILE pointer for scanf input stream */ /* guts of the printf stuff */ #define MINUSFLG 1 #define PLUSFLG 2 #define BLANKFLG 4 #define POUNDFLG 8 #define ZEROFLG 16 #define LONGFLG 32 #define SIGNFLG 64 #define LOWERFLG 128 #define MAXINT 32767 char _pfb[256]; /* in case someone needs a buffer */ sprintf(buf, fmt, args) char *buf, *fmt; int args; { return _dopf(buf, fmt, &args) - buf; } char *_numcnv(), *_fltcnv(); char * _dopf(buf, fmt, i_p) char *buf, *fmt; int *i_p; { char c, **s_p, *s; long strtol(); int i, lng, precision, minfldw, flags; for (c = *fmt; ; c = *++fmt) { /* scan to next conversion specification */ while (c != '%') { *buf++ = c; if (c == EOS) { return buf - 1; } c = *++fmt; } c = *++fmt; /* scan flags */ for (flags = 0; ; c = *++fmt) { if (c == '-') flags |= MINUSFLG; else if (c == '+') flags |= PLUSFLG; else if (c == ' ') flags |= BLANKFLG; else if (c == '#') flags |= POUNDFLG; else break; } /* scan minimum field width */ if (c == '*') { minfldw = *i_p++; c = *++fmt; } else { if (c == '0') flags |= ZEROFLG; minfldw = (int)strtol(fmt, &fmt, 10); c = *fmt; } /* scan precision */ precision = -1; if (c == '.') { c = *++fmt; if (c == '*') { precision = *i_p++; c = *++fmt; } else { precision = (int)strtol(fmt, &fmt, 10); c = *fmt; } } if (c == 'l') { flags |= LONGFLG; c = *++fmt; } switch (c) { case 'd': buf = _numcnv(buf, 10, flags | SIGNFLG, &i_p, precision, minfldw); break; case 'o': buf = _numcnv(buf, 8, flags, &i_p, precision, minfldw); break; case 'u': buf = _numcnv(buf, 10, flags, &i_p, precision, minfldw); break; case 'x': flags |= LOWERFLG; case 'X': buf = _numcnv(buf, 16, flags, &i_p, precision, minfldw); break; case 'f': buf = _fltcnv(buf, 'f', flags, &i_p, precision, minfldw); break; case 'e': flags |= LOWERFLG; case 'E': buf = _fltcnv(buf, 'E', flags, `K,O .#SOSNASR /N RJ@f A t /ASR /N,`/.NA`/.A /N9(N^Nurcan't opencan't open %s NV/.ND=@0. @ n$0. @g/.ND=@`p=@0. @ o:0. @g.0. n 2.RnH/.ND=@`p n 2.H09J@g/. A ^ /N9(0.N^NuN^Nu%s NVAS* -@/ 9St/N p =@p=@ n -fp`p=@J@g .R`: n 0f,p=@ .R n xfp=@ .Rp-@ .R @H=@J@g .2.H//NI-@0. @0m&0. @9n .2.t0BHЁ-@`f0. @Am*0. @Fn .2.tABt BHЁ-@`20. @am&0. @fn .2.taBt BHЁ-@`60.J@g .D` .N^NuN^NuNVAS4 / 9St/N ?<AS4 /N-ZN^NuN^NuNVN =@p?Az2."0 AN^NuNV09J@g/.AX /N9(Af //.NA#StrHfpN^Nu .#Spp3S09=@AS / 9St/N J@gX09SRySAS H=@H`N|`*AS4 / 9St/N 09J@fp`p?AS4 /N-Z=@09J@g,0. @gAF0.H0 ugp`p=@09J@g40.J@g*Az0. 0/Ah /N9(0.J@fAF0.H0 ug*Ar /Az0. 0/N,0. @:f8ptAF2.H 9S"9SЁA.2.!`fN b-@pdAF2.H 9SA.2.! 9S".Ё#S 9SrHJg 9SRS`r0.J@fBAS pH0H?AS pH0H?AS pH0H?N`$ :g .g !g`` 9St/NApN^NuN^Nuassemble %s rskip %s mul declNV 9St/ND=@ @ g00. @f A /A /N,`N^Nupremature EOFNV0.H`*?. ?. N`?. N`?. ?. Nn`?. ?. N$(`N b=@ N b=@ A0. 00?N3?. N0`T?. ?. N%0`>?. ?. N`(?. ?. N``?. ?. N)`?. ?. N(`?. ?. N*`N b=@ 0. D@"9S A"91N2r`?. ?. N `?. N`z?. ?. N`dN b=@ 0. @m$A /A /N,` 9SA$2. !`N b=@ ?. N1`N b=@ ?. N3"`N (`N-(` ?g $g %g *g: ig ag og eg mg tgf xgF rg& cg sg bg pgx jgX =g< lg`6N^Nuout of labelsNV0.H`~?<N ?N/`N =@N b=@?.?.N/`\N b=@?.N/P`@N b=@?.N3`$ $g +g .gh`N^NuNVN b=@N b=@p=@0. @n,`0.Rn`0.r4.iAf``0.H`0N b=@N b=@0.rA2.t iA2.A?N3`0. @ofN b=@N b=@N b=@0.J@g80.r(A2.t iA2.A?N3?.N3`&0.rA2.t iA2.A?N3`t0. @xfbN b=@N b=@N b=@0.r0A2.t iA2.A?N30<2.t iA?N3`N-(N^NuNV0.H`B?`A0.002.t iA2.tiA2.A?N3`L g g gp g* g g g `|`n0. @uf\A0.002.tiA2.A?N30. @f?<N3?<N3`N-(N^NuNV0.H`0N b=@?. N+=@0.2<A2.A?N3`0. @df*N b-@?<?</.?. N+6 `0. @lf>N b=@?. N+2<.A?N3?.N3`>0. @of,N b=@?0. @ f2p-".R A?. . D//.N; -@` .2.He2?. .2.H//NJ//.N; -@ .2.H//NJ$-@ . e .r HrAHЁ` .r0HЁ".R A .N^NuN^NuNV . fA? /NA`pN^Nu .-@ np 0 nr"0Ё nr"0Ё2<HЁ-@/./.?<?<JNA Jg?f .rHЁ-@`.09" @2l .A$29"Ry"!`pA$29"!N? .Jg:A? //. 9 /NB f/.N@ .Jg n >g>A? //. 9$/NB f/.N@`@A? /R ./ 9$/NB f/.N@ 9/A$ /09"?N =@ .Jg 9 /NA .Jg 9$/NA?.NAJN^Nunull tpa ycrwaNVp=@0. @lZ`0.Rn`pA2.ApA2.A1@A2.A1@`ApA # p"9 A@ApA #$p"9$ A@ApA #(p"9( A@p"9 Ap"9( A"9$ AN^NuNVAA6 /NA`/.NA`AAF /NA`?<NAJN^Nucan't redirect NV?.?<LNAN^NuNV nJg .R @H??<NA`N^NuNV . gR nrHA @f/.NG n( o n(H??<>NAp nN^NuNVp=@0. @l2A0.A g`0.Rn``0. @mpN^Nu/. /.A0.A /NB N^NuN^NuNVADj //. NH" @fp=@p=@`RADp //. NH" @fp=@p=@`"ADv //. NH" @fp=@p=@` n wf"?</. ?<0$0 00&  "<$  $ F & "  $ .( $  4 ..h$$ $J "$@  8<     0* & &^ $,$4 V$"N X * & .D     2 d2 2  4&(&   @ *$ (@*( 4Z&   "&    J4d r "  L     RJ""^"`,O .#ONLNV0. @f8AL /NA /N?<NNA -@p=@0.2.Al* n 0. 0 @ -f`0.Rn` n 0. 0 @pH0H=@H`p3`A //. N/N`A //. N/N`|A //. N-@`^?.A /N`B Og og Ig DgT Xg> xg4``A //.Nͨ#0.2.AlRA / n 0. 0/Nͨ/ n 0. 0/NT0.Rn` 9/NB09N^NuN^Nucc - version 2.0 - copyright 1987 - Mark A. Johnson usage: cc [-D define] [-I dir] [-o outfile] cfiles yc.outbad option -%c wrNV n 0=@ n0. 0 @pH0 f nRn0. 0-@`" n0. 0 @pHA -@0. n 0 .N^NuN^NuNVp3 .# . rHgH . #N509 @eg?<NE$` 9/NB`/.A /NJNrN^Nucan't open %sNVp=@0. @l,`0.Rn`pA2.H!`?<?<Nq(3?<?<Nq(3?<?<Nq(3?<?<Nq(??<@?<Nq(3?<?<Nq(3N^NuNV0.29Ag?.?.?.N*=@?.?.N`R?N`*0.rA??.?.N`R?N0. J@f?.N N=@?.N_ @f0.rA=@?. ?.NR`0. @f8?.?.?. 0. J@fp`p??.NF =@ `0. @ f0. J@gJ?.?.?. ?. ?.NF =@ ?.?.?. ?. ?.NF =@ `v?.?.N?0. J@fp`p??.NF =@?.?.?. ?. ?.NF =@ ?.Nv?.N`0. @ f0. J@gz?.?.N?0. J@fp`p??.NF =@?.?.?. ?. ?.NF =@ ?.Nv?.N`F?.?.?. ?. ?.NF =@ ?.?.?. ?. ?.NF =@ 0. N^NuN^NuNV0. @fpN^Nu0. @fpN^Nu0. @fp N^Nu0. @fpN^Nu0. @fpN^Nu0. @ fpN^NuN^NuNVA0.00=@A0.rA00=@0. @f 0. @m0. @ npN^Nu0. @f0. @fpN^Nu0. @ fpN^Nu0. @ fpN^NupN^NuN^NuNV0. @l0. 298bAmA /NJA0.00=@A0.rA00=@A0.rA00=@A0.rA00=@?.N J@g?. ?. N??<?.NF =@?. pH/?<NxN=@?Nv?.Nv?. pH/?<Nx?.Nv09=@?.N?.N`0.H`0. @f 09`0. @f 09`09=@?.?.?. ?. ?.?.N`R?N4 p=@`z?. ?. ?<?. ?. ?.N l??.N(Z=@`@?. ?. ?.?.0. @fp`p?N =@`A /A /A /?.Nav=@?.?.N`p=@0. @f0.J@g?. ?.N|`60.J@gA /NJ`?. ?.N|0. @f p=@`?. ?. N~`0.J@g?. ?.?.N|X`l0.J@g@0. @f?. ?.NPp=@`?. ?.N~`$?. ?. ?.?.?.N5 =@`?. ?. ?.?.N&=@?.N`R=@J@g ?. ?. ?. ?.Nw`@?. ?. ?. N}00. @f p=@`?. ?. N~`?. ?. ?.N%=@?.N`R=@J@g ?. ?<?. ?.Nz`*0. @f p=@`?. ?. N~`?. ?. ?.?.?.?.N =@`n0. @fp`p??.?. ?. ?.N#F =@`6?. ?.N{V09=@0. @f p=@`?. ?. N~`?<?. ?. ?.N l=@?.N_J@g,0. @f p=@`A /NJ?. ?.?.N`R?Ny`l?. ?. ?.N-=@0. @f p=@`?. ?. N~`&A /A /A /?. ?. ?.N/=@A0.00 @f.?. ?.?.?.?. N{ 09=@`?.N`R=@J@g ?. ?.?. ?.Nz`J0.J@g?. ?.?. N}n0. @f p=@`?. ?. N~`,?. ?. N??<?.NF =@?<?. ?. ?.N l=@N=@?Nv?.Nv?<?. ?. ?.N l=@?.Nv?.N?.N`x0.=@?<?. ?. ?.N l=@?`0.Rn`0.2.Al0.2.A=@0.rh=@`0.J@g?.N?.N,=@p=@0.298^Al`0.Rn`A70.H0JglA720.00?N`R=@0. @lp=@A70.00?A70.H0H??.N`r0.N^NuN^NuNV0.J@g?.Nw0. @o?. ?<Npp=@p=@p=@0. @lL`0.Rn`0.2. Am0.2.Af0.2.A=@0.rh=@`p=@0. @l>`0.Rn`0.2. Al0.2.A=@0.rh=@`0.J@g?.Np=@0.298^Al`0.Rn`A70.H0JglA720.00?N`R=@0. @lp=@A70.H0H?A70.00??.NP`rN^NuNVA0.00 @f$0.J@g ?<?. ?. ?.N l=@A0.rA00=@A /A /A /?.Nav=@?.?.N%L=@?.?.N`p=@0.J@g?.?.?.N`<0.J@g?.?.?.Nl`?.?.?.N$0.J@f ?<?. ?. ?.N l=@`?. ?. ?.N-=@A0.rA00=@?.N`R=@0.J@g?. ?<?. ?.Nz?.?.N%L=@?. ?.?.N0.J@f?. ?<?. ?.Nz0.N^NuN^NuNVA0.00 @@f,A0.rA00?Ncv=@`:A0.00 @ fA% /NJ`p=@0. J@g 0.D@`0.N^NuN^Nubad incrNV?<?. ?. ?.N l=@A0.00H`=<<>>->P M A O E N L G S R a NVN609 @#f N`09 @sf>A60900?N6J@g09?N`609 @zf`$09 @efNJ@g```b09N^NuN^NuNV0. @g0. @fp`pN^NuN^NuNV09LJ@g09L3 9N#3AR /A /NNp3L09J@g009?A /09?A< /N 09N^NuN=@ @mP0.A2.RnH 92.H//Nd2.HЁ#NA=@`0. @.g0. @eg0. @Ef?.?.NC`v0. @Lg0. @lf&0.A2.RnHpl3`?.NApA2.H 9 e pl3 93`09 @sf?.N=J@g(0.A2.RnHNA=@`pA2.H?.NAA /N3#`09 @'fvNA?N>H#3NA @'gA<& /NJ09?A<6 /A /NĮ pn3`~09 @"f0953#A095HA A|295Ry5!p"3NA=@ @"g=@ @g0.A295Ry5H`pA295Ry5H095 @mA<: /N095 @mA @m(0.A2. Rn HNA=@`0. @eg0. @Ef0.A2. Rn HNA=@0. @+g0. @-f$0.A2. Rn HNA=@?< ?.N> @m(0.A2. Rn HNA=@`pA2. H?.NAA /Np#3pf3N^NuNV0. @f p3#NJp=@NKD=@ @f,0. @g 0.J@g09=@`pN^Nu09 @;gp=@0. @g0. @f09 @:f`p3$0. @fp`p?A /?A|09 0/??. A*H0.00?NZA30.00=@`0.J@g?<}N`AZ /NJ`09 @{f8N5A /A /Nr~=@?<}N` A /A /Nr~=@0. J@g /.?.?.?.N^6 `/.?.?.?.N\ `(`$ g4 g g`4N^Nucan't init bitfieldsNV?.NcvrH//N-@0. J@g /.?<?<?<IN^6 `" .SJg?<N`N^NuNVp=@0.29=Al`0.Rn`A9,0.00H`DA:0.00?Nv`NA:0.00=@A|0. 0/?A:0.00=@?.Nv\pA62.1` tg dg`p3=N^NuNV0. H` . f?. N`/.?. N` ?.N_J@g$0. @if/.N-@`4?.N_J@f 0. @ff/.N-@?.N`R=@0. @f .?ND`00. @f .?N`/.N`@?. N,`.`* sg fg ig agN^NuNV0.A9,29=10. A929=10. A:29=1 .A;29=!Ry=09= @dmA^ /NN^Nutoo many static local'sNV?<=Np3 09#=@N?NB=@?<?<?<?.N l=@?=@AgJ09gA -@p=@NA=@2.Agp`0.Rn`0.AeB2.H0. @:g0. @\f AgJ09gA -@`0.".R A`pAeB2.H n09g @mA /NJN^NuA /AeB /Nͨ-@rHfp=@0.29Al`0.Rn`AeB /Af0. 0/A /Adz /NĮA /Adz /Nͨ-@rHg`` .rHf$AeB /A /NJ` 9Ag"29g!09Ag229g1 9Ag:29g!p3 .#AgJ09gA #09gRygN^Nuincludes nested too deepr%s\%srcan't include %sNV09g @ox09gSyg 9/NBAg"09g 0#Ag209g003Ag:09g 0#pN^Nu`pN^NuN^NuNVN609 @nf09=@`A| /NJN609 @sf0A /Af #/NNN6`j09 @"f:09?NB./Af #/NNN6`$09 @zgA /NJ0.3N^Nubad #linebad #lineNVN6 @sgA^ /NJ09=@NA=@ @(gH?.NA?<09??.NSpAd*rH!N6`?<09??.NSp=@N609 @)gZ09 @sgAj /NJ09Ad*2.RnH!N6 @,fN6`pAd*2.H!0. @mAt /N0.A=29RyHN609H?<A=09HA /N"LA309 @'mA /NN^Nubad #definebad macrotoo many macro paramstoo many #define'sNVp=@=@09 @eg0. J@g09 @zf `t`l0. J@fb09 @(f0.Rn`H0. @f&09 @,g09 @)f ` `09 @)f 0.SnpH-@09H`0. J@gL09?Nz=@J@g0px n2.RnH0. n2.RnH`&09 n2.RnHA -@`p" n2.RnH09?NB.-@`N609 @zgAh /NJ`^09 n2.RnH`B \g "gx fg lg ng sg` .rHg .R @H=@J@g|0. @ lVp\ n2.RnH0.r`r0A n2.RnH0.rAr0A n2.RnH`0. n2.RnH`pp n2.RnHN6`fp n2.RnH0.N^NuN^Nubad line continueNVp=@Ad*0. 0Jg<`0.Rn`Ad*0. 02.Hf 0.N^Nu`pN^NuN^NuNVA=C0.01HA -@A60.00 @fp=@ .R @H=@Adz -@N6?<(N09 @)gv09 @egh0. @l\ .Ad*2.Rn! .H?</.N"LHЁ-@09 @,fN6`0.2.AgA /NJN^NuAeB //.N-@p n09J@g AeB /A /N .SAeB"c nH?NA`N^Numacro param count mismatch[def %s]NV .R @H=@J@g0.H` .R @H=@J@g0.". R A``p"". R A .R @H=@J@g00. @"fp\". R A0.". R A`p"". R A`: .R @H=@/. Ad*0. 0/N-@ `p=@A50.H0Jgv`0.rA=@`0.A52.H0HAfBA50.H0". R AA50.rAH0". R A``A50.H0 f0.". R A`B xg "g fgV lgL ngB sg8`p ". R A` . N^NuN^NuNVp=@N6 @#g.09 @efA /NJpN^Nu`N6A /NAJ@f6A /NAJ@fA /NAJ@g0.Rn`l0.J@g20. @f&A /NAJ@g pN^Nu`2A /NAJ@g0.Sn @fpN^Nu`N^Nupremature EOFifdefifndefifelseendifNV .rHg n fN^Nu .-@ nJg$ n =g` .R`` nJgp".R A`A -@/.N=@?<09??.NSpsA=29RyH .R @A=29RyHJg`pA=29RyHN^Nu1NV09 @ mA /NJ`^Af209HA Af29Ry! .R @Af229RyHJg`N^Nutoo many include directoriesNV nH=@=@A0. 0JgrA0. 0//.NA6J@g 0.N^Nu0.Rn0. @fp=@0.2.AfA /N`zAg09HA A2.! .R @Ag29RyHJg`pAg29RyHpA62.109 @'mA /N0.N^NuN^Nusymbol table fullsymbol space fullNVp3 N?NB=@?.NJ@g,A0.rAA -@ n -@`A /NJp-@ .N^NuN^Nunot a constantNV0. 3p3535333=N?.NvNuNf?Nu098`?NuNZNPNN^NuNVp=@0.295AlP`0.Rn`A|0. 0Jg$A|0. 0/?.Nb`p3535N^NuNVp=@0.29Al@`0.Rn`A0.H0JfA. /NJ`p3N^Nubad goto labelNVA /NAJ@gN5?<N=@?. ?.N>A /NAJ@gTN=@?Nv?.Nv?.NN5?. ?.N>0.=@?.Nv?.N`A$ /NAJ@g~N5N=@?Nv?<N=@?.?.N>?.Nv?.Nv?.N?.N`pA* /NAJ@gN5N=@?NvN=@N=@?.?.N>?.NvA. /NAJ@fA4 /NJN5?<N=@?.Nv?.Nv?.Nv?<;N?.N?.N?.N`ZA< /NAJ@gH0. @lAF /NJ?. NvN5?<;N`AV /NAJ@gH0. @lA\ /NJ?.NvN5?<;N`Ah /NAJ@g N`vAl /NAJ@g?. N`JAt /NAJ@g\N5 @;g6?<N=@?`N50.38^`~09 @;f N5`f09=@09 @sf2?<:NBJ@g?.?<NN5`?<N?<;NN^Nuifelsewhiledowhilebad docontinuecan't continuebreakcan't breakforswitchreturnasmbad asmgotoNVp=@0.29Al2A"0.002. Ag`0.Rn``0.29AfN0. A"2.1NA2.1pA2.H09Ry0.J@g6pA2.HA0.00?Nv` A0.00?NvN^NuNVN5?<(N09 @;g?<N?<;NN=@?Nv09 @;g?<N=@` N=@?<;N09 @)g\N=@?NvN=@?Nv?<N?.Nv?.Nv` 0.=@?<)N?.?.N>?.Nv?.Nv?.N?.N?.N?.NN^NuNV09=@N5?<N=@?`N5?.Nv?.Nv09=@092.AoH09SyAn0900?A609 0/N`0.2.Ag?.Nv?.Nv?.N?.N?.N0.Sn2.Ao$An0.00?N`N^Nucasetoo many case'sdefaultNV?<(N?.N=@?<)N0.N^NuN^NuNVp3 N=@09#=@0.J@g,?<?<N??<?.NF =@` ?<?<?<?.N l=@0.3#0.N^NuN^NuNVN?N=@09 @,f*N5N??.?<?<N=@0.N^NuN^NuNV?.NB=@09 @=f6N5N?N??.?< ?<N=@0.N^NuN^NuNV?.N=@09 @?fdN5N?NB=@?<:NN?NB=@?.?.?.?< ?<N =@0.N^NuN^NuNV?.N8=@09 @Of6N5N?N??.?< ?<N=@0.N^NuN^NuNV?.N=@09 @Af6N5N?N8??.?< ?<N=@0.N^NuN^NuNVN=@J@gN509 @=f8N5N=@?.?.?.?<?<N =@`LN=@N2.Ao?.N=@?.?.?.NP=@`^0.N^NuN^NuNV?. NJ@g?. NJ@gA0. rAA -@A0. rAA -@0. @mJ0. @ n> n / n /?.N< H/?<?<N=@ `& n / n /?.N n `?. NJ@gv?. NJ@gbA0. rAA -@A0. rAA -@ n / n /?.N n `$?. ?. ?.?<?<N =@ 0. N^NuN^NuNV0.H` . ".-@ `, . ".-@ ` . ".-@ ` . ".fp`pH-@ ` . ".gp`pH-@ ` . ".lp`pH-@ ` . ".op`pH-@ ` . ".np`pH-@ `h . ".mp`pH-@ `H . ".-@ `6 . ".-@ `$ . ".Ё-@ ` . ".-@ ` . ".//N-@ ` . ".//N-@ ` . ".//N-@ `` g g g gj gN g2 g g g g gn gD g g g g . N^NuN^NuNV0.H` . ".//NJfp`p=@` . ".//NJgp`p=@` . ".//NJlp`p=@` . ".//NJop`p=@` . ".//NJnp`p=@`n . ".//NJmp`p=@`B`> g g g\ g& g g0.N^NuN^NuNV0.H` . ".//Nֆ-@ ` . ".//N^-@ ` . ".//NX-@ `d . ".//NL-@ `FAt /NJ`. g g gr gJ` . N^NuN^Nubad float mathNVA0.00 @fp`pN^NuN^NuNVA0.00 @gA0.00 @fp`pN^NuN^NuNV09H`8 9/?<?<N=@N5` 9/?<?<N=@N5`n 9/?<?<N=@N5`F09??<?<N=@N5`N5NN&=@ @m6?<)NN??.?<?<N=@`N=@?<)N`N5N??< ?<N=@`N5N??<?<N=@`fN5N??<?<?<N=@`:N5N??<?<?<N=@`A` /NAJ@gN =@`Ah /NAJ@gxN5?<(N?<nN=@09 @,fN5N=@`p=@?.?.?<?<N=@N5`v09=@A60.00 @f2A0.00H/?<?<N=@`?.?<?<N=@N5`Nr=@N5N??.N=@`09?09?An /NJ` ~g !g -g sgT Mg Pg *g &g (g "g fg lg| ngJ`T09H`H?.?<?<?<N=@N5``?.?<?<?<N=@N5`8N??.?<?<N=@`N509 @)f p=@` N=@?.?.?<?<N=@N5`N509??.?<?<N=@?<sN`N509??.?<?<N=@?<sN`N0.N^Nu`B ag .gn (g [g Mg Pg``lN^Nusizeoftrap%c (%d) not a factorNVA0. 00H`A0. rAA -@0. @f n Jfp`p`"0. @f n D` n F nH `0. @f4A0. rAA -@ n  n `A /NJ`F?. ?.?<?<N=@ `$ g g g`0. N^NuN^Nubad float unaryNVN5N=@?<]N09 @[f N`p=@?.?.?<NN^NuN^NuNVN509 @(fBN5NN&=@ @lN?N=@?<)N`N?N=@?.Ncv-@ . oA /NJ/.?<?<NN^NuN^Nusize too bigNVA` -@p@ n.HH0Jg>09 n.HH0HAf.rHAN^Nu` .R.`pN^NuN^Nu|^&EN<>LGSR+-*/%NV09 @!fpN^Nu09 @-fpN^Nu09 @~fpN^NupN^NuN^NuNV09 =@0. A29 Ry 10. A29 Ry 10. @o 0.A29 Ry 10. @o 0.A29 Ry 109 @,mA /N0.N^NuN^Nuout of expr nodesNVp=@p=@0. @lx`0.Rn`A0.H0HH`8pA2.H0.N^Nu0. @l 0.=@`` g g`0. @m*?.NvpA2.H0.N^NuA~ /NJpN^NuN^Nuout of labelsNVpA2.HN^NuNVp=@0. @l(`0.Rn`pA2.H`N^NuNVA0.rA00=@A0.rA00=@A0.rA00=@A0.00H`609N^Nu09N^Nu09N^Nu09N^NuA /A /A /?.Nav0.N^Nu?.NN^Nu?.NN^Nu?.N=@A0.00 @@gA0.00 @ fA0.rA00=@A0.00 @`f A0.rA00N^Nu`A| /NJ`?.N=@A0.00 @@gA0.00 @ f A0.rA00N^Nu`AČ /NJ`z?.N=@?.N=@?.N`RH?.N`R"LAo 0.`0.N^Nu?<?<Nn=@A|0. 0/NԈH/?.?< ?<Nn N^Nu0.N^Nu?.N=@A0.00 @f?.?<@?<Nn=@A /A /A /A /?.?.NmFA0.00 @f 09=@0.N^NuA0.00?AĠ /NJ`` g$ g g g gB g g g g g g g g g g gV gB g. g g g g g`09N^NuN^Nunot a functionnot a pointer/arrayunknown X_%dNVA //. /.N\ .N^NuN^NuNVA //.A /N\ 9Մ/A /N,N^NuNVA //. A /N\ /.A /N,N^NuNV . R @H=@J@g0. @%f . R @H=@ @%f0.".R A`b0. @lg0. @sfH .-@ .X @ -@-@ .-@0. @lf . R @H=@` .T @0H-@0.H`A6 -@ .Jg& .R @ nJg .R``?< /./.NH -@`?</./.NH -@`n?</./.NH -@`P .".R A`<`8 cg og xg dgh sg,``0.".R A`8p nN^Nu(use real printf)NV . -@ . lL . g>0. @ f2p-".R A?. . D//.NH -@` .2.He2?. .2.H//N//.NH -@ .2.H//N-@ . e .r HrAHЁ` .r0HЁ".R A .N^NuN^NuNV . fA~ /NpN^Nu .-@ np 0 nr"0Ё nr"0Ё2<HЁ-@/./.?<?<JNA Jg?f .rHЁ-@`.09 @2l .A29Ry!`pA29!N˔ .Jg:Aˎ //. 9Հ/N0 f/.N̚ .Jg n >g>Aː //. 9Մ/N0 f/.N̚`@A˒ /R ./ 9Մ/N0 f/.N̚ 9L/A /09?N =@ .Jg 9Հ/NB .Jg 9Մ/NB?.NN^Nunull tpa ycrwaNVp=@0. @lZ`0.Rn`pAP2.ApAP2.A1@AP2.A1@`APpA #Հp"9Հ A@APpA #Մp"9Մ A@APpA #Ոp"9Ո A@p"9Հ Ap"9Ո A"9Մ AN^NuNVA /N/.NA /N?<NN^Nucan't redirect NV?.?<LNAN^NuNV nJg .R @H??<NA`N^NuNV . gR nrHA @f/.Nd n( o n(H??<>NAp nN^NuNVp=@0. @l2AP0.A g`0.Rn``0. @mpN^Nu/. /.AP0.A /N0 N^NuN^NuNVA //. N @fp=@p=@`RA //. N @fp=@p=@`"A& //. N @fp=@p=@` n wf"?</. ?< n 9n0` .R`0.r nt0HBA=@`0.J@g 0.D@=@0. @od .rHrHr@H=@ ."<-@ .r //Nd/?.?.Nސ-@0.Sn`0. @ld .rHrHr@H=@ ."<-@ .r //N/?.?.Nސ-@0.Rn` .N^NuN^NuNV . f pN^Nu`j . "<Jg( . rH". tH‚Ё-@ 0. Rn ` . "< f . rH-@ 0. Sn `0. @@m2A߰ /N0.HrH"<N^Nu`(0. @lA /NpN^Nu0.HrH2. t@BHtH‚tH婀". $<‚N^NuN^Nufloat overflow float underflow NV nJg .R @H??<NA`N^NuNVp=@ . l0.Rn .D-@ . l0.Rn . D-@ /. /.Nd-@0.rAJ@g .D` .N^NuN^NuNVp=@ . l0.Rn .D-@ . l0.Rn . D-@ ?</. /.N -@0.rAJ@g .D` .N^NuN^NuNV . l .D-@ . l . D-@ ?</. /.N N^NuN^NuNVp-@ .Jg: .rJgA ". Ё A r A r ` .N^NuN^NuNV?</. /.N N^NuN^NuNV?</. /.N N^NuN^NuNVp=@p-@ . Jg .". c, . "<Jf0.RnA r ` .". eA ". .R0. @f`&0.SnA r A r `0.J@g .` .N^Nu` 0.rHN^Nu  t   R    @       8   : >L  (*, $( &><" ", """   $ " ,8., ($,""$($,&8 (&  ,2. $$( &"  "@ ^H"$$@,"4 &    &  JP^$&:**D " " 0"    , 46$$$($ R" V$6 * $( <"& ,"6" 0. ,( P$(&  ^48 2  PF&"&2  26"    202 F(^4P >      $&:*              jLx.< B*$ " r &  * "    0*& " (,(8*& ( 4 &&4L  D    8           Hf  0 @ 8J" 8:@ F & 6<  " ( (V( (H 0*   F .  " .h .*" N. R  $   N $          6        Z&  , ,$ X  &&&.  , b "              * 2 . ( * 0 . & $ $ , 2 * 0 2 & " " & * , 4 & * * & & & * * ( & &  * & * & $ $ "  & *    $       r*         >   \    "  4 "8((.  "  .  D       "       \ &B$ F(82 &   .(    2    L@  @* 4                                   4               8 """ """ &H&0(t,,,,, Z..         $      x2 T  $(\" T\  (< &  .&6  T&    J4d r "  L     RJ""^ &:Z 2 rz"#a020001 #b000000 #c7770007000600070055200505552220770557075055507703111103 #d #E 80 02 #W 00 00 28 01 22 17 09 D:\*.*@ #W 00 00 08 01 1F 17 08 A:\*.*@ #W 00 00 0E 09 2A 0B 00 @ #W 00 00 0F 0A 2A 0B 00 @ #M 00 02 00 FF D RAM DISK@ `@ #M 00 00 00 FF A FLOPPY DISK@ @ #M 00 01 00 FF B FLOPPY DISK@ @ #T 00 03 02 FF TRASH@ @ #F FF 04 @ *.*@ #D FF 01 @ *.*@ #G 03 FF *.APP@ @ #G 03 FF *.PRG@ @ #F 03 04 *.TOS@ @ #P 03 04 *.TTP@ @ #G 03 04 BASIC.PRG@ *.BAS@ #P 03 04 COMMAND.TOS@ *.BAT@ : fprintf csv lal 16 0 tad 0 0 phl 0 pll 12 lag _pfb 0 tad 0 0 phl 0 jsr _dopf pop 12 pll 8 lag _pfb 0 tad 0 0 phl 0 jsr fputs pop 8 ret ret efn 0 : printf csv lal 12 0 tad 0 0 phl 0 pll 8 lag _pfb 0 tad 0 0 phl 0 jsr _dopf pop 12 lgl stdout 0 phl 0 lag _pfb 0 tad 0 0 phl 0 jsr fputs pop 8 ret ret efn 0 : fscanf csv lll 8 0 sgl 0 _sffp ldl 0 0 sgl 0 _sfcp lal 16 0 tad 0 0 phl 0 pll 12 jsr _dosf pop 8 ret ret efn 0 : scanf csv lgl stdin 0 sgl 0 _sffp ldl 0 0 sgl 0 _sfcp lal 12 0 tad 0 0 phl 0 pll 8 jsr _dosf pop 8 ret ret efn 0 : sscanf csv ldl 0 0 sgl 0 _sffp lll 8 0 sgl 0 _sfcp lal 16 0 tad 0 0 phl 0 pll 12 jsr _dosf pop 8 ret ret efn 0 : _dosf csv ldw 0 0 slw 0 -2 jsr _sfget slw 0 -16 * 0 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 tsw 0 brc 4 1 llw -16 0 cdw 0 -1 brc 4 1 llw -14 0 cdw 0 32 brc 7 2 * 3 llw -16 0 cdw 0 32 brc 7 4 llw -16 0 cdw 0 -1 brc 4 4 jsr _sfget slw 0 -16 jmp 3 * 4 jmp 5 * 2 llw -14 0 cdw 0 37 brc 4 6 llw -16 0 llw -14 1 cmw 0 1 brc 4 7 llw -2 0 ret * 7 jsr _sfget slw 0 -16 jmp 8 * 6 ldw 0 0 slw 0 -8 slw 0 -6 slw 0 -4 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 cdw 0 42 brc 5 9 llw -8 0 ilw 1 -8 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 * 9 * 10 llw -14 0 cdw 0 48 brc 6 11 llw -14 0 cdw 0 57 brc 7 11 llw -4 0 ldw 10 1 obw 14 1 0 llw -14 1 ldw 48 2 obw 13 2 1 obw 12 1 0 slw 0 -4 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 jmp 10 * 11 llw -14 0 cdw 0 108 brc 5 12 llw -6 0 ilw 1 -6 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 jmp 13 * 12 llw -14 0 cdw 0 104 brc 5 14 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 * 14 * 13 llw -14 0 xtw 0 jmp 15 * 17 llw -16 0 cdw 0 37 brc 4 18 llw -2 0 ret * 18 jsr _sfget slw 0 -16 jmp 16 * 19 llw -4 0 cdw 0 0 brc 5 20 lll 12 0 ill 4 12 tda 0 0 lol 0 0 0 sll 0 -32 llw -8 0 tsw 0 brc 5 21 llw -16 0 lla -32 0 sob 0 0 0 llw -2 0 ilw 1 -2 * 21 jsr _sfget slw 0 -16 jmp 16 * 20 * 22 lll 12 0 ill 4 12 tda 0 0 lol 0 0 0 sll 0 -32 * 23 llw -16 0 cdw 0 32 brc 7 24 llw -16 0 cdw 0 -1 brc 4 24 jsr _sfget slw 0 -16 jmp 23 * 24 * 25 llw -16 0 cdw 0 32 brc 8 26 llw -16 0 cdw 0 -1 brc 4 26 llw -8 0 tsw 0 brc 5 27 llw -16 0 lll -32 1 ill 1 -32 tda 1 0 sob 0 0 0 * 27 jsr _sfget slw 0 -16 ilw -1 -4 llw -4 0 cdw 0 0 brc 5 28 jmp 26 * 28 jmp 25 * 26 ldw 0 0 lla -32 0 sob 0 0 0 llw -8 0 tsw 0 brc 5 29 llw -2 0 ilw 1 -2 * 29 jmp 16 * 30 * 31 * 32 ldw 1 0 slw 0 -6 llw -14 0 ldw 65 1 obw 13 1 0 ldw 97 1 obw 12 1 0 slw 0 -14 * 33 * 34 * 35 llw -14 0 cdw 0 120 brc 5 36 ldw 16 0 jmp 37 * 36 llw -14 0 cdw 0 111 brc 5 38 ldw 8 0 jmp 39 * 38 ldw 10 0 * 39 * 37 slw 0 -20 ldl 0 0 sll 0 -24 * 40 llw -16 0 cdw 0 -1 brc 4 41 llw -16 0 cdw 0 32 brc 7 41 jsr _sfget slw 0 -16 jmp 40 * 41 plw -20 plw -16 jsr _sfnum pop 4 slw 0 -18 cdw 0 0 brc 9 42 llw -2 0 ret * 42 * 43 lll -24 0 llw -20 1 xtw 1 phl 1 phl 0 jsr _lmul pop 8 llw -18 1 xtw 1 obl 12 1 0 sll 0 -24 jsr _sfget slw 0 -16 plw -20 plw -16 jsr _sfnum pop 4 slw 0 -18 ilw -1 -4 llw -4 0 cdw 0 0 brc 5 46 jmp 44 * 46 * 45 llw -18 0 cdw 0 0 brc 6 47 jmp 43 * 44 * 47 llw -18 0 cdw 0 0 brc 6 48 jsr _sfget slw 0 -16 * 48 llw -8 0 tsw 0 brc 5 49 llw -6 0 tsw 0 brc 4 50 lll 12 0 ill 4 12 tda 0 0 lol 0 0 0 sll 0 -28 lll -24 0 lla -28 0 sol 0 0 0 jmp 51 * 50 lll 12 0 ill 4 12 tda 0 0 lol 0 0 0 sll 0 -12 lll -24 0 lla -12 0 sow 0 0 0 * 51 llw -2 0 ilw 1 -2 * 49 jmp 16 * 52 * 53 * 54 * 55 * 56 llw -16 0 cdw 0 32 brc 7 57 llw -16 0 cdw 0 -1 brc 4 57 jsr _sfget slw 0 -16 jmp 56 * 57 plw -16 jsr _sfflt pop 2 tsw 0 brc 5 58 llw -2 0 ret * 58 lag _pfb 0 tad 0 0 sll 0 -32 * 59 plw -16 jsr _sfflt pop 2 tsw 0 brc 4 60 llw -16 0 lll -32 1 ill 1 -32 tda 1 0 sob 0 0 0 jsr _sfget slw 0 -16 jmp 59 * 60 ldw 0 0 lla -32 0 sob 0 0 0 llw -8 0 tsw 0 brc 5 61 lll 12 0 ill 4 12 tda 0 0 lol 0 0 0 sll 0 -28 lag _pfb 0 tad 0 0 phl 0 jsr atof pop 4 lla -28 0 sol 0 0 0 llw -2 0 ilw 1 -2 * 61 jmp 16 * 62 llw -2 0 ret jmp 16 * 15 cse 70 55 cse 69 54 cse 102 53 cse 101 52 cse 111 35 cse 120 34 cse 100 33 cse 79 32 cse 88 31 cse 68 30 cse 115 22 cse 99 19 cse 37 17 jmp 62 * 16 * 8 * 5 jmp 0 * 1 llw -14 0 cdw 0 0 brc 5 63 llw -2 0 jmp 64 * 63 ldw -1 0 * 64 ret ret efn 32 : _sfnum csv llw 8 0 cdw 0 48 brc 6 0 llw 8 0 cdw 0 57 brc 7 0 llw 8 0 ldw 48 1 obw 13 1 0 ret jmp 1 * 0 llw 10 0 cdw 0 16 brc 5 2 llw 8 0 cdw 0 97 brc 6 2 llw 8 0 cdw 0 102 brc 7 2 llw 8 0 ldw 97 1 obw 13 1 0 ldw 10 1 obw 12 1 0 ret jmp 3 * 2 llw 10 0 cdw 0 16 brc 5 4 llw 8 0 cdw 0 65 brc 6 4 llw 8 0 cdw 0 70 brc 7 4 llw 8 0 ldw 65 1 obw 13 1 0 ldw 10 1 obw 12 1 0 ret jmp 5 * 4 ldw -1 0 ret * 5 * 3 * 1 ret efn 0 : _sfflt csv llw 8 0 cdw 0 48 brc 6 0 llw 8 0 cdw 0 57 brc 7 0 ldw 1 0 ret * 0 llw 8 0 cdw 0 43 brc 4 2 llw 8 0 cdw 0 45 brc 4 3 llw 8 0 cdw 0 46 brc 5 1 * 3 * 2 ldw 1 0 ret * 1 llw 8 0 cdw 0 101 brc 4 5 llw 8 0 cdw 0 69 brc 5 4 * 5 ldw 1 0 ret * 4 ldw 0 0 ret ret efn 0 : _sfget csv lgl _sffp 0 tsl 0 brc 4 0 lgl _sffp 0 phl 0 jsr getc pop 4 ret * 0 lgl _sfcp 0 tsl 0 brc 4 1 lgl _sfcp 0 tda 0 0 lob 0 0 0 tsb 0 brc 4 1 lgl _sfcp 0 igl 1 _sfcp tda 0 0 lob 0 0 0 xtb 0 ret * 1 ldw -1 0 ret ret efn 0 . _sfcp 4 . _sffp 4 . _pfb 256 : sprintf csv lal 16 0 tad 0 0 phl 0 pll 12 pll 8 jsr _dopf pop 12 lll 8 1 obl 13 1 0 ret ret efn 0 : _dopf csv lla 12 0 lob 0 0 0 slb 0 -2 * 0 jmp 2 * 3 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 jmp 0 * 2 * 4 llb -2 0 cdb 0 37 brc 4 5 llb -2 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 llb -2 0 cdb 0 0 brc 5 6 lll 8 0 ldw 1 1 xtw 1 obl 13 1 0 ret * 6 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 jmp 4 * 5 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 ldw 0 0 slw 0 -20 * 7 jmp 9 * 10 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 jmp 7 * 9 llb -2 0 cdb 0 45 brc 5 11 llw -20 0 ldw 1 1 obw 1 1 0 slw 0 -20 jmp 12 * 11 llb -2 0 cdb 0 43 brc 5 13 llw -20 0 ldw 2 1 obw 1 1 0 slw 0 -20 jmp 14 * 13 llb -2 0 cdb 0 32 brc 5 15 llw -20 0 ldw 4 1 obw 1 1 0 slw 0 -20 jmp 16 * 15 llb -2 0 cdb 0 35 brc 5 17 llw -20 0 ldw 8 1 obw 1 1 0 slw 0 -20 jmp 18 * 17 jmp 8 * 18 * 16 * 14 * 12 jmp 10 * 8 llb -2 0 cdb 0 42 brc 5 19 lll 16 0 ill 2 16 tda 0 0 low 0 0 0 slw 0 -18 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 jmp 20 * 19 llb -2 0 cdb 0 48 brc 5 21 llw -20 0 ldw 16 1 obw 1 1 0 slw 0 -20 * 21 pdw 10 lal 12 0 tad 0 0 phl 0 pll 12 jsr strtol pop 10 slw 0 -18 lla 12 0 lob 0 0 0 slb 0 -2 * 20 ldw -1 0 slw 0 -16 llb -2 0 cdb 0 46 brc 5 22 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 llb -2 0 cdb 0 42 brc 5 23 lll 16 0 ill 2 16 tda 0 0 low 0 0 0 slw 0 -16 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 jmp 24 * 23 pdw 10 lal 12 0 tad 0 0 phl 0 pll 12 jsr strtol pop 10 slw 0 -16 lla 12 0 lob 0 0 0 slb 0 -2 * 24 * 22 llb -2 0 cdb 0 108 brc 5 25 llw -20 0 ldw 32 1 obw 1 1 0 slw 0 -20 ill 1 12 lll 12 0 tda 0 0 lob 0 0 0 slb 0 -2 * 25 llb -2 0 xtb 0 xtw 0 jmp 26 * 28 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 llw -20 0 ldw 64 1 obw 1 1 0 phw 0 pdw 10 pll 8 jsr _numcnv pop 16 sll 0 8 jmp 27 * 29 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 8 pll 8 jsr _numcnv pop 16 sll 0 8 jmp 27 * 30 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 10 pll 8 jsr _numcnv pop 16 sll 0 8 jmp 27 * 31 llw -20 0 ldw 128 1 obw 1 1 0 slw 0 -20 * 32 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 16 pll 8 jsr _numcnv pop 16 sll 0 8 jmp 27 * 33 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 102 pll 8 jsr _fltcnv pop 16 sll 0 8 jmp 27 * 34 llw -20 0 ldw 128 1 obw 1 1 0 slw 0 -20 * 35 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 69 pll 8 jsr _fltcnv pop 16 sll 0 8 jmp 27 * 36 llw -20 0 ldw 128 1 obw 1 1 0 slw 0 -20 * 37 plw -18 plw -16 lal 16 0 tad 0 0 phl 0 plw -20 pdw 71 pll 8 jsr _fltcnv pop 16 sll 0 8 jmp 27 * 38 lll 16 0 ill 2 16 tda 0 0 low 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 27 * 39 llw -16 0 cdw 0 0 brc 9 40 ldw 32767 0 slw 0 -16 * 40 lll 16 0 sll 0 -6 lll -6 0 ill 4 -6 tda 0 0 lol 0 0 0 sll 0 -10 lll -6 0 sll 0 16 ldw 0 0 slw 0 -14 * 41 lla -10 0 llw -14 0 xtw 0 lxb 0 0 0 cdb 0 0 brc 4 42 llw -14 0 llw -16 1 cmw 0 1 brc 9 42 jmp 43 * 44 ilw 1 -14 llw -14 0 jmp 41 * 43 jmp 44 * 42 llw -18 0 llw -14 1 obw 13 1 0 slw 0 -12 llw -20 0 ldw 1 1 obw 3 1 0 cdw 0 0 brc 5 45 * 46 llw -12 0 ilw -1 -12 cdw 0 0 brc 8 47 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 46 * 47 * 45 * 48 llw -14 0 ilw -1 -14 tsw 0 brc 4 49 lll -10 0 ill 1 -10 tda 0 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 48 * 49 * 50 llw -12 0 ilw -1 -12 cdw 0 0 brc 8 51 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 50 * 51 jmp 27 * 52 * 53 llb -2 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 27 jmp 27 * 26 cse 37 52 cse 115 39 cse 99 38 cse 71 37 cse 103 36 cse 69 35 cse 101 34 cse 102 33 cse 88 32 cse 120 31 cse 117 30 cse 111 29 cse 100 28 jmp 53 * 27 jmp 3 * 1 ret efn 20 : _fltcnv csv lla 16 0 lol 0 0 0 tda 0 0 lol 0 0 0 sll 0 -4 lla 16 0 lol 0 0 0 ldw 1 1 adw 4 1 obl 12 1 0 sol 0 0 0 ldw 0 0 lal -48 0 sob 0 0 0 lal -50 0 sob 0 0 0 lal -42 0 sob 0 0 0 lal -26 0 sob 0 0 0 llw 20 0 cdw 0 0 brc 9 0 ldw 6 0 slw 0 20 jmp 1 * 0 llw 20 0 cdw 0 13 brc 8 2 ldw 13 0 slw 0 20 * 2 * 1 lll -4 0 cdl 0 0 brc 5 3 l$ 0 0 tad 0 0 phl 0 lal -26 0 tad 0 0 phl 0 jsr strcpy pop 8 llw 20 0 cdw 0 0 brc 8 4 l$ 1 0 tad 0 0 phl 0 lal -42 0 tad 0 0 phl 0 jsr strcpy pop 8 * 4 jmp 5 * 3 lll -4 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 tsl 0 brc 4 6 l$ 2 0 tad 0 0 phl 0 lal -50 0 tad 0 0 phl 0 jsr strcpy pop 8 jmp 7 * 6 llw 14 0 ldw 2 1 obw 3 1 0 tsw 0 brc 4 8 l$ 3 0 tad 0 0 phl 0 lal -50 0 tad 0 0 phl 0 jsr strcpy pop 8 jmp 9 * 8 llw 14 0 ldw 4 1 obw 3 1 0 tsw 0 brc 4 10 l$ 4 0 tad 0 0 phl 0 lal -50 0 tad 0 0 phl 0 jsr strcpy pop 8 * 10 * 9 * 7 lll -4 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -6 lll -4 0 ldl 16777215 1 obl 3 1 0 sll 0 -62 llw 12 0 cdw 0 69 brc 4 12 llw -6 0 cdw 0 32 brc 9 13 llw -6 0 cdw 0 -24 brc 7 11 * 13 * 12 ldw 0 0 slw 0 -8 * 14 llw -6 0 cdw 0 2 brc 8 15 lll -62 0 ldl 10 1 phl 1 phl 0 jsr _ulmod pop 8 sll 0 -74 lll -62 0 ldl 10 1 phl 1 phl 0 jsr _uldiv pop 8 sll 0 -62 * 16 lll -62 0 tsl 0 brc 4 17 lll -62 0 ldl 8388608 1 obl 3 1 0 cdl 0 0 brc 21 17 lll -62 0 ldw 1 1 xtw 1 obl 10 1 0 sll 0 -62 llw -6 0 ilw -1 -6 jmp 16 * 17 lll -62 0 lll -74 1 obl 12 1 0 sll 0 -62 llw -8 0 ilw 1 -8 jmp 14 * 15 * 18 llw -6 0 cdw 0 0 brc 9 19 lll -62 0 ldl 10 1 phl 1 phl 0 jsr _ulmul pop 8 sll 0 -62 ldl 0 0 sll 0 -74 * 20 lll -62 0 ldl -16777216 1 obl 3 1 0 tsl 0 brc 4 21 lll -74 0 lll -62 1 ldl 1 2 obl 3 2 1 obl 1 1 0 sll 0 -74 lll -62 0 ldw 1 1 xtw 1 obl 11 1 0 sll 0 -62 llw -6 0 ilw 1 -6 jmp 20 * 21 lll -62 0 lll -74 1 obl 12 1 0 sll 0 -62 llw -8 0 ilw -1 -8 jmp 18 * 19 llw 14 0 ldw 128 1 obw 3 1 0 tsw 0 brc 4 22 ldw 101 0 jmp 23 * 22 ldw 69 0 * 23 lal -48 0 ldw 0 1 xtw 1 sxb 0 1 0 llw -8 0 cdw 0 0 brc 9 24 ldw 45 0 lal -48 0 ldw 1 1 xtw 1 sxb 0 1 0 llw -8 0 ouw 18 0 slw 0 -8 jmp 25 * 24 ldw 43 0 lal -48 0 ldw 1 1 xtw 1 sxb 0 1 0 * 25 llw -8 0 ldw 10 1 obw 15 1 0 ldw 48 1 obw 12 1 0 lal -48 0 ldw 2 1 xtw 1 sxb 0 1 0 llw -8 0 ldw 10 1 obw 16 1 0 ldw 48 1 obw 12 1 0 lal -48 0 ldw 3 1 xtw 1 sxb 0 1 0 ldw 0 0 lal -48 0 ldw 4 1 xtw 1 sxb 0 1 0 * 11 llw -6 0 cdw 0 0 brc 8 26 llw -6 0 cdw 0 24 brc 8 27 lll -62 0 llw -6 1 ldw 24 2 obw 13 2 1 xtw 1 obl 10 1 0 sll 0 -66 jmp 28 * 27 lll -62 0 ldw 24 1 llw -6 2 obw 13 2 1 xtw 1 obl 11 1 0 sll 0 -66 * 28 lal -26 0 tad 0 0 phl 0 pll -66 jsr _ltoc pop 8 lll -62 0 llw -6 1 xtw 1 obl 10 1 0 ldl 16777215 1 obl 3 1 0 sll 0 -62 ldw 0 0 slw 0 -6 jmp 29 * 26 l$ 5 0 tad 0 0 phl 0 lal -26 0 tad 0 0 phl 0 jsr strcpy pop 8 llw -6 0 cdw 0 0 brc 9 30 lll -62 0 llw -6 1 ouw 18 1 xtw 1 obl 11 1 0 sll 0 -62 * 30 * 29 llw 20 0 cdw 0 0 brc 8 31 lll -62 0 tsl 0 brc 4 32 ldl 8388608 0 sll 0 -70 ldl 500000000 0 sll 0 -74 ldl 1000000000 0 sll 0 -66 * 33 lll -70 0 tsl 0 brc 4 34 lll -62 0 lll -70 1 obl 3 1 0 tsl 0 brc 4 35 lll -66 0 lll -74 1 obl 12 1 0 sll 0 -66 * 35 lll -70 0 ldw 1 1 xtw 1 obl 11 1 0 sll 0 -70 lll -74 0 ldw 1 1 xtw 1 obl 11 1 0 sll 0 -74 jmp 33 * 34 lal -42 0 tad 0 0 phl 0 pll -66 jsr _ltoc pop 8 ldw 46 0 lal -42 0 ldw 0 1 xtw 1 sxb 0 1 0 jmp 36 * 32 l$ 6 0 tad 0 0 phl 0 lal -42 0 tad 0 0 phl 0 jsr strcpy pop 8 * 36 * 31 * 5 lal -42 0 lob 0 0 0 tsb 0 brc 4 37 lal -42 0 tad 0 0 phl 0 jsr strlen pop 4 slw 0 -6 * 38 llw -6 0 cdw 0 15 brc 9 39 jmp 40 * 41 llw -6 0 ilw 1 -6 jmp 38 * 40 ldw 48 0 lal -42 0 llw -6 1 xtw 1 sxb 0 1 0 jmp 41 * 39 ldw 0 0 lal -42 0 llw 20 1 ldw 1 2 obw 12 2 1 xtw 1 sxb 0 1 0 llw 14 0 ldw 8 1 obw 3 1 0 tsw 0 brc 4 43 llw 12 0 cdw 0 71 brc 4 42 * 43 llw 20 0 slw 0 -6 * 44 llw -6 0 cdw 0 0 brc 8 45 lal -42 0 llw -6 0 xtw 0 lxb 0 0 0 cdb 0 48 brc 5 45 jmp 46 * 47 llw -6 0 ilw -1 -6 jmp 44 * 46 ldw 0 0 lal -42 0 llw -6 1 xtw 1 sxb 0 1 0 jmp 47 * 45 llw -6 0 cdw 0 0 brc 5 48 ldw 0 0 lal -42 0 sob 0 0 0 * 48 * 42 * 37 lll 8 0 sll 0 -58 lal -26 0 tad 0 0 phl 0 jsr strlen pop 4 rsv -32768 lal -42 0 tad 0 0 phl 0 jsr strlen pop 4 tdd 0 1 rst 1 obw 12 1 0 rsv -32768 lal -48 0 tad 0 0 phl 0 jsr strlen pop 4 tdd 0 1 rst 1 obw 12 1 0 rsv -32768 lal -50 0 tad 0 0 phl 0 jsr strlen pop 4 tdd 0 1 rst 1 obw 12 1 0 slw 0 -10 llw 14 0 ldw 1 1 obw 3 1 0 tsw 0 brc 4 49 * 50 llw -10 0 llw 22 1 cmw 0 1 brc 9 51 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 llw -10 0 ilw 1 -10 jmp 50 * 51 * 49 lal -50 0 lob 0 0 0 tsb 0 brc 4 52 lal -50 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 * 52 lal -26 0 tad 0 0 sll 0 -54 * 53 lll -54 0 ill 1 -54 tda 0 0 lob 0 0 0 lla 8 0 sob 0 0 0 tsb 0 brc 4 54 lll 8 0 ill 1 8 jmp 53 * 54 lal -42 0 lob 0 0 0 tsb 0 brc 4 55 lal -42 0 tad 0 0 sll 0 -54 * 56 lll -54 0 ill 1 -54 tda 0 0 lob 0 0 0 lla 8 0 sob 0 0 0 tsb 0 brc 4 57 lll 8 0 ill 1 8 jmp 56 * 57 jmp 58 * 55 llw 14 0 ldw 4 1 obw 3 1 0 tsw 0 brc 4 59 ldw 46 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 * 59 * 58 lal -48 0 lob 0 0 0 tsb 0 brc 4 60 lal -48 0 tad 0 0 sll 0 -54 * 61 lll -54 0 ill 1 -54 tda 0 0 lob 0 0 0 lla 8 0 sob 0 0 0 tsb 0 brc 4 62 lll 8 0 ill 1 8 jmp 61 * 62 * 60 llw 14 0 ldw 1 1 obw 3 1 0 cdw 0 0 brc 5 63 * 64 llw -10 0 llw 22 1 cmw 0 1 brc 9 65 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 llw -10 0 ilw 1 -10 jmp 64 * 65 * 63 ldw 0 0 lla 8 0 sob 0 0 0 lll 8 0 ret ret efn 74 $ 0 = 12288 $ 1 = 11824 = 0 $ 2 = 11520 $ 3 = 11008 $ 4 = 8192 $ 5 = 12288 $ 6 = 11824 = 0 : _ltoc csv lll 12 0 sll 0 -4 lll 8 0 cdl 0 0 brc 5 0 ldw 48 0 lll 12 1 ill 1 12 tda 1 0 sob 0 0 0 ldw 0 0 lla 12 0 sob 0 0 0 jmp 1 * 0 lll 8 0 cdl 0 0 brc 9 2 ldw 45 0 lll 12 1 ill 1 12 tda 1 0 sob 0 0 0 lll 8 0 oul 18 0 sll 0 8 * 2 ldw 0 0 slw 0 -6 * 3 lll 8 0 cdl 0 0 brc 8 4 jmp 5 * 6 lll 8 0 ldl 10 1 phl 1 phl 0 jsr _ldiv pop 8 sll 0 8 jmp 3 * 5 lll 8 0 ldl 10 1 phl 1 phl 0 jsr _lmod pop 8 ldw 48 1 xtw 1 obl 12 1 0 lla 12 0 llw -6 1 ilw 1 -6 xtw 1 sxb 0 1 0 jmp 6 * 4 ldw 0 0 lla 12 0 llw -6 1 ilw -1 -6 xtw 1 sxb 0 1 0 ldw 0 0 slw 0 -8 * 7 llw -8 0 llw -6 1 cmw 0 1 brc 9 8 lla 12 0 llw -6 0 xtw 0 lxb 0 0 0 xtb 0 slw 0 -10 lla 12 0 llw -8 0 xtw 0 lxb 0 0 0 lla 12 0 llw -6 1 ilw -1 -6 xtw 1 sxb 0 1 0 llw -10 0 lla 12 0 llw -8 1 ilw 1 -8 xtw 1 sxb 0 1 0 jmp 7 * 8 * 1 ret efn 10 : _numcnv csv lal -20 0 tad 0 0 sll 0 -30 lal -26 0 tad 0 0 sll 0 -34 llw 14 0 ldw 32 1 obw 3 1 0 tsw 0 brc 4 0 lla 16 0 lol 0 0 0 sll 0 -50 lll -50 0 ill 4 -50 tda 0 0 lol 0 0 0 sll 0 -46 lll -50 0 lla 16 0 sol 0 0 0 jmp 1 * 0 lla 16 0 lol 0 0 0 tda 0 0 low 0 0 0 xtw 0 sll 0 -46 lla 16 0 lol 0 0 0 ldw 1 1 adw 2 1 obl 12 1 0 sol 0 0 0 * 1 llw 14 0 ldw 64 1 obw 3 1 0 tsw 0 brc 4 2 lll -46 0 cdl 0 0 brc 9 3 ldw 45 0 lll -34 1 ill 1 -34 tda 1 0 sob 0 0 0 lll -46 0 oul 18 0 sll 0 -46 jmp 4 * 3 llw 14 0 ldw 2 1 obw 3 1 0 tsw 0 brc 4 5 ldw 43 0 lll -34 1 ill 1 -34 tda 1 0 sob 0 0 0 jmp 6 * 5 llw 14 0 ldw 4 1 obw 3 1 0 tsw 0 brc 4 7 ldw 32 0 lll -34 1 ill 1 -34 tda 1 0 sob 0 0 0 * 7 * 6 * 4 * 2 lll -46 0 sll 0 -54 * 8 lll -54 0 tsl 0 brc 4 9 lll -54 0 llw 12 1 xuw 1 phl 1 phl 0 jsr _ulmod pop 8 slw 0 -42 llw -42 0 cdw 0 10 brc 9 10 llw -42 0 ldw 48 1 obw 12 1 0 jmp 11 * 10 llw -42 0 ldw 10 1 obw 13 1 0 llw 14 1 ldw 128 2 obw 3 2 1 tsw 1 brc 4 12 ldw 97 1 jmp 13 * 12 ldw 65 1 * 13 obw 12 1 0 * 11 lll -30 1 ill 1 -30 tda 1 0 sob 0 0 0 lll -54 0 llw 12 1 xuw 1 phl 1 phl 0 jsr _uldiv pop 8 sll 0 -54 jmp 8 * 9 lll -30 0 lal -20 0 tad 0 1 obl 13 1 0 slw 0 -40 lll -34 0 lal -26 0 tad 0 1 obl 13 1 0 slw 0 -36 llw 22 0 llw -36 1 obw 13 1 0 slw 0 -38 llw 14 0 ldw 16 1 obw 3 1 0 tsw 0 brc 4 14 llw 22 0 llw -36 1 obw 13 1 0 slw 0 20 * 14 llw 20 0 cdw 0 0 brc 9 15 ldw 1 0 slw 0 20 * 15 llw 14 0 ldw 8 1 obw 3 1 0 tsw 0 brc 4 16 llw 12 0 cdw 0 8 brc 21 17 llw -40 0 llw 20 1 cmw 0 1 brc 6 17 llw -40 0 ldw 1 1 obw 12 1 0 slw 0 20 jmp 18 * 17 llw 12 0 cdw 0 16 brc 21 19 ldw 48 0 lll -34 1 ill 1 -34 tda 1 0 sob 0 0 0 llw 14 0 ldw 128 1 obw 3 1 0 tsw 0 brc 4 20 ldw 120 0 jmp 21 * 20 ldw 88 0 * 21 lll -34 1 ill 1 -34 tda 1 0 sob 0 0 0 llw -36 0 ldw 2 1 obw 12 1 0 slw 0 -36 llw 20 0 ldw 2 1 obw 13 1 0 slw 0 20 * 19 * 18 * 16 llw -38 0 llw -40 1 llw 20 2 cmw 1 2 brc 8 22 llw -40 1 jmp 23 * 22 llw 20 1 * 23 obw 13 1 0 slw 0 -38 llw -38 0 cdw 0 0 brc 9 24 ldw 0 0 slw 0 -38 * 24 llw 14 0 ldw 1 1 obw 3 1 0 cdw 0 0 brc 5 25 * 26 llw -38 0 ilw -1 -38 tsw 0 brc 4 27 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 26 * 27 ldw 0 0 slw 0 -38 * 25 plw -36 lal -26 0 tad 0 0 phl 0 pll 8 jsr strncpy pop 10 lll 8 0 llw -36 1 xtw 1 obl 12 1 0 sll 0 8 * 28 llw 20 0 ilw -1 20 llw -40 1 cmw 0 1 brc 8 29 ldw 48 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 28 * 29 * 30 llw -40 0 ilw -1 -40 tsw 0 brc 4 31 ill -1 -30 lll -30 0 tda 0 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 30 * 31 * 32 llw -38 0 ilw -1 -38 tsw 0 brc 4 33 ldw 32 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 32 * 33 lll 8 0 ret ret efn 54 : _cttp csv lll 8 0 cdl 0 0 brc 5 0 l$ 0 0 tad 0 0 phl 0 jsr _ps pop 4 ldw 1 0 ret * 0 lll 8 0 sll 0 -26 lla -26 0 ldw 3 0 adw 4 0 lxl 0 0 0 lla -26 0 ldw 5 1 adw 4 1 lxl 0 1 1 obl 12 1 0 lla -26 0 ldw 7 1 adw 4 1 lxl 0 1 1 obl 12 1 0 ldw 256 1 xtw 1 obl 12 1 0 sll 0 -22 pll -22 pll 8 pdw 0 pdw 74 trp 1 pop 12 tsl 0 brc 4 1 pdw -1 jsr exit pop 2 * 1 ldw 1 0 sgw 0 _argc l$ 1 0 tad 0 0 lag _argv 0 ldw 0 1 adw 4 1 sxl 0 1 0 lla -26 0 ldw 11 0 adw 4 0 lxl 0 0 0 sgl 0 environ lll 8 0 ldw 129 1 xtw 1 obl 12 1 0 sll 0 -4 ldl 0 0 sll 0 -16 sll 0 -12 * 2 lla -4 0 lob 0 0 0 tsb 0 brc 4 3 * 4 lla -4 0 lob 0 0 0 tsb 0 brc 4 5 lla -4 0 lob 0 0 0 cdb 0 32 brc 7 5 lll -4 0 ill 1 -4 jmp 4 * 5 lll -4 0 sll 0 -8 * 6 lla -4 0 lob 0 0 0 tsb 0 brc 4 7 lla -4 0 lob 0 0 0 cdb 0 32 brc 8 7 lll -4 0 ill 1 -4 jmp 6 * 7 lla -4 0 lob 0 0 0 tsb 0 brc 4 8 ldw 0 0 lll -4 1 ill 1 -4 tda 1 0 sob 0 0 0 * 8 lla -8 0 lob 0 0 0 cdb 0 60 brc 5 9 lll -8 0 ldw 1 1 xtw 1 obl 12 1 0 sll 0 -12 jmp 10 * 9 lla -8 0 lob 0 0 0 cdb 0 62 brc 5 11 lll -8 0 ldw 1 1 xtw 1 obl 12 1 0 sll 0 -16 jmp 12 * 11 lgw _argc 0 cdw 0 50 brc 9 13 lll -8 0 lag _argv 0 lgw _argc 1 igw 1 _argc adw 4 1 sxl 0 1 0 * 13 * 12 * 10 jmp 2 * 3 ldl 0 0 lag _argv 0 lgw _argc 1 adw 4 1 sxl 0 1 0 jsr _ioinit lll -12 0 tsl 0 brc 4 14 l$ 2 0 tad 0 0 phl 0 pll -12 lgl stdin 0 phl 0 jsr _fopen pop 12 cdl 0 0 brc 21 15 pll -12 jsr _cant pop 4 * 15 * 14 lll -16 0 tsl 0 brc 4 16 lla -16 0 lob 0 0 0 cdb 0 62 brc 4 17 l$ 3 0 tad 0 0 phl 0 pll -16 lgl stdout 0 phl 0 jsr _fopen pop 12 cdl 0 0 brc 21 18 pll -16 jsr _cant pop 4 * 18 jmp 19 * 17 l$ 4 0 tad 0 0 phl 0 ill 1 -16 lll -16 0 phl 0 lgl stdout 0 phl 0 jsr _fopen pop 12 cdl 0 0 brc 21 20 pll -16 jsr _cant pop 4 * 20 * 19 * 16 lgl environ 0 phl 0 lag _argv 0 tad 0 0 phl 0 lgw _argc 0 phw 0 jsr main pop 10 slw 0 -18 lll -12 0 tsl 0 brc 4 21 lgl stdin 0 phl 0 jsr fclose pop 4 * 21 lll -16 0 tsl 0 brc 4 22 lgl stdout 0 phl 0 jsr fclose pop 4 * 22 plw -18 jsr exit pop 2 ret efn 26 $ 0 = 28277 = 27756 = 8308 = 28769 = 2573 = 0 $ 1 = 31075 = 0 $ 2 = 29184 $ 3 = 30464 $ 4 = 24832 : _ioinit csv ldw 0 0 slw 0 -2 * 0 llw -2 0 cdw 0 8 brc 9 1 jmp 2 * 3 llw -2 0 ilw 1 -2 jmp 0 * 2 ldw 0 0 lag _iobuf 0 llw -2 1 adw 1030 1 lax 0 1 0 sob 0 0 0 ldw 0 0 lag _iobuf 0 llw -2 1 adw 1030 1 lax 0 1 0 sow 0 4 0 lag _iobuf 0 llw -2 1 adw 1030 1 lax 0 1 0 sow 0 2 0 jmp 3 * 1 lag _iobuf 0 ldw 0 0 adw 1030 0 lax 0 0 0 tad 0 0 sgl 0 stdin ldw 0 0 lgl stdin 1 tda 1 0 sob 0 1 0 lag _iobuf 0 ldw 1 0 adw 1030 0 lax 0 0 0 tad 0 0 sgl 0 stdout ldw 1 0 lgl stdout 1 tda 1 0 sob 0 1 0 lag _iobuf 0 ldw 2 0 adw 1030 0 lax 0 0 0 tad 0 0 sgl 0 stderr ldw 1 0 lgl stderr 1 tda 1 0 sob 0 1 0 ldw 7 0 lgl stdin 1 tda 1 0 sob 0 0 0 ldw 3 0 lgl stderr 1 tda 1 0 sob 0 0 0 lgl stdout 1 tda 1 0 sob 0 0 0 ret efn 2 : _cant csv l$ 0 0 tad 0 0 phl 0 jsr _ps pop 4 pll 8 jsr _ps pop 4 l$ 1 0 tad 0 0 phl 0 jsr _ps pop 4 pdw 1 jsr exit pop 2 ret efn 0 $ 0 = 25441 = 28199 = 29728 = 29285 = 25705 = 29285 = 25460 = 8192 $ 1 = 2573 = 0 : exit csv plw 8 pdw 76 trp 1 pop 4 ret efn 0 : exec csv lgl environ 0 phl 0 pll 12 pll 8 plw 16 pdw 75 trp 1 pop 16 ret ret efn 0 : getenv csv lgl environ 0 sll 0 -4 * 0 lla -4 0 lob 0 0 0 tsb 0 brc 4 1 lll 8 0 sll 0 -8 * 2 lll -4 0 ill 1 -4 tda 0 0 lob 0 0 0 lll -8 1 ill 1 -8 tda 1 0 lob 0 0 1 xtb 0 xtb 1 cmw 0 1 brc 5 3 jmp 2 * 3 lla -4 0 ldw -1 0 xtw 0 lxb 0 0 0 cdb 0 61 brc 5 4 lla -8 0 ldw -1 0 xtw 0 lxb 0 0 0 cdb 0 0 brc 5 4 lll -4 0 ret * 4 * 5 lll -4 0 ill 1 -4 tda 0 0 lob 0 0 0 tsb 0 brc 4 6 jmp 5 * 6 jmp 0 * 1 ldl 0 0 ret ret efn 8 . _argc 2 . _argv 200 . environ 4 . _iobuf 8240 . stdin 4 . stdout 4 . stderr 4 : getopt csv igw 1 optind lgw optind 0 llw 8 1 cmw 0 1 brc 5 0 ldw -1 0 ret * 0 lla 10 0 lgw optind 0 adw 4 0 lxl 0 0 0 sll 0 -4 lla -4 0 lob 0 0 0 cdb 0 45 brc 5 1 lla -4 0 igw 1 optsubind lgw optsubind 0 xtw 0 lxb 0 0 0 slb 0 -6 llb -6 0 cdb 0 45 brc 5 2 ldw -1 0 ret * 2 llb -6 0 xtb 0 phw 0 pll 14 jsr strchr pop 6 sll 0 14 lll 14 0 cdl 0 0 brc 21 3 lgw opterr 0 cdw 0 0 brc 5 4 l$ 0 0 tad 0 0 phl 0 jsr _ps pop 4 pll -4 jsr _ps pop 4 l$ 1 0 tad 0 0 phl 0 jsr _ps pop 4 * 4 ldw 0 0 sgw 0 optsubind ldw 63 0 ret * 3 lla 14 0 ldw 1 0 xtw 0 lxb 0 0 0 cdb 0 58 brc 5 5 lla -4 0 lgw optsubind 0 ldw 1 1 obw 12 1 0 xtw 0 lxb 0 0 0 ldw 0 1 xtb 0 xtb 1 cmw 0 1 brc 4 6 lll -4 0 lgw optsubind 1 xtw 1 obl 12 1 0 ldw 1 1 xtw 1 obl 12 1 0 jmp 7 * 6 lla 10 0 igw 1 optind lgw optind 0 adw 4 0 lxl 0 0 0 * 7 sgl 0 optarg ldw 0 0 sgw 0 optsubind lgl optarg 0 cdl 0 0 brc 21 8 lgw opterr 0 cdw 0 0 brc 5 9 l$ 2 0 tad 0 0 phl 0 jsr _ps pop 4 pll -4 jsr _ps pop 4 l$ 3 0 tad 0 0 phl 0 jsr _ps pop 4 * 9 ldw 63 0 ret * 8 jmp 10 * 5 lla -4 0 ldw 2 0 xtw 0 lxb 0 0 0 ldw 0 1 xtb 0 xtb 1 cmw 0 1 brc 4 11 lgw optind 0 ldw 1 1 obw 13 1 0 sgw 0 optind * 11 * 10 llb -6 0 xtb 0 ret * 1 ldw -1 0 ret ret efn 6 $ 0 = 30062 = 27502 = 28535 = 28192 = 28528 = 29801 = 28526 = 14880 = 0 $ 1 = 2573 = 0 $ 2 = 28009 = 29555 = 26990 = 26400 = 24946 = 26426 = 8192 $ 3 = 2573 = 0 . optarg 4 . optind 2 . opterr 2 . optsubind 2 : _ps csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 phw 0 pdw 2 trp 1 pop 4 jmp 0 * 1 ret efn 0 : fileno csv lla 8 0 lob 0 1 0 xtb 0 ret ret efn 0 : fread csv llw 14 0 xtw 0 llw 12 1 xtw 1 phl 1 phl 0 jsr _lmul pop 8 sll 0 -6 pll 8 pll -6 lla 16 0 lob 0 1 0 xtb 0 phw 0 pdw 63 trp 1 pop 12 slw 0 -2 cdw 0 0 brc 9 0 ldw 0 0 slw 0 -2 jmp 1 * 0 llw -2 0 llw 12 1 obw 15 1 0 slw 0 -2 * 1 llw -2 0 ret ret efn 6 : fwrite csv llw 14 0 xtw 0 llw 12 1 xtw 1 phl 1 phl 0 jsr _lmul pop 8 sll 0 -6 pll 8 pll -6 lla 16 0 lob 0 1 0 xtb 0 phw 0 pdw 64 trp 1 pop 12 slw 0 -2 cdw 0 0 brc 9 0 ldw 0 0 slw 0 -2 jmp 1 * 0 llw -2 0 llw 12 1 obw 15 1 0 slw 0 -2 * 1 llw -2 0 ret ret efn 6 : fseek csv plw 16 pll 12 lla 8 0 lob 0 1 0 xtb 0 phw 0 jsr lseek pop 8 ret efn 0 : freopen csv pll 16 jsr fclose pop 4 pll 12 pll 8 jsr fopen pop 8 ret ret efn 0 : fclose csv lll 8 0 cdl 0 0 brc 20 0 lla 8 0 lob 0 0 0 ldw 3 1 xtb 0 obw 3 1 0 cdw 0 2 brc 5 1 pll 8 jsr fflush pop 4 * 1 lla 8 0 lob 0 1 0 cdb 0 5 brc 8 2 lla 8 0 lob 0 1 0 xtb 0 phw 0 pdw 62 trp 1 pop 4 * 2 ldw 0 0 lla 8 0 sob 0 0 0 * 0 ret efn 0 : fgets csv pll 14 jsr getc pop 4 slw 0 -2 llw -2 0 cdw 0 -1 brc 5 0 ldl 0 0 ret * 0 llw 12 0 ilw -1 12 ldw 0 0 slw 0 -4 * 1 llw -4 0 llw 12 1 cmw 0 1 brc 9 2 llw -2 0 cdw 0 -1 brc 4 2 jmp 3 * 4 pll 14 jsr getc pop 4 slw 0 -2 jmp 1 * 3 llw -2 0 lla 8 0 llw -4 1 ilw 1 -4 xtw 1 sxb 0 1 0 llw -2 0 cdw 0 10 brc 5 5 jmp 2 * 5 jmp 4 * 2 ldw 0 0 lla 8 0 llw -4 1 xtw 1 sxb 0 1 0 lll 8 0 ret ret efn 4 : fopen csv ldw 0 0 slw 0 -2 * 0 llw -2 0 cdw 0 8 brc 9 1 lag _iobuf 0 llw -2 0 adw 1030 0 lax 0 0 0 lob 0 0 0 cdb 0 0 brc 4 1 jmp 2 * 3 llw -2 0 ilw 1 -2 jmp 0 * 2 jmp 3 * 1 llw -2 0 cdw 0 8 brc 6 4 ldl 0 0 ret * 4 pll 12 pll 8 lag _iobuf 0 llw -2 0 adw 1030 0 lax 0 0 0 tad 0 0 phl 0 jsr _fopen pop 12 ret ret efn 2 : _fopen csv l$ 0 0 tad 0 0 phl 0 pll 12 jsr strcmp pop 8 cdw 0 0 brc 5 0 ldw 3 0 slw 0 -4 ldw 3 0 slw 0 -2 jmp 1 * 0 l$ 1 0 tad 0 0 phl 0 pll 12 jsr strcmp pop 8 cdw 0 0 brc 5 2 ldw 0 0 slw 0 -4 ldw 3 0 slw 0 -2 jmp 3 * 2 l$ 2 0 tad 0 0 phl 0 pll 12 jsr strcmp pop 8 cdw 0 0 brc 5 4 ldw 2 0 slw 0 -4 ldw 3 0 slw 0 -2 jmp 5 * 4 lla 16 0 lob 0 0 0 cdb 0 119 brc 5 6 pdw 0 pll 12 pdw 60 trp 1 pop 8 slw 0 -4 ldw 2 0 slw 0 -2 jmp 7 * 6 lla 16 0 lob 0 0 0 cdb 0 114 brc 5 8 pdw 0 pll 12 pdw 61 trp 1 pop 8 slw 0 -4 ldw 1 0 slw 0 -2 jmp 9 * 8 lla 16 0 lob 0 0 0 cdb 0 97 brc 5 10 pdw 1 pll 12 pdw 61 trp 1 pop 8 slw 0 -4 cdw 0 0 brc 9 11 pdw 0 pll 12 pdw 60 trp 1 pop 8 slw 0 -4 jmp 12 * 11 pdw 2 plw -4 pdl 0 pdw 66 trp 1 pop 10 cdl 0 0 brc 9 13 ldw -1 0 slw 0 -4 * 13 * 12 ldw 2 0 slw 0 -2 jmp 14 * 10 pdw 3 pll 12 pdw 61 trp 1 pop 8 slw 0 -4 ldw 3 0 slw 0 -2 * 14 * 9 * 7 * 5 * 3 * 1 lla 16 0 ldw 1 0 xtw 0 lxb 0 0 0 cdb 0 98 brc 5 15 llw -2 0 ldw 4 1 obw 1 1 0 slw 0 -2 * 15 llw -4 0 cdw 0 0 brc 9 16 ldl 0 0 ret * 16 ldw 0 0 lla 8 0 sow 0 2 0 lla 8 0 sow 0 4 0 llw -4 0 lla 8 0 sob 0 1 0 llw -2 0 lla 8 0 sob 0 0 0 lll 8 0 ret ret efn 4 $ 0 = 20562 = 21562 = 0 $ 1 = 17231 = 20026 = 0 $ 2 = 16725 = 22586 = 0 : fputs csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 pll 12 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 phw 0 jsr putc pop 6 jmp 0 * 1 ret efn 0 : gets csv lll 8 0 sll 0 -6 lgl stdin 0 phl 0 jsr getc pop 4 slw 0 -2 cdw 0 -1 brc 5 0 ldl 0 0 ret * 0 * 1 llw -2 0 cdw 0 10 brc 4 2 llw -2 0 cdw 0 -1 brc 4 2 llw -2 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 lgl stdin 0 phl 0 jsr getc pop 4 slw 0 -2 jmp 1 * 2 ldw 0 0 lla 8 0 sob 0 0 0 lll -6 0 ret ret efn 6 : getchar csv lgl stdin 0 phl 0 jsr getc pop 4 ret ret efn 0 : getc csv lll 8 0 cdl 0 0 brc 21 0 ldw -1 0 ret * 0 lla 8 0 lob 0 0 0 ldw 3 1 xtb 0 obw 3 1 0 slw 0 -10 llw -10 0 cdw 0 3 brc 5 1 lla 8 0 lao 0 6 0 tad 0 0 phl 0 ldw 1 0 xtw 0 phl 0 lla 8 0 lob 0 1 0 xtb 0 phw 0 pdw 63 trp 1 pop 12 slw 0 -4 llw -4 0 cdw 0 1 brc 4 2 ldw -1 0 ret * 2 ldw 0 0 slw 0 -2 jmp 3 * 1 llw -10 0 cdw 0 1 brc 5 4 lla 8 0 low 0 2 0 slw 0 -2 * 5 llw -2 0 lla 8 0 low 0 4 1 cmw 0 1 brc 6 6 lla 8 0 lao 0 6 0 tad 0 0 phl 0 ldw 1024 0 xtw 0 phl 0 lla 8 0 lob 0 1 0 xtb 0 phw 0 pdw 63 trp 1 pop 12 slw 0 -4 llw -4 0 cdw 0 0 brc 7 7 ldw 0 0 lla 8 0 sow 0 4 0 lla 8 0 sow 0 2 0 ldw -1 0 ret * 7 llw -4 0 lla 8 0 sow 0 4 0 ldw 0 0 slw 0 -2 jmp 5 * 6 llw -2 0 ldw 1 1 obw 12 1 0 lla 8 0 sow 0 2 0 jmp 8 * 4 ldw -1 0 ret * 8 * 3 lla 8 0 lao 0 6 0 llw -2 0 xtw 0 lxb 0 0 0 ldw 255 1 xtb 0 obw 3 1 0 slw 0 -6 lla 8 0 lob 0 1 0 cdb 0 0 brc 5 9 llw -6 0 cdw 0 13 brc 5 10 ldw 10 0 slw 0 -6 phw 0 pdw 2 trp 1 pop 4 jmp 11 * 10 llw -6 0 cdw 0 4 brc 5 12 ldw -1 0 slw 0 -6 * 12 * 11 * 9 llw -6 0 cdw 0 13 brc 5 13 lla 8 0 lob 0 0 0 ldw 4 1 xtb 0 obw 3 1 0 tsw 0 brc 5 13 pll 8 jsr getc pop 4 slw 0 -6 * 13 llw -6 0 ret ret efn 10 : putchar csv lgl stdout 0 phl 0 plw 8 jsr putc pop 6 ret efn 0 : puts csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lgl stdout 0 phl 0 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 phw 0 jsr putc pop 6 jmp 0 * 1 lgl stdout 0 phl 0 pdw 10 jsr putc pop 6 ret efn 0 : putc csv ldw 0 0 slw 0 -6 lll 10 0 cdl 0 0 brc 21 0 ldw -1 0 ret * 0 llw 8 0 cdw 0 10 brc 5 1 lla 10 0 lob 0 0 0 ldw 4 1 xtb 0 obw 3 1 0 tsw 0 brc 5 1 pll 10 pdw 13 jsr putc pop 6 slw 0 -6 * 1 ldw 0 0 slw 0 -6 lla 10 0 lob 0 0 0 ldw 3 1 xtb 0 obw 3 1 0 slw 0 -4 llw -4 0 cdw 0 3 brc 5 2 llw 8 0 lla 10 0 lao 0 6 0 ldw 0 1 xtw 1 sxb 0 1 0 lla 10 0 lao 0 6 0 tad 0 0 phl 0 ldw 1 0 xtw 0 phl 0 lla 10 0 lob 0 1 0 xtb 0 phw 0 pdw 64 trp 1 pop 12 slw 0 -6 jmp 3 * 2 llw -4 0 cdw 0 2 brc 5 4 lla 10 0 low 0 2 0 cdw 0 1024 brc 5 5 pll 10 jsr fflush pop 4 slw 0 -6 * 5 llw 8 0 lla 10 0 lao 0 6 0 lla 10 1 low 1 2 1 xtw 1 sxb 0 1 0 lla 10 0 low 0 2 0 ldw 1 1 obw 12 1 0 lla 10 0 sow 0 2 0 jmp 6 * 4 ldw -1 0 ret * 6 * 3 llw -6 0 cdw 0 0 brc 7 7 ldw -1 0 jmp 8 * 7 llw -6 0 * 8 ret ret efn 6 : fflush csv lla 8 0 low 0 2 0 cdw 0 0 brc 8 0 lla 8 0 lao 0 6 0 tad 0 0 phl 0 lla 8 0 low 0 2 0 xtw 0 phl 0 lla 8 0 lob 0 1 0 xtb 0 phw 0 pdw 64 trp 1 pop 12 slw 0 -2 * 0 ldw 0 0 lla 8 0 sow 0 2 0 llw -2 0 cdw 0 0 brc 7 1 ldw -1 0 jmp 2 * 1 llw -2 0 * 2 ret ret efn 2 : dup csv plw 8 pdw 69 trp 1 pop 4 ret ret efn 0 : dup2 csv plw 10 plw 8 pdw 70 trp 1 pop 6 ret ret efn 0 : getdir csv plw 12 pll 8 pdw 71 trp 1 pop 8 ret ret efn 0 : listdir csv lll 8 0 tsl 0 brc 4 0 pll 12 pdw 26 trp 1 pop 6 plw 16 pll 8 pdw 78 trp 1 pop 8 ret jmp 1 * 0 pdw 79 trp 1 pop 2 ret * 1 ret efn 0 : lseek csv plw 14 plw 8 pll 10 pdw 66 trp 1 pop 10 ret ret efn 0 : unlink csv pll 8 pdw 65 trp 1 pop 6 ret ret efn 0 : close csv plw 8 pdw 62 trp 1 pop 4 ret efn 0 : creat csv plw 12 pll 8 pdw 60 trp 1 pop 8 ret ret efn 0 : open csv plw 12 pll 8 pdw 61 trp 1 pop 8 ret ret efn 0 : read csv pll 10 llw 14 0 xtw 0 phl 0 plw 8 pdw 63 trp 1 pop 12 ret ret efn 0 : write csv pll 10 llw 14 0 xtw 0 phl 0 plw 8 pdw 64 trp 1 pop 12 ret ret efn 0 : chmod csv pdw 0 plw 12 pll 8 pdw 67 trp 1 pop 10 ret ret efn 0 : realloc csv lll 8 0 ldw 1 1 adw 8 1 obl 13 1 0 sll 0 -4 llw 12 0 ldw 8 1 obw 12 1 0 ldw 7 1 obw 12 1 0 ldw -8 1 obw 3 1 0 xuw 0 sll 0 -20 lla -4 0 lol 0 4 0 lll -20 1 cml 0 1 brc 8 0 lll -4 0 lll -20 1 obl 12 1 0 sll 0 -8 lla -4 0 lol 0 4 0 lll -20 1 obl 13 1 0 lla -8 0 sol 0 4 0 lll -8 0 ldw 1 1 adw 8 1 obl 12 1 0 phl 0 jsr free pop 4 lll -20 0 lla -4 0 sol 0 4 0 jmp 1 * 0 lla -4 0 lol 0 4 0 lll -20 1 cml 0 1 brc 9 2 plw 12 jsr malloc pop 2 sll 0 -8 sll 0 -16 lll -8 0 cdl 0 0 brc 20 3 lll 8 0 sll 0 -12 lla -4 0 lol 0 4 0 ldw 8 1 xtw 1 obl 13 1 0 slw 0 12 * 4 llw 12 0 cdw 0 0 brc 24 5 lll -12 0 ill 4 -12 tda 0 0 lol 0 0 0 lll -16 1 ill 4 -16 tda 1 0 sol 0 0 0 llw 12 0 ldw 4 1 obw 13 1 0 slw 0 12 jmp 4 * 5 * 3 pll 8 jsr free pop 4 lll -8 0 sll 0 8 * 2 * 1 lll 8 0 ret ret efn 20 : calloc csv llw 8 0 llw 10 1 obw 14 1 0 slw 0 -10 plw -10 jsr malloc pop 2 sll 0 -8 sll 0 -4 cdl 0 0 brc 20 0 * 1 llw -10 0 ilw -1 -10 tsw 0 brc 4 2 ldw 0 0 lll -8 1 ill 1 -8 tda 1 0 sob 0 0 0 jmp 1 * 2 * 0 lll -4 0 ret ret efn 10 : malloc csv llw 8 0 ldw 8 1 obw 12 1 0 ldw 7 1 obw 12 1 0 ldw -8 1 obw 3 1 0 xuw 0 sll 0 -12 lag _base 0 tad 0 0 sll 0 -4 lag _base 0 lol 0 0 0 sll 0 -8 * 0 lll -8 0 cdl 0 0 brc 20 1 lla -8 0 lol 0 4 0 lll -12 1 cml 0 1 brc 9 1 lll -8 0 sll 0 -4 lla -8 0 lol 0 0 0 sll 0 -8 jmp 0 * 1 lll -8 0 cdl 0 0 brc 21 2 lll -12 0 cdl 0 20000 brc 9 3 ldw 20000 0 jmp 4 * 3 lll -12 0 * 4 xtw 0 sll 0 -16 pll -16 pdw 72 trp 1 pop 6 sll 0 -8 lll -8 0 cdl 0 0 brc 9 5 ldl 0 0 ret * 5 lll -8 0 lla -4 0 sol 0 0 0 lll -16 0 lla -8 0 sol 0 4 0 ldl 0 0 lla -8 0 sol 0 0 0 * 2 lla -8 0 lol 0 4 0 lll -12 1 ldw 8 2 xtw 2 obl 12 2 1 cml 0 1 brc 8 6 lla -8 0 lao 0 4 0 lol 0 0 0 lll -12 1 obl 13 1 0 sol 0 0 0 lll -8 0 lla -8 0 lol 0 4 1 obl 12 1 0 sll 0 -8 lll -12 0 lla -8 0 sol 0 4 0 jmp 7 * 6 lla -8 0 lol 0 0 0 lla -4 0 sol 0 0 0 * 7 ill 8 -8 lll -8 0 ret ret efn 16 : free csv lll 8 0 ill -8 8 lag _base 0 tad 0 0 sll 0 -4 lag _base 0 lol 0 0 0 sll 0 -8 * 0 lll -8 0 cdl 0 0 brc 20 1 lll -8 0 lll 8 1 cml 0 1 brc 25 1 lll -8 0 sll 0 -4 lla -8 0 lol 0 0 0 sll 0 -8 jmp 0 * 1 lll 8 0 lla 8 0 lol 0 4 1 obl 12 1 0 sll 0 -12 lll -8 0 cdl 0 0 brc 20 2 lll -12 0 lll -8 1 cml 0 1 brc 22 2 lla 8 0 lao 0 4 0 lol 0 0 0 lla -8 1 lol 1 4 1 obl 12 1 0 sol 0 0 0 lla -8 0 lol 0 0 0 sll 0 -8 * 2 lll -8 0 lla 8 0 sol 0 0 0 lll -4 0 lla -4 0 lol 0 4 1 obl 12 1 0 sll 0 -12 lll -12 0 lll 8 1 cml 0 1 brc 22 3 lla -4 0 lao 0 4 0 lol 0 0 0 lla 8 1 lol 1 4 1 obl 12 1 0 sol 0 0 0 lla 8 0 lol 0 0 0 lla -4 0 sol 0 0 0 jmp 4 * 3 lll 8 0 lla -4 0 sol 0 0 0 * 4 ret efn 12 : _base = 0 = 0 = 0 = 0 : time csv jsr getdate slw 0 -2 llw -2 0 ldw 9 1 obw 26 1 0 ldw 127 1 obw 3 1 0 slw 0 -6 llw -2 0 ldw 5 1 obw 26 1 0 ldw 15 1 obw 3 1 0 slw 0 -8 llw -2 0 ldw 31 1 obw 3 1 0 slw 0 -10 jsr gettime slw 0 -4 ldw 1460 0 llw -6 1 obw 14 1 0 ldw 4 1 obw 15 1 0 llw -6 1 ldw 4 2 obw 16 2 1 tsw 1 brc 4 0 ldw 1 1 jmp 1 * 0 ldw 0 1 * 1 obw 12 1 0 lag _ma 0 llw -8 1 adw 2 1 lxw 0 1 1 obw 12 1 0 llw -10 1 obw 12 1 0 xtw 0 sll 0 -14 ldl 2 0 llw -4 1 ldw 31 2 obw 3 2 1 xtw 1 phl 1 phl 0 jsr _lmul pop 8 ldl 60 1 llw -4 2 ldw 5 3 obw 26 3 2 ldw 63 3 obw 3 3 2 xtw 2 rsv -32768 phl 2 phl 1 jsr _lmul pop 8 tdd 0 1 rst 1 ldl 3600 2 ldl 24 3 lll -14 4 rsv -8192 phl 4 phl 3 jsr _lmul pop 8 tdd 0 3 rst 7 llw -4 4 ldw 11 5 obw 26 5 4 ldw 31 5 obw 3 5 4 xtw 4 obl 12 4 3 rsv -16384 phl 3 phl 2 jsr _lmul pop 8 tdd 0 2 rst 3 obl 12 2 1 obl 12 1 0 sll 0 -14 lll 8 0 cdl 0 0 brc 20 2 lll -14 0 lla 8 0 sol 0 0 0 * 2 lll -14 0 ret ret efn 14 : getdate csv pdw 42 trp 1 pop 2 ret ret efn 0 : gettime csv pdw 44 trp 1 pop 2 ret ret efn 0 : _ma = 0 = 31 = 59 = 90 = 120 = 151 = 181 = 212 = 243 = 273 = 304 = 334 : setjmp csv lll 8 0 tda 0 0 tad 6 0 sol 0 0 0 lol 6 0 0 sol 0 4 0 lol 6 4 0 sol 0 8 0 ldw 0 0 ret ret efn 0 : longjmp csv lll 8 0 tda 0 0 llw 12 0 lol 0 0 1 tda 1 6 lol 0 4 1 sll 1 0 lol 0 8 1 sll 1 4 ret ret efn 0 : atoi csv pdw 10 pdl 0 pll 8 jsr strtol pop 10 ret ret efn 0 : atol csv pdw 10 pdl 0 pll 8 jsr strtol pop 10 ret ret efn 0 : strcat csv lll 8 0 sll 0 -4 lla 8 0 lob 0 0 0 tsb 0 brc 4 0 * 1 ill 1 8 lll 8 0 tda 0 0 lob 0 0 0 tsb 0 brc 4 2 jmp 1 * 2 * 0 * 3 lll 12 0 ill 1 12 tda 0 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 tsb 0 brc 4 4 jmp 3 * 4 lll -4 0 ret ret efn 4 : strncat csv llw 16 0 cdw 0 0 brc 7 0 lll 8 0 ret * 0 lll 8 0 sll 0 -4 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 * 2 ill 1 8 lll 8 0 tda 0 0 lob 0 0 0 tsb 0 brc 4 3 jmp 2 * 3 * 1 * 4 llw 16 0 ilw -1 16 tsw 0 brc 4 5 lll 12 0 ill 1 12 tda 0 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 tsb 0 brc 4 5 jmp 4 * 5 * 6 llw 16 0 ilw -1 16 cdw 0 0 brc 8 7 ldw 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 6 * 7 lll -4 0 ret ret efn 4 : strcmp csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 lll 12 1 ill 1 12 tda 1 0 lob 0 0 1 xtb 0 xtb 1 cmw 0 1 brc 4 2 ill -1 8 lll 8 0 tda 0 0 lob 0 0 0 xtb 0 ldw 255 1 obw 3 1 0 ill -1 12 lll 12 1 tda 1 0 lob 0 0 1 xtb 1 ldw 255 2 obw 3 2 1 obw 13 1 0 ret * 2 jmp 0 * 1 lla 12 0 lob 0 0 0 xtb 0 ldw 255 1 obw 3 1 0 ouw 18 0 ret ret efn 0 : strncmp csv llw 16 0 cdw 0 0 brc 7 0 ldw 0 0 ret * 0 * 1 lla 8 0 lob 0 0 0 tsb 0 brc 4 2 ilw -1 16 llw 16 0 tsw 0 brc 4 2 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 lll 12 1 ill 1 12 tda 1 0 lob 0 0 1 xtb 0 xtb 1 cmw 0 1 brc 4 3 ill -1 8 lll 8 0 tda 0 0 lob 0 0 0 xtb 0 ldw 255 1 obw 3 1 0 ill -1 12 lll 12 1 tda 1 0 lob 0 0 1 xtb 1 ldw 255 2 obw 3 2 1 obw 13 1 0 ret * 3 jmp 1 * 2 lla 8 0 lob 0 0 0 xtb 0 ldw 255 1 obw 3 1 0 lla 12 0 lob 0 0 1 xtb 1 ldw 255 2 obw 3 2 1 obw 13 1 0 ret ret efn 0 : strcpy csv lll 8 0 sll 0 -4 * 0 lll 12 0 ill 1 12 tda 0 0 lob 0 0 0 lll -4 1 ill 1 -4 tda 1 0 sob 0 0 0 tsb 0 brc 4 1 jmp 0 * 1 lll 8 0 ret ret efn 4 : strncpy csv llw 16 0 cdw 0 0 brc 7 0 lll 8 0 ret * 0 lll 8 0 sll 0 -4 * 1 llw 16 0 tsw 0 brc 4 2 lll 12 0 ill 1 12 tda 0 0 lob 0 0 0 lll -4 1 ill 1 -4 tda 1 0 sob 0 0 0 tsb 0 brc 4 2 ilw -1 16 llw 16 0 jmp 1 * 2 * 3 llw 16 0 ilw -1 16 tsw 0 brc 4 4 ldw 0 0 lll -4 1 ill 1 -4 tda 1 0 sob 0 0 0 jmp 3 * 4 lll 8 0 ret ret efn 4 : strlen csv ldw 0 0 slw 0 -2 * 0 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 tsb 0 brc 4 1 jmp 2 * 3 ilw 1 -2 llw -2 0 jmp 0 * 2 jmp 3 * 1 llw -2 0 ret ret efn 2 : strchr csv * 0 lla 8 0 lob 0 0 0 llw 12 1 xtb 0 cmw 0 1 brc 5 3 lll 8 0 ret * 3 * 2 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 tsb 0 brc 4 4 jmp 0 * 1 * 4 ldl 0 0 ret ret efn 0 : strrchr csv ldl 0 0 sll 0 -4 * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 llw 12 1 xtb 0 cmw 0 1 brc 5 2 lll 8 0 ldw 1 1 xtw 1 obl 13 1 0 sll 0 -4 * 2 jmp 0 * 1 lll -4 0 ret ret efn 4 : strpbrk csv lla 8 0 lob 0 0 0 tsb 0 brc 5 1 lla 12 0 lob 0 0 0 tsb 0 brc 4 0 * 1 ldl 0 0 ret * 0 lal -66 0 tad 0 0 phl 0 pll 12 jsr _setbits pop 8 lla 8 0 lob 0 0 0 xub 0 slw 0 -2 * 2 lal -66 0 llw -2 0 ldw 5 1 obw 26 1 0 adw 4 0 lxl 0 0 0 ldw 1 1 llw -2 2 ldw 31 3 obw 3 3 2 obw 10 2 1 xtw 1 obl 3 1 0 tsl 0 brc 4 5 lll 8 0 ret * 5 * 4 ill -1 8 lll 8 0 tda 0 0 lob 0 0 0 xub 0 slw 0 -2 tsw 0 brc 4 6 jmp 2 * 3 * 6 ldl 0 0 ret ret efn 66 : strtok csv lll 8 0 cdl 0 0 brc 20 0 lll 8 0 sgl 0 _tokptr * 0 lgl _tokptr 0 tda 0 0 lob 0 0 0 cdb 0 0 brc 5 1 ldl 0 0 ret * 1 lgl _tokptr 0 rsv -32768 pll 12 lgl _tokptr 0 phl 0 jsr strspn pop 8 tdd 0 1 rst 1 xtw 1 obl 12 1 0 sll 0 8 lll 8 0 rsv -32768 pll 12 pll 8 jsr strcspn pop 8 tdd 0 1 rst 1 xtw 1 obl 12 1 0 sgl 0 _tokptr lgl _tokptr 0 lll 8 1 cml 0 1 brc 21 2 ldl 0 0 ret * 2 lgl _tokptr 0 tda 0 0 lob 0 0 0 cdb 0 0 brc 4 3 ldw 0 0 lgl _tokptr 1 igl 1 _tokptr tda 1 0 sob 0 0 0 * 3 lll 8 0 ret ret efn 0 . _tokptr 4 : strspn csv lla 8 0 lob 0 0 0 cdb 0 0 brc 20 1 lla 12 0 lob 0 0 0 cdb 0 0 brc 21 0 * 1 ldw 0 0 ret * 0 lal -36 0 tad 0 0 phl 0 pll 12 jsr _setbits pop 8 lll 8 0 sll 0 12 lla 8 0 lob 0 0 0 xub 0 sll 0 -4 * 2 lal -36 0 lll -4 0 ldw 5 1 xtw 1 obl 26 1 0 adl 4 0 lxl 0 0 0 ldl 1 1 lll -4 2 ldw 31 3 xtw 3 obl 3 3 2 obl 10 2 1 obl 3 1 0 tsl 0 brc 4 3 jmp 4 * 5 ill 1 8 lll 8 0 tda 0 0 lob 0 0 0 xub 0 sll 0 -4 jmp 2 * 4 jmp 5 * 3 lll 8 0 lll 12 1 obl 13 1 0 ret ret efn 36 : strcspn csv lla 8 0 lob 0 0 0 cdb 0 0 brc 20 1 lla 12 0 lob 0 0 0 cdb 0 0 brc 21 0 * 1 ldw 0 0 ret * 0 lal -36 0 tad 0 0 phl 0 pll 12 jsr _setbits pop 8 lll 8 0 sll 0 12 lal -36 0 ldw 0 0 adw 4 0 lax 0 0 0 lol 0 0 0 ldl 1 1 obl 1 1 0 sol 0 0 0 lla 8 0 lob 0 0 0 xub 0 sll 0 -4 * 2 lal -36 0 lll -4 0 ldw 5 1 xtw 1 obl 26 1 0 adl 4 0 lxl 0 0 0 ldl 1 1 lll -4 2 ldw 31 3 xtw 3 obl 3 3 2 obl 10 2 1 obl 3 1 0 cdl 0 0 brc 5 3 jmp 4 * 5 ill 1 8 lll 8 0 tda 0 0 lob 0 0 0 xub 0 sll 0 -4 jmp 2 * 4 jmp 5 * 3 lll 8 0 lll 12 1 obl 13 1 0 ret ret efn 36 : _setbits csv ldw 8 0 xtw 0 sll 0 -4 * 0 lll -4 0 tsl 0 brc 4 1 ldl 0 0 lla 12 0 ill -1 -4 lll -4 1 adl 4 1 sxl 0 1 0 jmp 0 * 1 * 2 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xub 0 sll 0 -4 tsl 0 brc 4 3 lla 12 0 lll -4 0 ldw 5 1 xtw 1 obl 11 1 0 adl 4 0 lax 0 0 0 lol 0 0 0 ldl 1 1 lll -4 2 ldw 31 3 xtw 3 obl 3 3 2 obl 10 2 1 obl 1 1 0 sol 0 0 0 jmp 2 * 3 ret efn 4 : strtol csv ldl 0 0 sll 0 -4 ldw 0 0 slw 0 -6 llw 16 0 cdw 0 11 brc 9 0 ldw 47 0 llw 16 1 obw 12 1 0 jmp 1 * 0 ldw 57 0 * 1 slw 0 -8 ldw 87 0 llw 16 1 obw 12 1 0 slw 0 -10 ldw 55 0 llw 16 1 obw 12 1 0 slw 0 -12 * 2 lla 8 0 lob 0 0 0 cdb 0 32 brc 4 4 lla 8 0 lob 0 0 0 cdb 0 9 brc 5 3 * 4 ill 1 8 lll 8 0 jmp 2 * 3 lla 8 0 lob 0 0 0 cdb 0 45 brc 5 5 ldw 1 0 slw 0 -6 ill 1 8 lll 8 0 * 5 lla 8 0 lob 0 0 0 cdb 0 48 brc 5 6 lla 8 0 ldw 1 0 xtw 0 lxb 0 0 0 cdb 0 120 brc 4 8 lla 8 0 ldw 1 0 xtw 0 lxb 0 0 0 cdb 0 88 brc 5 7 * 8 llw 16 0 cdw 0 16 brc 5 7 lll 8 0 ldw 2 1 xtw 1 obl 12 1 0 sll 0 8 * 7 * 6 lla 8 0 lob 0 0 0 xtb 0 slw 0 -14 * 9 jmp 11 * 12 ill 1 8 lll 8 0 tda 0 0 lob 0 0 0 xtb 0 slw 0 -14 jmp 9 * 11 llw -14 0 cdw 0 48 brc 6 13 llw -14 0 llw -8 1 cmw 0 1 brc 7 13 llw -14 0 ldw 48 1 obw 13 1 0 slw 0 -14 jmp 14 * 13 llw -14 0 cdw 0 97 brc 6 15 llw -14 0 llw -10 1 cmw 0 1 brc 9 15 llw -14 0 ldw 97 1 obw 13 1 0 ldw 10 1 obw 12 1 0 slw 0 -14 jmp 16 * 15 llw -14 0 cdw 0 65 brc 6 17 llw -14 0 llw -12 1 cmw 0 1 brc 9 17 llw -14 0 ldw 65 1 obw 13 1 0 ldw 10 1 obw 12 1 0 slw 0 -14 jmp 18 * 17 lll 12 0 cdl 0 0 brc 20 19 lll 8 0 lla 12 0 sol 0 0 0 * 19 llw -6 0 tsw 0 brc 4 20 lll -4 0 oul 18 0 jmp 21 * 20 lll -4 0 * 21 ret * 18 * 16 * 14 lll -4 0 llw 16 1 xtw 1 phl 1 phl 0 jsr _lmul pop 8 llw -14 1 xtw 1 obl 12 1 0 sll 0 -4 jmp 12 * 10 ret efn 14 : strlower csv lll 8 0 sll 0 -6 * 0 lla -6 0 lob 0 0 0 slb 0 -2 tsb 0 brc 4 1 jmp 2 * 3 ill 1 -6 lll -6 0 jmp 0 * 2 llb -2 0 cdb 0 65 brc 6 4 llb -2 0 cdb 0 90 brc 7 4 llb -2 0 ldw -32 1 xtb 0 obw 13 1 0 lla -6 0 sob 0 0 0 * 4 jmp 3 * 1 lll 8 0 ret ret efn 6 : strupper csv lll 8 0 sll 0 -6 * 0 lla -6 0 lob 0 0 0 slb 0 -2 tsb 0 brc 4 1 jmp 2 * 3 ill 1 -6 lll -6 0 jmp 0 * 2 llb -2 0 cdb 0 97 brc 6 4 llb -2 0 cdb 0 122 brc 7 4 llb -2 0 ldw 32 1 xtb 0 obw 13 1 0 lla -6 0 sob 0 0 0 * 4 jmp 3 * 1 lll 8 0 ret ret efn 6 : memcpy csv * 0 llw 16 0 ilw -1 16 cdw 0 0 brc 8 1 lll 12 0 ill 1 12 tda 0 0 lob 0 0 0 lll 8 1 ill 1 8 tda 1 0 sob 0 0 0 jmp 0 * 1 ret efn 0 : _ltof csv lll 8 0 cdl 0 0 brc 9 1 ldw 1 0 jmp 2 * 1 ldw 0 0 * 2 slw 0 -2 tsw 0 brc 4 0 lll 8 0 oul 18 0 sll 0 8 * 0 pll 8 pdw 24 plw -2 jsr _fnorm pop 8 ret ret efn 2 : _ftol csv lll 8 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 slw 0 -4 lll 8 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -2 lll 8 0 ldl 16777215 1 obl 3 1 0 sll 0 -8 llw -2 0 cdw 0 0 brc 7 0 ldl 0 0 ret jmp 1 * 0 llw -2 0 cdw 0 24 brc 9 2 lll -8 0 ldw 24 1 llw -2 2 obw 13 2 1 xtw 1 obl 26 1 0 sll 0 -8 jmp 3 * 2 llw -2 0 cdw 0 24 brc 5 4 jmp 5 * 4 llw -2 0 cdw 0 32 brc 9 6 lll -8 0 llw -2 1 ldw 24 2 obw 13 2 1 xtw 1 obl 10 1 0 sll 0 -8 jmp 7 * 6 l$ 0 0 tad 0 0 phl 0 jsr _ferr pop 4 ldl 2147483647 0 sll 0 -8 * 7 * 5 * 3 * 1 llw -4 0 tsw 0 brc 4 8 lll -8 0 oul 18 0 jmp 9 * 8 lll -8 0 * 9 ret ret efn 8 $ 0 = 26228 = 28524 = 8303 = 30309 = 29286 = 27759 = 30474 = 3328 : _fcmp csv lll 8 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 tsl 0 brc 4 0 lll 12 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 tsl 0 brc 4 0 lll 12 0 lll 8 1 obl 13 1 0 jmp 1 * 0 lll 8 0 lll 12 1 obl 13 1 0 * 1 ret ret efn 0 : _fneg csv lll 8 0 ldl 2147483648 1 obl 2 1 0 ret ret efn 0 : _fsub csv lll 12 0 ldl 2147483648 1 obl 2 1 0 phl 0 pll 8 jsr _fadd pop 8 ret ret efn 0 : _fadd csv lll 8 0 cdl 0 0 brc 5 0 lll 12 0 ret * 0 lll 12 0 cdl 0 0 brc 5 1 lll 8 0 ret * 1 lll 8 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -6 lll 12 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -8 lll 8 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 tsl 0 brc 4 2 lll 8 0 ldl 16777215 1 obl 3 1 0 oul 18 0 jmp 3 * 2 lll 8 0 ldl 16777215 1 obl 3 1 0 * 3 sll 0 -14 lll 12 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 tsl 0 brc 4 4 lll 12 0 ldl 16777215 1 obl 3 1 0 oul 18 0 jmp 5 * 4 lll 12 0 ldl 16777215 1 obl 3 1 0 * 5 sll 0 -18 llw -6 0 llw -8 1 obw 13 1 0 slw 0 -2 llw -2 0 cdw 0 -24 brc 7 6 lll -18 0 sll 0 -22 llw -8 0 slw 0 -10 jmp 7 * 6 llw -2 0 cdw 0 0 brc 7 8 llw -2 0 tsw 0 brc 4 9 lll -14 0 llw -2 1 ouw 18 1 xtw 1 obl 26 1 0 sll 0 -14 * 9 lll -18 0 lll -14 1 obl 12 1 0 sll 0 -22 llw -8 0 slw 0 -10 jmp 10 * 8 llw -2 0 cdw 0 24 brc 9 11 lll -18 0 llw -2 1 xtw 1 obl 26 1 0 sll 0 -18 lll -18 0 lll -14 1 obl 12 1 0 sll 0 -22 llw -6 0 slw 0 -10 jmp 12 * 11 lll -14 0 sll 0 -22 llw -6 0 slw 0 -10 * 12 * 10 * 7 lll -22 0 cdl 0 0 brc 9 14 ldw 1 0 jmp 15 * 14 ldw 0 0 * 15 slw 0 -4 tsw 0 brc 4 13 lll -22 0 oul 18 0 sll 0 -22 * 13 pll -22 plw -10 plw -4 jsr _fnorm pop 8 ret ret efn 22 : _fmul csv lll 8 0 ldl 16777215 1 obl 3 1 0 sll 0 -12 cdl 0 0 brc 5 0 ldl 0 0 ret * 0 lll 12 0 ldl 16777215 1 obl 3 1 0 sll 0 -16 cdl 0 0 brc 5 1 ldl 0 0 ret * 1 lll 8 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -6 lll 12 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -8 lll 8 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 lll 12 1 ldw 31 2 xtw 2 obl 26 2 1 ldw 1 2 xtw 2 obl 3 2 1 obl 2 1 0 slw 0 -2 llw -6 0 llw -8 1 ldw 8 2 obw 13 2 1 obw 12 1 0 slw 0 -4 lll -12 0 ldw 8 1 xtw 1 obl 26 1 0 lll -16 1 ldw 8 2 xtw 2 obl 26 2 1 phl 1 phl 0 jsr _lmul pop 8 sll 0 -20 pll -20 plw -4 plw -2 jsr _fnorm pop 8 ret ret efn 20 : _fdiv csv lll 8 0 ldl 16777215 1 obl 3 1 0 sll 0 -12 cdl 0 0 brc 5 0 ldl 0 0 ret * 0 lll 12 0 ldl 16777215 1 obl 3 1 0 sll 0 -16 cdl 0 0 brc 5 1 ldl 0 0 ret * 1 lll 8 0 ldw 31 1 xtw 1 obl 26 1 0 ldw 1 1 xtw 1 obl 3 1 0 lll 12 1 ldw 31 2 xtw 2 obl 26 2 1 ldw 1 2 xtw 2 obl 3 2 1 obl 2 1 0 slw 0 -2 lll 8 0 ldw 24 1 xtw 1 obl 26 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 lll 12 1 ldw 24 2 xtw 2 obl 26 2 1 ldw 127 2 xtw 2 obl 3 2 1 ldw 64 2 xtw 2 obl 13 2 1 obl 13 1 0 ldw 1 1 xtw 1 obl 12 1 0 slw 0 -4 ldl 0 0 sll 0 -20 ldl 8388608 0 sll 0 -8 * 2 lll -8 0 tsl 0 brc 4 3 lll -12 0 lll -16 1 cml 0 1 brc 6 4 lll -20 0 lll -8 1 obl 12 1 0 sll 0 -20 lll -12 0 lll -16 1 obl 13 1 0 sll 0 -12 * 4 lll -8 0 ldw 1 1 xtw 1 obl 26 1 0 sll 0 -8 lll -16 0 ldw 1 1 xtw 1 obl 26 1 0 sll 0 -16 jmp 2 * 3 pll -20 plw -4 plw -2 jsr _fnorm pop 8 ret ret efn 20 : atof csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lla 8 0 lob 0 0 0 cdb 0 32 brc 7 1 lll 8 0 ill 1 8 jmp 0 * 1 lla 8 0 lob 0 0 0 cdb 0 45 brc 5 4 ldw 1 0 jmp 5 * 4 ldw 0 0 * 5 slw 0 -8 tsw 0 brc 5 3 lla 8 0 lob 0 0 0 cdb 0 43 brc 5 2 * 3 lll 8 0 ill 1 8 * 2 ldl 0 0 sll 0 -12 * 6 lla 8 0 lob 0 0 0 cdb 0 48 brc 6 7 lla 8 0 lob 0 0 0 cdb 0 57 brc 7 7 lll -12 0 ldl 10 1 phl 1 phl 0 jsr _ulmul pop 8 lll 8 1 ill 1 8 tda 1 0 lob 0 0 1 ldw 48 2 xtb 1 obw 13 2 1 xtw 1 obl 12 1 0 sll 0 -12 jmp 6 * 7 ldl 0 0 sll 0 -16 lla 8 0 lob 0 0 0 cdb 0 46 brc 5 8 lll 8 0 ill 1 8 ldw 0 0 slw 0 -4 * 9 llw -4 0 cdw 0 9 brc 9 10 jmp 11 * 12 llw -4 0 ilw 1 -4 jmp 9 * 11 lla 8 0 lob 0 0 0 cdb 0 48 brc 6 13 lla 8 0 lob 0 0 0 cdb 0 57 brc 7 13 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 ldw 48 1 xtb 0 obw 13 1 0 slw 0 -6 jmp 14 * 13 ldw 0 0 slw 0 -6 * 14 lll -16 0 ldl 10 1 phl 1 phl 0 jsr _ulmul pop 8 llw -6 1 xtw 1 obl 12 1 0 sll 0 -16 jmp 12 * 10 ldl 500000000 0 sll 0 -28 * 8 lll -12 0 tsl 0 brc 4 15 pll -12 pdw 24 plw -8 jsr _fnorm pop 8 sll 0 -20 lll -20 0 ldw 24 1 xtw 1 obl 11 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -2 jmp 16 * 15 ldl 0 0 sll 0 -20 slw 0 -2 * 16 lll -16 0 tsl 0 brc 4 17 llw -2 0 cdw 0 24 brc 9 17 lll -20 0 ldl 16777215 1 obl 3 1 0 sll 0 -20 ldl 1 0 ldw 23 1 llw -2 2 obw 13 2 1 xtw 1 obl 10 1 0 sll 0 -24 * 18 lll -24 0 tsl 0 brc 4 19 lll -16 0 tsl 0 brc 4 19 lll -16 0 lll -28 1 cml 0 1 brc 22 20 lll -16 0 lll -28 1 obl 13 1 0 sll 0 -16 lll -20 0 lll -24 1 obl 1 1 0 sll 0 -20 * 20 lll -24 0 ldw 1 1 xtw 1 obl 11 1 0 sll 0 -24 lll -28 0 ldw 1 1 xtw 1 obl 11 1 0 sll 0 -28 jmp 18 * 19 lll -16 0 tsl 0 brc 4 21 lll -20 0 ill 1 -20 * 21 pll -20 plw -2 plw -8 jsr _fnorm pop 8 sll 0 -20 * 17 lll -20 0 tsl 0 brc 4 22 lla 8 0 lob 0 0 0 cdb 0 101 brc 4 23 lla 8 0 lob 0 0 0 cdb 0 69 brc 5 22 * 23 ldw 0 0 slw 0 -4 lll 8 0 ill 1 8 lla 8 0 lob 0 0 0 cdb 0 45 brc 5 26 ldw 1 0 jmp 27 * 26 ldw 0 0 * 27 slw 0 -6 tsw 0 brc 5 25 lla 8 0 lob 0 0 0 cdb 0 43 brc 5 24 * 25 lll 8 0 ill 1 8 * 24 ldw 0 0 slw 0 -4 * 28 lla 8 0 lob 0 0 0 cdb 0 48 brc 6 29 lla 8 0 lob 0 0 0 cdb 0 57 brc 7 29 jmp 30 * 31 lll 8 0 ill 1 8 jmp 28 * 30 llw -4 0 ldw 10 1 obw 14 1 0 lla 8 0 lob 0 0 1 ldw 48 2 xtb 1 obw 13 2 1 obw 12 1 0 slw 0 -4 jmp 31 * 29 llw -6 0 tsw 0 brc 4 32 llw -4 0 ouw 18 0 slw 0 -4 * 32 * 33 llw -4 0 cdw 0 0 brc 8 34 lll -20 0 ldw 24 1 xtw 1 obl 11 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -2 lll -20 0 ldl 16777215 1 obl 3 1 0 sll 0 -20 lll -20 0 ldl 10 1 phl 1 phl 0 jsr _ulmul pop 8 phl 0 plw -2 plw -8 jsr _fnorm pop 8 sll 0 -20 llw -4 0 ilw -1 -4 jmp 33 * 34 * 35 llw -4 0 cdw 0 0 brc 9 36 lll -20 0 ldw 24 1 xtw 1 obl 11 1 0 ldw 127 1 xtw 1 obl 3 1 0 ldw 64 1 xtw 1 obl 13 1 0 slw 0 -2 lll -20 0 ldl 16777215 1 obl 3 1 0 sll 0 -20 lll -20 0 ldl 10 1 phl 1 phl 0 jsr _uldiv pop 8 phl 0 plw -2 plw -8 jsr _fnorm pop 8 sll 0 -20 llw -4 0 ilw 1 -4 jmp 35 * 36 * 22 lll -20 0 ret ret efn 28 : _fnorm csv lll 12 0 cdl 0 0 brc 21 0 ldl 0 0 ret jmp 1 * 0 * 2 lll 12 0 ldl -16777216 1 obl 3 1 0 tsl 0 brc 4 3 lll 12 0 ldw 1 1 xtw 1 obl 11 1 0 lll 12 1 ldw 1 2 xtw 2 obl 3 2 1 obl 12 1 0 sll 0 12 llw 10 0 ilw 1 10 jmp 2 * 3 * 4 lll 12 0 ldl 8388608 1 obl 3 1 0 cdl 0 0 brc 21 5 lll 12 0 ldw 1 1 xtw 1 obl 10 1 0 sll 0 12 llw 10 0 ilw -1 10 jmp 4 * 5 * 1 llw 10 0 cdw 0 64 brc 6 6 l$ 0 0 tad 0 0 phl 0 jsr _ferr pop 4 llw 8 0 xtw 0 ldw 31 1 xtw 1 obl 10 1 0 ldl 2147483647 1 obl 1 1 0 ret jmp 7 * 6 llw 10 0 cdw 0 -64 brc 9 8 l$ 1 0 tad 0 0 phl 0 jsr _ferr pop 4 ldl 0 0 ret * 8 * 7 llw 8 0 xtw 0 ldw 31 1 xtw 1 obl 10 1 0 llw 10 1 ldw 64 2 obw 12 2 1 xtw 1 ldw 127 2 xtw 2 obl 3 2 1 ldw 24 2 xtw 2 obl 10 2 1 obl 1 1 0 lll 12 1 ldl 16777215 2 obl 3 2 1 obl 1 1 0 ret ret efn 0 $ 0 = 26220 = 28513 = 29728 = 28534 = 25970 = 26220 = 28535 = 2573 = 0 $ 1 = 26220 = 28513 = 29728 = 30062 = 25701 = 29286 = 27759 = 30474 = 3328 : _ferr csv * 0 lla 8 0 lob 0 0 0 tsb 0 brc 4 1 lll 8 0 ill 1 8 tda 0 0 lob 0 0 0 xtb 0 phw 0 pdw 2 trp 1 pop 4 jmp 0 * 1 ret efn 0 : _lmul csv ldw 0 0 slw 0 -2 lll 8 0 cdl 0 0 brc 9 0 llw -2 0 ilw 1 -2 lll 8 0 oul 18 0 sll 0 8 * 0 lll 12 0 cdl 0 0 brc 9 1 llw -2 0 ilw 1 -2 lll 12 0 oul 18 0 sll 0 12 * 1 pll 12 pll 8 jsr _ulmul pop 8 sll 0 8 llw -2 0 ldw 1 1 obw 3 1 0 tsw 0 brc 4 2 lll 8 0 oul 18 0 jmp 3 * 2 lll 8 0 * 3 ret ret efn 2 : _ldiv csv ldw 0 0 slw 0 -2 lll 8 0 cdl 0 0 brc 9 0 llw -2 0 ilw 1 -2 lll 8 0 oul 18 0 sll 0 8 * 0 lll 12 0 cdl 0 0 brc 9 1 llw -2 0 ilw 1 -2 lll 12 0 oul 18 0 sll 0 12 * 1 pdw 0 pll 12 pll 8 jsr _ldivmod pop 10 sll 0 8 llw -2 0 ldw 1 1 obw 3 1 0 tsw 0 brc 4 2 lll 8 0 oul 18 0 jmp 3 * 2 lll 8 0 * 3 ret ret efn 2 : _lmod csv lll 8 0 cdl 0 0 brc 9 0 lll 8 0 oul 18 0 sll 0 8 * 0 lll 12 0 cdl 0 0 brc 9 1 lll 12 0 oul 18 0 sll 0 12 * 1 pdw 1 pll 12 pll 8 jsr _ldivmod pop 10 ret ret efn 0 : _ulmul csv ldl 0 0 sll 0 -4 * 0 lll 8 0 tsl 0 brc 4 1 lll 8 0 ldl 1 1 obl 3 1 0 tsl 0 brc 4 2 lll -4 0 lll 12 1 obl 12 1 0 sll 0 -4 * 2 lll 8 0 ldl 1 1 obl 11 1 0 sll 0 8 lll 12 0 ldl 1 1 obl 10 1 0 sll 0 12 jmp 0 * 1 lll -4 0 ret ret efn 4 : _uldiv csv pdw 0 pll 12 pll 8 jsr _ldivmod pop 10 ret ret efn 0 : _ulmod csv pdw 1 pll 12 pll 8 jsr _ldivmod pop 10 ret ret efn 0 : _ldivmod csv ldw 0 0 slw 0 -2 ldl 0 0 sll 0 -6 lll 12 0 tsl 0 brc 4 0 * 1 lll 8 0 lll 12 1 cml 0 1 brc 24 2 lll 12 0 ldl 2147483648 1 obl 3 1 0 tsl 0 brc 5 2 llw -2 0 ilw 1 -2 lll 12 0 ldl 1 1 obl 10 1 0 sll 0 12 jmp 1 * 2 * 3 lll 8 0 lll 12 1 cml 0 1 brc 22 5 lll 8 0 lll 12 1 obl 13 1 0 sll 0 8 lll -6 0 ill 1 -6 * 5 llw -2 0 cdw 0 0 brc 5 6 jmp 4 * 6 llw -2 0 ilw -1 -2 lll -6 0 ldl 1 1 obl 10 1 0 sll 0 -6 lll 12 0 ldl 1 1 obl 11 1 0 sll 0 12 jmp 3 * 4 llw 16 0 tsw 0 brc 4 7 lll 8 0 jmp 8 * 7 lll -6 0 * 8 ret jmp 9 * 0 llw -2 0 ldw 0 1 obw 15 1 0 * 9 ret efn 6 lib.a: lib.s fmtio.s str.s math.s cat fmtio.s lib.s str.s math.s >lib.a gem.a: gem.c d:cc.ttp -o gem.a gem.c `Ov!,O .#WvOWvN,NV0<=@A: -@0<=@=@0<=@0.2.Al . @0. 0 @2<-HAf`0.Rn` . @0. 0 @0<H0HH`0.Rn . @0. 0-@`00<3`"0<3`0<=@`0<3`0<3`09 J@f 0<`0<3 ` . @0. 0/AD /N10<=@`` Hg hg Rg| rgr NgZ ngP Tg: tg0 Dg dg Ig ig Fg fg`:`|0.J@gAX /N+0.J@g:0.2.Al( . @0.Rn 0/Nv``N ./N60.2.Af(09$2<Am09$?N`r0.2.Ald`0.Rn` . @0. 0/N J@f, . @0. 0/N'?N`0<?N)DN^Numakefileunknown option: %s usage: make [-i -n -t -r -d -h -f file] [targets] NV <A_2<A!@0<=@0.2<dAl.`0.Rn` <AZ2.!`09J@gN^Nu <-@A^ / ./N-@An / ./N-@A / ./N-@ ./A /A /N <-@A / ./N-@A / ./N-@A / ./N-@ ./A /A /N <-@A / ./N-@ ./A2 /A. /N N^Nu d:\cc.ttp $*.c d:\as.ttp -o $*.ttp d:\ttp.s yc.out -L d:\lib.a rm yc.out.c.ttp d:\cc.ttp $*.c d:\as.ttp -o $*.prg d:\prg.s yc.out -L d:\gem.a d:\lib.a rm yc.out.c.prg d:\cc.ttp -o $*.s $*.c.c.sNV ./NJ@fN^NuN09W~J@f|AW2<#HAf N`ZN J@g N`DAW2<.HAf N 8`&AW2< HAo N`N`| 9Wz/N1N^NuNVA / ./N32#WzJg 0<N^Nu0<?NA=@0<=@0.2<Alz`0.Rn`0.?0<?NA=@A / ./N32#WzJg*0.2<AA?A /N10<N^Nu`0.?0<?NA0<N^NuN^Nurr run from %c: NVAW -@N =@0.20.2AZ0.  0/AZ0. 0/A /N1 0<?N(-@0. ". A0A\0. 0". A!@ .A\2.!N^Nuadd_dep(%s,%s) NV09J@g" . / ./AN /N1 . AY`H瀀 ./N'"L!N^Nuadd_mac(%s,%s) NV09J@g0 . /AZ0. 0/A /N1 . A^2.!N^Nuset_cmd(%s,%lx) NV09J@g( ./ . / ./A /N1 ./N'A_29"A0 . /N'A_29"A1@ .A_29"A!@Ry"09"2<AmA /N+ <A_29"A!@N^Nuadd_rule(%s,%s,%lx) too many rulesNV09J@g*AZ0. 0/Aj /N1AZ0. 0/Np-@0<=@A\0. 0-@Jg^ .JgP . @0?N ./ . @0?NPJ@g 0<=@ . @ (-@`` 0<=@0.J@gAZ0. 0/Aa0 /NF:Aa0 /At /NA^0. 0-@Jg*Aa0 /N:" ./N` ./0.?NN^Numake(%s) @NV0<? ./N:Z=@2<Am0<*?NAJg 0<`0<H0<,?NA"L4<HH-@0<?0.?A /0<W?NA =@J@g ./0.?N)0.?N:@`"0.? ./AZ /N+ N^Nucannot open %s (%d) NV0<? ./N:Z=@2<Amd0<?0.?A /0<W?NA .2<"<".4<婀-@0.?N:@` <-@09J@g" ./ ./A< /N1 .N^NuN^Nudate of %s is %lx NVAZ0. 0/Np-@ .". o 0<`0<N^NuN^NuNVAZ0. 0-@0<=@=@ . @0.H0A`2.HJg:`0.Rn` . @0.H02<.HAf 0.=@`0.2<Af 0<N^Nu . @0.HA -@0<A`2.HA` /N'=@ ./N'=@09"=@Sn0.2<Am A_0.A -@ . @0(2.AfA` /AX /NF:AZ ."@0 0/AX /NE`AX /N'=@0.?NAZ0. 0/A /N . /0.?NPJ@g:AZ0. 0/N:" . @ (/NN^Nu`N^Nu*NV .Jg . @ /AW /NF:N 8AW /A~ /N109J@fFAW /N%=@J@g(09J@fA /0.?N) . @ (-@`TN^Nu %s command failedNV0<3bA / ./NG6-@ 9o#b 9o#c09b2<KAl ."<g . @2<>HAfv . @0<H02<>HAf.A$ / .2<HЁ/N32#c`*A& / .2<HЁ/N32#c`` . @2<0.". AA' / ./AX /0<?0<K?NA=@0.N^NuN^Nucommand line too longNV ./N(F . @H=@=@AZ0. 0JgxAZ0. 0/ ./NE2<Af 0.N^NuRn0.2<dAm 0<=@0.2.AfA(4 /N+`t ./N(AZ2.! <A\2.!AY`2.!A^2.!0.N^NuN^Nutoo many symbolsNV . @H*@J@gD` .R` 2<aAm$ 2<zAn 2<aA2<AA". A`N^NuNV ./NF2<A?N(-@ ./ ./NF: .N^NuN^NuNV0.?NC-@"<fA)2 /N+ .N^NuN^Nuout of free spaceNV09 J@gA) /N1N6X0.?N1N^Nu(press any char) NV0.H`A* -@` A* -@`A+ -@`A+ -@`A+0 -@`A+D -@`A+T -@`A+f -@`A+z -@`0.?A+ /AX -@/N:~ `` g g g gn gT g: g g g`x . / ./A+ /N+ N^Nuinvalid function numberfile not foundpathname not foundtoo many open filesaccess not possibleinvalid handlenot enough memoryinvalid drive specno more fileserror %d%s: %sNVA, /N1 ./ ./ ./ . / ./N1A, /N10<?N)DN^Nu** NV ."<fA0 /N1Z0<N^Nu .-@ . @0< 0". A2<"0Ё". A2<"0Ё2<HЁ-@ ./ ./0<?0<J?NA Jg0HAf .2<HЁ-@`009c2<2Al .Ac29cRyc!` <Ac29c!0<=@0.2<Alt`0.Rn`0<Ac2.A0<Ac2.A1@Ac2.A1@Ac2.A@`Ac0<A #oAc0<A #oAc0<A #o0<"9o A"9o A"9o A .Jg\0<? ./0<=?NA=@"9o A@0<"9o A0.2<Al0.? ./N0 .Jg . @2<>HAg.0<? ./0<?NA0<". AN^NuNV ./N6v=@0.2 . @2<wHAf0<=@0<=@`0<=@0<=@`pA6 / ./NE2<Af0<=@0<=@`8 . @2<wHAf*0<? ./0<?NAN^NuNV0. ? ./0<=?NAN^NuN^NuNVA / . / ./N: ".N^NuN^NuNV . @@`R . @@`.2<%HAgD.".R A.2<f .2<HN^NuR . @@`R . @@0<=@`R . @@`.2<-HAf0.2<A=@`l.2<+HAf0.2<A=@`J.2< HAf0.2<A=@`(.2<#HAf0.2<A=@```^.2<*HAf& .T @0=@R . @@`N.2<0HAf0.2<A=@0< ?A / . /NJ =@ . @@0<=@.2<.HAftR . @@.2<*HAf& .T @0=@R . @@`00< ?A / . /NJ =@ . @@.2<lHAf 0.2< A=@R . @@.HH`D0.?0.?A /0.2<@A?0< ? ./N?-@`0.?0.?A /0.?0<? ./N?-@`T0.?0.?A /0.?0< ? ./N?-@`0.2<A=@0.?0.?A /0.?0<? ./N?-@`` .T @0".R A`0.2<Al 0<=@ .-@ .X @ -@ .-@0<=@ . @0.H02<g$0.2.Al`Rn0.``0.2.A=@0.2<A2<Af(0.Sn2<Ao0< ".R A`0.SnJ@g .R @".R A`0.Sn2<Ao0< ".R A``.".R A`` %g sg cg Gg gg Egx egn fgd Xg" xg ug og dg>`d`N^NuNVA -@A -@0.2< AJ@g. . @ -@ .X @ -@ .". A `. . @  @0H-@ . @ 2<Ё". A 0.2<@AJ@gt .2<Hl 0<-".R A .D-@`F0.2<AJ@g0<+".R A`"0.2<AJ@g0< ".R A .-@ .Jg .2. //0<?NM =@0.2< Al0.2<0A`*0.2< A2.4<BJAg 2<a`2<AA".R A .2. //0<?NM -@`X .A"=@ .A"=@0.2.ܐA=@0.2<AJ@g0.2.ܐA=@0.2<Al 0<=@0.2<AJ@g0. 2<Af"0.2.Am0.2<A=@`d0. 2<AfV0<0".R A0.2<AJ@g 0<x`0<X".R A0.2<A=@0.2<A=@0.2.4.Bo 2.`2.A=@0.2<Al 0<=@0.2<A2<Af,0.SnJ@g0< ".R A`0<=@0.?A / ./NFt .2.HЁ-@0.Sn2.ذAo0<0".R A`0.SnJ@gS . @".R A`0.SnJ@g0< ".R A` .N^NuN^NuNV0.2<A2<A2P   8&& 6 F     X " 4$       @$ H\^0     $ ND    , . x ( ( (8 0$D0B$ "    @T\zL(Px̂(88F v N,`/* * OSBIND.H Mnemonic names for operating system calls * * Adapted from Dale Schumacher's version to Mark Johnson C by Eric Gisin. * Notes: * There are bugs in MJ C's macro expansion. * If you get syntax errors using these macros, * Try enclosing the macro call with asm() and compile. * Then look at the yc.out to see the macro expansion. */ /* * GEMDOS (trap1) */ #define Pterm0() trap(1,0x00) #define Cconin() trap(1,0x01) #define Cconout(c) trap(1,0x02,c) #define Cauxin() trap(1,0x03) #define Cauxout(c) trap(1,0x04,c) #define Cprnout(c) trap(1,0x05,c) #define Crawio(data) trap(1,0x06,data) #define Crawcin() trap(1,0x07) #define Cnecin() trap(1,0x08) #define Cconws(s) trap(1,0x09,s) #define Cconrs(buf) trap(1,0x0A,buf) #define Cconis() (int)trap(1,0x0B) #define Dsetdrv(d) trap(1,0x0E,d) #define Cconos() trap(1,0x10) #define Cprnos() trap(1,0x11) #define Cauxis() trap(1,0x12) #define Cauxos() trap(1,0x13) #define Dgetdrv() (int)trap(1,0x19) #define Fsetdta(dta) trap(1,0x1A,dta) #define Super(ptr) trap(1,0x20,ptr) #define Tgetdate() (int)trap(1,0x2A) #define Tsetdate(date) trap(1,0x2B,date) #define Tgettime() (int)trap(1,0x2C) #define Tsettime(time) trap(1,0x2D,time) #define Fgetdta() trap(1,0x2F) #define Sversion() (int)trap(1,0x30) #define Ptermres(save,rv) trap(1,0x31,save,rv) #define Dfree(buf,d) trap(1,0x36,buf,d) #define Dcreate(path) trap(1,0x39,path) #define Ddelete(path) trap(1,0x3A,path) #define Dsetpath(path) trap(1,0x3B,path) #define Fcreate(fn,mode) trap(1,0x3C,fn,mode) #define Fopen(fn,mode) trap(1,0x3D,fn,mode) #define Fclose(H) trap(1,0x3E,H) #define Fread(H,cnt,buf) trap(1,0x3F,H,cnt,buf) #define Fwrite(H,cnt,buf) trap(1,0x40,H,cnt,buf) #define Fdelete(fn) trap(1,0x41,fn) #define Fseek(where,H,how) trap(1,0x42,where,H,how) #define Fattrib(fn,rwflag,attr) trap(1,0x43,fn,rwflag,attr) #define Fdup(H) trap(1,0x45,H) #define Fforce(Hstd,Hnew) trap(1,0x46,Hstd,Hnew) #define Dgetpath(buf,d) trap(1,0x47,buf,d) #define Malloc(size) trap(1,0x48,size) #define Mfree(ptr) trap(1,0x49,ptr) #define Mshrink(ptr,size) trap(1,0x4A,0,ptr,size) #define Pexec(mode,prog,tail,env) trap(1,0x4B,mode,prog,tail,env) #define Pterm(rv) trap(1,0x4C,rv) #define Fsfirst(filespec,attr) (int)trap(1,0x4E,filespec,attr) #define Fsnext() (int)trap(1,0x4F) #define Frename(zero,old,new) trap(1,0x56,zero,old,new) #define Fdatime(timeptr,H,rwflag) trap(1,0x57,timeptr,H,rwflag) /* * BIOS (trap13) */ #define Bconstat(DEV) trap(13,1,DEV) #define Bconin(DEV) trap(13,2,DEV) #define Bconout(DEV,c) trap(13,3,DEV,c) #define Rwabs(rwflag,buf,n,sector,d) trap(13,4,rwflag,buf,n,sector,d) #define Setexc(vnum,vptr) trap(13,5,vnum,vptr) #define Tickcal() trap(13,6) #define Getbpb(d) trap(13,7,d) #define Bcostat(DEV) trap(13,8,DEV) #define Mediach(d) trap(13,9,a) #define Drvmap() trap(13,10) #define Getshift() trap(13,11,-1) #define Kbshift(data) trap(13,11,data) /* * XBIOS (trap14) */ #define Initmous(type,param,vptr) trap(14,0,type,param,vptr) #define Physbase() trap(14,2) #define Logbase() trap(14,3) #define Getrez() (int)trap(14,4) #define Setscreen(lscrn,pscrn,rez) trap(14,5,lscrn,pscrn,rez) #define Setpallete(palptr) trap(14,6,palptr) #define Setcolor(colornum,mixture) trap(14,7,colornum,mixture) #define Floprd(buf,x,d,sect,trk,side,n) trap(14,8,buf,x,d,sect,trk,side,n) #define Flopwr(buf,x,d,sect,trk,side,n) trap(14,9,buf,x,d,sect,trk,side,n) #define Flopfmt(b,x,d,spt,trk,sd,i,m,v) trap(14,10,b,x,d,spt,trk,sd,i,m,v) #define Midiws(cnt,ptr) trap(14,12,cnt,ptr) #define Mfpint(vnum,vptr) trap(14,13,vnum,vptr) #define Iorec(ioDEV) trap(14,14,ioDEV) #define Rsconf(baud,flow,uc,rs,ts,sc) trap(14,15,baud,flow,uc,rs,ts,sc) #define Keytbl(nrml,shft,caps) trap(14,16,nrml,shft,caps) #define Random() trap(14,17) #define Protobt(buf,serial,dsktyp,exec) trap(14,18,buf,serial,dsktyp,exec) #define Flopver(buf,x,d,sect,trk,sd,n) trap(14,19,buf,x,d,sect,trk,sd,n) #define Scrdmp() trap(14,20) #define Cursconf(func,rate) trap(14,21,func,rate) #define Settime(time) trap(14,22,time) #define Gettime() trap(14,23) #define Bioskeys() trap(14,24) #define Ikbdws(len_minus1,ptr) trap(14,25,len_minus1,ptr) #define Jdisint(vnum) trap(14,26,vnum) #define Jenabint(vnum) trap(14,27,vnum) #define Giaccess(data,reg) trap(14,28,data,reg) #define Offgibit(ormask) trap(14,29,ormask) #define Ongibit(andmask) trap(14,30,andmask) #define Xbtimer(timer,ctrl,data,vnum) trap(14,31,timer,ctrl,data,vnum) #define Dosound(ptr) trap(14,32,ptr) #define Setprt(config) trap(14,33,config) #define Kbdvbase() trap(14,34) #define Kbrate(delay,reprate) trap(14,35,delay,reprate) #define Prtblk(pblkptr) trap(14,36,pblkptr) #define Vsync() trap(14,37) #define Supexec(funcptr) trap(14,38,funcptr) /* * stdio.h * * the standard i/o header */ #define BOOLEAN int #define FILE char #define EOF (-1) #define NULL (0L) #define TRUE (0) #define FALSE (-1) extern FILE *stdin, *stdout, *stderr, *fopen(); extern long mfree(), time(), strtol(); extern char *gets(), *fgets(), *malloc(), *realloc(), *calloc(); extern char *strcat(), *strncat(), *strcpy(), *strncpy(); extern char *strchr(), *strrchr(), *strpbrk(), *strtok(); extern char *strlower(), *strupper(); . _bstk 2048 . _estk 4 taa 7 6 lll 4 0 sgl 0 _estk lag _estk 7 jsr _cttp `d &,BNc&`FCLEAR68K V02.00, Copyright(c) 1984, Digital Research XXXX-0000-654321 o#r"h#rE?/ NPN o AdpNu#rBNuNV0/"/ NBrd0< Ad"NB?<NAN^Nu o2/0/ HSoQBNu o0/JfBNuf SNuNV ytBhpN^NuNVH>. JGl0D@>?.aT`n`b ytJhfB yt h *h yu6fB@`B yt!M yt1m  yt(` yt0("ytSi0SGJ@fpJL N^NuNV yt"yt"i 1i pN^NuNVH>. JGl0D@>?.a*T``z yt0("yt"i 2) AfH yt ( "yu6")fB@`J yt"yt"i !Q ytBh yt(` yt0("ytRi0SGJ@fpJLN^NuNV yt"yu6"i!Q ytBh yt(pN^NuNV yt"yu6!i ytBh yt(pN^NuNVHJn l0. D@>?.a|T`l9tf 3u0tyt yt*h `*U0. Sn J@g yu6f yt!M .a? yt1_ yt(pJL N^NuNVHJn l0. D@>?.aLT`r9tf 3u0tyt yt*h `*m0. Sn J@g yu6 (f yt!M .a$? yt1_ yt(pJL N^NuNVH*nBFBD`65@ H>|:| f|`| m|fREREytn <RDm f0JL N^NuNVH>. Jnf yt(H>UGJGn~`*JGl0D@>?.arT`b`0"yt)H> yt*h`*U0SGJ@g yu6f yt!M yt!M ytBh yt(pJL N^NuNVH>. Jnf yt(H>UGJGn~`*JGl0D@>?.aT`h`0"yt)H> yt*h`*m0SGJ@g yu6 (f yt!M yt!M ytBh yt(pJL N^NuNV yt"yt!i  yt"yt1i.e"N,ppN^NuNVH ytJf.e-N,pB@`Z yt*h yt>( yt"yt!i yt"yt1i yt!M yt1G yt(pJL N^NuNVH yu6*Pu2f*U f*yt JL N^NuNVH >//<eDN*PP>|fp`0|f BW?</a\*@ fB@` `az*@.a JL0N^NuNVH *n yu6S(fH yu6"yt!i  yu6"yt1i yu6"yt!i yu6"yt1i#u6 yt!M yt!m yt(-HR-Jf4 yt!m yt1m yt!m  yt1mp`P(yt`Btg8f2 yt!l yt1l yt!l yt1l`(T fpJL0N^NuNVH>//<eXN*PP>|fp`JGf 9u6`BWBg/a\*@ gu2fp` -o.epN,pB@`n -fa(@f(yu2.aD.a>|g0`<.N[.&yt`(K&Sf&S f#t`(.N[.N)pJL8N^NuNVH a>|g0` yu2J(fFNJ*@ fB@`(mS,f)m 9m)m 9m+yu2 yu2R(*yt`< -u2f. yu2 h+P yu2 h+P BmBBm-*U fpJL0N^NuNVnH yu2(.u2ad:|g0`.e/9u2Nb6X.eafJ@g.eaXJ@fB@`&yt`Kn+g*`  B k-P` n0( T@H܀ n-P +f.?< / at\  IffSIJg*` мe` мdHJGfB.naJ@fB@` &S fJpJL8N^NuNVH>. ,.`6SG0G//< /NdPм0 _/< /Nd0P, lSG м02G` SG0G JGfJLN^NuNVH.NbX<>N*@ fB@`xBG` M2G2GQ RGFm yu2 h h yu2 h+h yu2 h!M yu2* yu2 ("yu2")f yu2!MpJL N^NuNVH*yt`-f -gp`*U fB@JL N^NuNVH*n(yt`8.f/ NaXJ@f ,g.eN,pB` `(T fJn g>vNY(@ fB`xBWN&@ f .N[.B`\(t#t)KBlB Bl0.@B,)K.e/ Nb6X./ fNb6X&'K JL8N^NuNVH *n-f -g.eN)>|g0`0-`.N m(Pf+mBmB BmpJL0N^NuNVH>P//<f N*PP>|g0` .aJLN^NuNVH>P//<fN*PP<|g0`*yt`-fv./ NaXJ@fX yu6S(fH yu6"yt!i  yu6"yt1i yu6"yt!i yu6"yt1i#u6 yt!M-HR-Jf2 yt!m yt1m yt!m  yt1m`N(yt`Btg8f2 yt!l yt1l yt!l yt1l`(T f yt&h yt(H>HǏ`&k0SGJ@g yu6 (f yt!K yt(.f%N,pp`6*U f|./aX`D>//<f2N*PP<|f0`JFf./atX`BWBg/N \*@ f f.BW?</N \*@ f.f`N,pB@` yu6S(fH yu6"yt!i  yu6"yt1i yu6"yt!i yu6"yt1i#u6 yt!M yu6(H"yu6R).a JL8N^NuNVH-yu6.N <|g0`d n(./.Nb6X.N<|gܼ|f.fuN,p`.fN,pBnB`l>N*@ f|`x0.T@HѮ yu6 h(h( yu6*+L yu6 h!MBG` M2G2Gi RGnmRn.]?</N\<JFgvN|f>/./<fN,pP&yt`< +u6f. yu6 h'P yu6 h'P BkBBk+&S f|fB@`pJL8N^NuNVH *n `RJf`S g -:g -\f(n` .мg Jg ;fBJL0N^NuNVH>P//<fN*PP>|g0`^.a>|fH./9u6Nb6X yu6(*yt` -u6f-*U f0JL N^NuNVH yu6(fp`` yu6J(f.fN,pB@`D.u6a@>|f, yu6(*yt` -u6f-*U f0JL N^NuNVH.N@>JGgB@` yu6 h*PBF0F-H`00- =@>/  NX>JGfRF0.T@HѮ*U yu6fJGf"N>JGf>/./<fN,pP`NJGgB@`pJL N^NuNVH>P//<fN*PP>|f0`^JGf.f/9u6Nb6X`./9u6Nb6X*yt` -u6f-*U fpJL N^NuNV0<@3f>NY#tJtf#rt3fB@3f3f3rN^NuNV 9trg .tN[.B@3f3f3r3fN^NuNVBW/.?<=Nd\3rlp` aPBytB@N^NuNV./Nb6XBW/?<r?<>NdTaB@N^NuNVH*nBG`^0yftRyf09fyff:.t0yf/?9r?<@NdPJl.g!N,pp`&ByfRGn mfg*|f=| `B@JL N^NuNVHBG09fyff,.t0yf/?9r?<?NdP3fByf09fyfl`0yftRyf< fRytJGo0G ( fSG`*0GRGn f>t/<g1N,pX``Z0GB n009fyfo.gPN,pp`"JyffJGg.g`N,pp`p`B@JLN^NuNVH>.<||JFf|>WNY*@ f>/<gN,pXB` ;F;G JL N^NuNVH*n&yt`(f'U f'U Bkf'UBk&S f(yt`$J,ff)UBl f)U Bl(T f m U!m.N[.JL8N^NuNVH>. yu6 (g~ yu6(f| yu6(*yt` -u6f 0-A*U fJL N^NuNVH>a yt&h yu6f ytJhg.gN,pB@`>af-@fB@`-k n n 'n n!nBF`0. 2F@ RFnm yt!n yt1np` yt>(0+ nko> 0.Wa-@fB@`^K (n ` 2HЁм f0.H` 2+ HЁм f k n S!n n!k.N[.`@-K0."ni (K0+ H *L0.H`% 2HЁм fBF`0. 2G@ RFnm-yt`~ nf n!n n f, n!n .tg nhl 0."ni nf n!n nhl 0."ni n-PJf~pJL8N^NuNVH>a: yt&h yt>(>a:-@fB@`K (n ` 2HЁм fI ` 2+ HЁм fk n!k'n n h n -yt`r nf n!n n f nho n!n ` 0"ni nf nho n!n` 0"ni n-PJfpJL8N^NuNVH`F yt&h yt>( yu6fB@`*<+ Gno<.JFf0>aaJ@gJn g> aJ@fB@`Sn`>a*K (MJn g&`H>azJ@fB@`Rf*K ` 2+ HЁм fk -yt`h n f& nhn0"ni nho n1G nf& nhn0"ni nho n1G n-PJfnJnfpJL8N^NuNVH yt&h -S yu6 (fJk f.ap`D n0( 2+k An*K0+ H (n ` n0( HЮм f-yt`b n (f n!K n ( f n!K 0+ "ni n (f n!K0+ "ni n-PJf n0( k n& n P!K.N[.p`Z n> 0+ Wa-@fB@`gWNY*@ fB@`ZBG` M2G2GgRGygmJgg .gN[.#gyg0.2yggRygpJL N^NuNV0.ygmp``0n"yg0H|N^NuNVH.i/Nb6X no n ./NX.aN.j N,p no n .N4BytN>a>JyogN)N>| gBFz|Uf|zBD.iN,p`X|UfE`(|-f JDfdBEx`JDfBEx02 A:|JDm>`JEg0D@>`>/<iN,pXa0>0|0m|9o|Ug|-g|f JEfRE0D@:|Xf a<>|JtgR|)g <itdBWBgaT`JFg yt0UTt yt0Tt yt0Tt>??aX`JLN^NuNVH N("BW?</.N \*@>?</<iN \#u2>NY(@ g gJu2f >NV#u6#t#tB)M|)m)m BlBBlB,09nVS@@B,|JL0N^NuNVH >.09nT(@k*|k`,Uf&Byt?. ?. mNX<3tt0`d\eо| m|~o |mD|n>Jn nBytJn lB@`p`,Byt>?. NT<3tt0`BytB@JL0N^NuNVH>Nd>|f a(>0|`JGm|n|@|0JLN^NuNVH>Nd>|am |zn| JGm|n|@|0JLN^NuNV yu6(g yu6(f> ?.NT> ?.aTN^NuNVHJnf6N hJ@g,>BgN LTN>.iN)>|g0`N=N(LBWNVJLN^NuNVJtfJtg.iN,pB@`.iN,p#gtpN^NuNVJtf.iN,pB@`.jN,pBtpN^NuNVHJtfJtg.jN,pB@`Jn np`v#gtBFz yt>|U@TtDf| yt:Tt yt>Ttx|)g>??aX8|gBtܸ|fSn f0JLN^NuNV.jN,pJtg3)gBtpN^NuNV.jVN,pN^NuNV.kv/<j/<jv?<Nd N^NuNV>NdN^NuNV`HI``- мe n(H< n(H@ yt2F pPBW?N=T n&h+g p*@b@aId*|nfSKff| J+g*|nfSKf| I`` H>N= мeJL8N^NuNV0.yof 0. yogB3o3 o0.H| n\0. H| n].nZ?< NdTN^NuNVBW?9nVaT.n?< NdTByoN^NuNVH./Nb6X.o/NaX>@//aFP>|fp`.JGg( .yg .Yfp` .ng .NfB@``JLN^NuNVHBGJtg>` 02G RG yt:0TtJ@f0G B n JfB@`p`.a>Nd:0`02G RG0G BRGJtgH0@Hйt԰icBWBgN'Tp`jBF` n 0`H"yt2TtRFGm> ?<NdTByo n JfB@`$p`.o ?< NdTTyoBWBgN'Tp`JGg>.o ?< NdTSyoSG0G  l.o?< NdTSyo``>.o?< NdTSyoSG0G  l.o?< NdTSyoJGf`b0.S@@l@02G RG| l>^?<NdTRyo E@>?<NdTRyo`H |n`rW hN`DJLN^NuNVH.o?< NdTBW?9nVaTK `|%g>?<NdTRyo` nH>R0`j> ?aTT`p>?aTT`^>?aTT`N> /aXX`>.?< NdTX`,>?<NdTRyo`H |nrW hN nH>0RJ@f<.o ?< NdT3oJL N^NuNVHJnl0.D@=@>-?<NdT>.HǏ JGg > ?aT0.H H@0@"|n0H>?<NdTRyoJLN^NuNVHJl .D-@>-?<NdT0. H//.Nd0P.Jg > /aX . H@H>W0?<NdTRyoJLN^NuNV3 tpN^NuNVH? yu6 h*PBFB ytʻ f$ ytʼhf*m fx ` 5` H8|m f yu6g *UBF`RFR`BWa\=@BCJg//<d/NcP/Nd0P6.?/??9tRW?.RW/<o$N,ppJL N^NuNVHBEBF`F yt h 0` H>|| g | gJnf*| f|`| m|fRERERF ytʼhm0JLN^NuNVH yt*h yt>(m fSGlB@`D5p H:|SGlB@`05p H<|0"M4G@ 0"M4G@ >NpJL N^NuNVH>Nd<Jn lB@`6Jn fp`,| fNB>|fSn f0`>?. NTJLN^NuNVJn lB@`ZJn g n o 3 tp`@Jytf> ?<NT`&> ?9tBganTHtH@WNTN^NuNVHJn lB@`:Jn fp`0>. NB<|fSGf|f> ?.NT<0JLN^NuNVHJn lB@`n`\ yt*h yt0(m f0 yu6g$ UJh f>BgNT>|g0`"`NB>|g0`0. Sn J@fpJL N^NuNVH yt*h `*LJm f(m yu6f(MBG`RG(T yu6gJl gJGfp` yt!U ytBh>NlJL0N^NuNVHJn lB@``BGBE`0 yt h 0P H<|| g| f| f|RGRE yt h h mNBJ@g::Hŋg> ?NTJ@g:HŋHEg> ?NTJ@fB@`0. Sn J@ffpJLN^NuNVJn l0. D@>?.a6T`.Jng9tfN!Tyt>?. NlTN^NuNVHJn l0. D@>?.aT`JJng9tfN!Tyt> ?.NT>|f>?. NlT>0JLN^NuNVH9tfN!TytJnf$ yt h >( yt0(@JGf~`Jn f yt>( ytBh`bJn oL yt h >( yt0(@RG yt h *P` yu6fB@`00- R@@*USn f`.oHN,pB@`>?NlTJL N^NuNVHJn lB@`T`DBF`4| f>BgaxTJ@fB@`4`>?<NTJ@fB@`RF>N">l0. Sn J@fpJLN^NuNVH.Qa>|g0`@9tfN!Tyt yt!n yt1n>?.NlTJLN^NuNVH.Qa<|g0`t9tfN!Tyt*n>.`Bm f> N!<|g0`4*UBG` 5p H>WN!<|g0`RG0.SnJ@fpJL N^NuNVH.Qa:|g0`X>N*n>.`6m f*UBG`*5p H<||Am|Zn0| "M4G@ RG0.SnJ@fpJL N^NuNVH.Qap:|g0`X>N*n>.`6m f*UBG`*5p H<||am|zn0|"M4G@ RG0.SnJ@fpJL N^NuNVH*n ytJf.oRN,pB@` yt ( "yt")fv yt* yt0("yt2)Al( yt;h yt0("yt2)A;@`& yt;h yt0("yt2)A;@p` yt&h yt<( yt(h >, yt0(@RG` yu6gD(T ytʹf. yt* yt;h0"yt2)A;@p`0, R@@ yu6 (g<&k0+ R@@ ytʷf$* yt;h0"yt2)A;@p`. yu6fX yu6 (fF.omN,pB@JL8N^NuNVH.oa>|gJGf0`"|f> ?.aPT` > ?.a TJLN^NuNVH yt*h yt>(`m f*UBGz `5p H:|RG9tH>?aTJ@gn(M<&|t`: yu6gVl f(TBFz `4` H:|RFH>?aTJ@g(Jf yt!L yt1F yt(p` yu6fT.o|N,pB@JL8N^NuNVH.oa>|gJGf0`"|f> ?.aT` > ?.a TJLN^NuNVH&|t`RJ+f yt*h yt>(JGf(*m yu6f.o|N,pB@`>- RGSG0m fz ` 5p H:|H>?aTJ@g(M<-K`LJFf(l yu6gh<, RFSF0l fz ` 4` H:|S nH>?aDTJ@g0 <tమf yt!L yt1F yt(p``JL8N^NuNV nam nznn  na m nz nn 0.n fp`B@N^NuNVH K(n`HJGfJ9tgD [(|t`( ]d | m|f ^ G@`|%fHJGf]: B>P//N*PP<|fR.NbX:6PH>|g|fSEB@H"N4E@<JEo./<tNb6X`JFf J9tg|0JL0N^NuNVH09nV@>NY#tJtf >NV09nV@>NY#tJtf >NVBG`Z>nXXWNY*@ f >NV0Gt >nXXWNY*@ f >NV0Gt RGynVmJL N^NuNVBW?9nVN)4T.o?< NdTN^NuNV3o3 oN^NuNVH0yot*P09nXyon M2ynX|$`X n f> a09o|f`< n m nf>^a0.r@@>a`0."M4yo@RyoJL N^NuNVH0yot*P` M2yo| Ryo09nXyonJL N^NuNVH.o?< NdT(yt`J,g,f(*lBG` g lg*URG,H@m,HJGoSG,H@m,HSG` JGl,H@JGlBG` ,HHǏ*l `SG*mJGg l (f)M,*l,H,H||fN`RG*U f yt2G pPBW?aTBF`5` H>WaRFm ma`,H| gv`` yt2G pP yt2G pPBW?aT lgBF`5` H>WaRFm m*UaRG,H,HA@m,g.N(^B,B,(T fX yt*h yt(H3t`Ryt*U ytʻ fByu0BG`65p H:|RG| f yu0`| m|fRyu0Ryu0 ytʾhm09nXyu0n09nXS@3u0JyogtBG`> yt2G pP0Gt&PBF` K2F| RFynXmRGynVmBWBgN)4T.o?< NdTByoByo.o?< NdTBG`<0Gt&P+g$S0Gt-P.T/ T?a<\RGynVm.o?< NdT>u0?9tN)4TJL8N^NuNVH yt2n p(g.o?< NdT*n (n`RR09nXHЮ gHg09nXHЮ gBG6ynX 09nXHЮ-@`SS  g~ n(H+g-KJGf*`Sg n ( g n-K >?.N)4T`H>?<NdTRyoݻfg.o?< NdT`ݻf yt2n p(g.o?< NdTJL8N^NuNV0. "yt@ yt(pN^NuNVJnf 3o` ytB( yt(pN^NuNVH yt*P f*yt#t#u6pJL N^NuNVH *yt(ytʻf`*Uf#t#u6pJL0N^NuNV0. D@>?.aTN^NuNVH yt*hJn l`*U0. Rn J@g yu6f`"`*m0. Sn J@g yu6 (f yt!M yt(BG` ytʻ fp`l yu6g*URG yt(H@m yt*h yt(H>HǏ`*U0SGJ@g yu6f yt!M ytBhpJL N^NuNVH `F*yt#t mS(f( m!m  m1m m!m m1m.N[. 9tذtf`J yt*P yt mS(f( m!m  m1m m!m m1m.N[. ytJf yt(h yt(H>`SG(lJGg yu6 (f ytB(09nVS@"yt@ yt!L yt(pJL0N^NuNVH yt (l" yt(H>/<oN,pXB@`>NY*@ f.oN,pB@`t yu6R(+yu6 yt+h yt;h yt+h yt;hB-B- yt(H>SGHǏ yt(H<SFG yt(hBE`RE(T ytʹ f yt(hGn>Gf(T0"yt@ yt* yt 0"yt)HAR@@F`t-yt` &n n-P .tf f#t`&*t ythGRG? yt(_@0"yt@`(T0SGJ@f yt!L+L yt(-pJL8N^NuNVH Jn l0. D@>?.a$T` ytJf.pN,pB@` yt*P f*yt`*U tf-Hn n.pN,pB@` ytʻf0(mBG`(TRGn l mf+L0. -A`H yt(hBG`(lRGn l yu6 (f yt!L?. yt(_@?. yt(_@0. -A yt(-pJL0N^NuNVH Jn l0. D@>?.aT` ytJf.p'N,pB@` yt*P f*yt`*U tf yt(Hn n.p7N,pB@` ytʻf6(mBG`(lRGn l m (f+L0. -A`B yt(hBG`(TRGn l yu6f yt!L?. yt(_@?. yt(_@0. -A yt(-pJL0N^NuNVH ytJfBWBgaTJ@fB`*yt`*U gtg JL N^NuNVN^NuNVJn l0. D@>?.a~T`t>BgNTJ@fB@`\`@`>BgNTJ@fB@`BaJ@g`>BgNTJ@fB@`"aJ@f0. Sn J@f>BgNTN^NuNVJn l0. D@>?.aRT`P`@`>BgNTJ@fB@`6a`J@g`>BgNTJ@fB@`a@J@f0. Sn J@fpN^NuNVHJn lB@```>BgNTJ@fB@`aJ@g`l yt0h"yt"i 0 H>||am0|zn*| 0"yt"i $yt4j@ >N>BgNTJ@fB@`a~J@f0. Sn J@f\pJLN^NuNVHJn lB@```>BgNTJ@fB@`a*J@g`l yt0h"yt"i 0 H>||Am0|Zn*| 0"yt"i $yt4j@ >N>BgNTJ@fB@`aJ@f0. Sn J@f\pJLN^NuNVHJn lB@`&``>BgNTJ@fB@`a`J@gaXJ@g yt0h"yt"i 0 H>||am0|zn*| 0"yt"i $yt4j@ >N>BgNTJ@fB@``l yt0h"yt"i 0 H>||Am0|Zn*| 0"yt"i $yt4j@ >N>BgNTJ@fB@`arJ@f0. Sn J@fpJLN^NuNVHJn lB@` yt*h yt<(BG`D`>BgNTJ@fB@`ZRGa J@g`>BgNTJ@fB@`8RGaJ@f0. Sn J@f yt!M yt1F>?NlTJL N^NuNVHJn lB@`>BgNTJ@fB@`vBG`@`>BgNTJ@fB@`XRGa^J@g`>BgNTJ@fB@`8RGa>J@f0. Sn J@f>BgNTJ@fB@`>?NlTJLN^NuNVH yt0("yt"i 2) AfB@`d yt0h"yt"i 0 H>||am |znp`2|Am |Znp`"|0m |9np`|$g|_fp`B@JLN^NuNVHN^ BW/<eNXX>/<eNXX>/<eNXX n2n B*n`&HHмq @g H| `HRJf> /.NQXJL N^NuNVH BWN\#t#tByt.e a*n`N`RJgHHмq @fJg2 "g 'fFH>/ RNX(@ f.pJ/ aVX H> M2GBRG.Ra`BG`RG M2GJg5pHHмq @gJ5pg M2GBRGH`BWNVBW/ RNXXJ@g.R/<p\aX`l>NV ->f@>/ TNXX|f>B?<NY.\|f.R/<pia|X`$BW/ RNUX|g.R/<pxaVX`>?/ NXJf>*/ NXJg-|{.8?<NT>/ ?<N`\<f.p/ aX`^.H?/.aZ\.NbX>RWNb(@./ Nb6X.a>/ ?<N`\<f`.a`|g`JfBaSyt.tN|f.p/<pa*XB/9t?9tN"D\>NVJL0N^NuNV|./Nb6X. /NaX.p/NaX.?< NT>NVN^NuNVH*n yt XtRytJL N^NuNVH*n. (nGVfJL8N^NuNVHN]>|fp`>N^,08*@u:JnfU.e/.NbXJ@f U0`R`.e/.NbXJ@fU0`2>/.?N`\J@g3#q3rqp`U0JL N^NuNVBW?. /.a:\N^NuNVBW?. /.a"\N^NuNV>?. /.a\N^NuNVNV6>NN^NuNVHBG`0мp.NVhRG|mJLN^NuNVH*n0-|g*.NWP-g .N[.B@H+@+@Bm m>NVJL N^NuNVH>.>N^*@ f3 q3rqp`NBF0|f>?<>NcT<l|>N^,>N]JFf0``3q3rqpJL N^NuNVN^NuNVH*n0-| |f, -<o >/-?N]&\>Gg mp`J-gJg-g;| `;| `>0- D@H/?NY.\Bm +mB@JL N^NuNVHN]>|fp`>N^,08*@u:Jn fUJnfU.e/.NbXJ@fU;n 0``.e/.NbXJ@fU0`d>/.?N`\J@g>N]3q3rqp`0U>B-H?NY.\BWB-H?NY.\0JL N^NuNVBW?. /.a\N^NuNVBW?. /.a\N^NuNV>?. /.a\N^NuNVH>N^*@ f3 q3rqp`$>?-/. ?<BNcP+@U -JL N^NuNV>B?.a\N^NuNVH>.^GORG>a*@ fB` >/ aXJL N^NuNVH (yq*T`ZB@0-BA2-@F@J@g>N\B`:B@0-ne `*qf>a*@ f>N\B`(M*U`JL0N^NuNVH n*PB@0. X@me n `F(MB@0. HH@B@H@B@0-n 9@B@0,F@9@( n ;n B@0-F@;@#q PJL0N^NuNVH >.|?GG0@>N\*@fB`* R*@(M9GB@0,F@9@.Pa 9qJL0N^NuNVH *nQB@0-BA2-@F@J@g>N\p`(yqeeecd(T`e2 BA2-IHABAHAЁ" BB4,JHBBBHB҂b #qB@`n BA2-IHABAHAЁf T0(mB@0-F@;@ T*`* BA2,IHABAHAЁfB@0-lB@0,F@9@(`(#qB@JL0N^NuNVH *n.a>. ^GORG>a-@fB`J n(PPg2d`Sn Jn f`B0. B0. `%Sn Jn f>/.aXJL0N^NuNVN^NuNVN^NuNVH >.HμgR*yr(Gr.N|f3 q3rqp`>Bg/ N\ JL0N^NuNVH>N^*@ fp`XJnfB@`N-g3 q3rqp`0-g>/. / N^P``>/. / N` PJL N^NuNVH|BG` qf q0`RG|m3q3rqpJLN^NuNVp2.`F@HqB@N^NuNVHBG`>aRG|mJLN^NuNVH 0.8*@u:0.@BUB-+| BB> Bg/ N\> ?< / N\JL0N^NuNVH>.|e3 q3rqB`0B@08*@u:-f3 q3rqB` JL N^NuNVH *n(n >.B@=@=@``Rnnc L2n  fB@0.ncf>?.B@0.W B2.Ё//-/ Ncr=@B0.ѭJnf3q3rqp`^=n`8Rn>?</<q/-/ Ncr=@B0.ѭnb4 -o+mB@0.JL0N^NuNVH*n>?./. /-/ Ncr=@Jnf3q3rqp` B0.ѭ -o+mB@0.JL N^NuNVH*n 0.8мu:-@~.a&M`RJg :fJgc .Am .On*K`K0.`BW/ ?<o n1GBG`BW/ ?<NNc\JgB@`0<>`d>ONcJgB@`0<>`J.?<=NcT>o n1GBG`,.?<ANcT>``||b@0@q PN0JL8N^NuNV n am n zn n nHRJfN^NuNVH *n (n`RJff .JL0N^NuNVH *n(n `op`lp`JgJfHHAJL0N^NuNVH *n (nf .JL0N^NuNVH *n(M`RJf HJL0N^NuNVN^NuNVH *n(n `$H>a0H>a&op`lp` JfJfB@JL0N^NuNVH>.|am |zn|0JLN^Nu _B0Z"yrCCbNC NJg .NuNV n=h.0n/0n/NcP/?.?<?NcPN^NuNV n=h.0n/0n/NcP/?.?<@NcPN^Nu#tNA/9tNuNVBBJlDRBJ lD RB0. -@0.2. An=@ .gDN^NuNV/. /.Nd0 9tN^NuNVH?BCB..,. f#t <`hlDRCJlDRCn8fzB`0l :HGH`xe`Jge`|fD#t D`#t JLN^Nu#tNN/9tNu#tNM/9tNu#tNA/9tNuStack Overflow$C runtimeCON:LST:[Mark set]No mark in this windowUse [next] buffer: Kill [current] buffer: Buffer is being multiply displayedC Size Buffer File- ---------- ------ ----Cannot select builtin bufferDiscard changesRead file: Visit file: [Old buffer]A namesake buffer exists; give another name: Cannot create buffer[New file][Reading file][Read %D bytes in %d lines]Write file: No file name[Wrote %D bytes in %d lines]Name:  Cannot open file for writingWrite I/O errorWrite I/O errorlong line %d is being split...File read errorThe last line ended without \nCannot allocate %d bytesbug: linsert)mainArg: 4Arg: %d[List]Unsaved buffers exist! QuitNot now[Start macro]Not now[End macro]Not now^G...ok!ported at Case Western Reserve University; 03/04/86please Visit File 'keybind.doc'1234567890-= qwertyuiop[] asdfghjkl;'`\zxcvbnm,./ Ž·!@#$%^&*()_+ QWERTYUIOP{} ASDFGHJKL:"~|ZXCVBNM<>? 1234567890-= QWERTYUIOP[] ASDFGHJKL;'`\ZXCVBNM,./ Ž·@ABD3EFG'H3fI0J2XK3LCM1XNO1PQ08R:S8T/V~W5*Y4Z&OO34Z L">(&*~DPDhFE`DC'..CK0KB LC&XFL6*O1NDPPDhR SU6V>W"XZI=.(&)&1E`2FBE'.F.|KZNCPDZH\HO!C.><BK0CMDOFKLMUL8V*W5O3fePYrc +J+t***++t,Ddosx-,,-,-$0123456789ABCDEF microEmacs -- -- File: qK [y/n]? ^G    qKX=%d Y=%d CH=0x%x .=%D (%d%% of %D)neg killNo mark set in this windowBug: lost markNot foundForward SearchBackward SearchKqJfepKqCannot split a %d line windowCannot allocate WINDOW blockOnly one windowImpossible changeOnly one windowImpossible change: unmatched quoteCannot open Cannot append Cannot create : No matchStack Overflow $   qq a@aaa&a^aa`!!!!"CP/M-68K(tm), Version 1.2, Copyright (c) 1983, Digital Research XXXX-0000-654321R N4   ">    "  6  > T02 *2       &Z        4 " , 4 :  L , :$ &6D>$        " 8>       & ,  > 0  (   ,( .   (  "  $  , <,4@ 2  ^ d8t n      RJ (  .,  .  D:&    ""  @& &$   n 2$       0 * d * 0.0. *0 &F T"0  , , 2 .0N4   "L@ 2$L~j       N *> N  RD ~Z:         8   Rh          n     2   : <          B   :B   @ &B *4 J (  R (  R$ (   (  F "& , *  j   , ,D( 0 <    >  h 0HN&  jp".86 Jp $""@2&"fHR">* h$f 0 t2)A;@`& yt;h yt0("yt2)A;@p` yt&i_p, precision, minfldw); break; case 'g': flags |= LOWERFLG; case 'G': buf = _fltcnv(buf, 'G', flags, &i_p, precision, minfldw); break; case 'c': *buf++ = *i_p++; break; case 's': if (precision < 0) precision = MAXINT; s_p = (char **)i_p; s = *s_p++; i_p = (int *)s_p; for (lng = 0; s[lng] != EOS && lng < precision; ++lng); i = minfldw - lng; if ((flags & MINUSFLG) == 0) { /* right justify */ while (i-- > 0) *buf++ = ' '; } while (lng--) *buf++ = *s++; while (i-- > 0) *buf++ = ' '; break; case '%': default: *buf++ = c; break; } } } /* * convert float to ascii for my 32 bit floating point format * bit function * 31 sign * 24-30 exponent (excess 64) * 0-23 fraction */ #define EXCESS 64 #define DIGITS 24 #define MAXFRAC 0xFFFFFF #define MAXEXP 0x7F #define MAXBITS 32 #define sign(x) ((x >> 31) & 1) #define exp(x) (((x >> 24) & MAXEXP) - EXCESS) #define frac(x) (x & MAXFRAC) #define negate(x) (x ^ 0x80000000L) char * _fltcnv(buf, style, flags, f_p, precision, minfldw) char *buf; int style; int flags; long **f_p; int precision; int minfldw; { long x; int e, ee, len; char ibuf[15], fbuf[15], ebuf[6], sbuf[2], *p, *r; unsigned long f, t, b, d; x = **f_p; *f_p += 1; *ibuf = *fbuf = *sbuf = *ebuf = 0; if (precision < 0) precision = 6; else if (precision > 13) precision = 13; if (x == 0L) { strcpy(ibuf, "0"); if (precision > 0) strcpy(fbuf, ".0"); } else { if (sign(x)) strcpy(sbuf, "-"); else if (flags & PLUSFLG) strcpy(sbuf, "+"); else if (flags & BLANKFLG) strcpy(sbuf, " "); e = exp(x); f = frac(x); if (style == 'E' || e >= MAXBITS || e <= -DIGITS) { ee = 0; while (e > 2) { d = f % 10L; f = f / 10L; while (f && (f & 0x800000L) == 0) { f <<= 1; e--; } f += d; ee++; } while (e < 0) { f = f * 10L; d = 0L; while (f & 0xFF000000L) { d |= (f & 1L); f >>= 1; e++; } f += d; ee--; } ebuf[0] = flags & LOWERFLG ? 'e' : 'E'; if (ee < 0) { ebuf[1] = '-'; ee = -ee; } else ebuf[1] = '+'; ebuf[2] = (ee / 10) + '0'; ebuf[3] = (ee % 10) + '0'; ebuf[4] = 0; } /* now get the integer part */ if (e > 0) { if (e > DIGITS) t = f << (e - DIGITS); else t = f >> (DIGITS - e); _ltoc(t, ibuf); f = (f << e) & MAXFRAC; e = 0; } else { strcpy(ibuf, "0"); if (e < 0) f = f >> -e; } /* now get the fraction part */ if (precision > 0) { if (f) { b = 0x800000; d = 500000000; t = 1000000000; while (b) { if (f & b) t += d; b >>= 1; d >>= 1; } _ltoc(t, fbuf); fbuf[0] = '.'; } else strcpy(fbuf, ".0"); } } /* adjust the fraction part, trailing 0's, etc */ if (*fbuf) { for (e = strlen(fbuf); e < 15; e++) fbuf[e] = '0'; fbuf[precision+1] = 0; if (!((flags & POUNDFLG) && style == 'G')) { /* drop trailing 0's */ for (e = precision; e > 0 && fbuf[e] == '0'; e--) fbuf[e] = 0; if (e == 0) *fbuf = 0; } } /* okay, now fill out buf with the number */ r = buf; len = strlen(ibuf) + strlen(fbuf) + strlen(ebuf) + strlen(sbuf); if (flags & MINUSFLG) { while (len < minfldw) { *buf++ = ' '; len++; } } if (*sbuf) *buf++ = *sbuf; for (p = ibuf; *buf = *p++; ) buf++; if (*fbuf) { for (p = fbuf; *buf = *p++; ) buf++; } else if (flags & BLANKFLG) *buf++ = '.'; if (*ebuf) { for (p = ebuf; *buf = *p++; ) buf++; } if ((flags & MINUSFLG) == 0) { while (len < minfldw) { *buf++ = ' '; len++; } } *buf = 0; return buf; } _ltoc(x, p) long x; char *p; { char *r; int i, j, t; r = p; if (x == 0) { *p++ = '0'; *p = 0; } else { if (x < 0) { *p++ = '-'; x = -x; } for (i = 0; x > 0; x = x / 10L) p[i++] = (x % 10L) + '0'; p[i--] = 0; for (j = 0; j < i; ) { t = p[i]; p[i--] = p[j]; p[j++] = t; } } } char * _numcnv(buf, base, flags, ip_p, precision, minfldw) char *buf; unsigned int base; int **ip_p; { char numbuf[20], prefix[5], *s, *p, *strncpy(); int n, pad, lng, d; long value, *l_p; unsigned long uvalue; s = numbuf; p = prefix; if (flags & LONGFLG) { l_p = (long *)*ip_p; value = *l_p++; *ip_p = (int *)l_p; } else { value = (long)**ip_p; *ip_p += 1; } if (flags & SIGNFLG) { if (value < 0) { *p++ = '-'; value = -value; } else { if (flags & PLUSFLG) *p++ = '+'; else if (flags & BLANKFLG) *p++ = ' '; } } uvalue = (unsigned long) value; while (uvalue) { d = uvalue % base; *s++ = (d < 10) ? d + '0' : d - 10 + ((flags & LOWERFLG) ? 'a' : 'A'); uvalue /= base; } lng = (int)(s - numbuf); n = (int)(p - prefix); pad = minfldw - n; if (flags & ZEROFLG) precision = minfldw - n; if (precision < 0) precision = 1; if (flags & POUNDFLG) { if (base == 8 && lng >= precision) precision = lng + 1; else if (base == 16) { *p++ = '0'; *p++ = flags & LOWERFLG ? 'x' : 'X'; n += 2; precision -= 2; } } pad -= lng > precision ? lng : precision; if (pad < 0) pad = 0; if ((flags & MINUSFLG) == 0) { while (pad--) *buf++ = ' '; pad = 0; } strncpy(buf, prefix, n); buf += n; while (precision-- > lng) *buf++ = '0'; while (lng--) *buf++ = *--s; while (pad--) *buf++ = ' '; return buf; } : _cprg csv lll 8 0 sll 0 -10 lla -10 0 ldw 3 0 adw 4 0 lxl 0 0 0 lla -10 0 ldw 5 1 adw 4 1 lxl 0 1 1 obl 12 1 0 lla -10 0 ldw 7 1 adw 4 1 lxl 0 1 1 obl 12 1 0 ldw 256 1 xtw 1 obl 12 1 0 sll 0 -6 pll -6 pll 8 pdw 0 pdw 74 trp 1 pop 12 tsl 0 brc 4 0 pdw -1 jsr appl_exit pop 2 * 0 lag ct0 0 tad 0 0 sgl 0 aes0 lag global 0 tad 0 0 sgl 0 aes1 lag ii0 0 tad 0 0 sgl 0 aes2 lag io0 0 tad 0 0 sgl 0 aes3 lag ai0 0 tad 0 0 sgl 0 aes4 lag ao0 0 tad 0 0 sgl 0 aes5 lag ct0 0 tad 0 0 sgl 0 vdi0 lag ii0 0 tad 0 0 sgl 0 vdi1 lag pi0 0 tad 0 0 sgl 0 vdi2 lag io0 0 tad 0 0 sgl 0 vdi3 lag po0 0 tad 0 0 sgl 0 vdi4 jsr _ioinit jsr main slw 0 -2 plw -2 jsr appl_exit pop 2 ret efn 10 : v_opnvwk csv lag ct0 0 tad 0 0 sgl 0 vdi0 lll 8 0 sgl 0 vdi1 lag pi0 0 tad 0 0 sgl 0 vdi2 lll 16 0 sgl 0 vdi3 lla 16 0 lao 0 88 0 tad 0 0 sgl 0 vdi4 ldw 100 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 11 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 ldw 1 0 sgw 0 ct6 jsr vdi lgw ct6 0 lla 12 0 sow 0 0 0 lag ct0 0 tad 0 0 sgl 0 vdi0 lag ii0 0 tad 0 0 sgl 0 vdi1 lag pi0 0 tad 0 0 sgl 0 vdi2 lag io0 0 tad 0 0 sgl 0 vdi3 lag po0 0 tad 0 0 sgl 0 vdi4 ret efn 0 : v_clsvwk csv ldw 101 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_clrwk csv ldw 3 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_enter_cur csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 3 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_exit_cur csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 2 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_rvon csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 13 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_rvoff csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 14 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_curhome csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 8 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : vs_curaddress csv llw 12 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 11 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_eeos csv ldw 5 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 9 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_pmarker csv lll 12 0 sgl 0 vdi2 ldw 7 0 sgw 0 ct0 llw 10 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 0 : vsm_color csv plw 10 pdw 20 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsm_height csv ldw 0 0 sgw 0 pi0 llw 10 0 sgw 0 pi1 ldw 19 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw po1 0 ret ret efn 0 : vsm_type csv plw 10 pdw 18 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vqm_attributes csv lll 10 0 sgl 0 vdi3 lla 10 0 lao 0 6 0 tad 0 0 sgl 0 vdi4 ldw 36 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag io0 0 tad 0 0 sgl 0 vdi3 lag po0 0 tad 0 0 sgl 0 vdi4 ret efn 0 : v_pline csv lll 12 0 sgl 0 vdi2 ldw 6 0 sgw 0 ct0 llw 10 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 0 : vsl_color csv plw 10 pdw 17 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsl_ends csv llw 10 0 sgw 0 ii0 llw 12 0 sgw 0 ii1 ldw 108 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : vsl_type csv plw 10 pdw 15 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsl_udsty csv plw 10 pdw 113 plw 8 jsr vdi_attr pop 6 ret efn 0 : vsl_width csv llw 10 0 sgw 0 pi0 ldw 16 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw po0 0 ret ret efn 0 : vql_attributes csv lll 10 0 sgl 0 vdi3 lla 10 0 lao 0 10 0 tad 0 0 sgl 0 vdi4 ldw 35 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag io0 0 tad 0 0 sgl 0 vdi3 lag po0 0 tad 0 0 sgl 0 vdi4 ret efn 0 : vst_alignment csv llw 10 0 sgw 0 ii0 llw 12 0 sgw 0 ii1 ldw 39 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw io0 0 lla 14 0 sow 0 0 0 lgw io1 0 lla 18 0 sow 0 0 0 ret efn 0 : vst_color csv plw 10 pdw 22 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vst_effects csv plw 10 pdw 106 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vst_height csv ldw 0 0 sgw 0 pi0 llw 10 0 sgw 0 pi1 ldw 12 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw po0 0 lla 12 0 sow 0 0 0 lgw po1 0 lla 16 0 sow 0 0 0 lgw po2 0 lla 20 0 sow 0 0 0 lgw po3 0 lla 24 0 sow 0 0 0 ret efn 0 : vst_point csv plw 10 pdw 107 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vst_rotation csv plw 10 pdw 13 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vst_font csv plw 10 pdw 21 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vswr_mode csv plw 10 pdw 32 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : v_curtext csv pll 10 plw 8 pdw 12 pdw 0 pdw 5 jsr _vdi_tcpy pop 12 ret efn 0 : v_gtext csv llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 pll 14 plw 8 pdw 0 pdw 2 pdw 8 jsr _vdi_tcpy pop 12 ret efn 0 : _vdi_tcpy csv lal -284 0 tad 0 0 sgl 0 vdi1 lal -284 0 tad 0 0 sll 0 -4 ldw 0 0 slw 0 -286 * 0 llw -286 0 cdw 0 140 brc 9 1 lla 16 0 lob 0 0 0 cdb 0 0 brc 4 1 jmp 2 * 3 ilw 1 -286 llw -286 0 jmp 0 * 2 lll 16 0 ill 1 16 tda 0 0 lob 0 0 0 lll -4 1 ill 2 -4 tda 1 0 xtb 0 sow 0 0 0 jmp 3 * 1 llw 8 0 sgw 0 ct0 llw 10 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 llw -286 0 sgw 0 ct3 llw 12 0 sgw 0 ct5 llw 14 0 sgw 0 ct6 jsr vdi lag ii0 0 tad 0 0 sgl 0 vdi1 ret efn 286 : vqt_attributes csv lll 10 0 sgl 0 vdi3 lla 10 0 lao 0 12 0 tad 0 0 sgl 0 vdi4 ldw 38 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag io0 0 tad 0 0 sgl 0 vdi3 lag po0 0 tad 0 0 sgl 0 vdi4 ret efn 0 : v_arc csv llw 16 0 sgw 0 ii0 llw 18 0 sgw 0 ii1 llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 pi6 ldw 11 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 2 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_bar csv lla 10 0 low 0 0 0 sgw 0 pi0 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi1 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi2 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 1 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_circle csv llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 pi4 ldw 11 0 sgw 0 ct0 ldw 3 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 4 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_contourfill csv llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 ii0 ldw 103 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_ellarc csv llw 18 0 sgw 0 ii0 llw 20 0 sgw 0 ii1 llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 pi2 llw 16 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 6 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_ellpie csv llw 18 0 sgw 0 ii0 llw 20 0 sgw 0 ii1 llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 pi2 llw 16 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 7 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_ellipse csv llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 14 0 sgw 0 pi2 llw 16 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 5 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_rbox csv lla 10 0 low 0 0 0 sgw 0 pi0 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi1 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi2 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 8 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_rfbox csv lla 10 0 low 0 0 0 sgw 0 pi0 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi1 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi2 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi3 ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 9 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_recfl csv lla 10 0 low 0 0 0 sgw 0 pi0 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi1 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi2 ill 2 10 lll 10 0 tda 0 0 low 0 0 0 sgw 0 pi3 ldw 114 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_fillarea csv lll 12 0 sgl 0 vdi2 ldw 9 0 sgw 0 ct0 llw 10 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 0 : vsf_color csv plw 10 pdw 25 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsf_perimeter csv plw 10 pdw 104 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsf_interior csv plw 10 pdw 23 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsf_style csv plw 10 pdw 24 plw 8 jsr vdi_attr pop 6 ret ret efn 0 : vsf_updat csv llw 14 0 ldw 4 1 obw 10 1 0 slw 0 -2 lll 10 0 sgl 0 vdi1 ldw 112 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 llw -2 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag ii0 0 tad 0 0 sgl 0 vdi1 ret efn 2 : vqf_attributes csv lll 10 0 sgl 0 vdi4 ldw 37 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag po0 0 tad 0 0 sgl 0 vdi4 ret efn 0 : v_get_pixel csv llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 ldw 105 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw io0 0 lla 14 0 sow 0 0 0 lgw io1 0 lla 18 0 sow 0 0 0 ret efn 0 : vro_cpyfm csv lag ct7 0 tad 0 0 sll 0 -4 lll 16 0 lla -4 0 sol 0 0 0 lll 20 0 ill 4 -4 lll -4 1 tda 1 0 sol 0 0 0 llw 10 0 sgw 0 ii0 lll 12 0 sgl 0 vdi2 ldw 109 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 4 : vrt_cpyfm csv lag ct7 0 tad 0 0 sll 0 -4 lll 16 0 lll -4 1 ill 4 -4 tda 1 0 sol 0 0 0 lll 20 0 lla -4 0 sol 0 0 0 llw 10 0 sgw 0 ii0 llw 24 0 sgw 0 ii1 ldw 0 0 sgw 0 ii2 lll 12 0 sgl 0 vdi2 ldw 121 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 3 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 4 : vr_trnfm csv lag ct7 0 tad 0 0 sll 0 -4 lll 10 0 lll -4 1 ill 4 -4 tda 1 0 sol 0 0 0 lll 14 0 lla -4 0 sol 0 0 0 ldw 110 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 4 : vq_color csv llw 10 0 sgw 0 ii0 llw 12 0 sgw 0 ii1 ldw 26 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 2 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw io1 0 lla 14 0 ldw 0 1 adw 2 1 sxw 0 1 0 lgw io2 0 lla 14 0 ldw 1 1 adw 2 1 sxw 0 1 0 lgw io3 0 lla 14 0 ldw 2 1 adw 2 1 sxw 0 1 0 ret efn 0 : vs_color csv llw 10 0 sgw 0 ii0 lla 12 0 ldw 0 0 adw 2 0 lxw 0 0 0 sgw 0 ii1 lla 12 0 ldw 1 0 adw 2 0 lxw 0 0 0 sgw 0 ii2 lla 12 0 ldw 2 0 adw 2 0 lxw 0 0 0 sgw 0 ii3 ldw 14 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 4 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : vq_key_s csv ldw 128 0 sgw 0 ct0 ldw 0 0 sgw 0 ct3 sgw 0 ct2 sgw 0 ct1 llw 8 0 sgw 0 ct6 jsr vdi lgw io0 0 lla 10 0 sow 0 0 0 ret efn 0 : v_show_c csv llw 10 0 sgw 0 ii0 ldw 122 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : v_hide_c csv ldw 123 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi ret efn 0 : vsc_form csv lll 10 0 sgl 0 vdi1 ldw 111 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 37 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lag ii0 0 tad 0 0 sgl 0 vdi1 ret efn 0 : vq_mouse csv ldw 124 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw io0 0 lla 10 0 sow 0 0 0 lgw po0 0 lla 14 0 sow 0 0 0 lgw po1 0 lla 18 0 sow 0 0 0 ret efn 0 : vdi_attr csv llw 12 0 sgw 0 ii0 llw 10 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct5 llw 8 0 sgw 0 ct6 jsr vdi lgw io0 0 ret ret efn 0 : appl_init csv ldw 10 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 sgw 0 ct1 jsr aes lgw io0 0 ret ret efn 0 : appl_exit csv plw 8 pdw 76 trp 1 pop 4 ret efn 0 : vq_extnd csv ldw 102 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 llw 8 0 sgw 0 ct6 llw 10 0 sgw 0 ii0 jsr vdi lag io0 0 tad 0 0 sll 0 -8 ldw 0 0 slw 0 -2 * 0 llw -2 0 cdw 0 45 brc 9 1 jmp 2 * 3 llw -2 0 ilw 1 -2 jmp 0 * 2 lla -8 0 llw -2 0 adw 2 0 lxw 0 0 0 lla 12 0 llw -2 1 adw 2 1 sxw 0 1 0 jmp 3 * 1 lag po0 0 tad 0 0 sll 0 -12 ldw 0 0 slw 0 -4 * 4 llw -4 0 cdw 0 12 brc 9 5 jmp 6 * 7 llw -4 0 ilw 1 -4 jmp 4 * 6 lla -12 0 llw -4 0 adw 2 0 lxw 0 0 0 lla 12 0 llw -2 1 ilw 1 -2 adw 2 1 sxw 0 1 0 jmp 7 * 5 ret efn 12 : vs_clip csv ldw 129 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 llw 8 0 sgw 0 ct6 llw 10 0 sgw 0 ii0 lll 12 0 sgl 0 vdi2 jsr vdi lag pi0 0 tad 0 0 sgl 0 vdi2 ret efn 0 : v_justified csv ldw 11 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 llw 8 0 sgw 0 ct6 llw 20 0 sgw 0 ii0 llw 22 0 sgw 0 ii1 lag ii2 0 tad 0 0 sll 0 -4 ldw 2 0 sgw 0 ct3 * 0 lll 14 0 ill 1 14 tda 0 0 lob 0 0 0 lll -4 1 ill 2 -4 tda 1 0 xtb 0 sow 0 0 0 tsw 0 brc 4 1 jmp 2 * 3 lgw ct3 0 igw 1 ct3 jmp 0 * 2 jmp 3 * 1 llw 10 0 sgw 0 pi0 llw 12 0 sgw 0 pi1 llw 18 0 sgw 0 pi2 jsr vdi ret efn 4 : rsrc_gaddr csv ldw 112 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct4 sgw 0 ct2 ldw 0 0 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 jsr aes lgl ao0 0 lla 12 0 sol 0 0 0 lgw io0 0 ret ret efn 0 : rsrc_saddr csv ldw 113 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 lll 12 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : graf_handle csv ldw 77 0 sgw 0 ct0 ldw 5 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 sgw 0 ct1 jsr aes lgw io1 0 lla 8 0 sow 0 0 0 lgw io2 0 lla 12 0 sow 0 0 0 lgw io3 0 lla 16 0 sow 0 0 0 lgw io4 0 lla 20 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : graf_rubberbox csv ldw 70 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 3 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 jsr aes lgw io1 0 lla 16 0 sow 0 0 0 lgw io2 0 lla 20 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : graf_dragbox csv ldw 71 0 sgw 0 ct0 ldw 8 0 sgw 0 ct1 ldw 3 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 llw 20 0 sgw 0 ii6 llw 22 0 sgw 0 ii7 jsr aes lgw io1 0 lla 24 0 sow 0 0 0 lgw io2 0 lla 28 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : graf_movebox csv ldw 72 0 sgw 0 ct0 ldw 6 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 jsr aes lgw io0 0 ret ret efn 0 : graf_growbox csv ldw 73 0 sgw 0 ct0 ldw 8 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 lal 8 0 tad 0 0 sgl 0 aes2 jsr aes lag ii0 0 tad 0 0 sgl 0 aes2 lgw io0 0 ret ret efn 0 : graf_shrinkbox csv ldw 73 0 sgw 0 ct0 ldw 8 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 lal 8 0 tad 0 0 sgl 0 aes2 jsr aes lag ii0 0 tad 0 0 sgl 0 aes2 lgw io0 0 ret ret efn 0 : graf_watchbox csv ldw 75 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii1 llw 14 0 sgw 0 ii2 llw 16 0 sgw 0 ii3 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : graf_slidebox csv ldw 76 0 sgw 0 ct0 ldw 3 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 llw 16 0 sgw 0 ii2 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : graf_mouse csv ldw 78 0 sgw 0 ct0 ldw 1 0 sgw 0 ct3 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 lll 10 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : graf_mkstate csv ldw 79 0 sgw 0 ct0 ldw 0 0 sgw 0 ct4 sgw 0 ct3 sgw 0 ct1 ldw 5 0 sgw 0 ct2 jsr aes lgw io1 0 lla 8 0 sow 0 0 0 lgw io2 0 lla 12 0 sow 0 0 0 lgw io3 0 lla 16 0 sow 0 0 0 lgw io4 0 lla 20 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : wind_get csv ldw 104 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 5 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 jsr aes lgw io1 0 lla 12 0 sow 0 0 0 lgw io2 0 lla 16 0 sow 0 0 0 lgw io3 0 lla 20 0 sow 0 0 0 lgw io4 0 lla 24 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : wind_create csv ldw 100 0 sgw 0 ct0 ldw 5 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 jsr aes lgw io0 0 ret ret efn 0 : wind_set csv ldw 105 0 sgw 0 ct0 ldw 6 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 jsr aes lgw io0 0 ret ret efn 0 : wind_open csv ldw 101 0 sgw 0 ct0 ldw 5 0 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 jsr aes lgw io0 0 ret ret efn 0 : wind_close csv ldw 102 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 jsr aes lgw io0 0 ret ret efn 0 : wind_delete csv ldw 103 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 jsr aes lgw io0 0 ret ret efn 0 : wind_find csv ldw 106 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 jsr aes lgw io0 0 ret ret efn 0 : wind_update csv ldw 107 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 jsr aes lgw io0 0 ret ret efn 0 : wind_calc csv ldw 108 0 sgw 0 ct0 ldw 6 0 sgw 0 ct1 ldw 5 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 jsr aes lgw io1 0 lla 20 0 sow 0 0 0 lgw io2 0 lla 24 0 sow 0 0 0 lgw io3 0 lla 28 0 sow 0 0 0 lgw io4 0 lla 32 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : event_multi csv ldw 25 0 sgw 0 ct0 ldw 16 0 sgw 0 ct1 ldw 7 0 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 llw 20 0 sgw 0 ii6 llw 22 0 sgw 0 ii7 llw 24 0 sgw 0 ii8 llw 26 0 sgw 0 ii9 llw 28 0 sgw 0 ii10 llw 30 0 sgw 0 ii11 llw 32 0 sgw 0 ii12 llw 34 0 sgw 0 ii13 llw 38 0 sgw 0 ii14 llw 40 0 sgw 0 ii15 llw 36 0 xtw 0 sgl 0 ai0 jsr aes lgw io1 0 lla 42 0 sow 0 0 0 lgw io2 0 lla 46 0 sow 0 0 0 lgw io3 0 lla 50 0 sow 0 0 0 lgw io4 0 lla 54 0 sow 0 0 0 lgw io5 0 lla 58 0 sow 0 0 0 lgw io6 0 lla 62 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : objc_draw csv ldw 42 0 sgw 0 ct0 ldw 6 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 llw 16 0 sgw 0 ii2 llw 18 0 sgw 0 ii3 llw 20 0 sgw 0 ii4 llw 22 0 sgw 0 ii5 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : objc_find csv ldw 43 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 llw 16 0 sgw 0 ii2 llw 18 0 sgw 0 ii3 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : objc_offset csv ldw 43 0 sgw 0 ct0 ldw 1 0 sgw 0 ct1 ldw 3 0 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 lll 8 0 sgl 0 ai0 jsr aes lgw io1 0 lla 14 0 sow 0 0 0 lgw io2 0 lla 18 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : objc_edit csv ldw 46 0 sgw 0 ct0 ldw 4 0 sgw 0 ct1 ldw 2 0 sgw 0 ct2 ldw 1 0 sgw 0 ct3 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 llw 16 0 sgw 0 ii2 llw 18 0 sgw 0 ii3 lll 8 0 sgl 0 ai0 jsr aes lgw io1 0 lla 20 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : objc_change csv ldw 47 0 sgw 0 ct0 ldw 8 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 llw 16 0 sgw 0 ii2 llw 18 0 sgw 0 ii3 llw 20 0 sgw 0 ii4 llw 22 0 sgw 0 ii5 llw 24 0 sgw 0 ii6 llw 26 0 sgw 0 ii7 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : menu_bar csv ldw 30 0 sgw 0 ct0 ldw 1 0 sgw 0 ct3 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : menu_icheck csv ldw 31 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : menu_enable csv ldw 32 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : menu_tnormal csv ldw 33 0 sgw 0 ct0 ldw 2 0 sgw 0 ct1 ldw 1 0 sgw 0 ct3 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 llw 14 0 sgw 0 ii1 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : menu_text csv ldw 34 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 sgw 0 ct1 ldw 2 0 sgw 0 ct3 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 lll 8 0 sgl 0 ai0 lll 14 0 sgl 0 ai1 jsr aes lgw io0 0 ret ret efn 0 : menu_register csv ldw 35 0 sgw 0 ct0 ldw 1 0 sgw 0 ct3 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 lll 10 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : form_pf csv lal 12 0 tad 0 0 phl 0 pll 8 lag _pfb 0 tad 0 0 phl 0 jsr _dopf pop 12 lag _pfb 0 tad 0 0 phl 0 pdw 0 jsr form_alert pop 6 ret efn 0 : form_do csv ldw 50 0 sgw 0 ct0 ldw 1 0 sgw 0 ct3 sgw 0 ct1 ldw 2 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 llw 12 0 sgw 0 ii0 lll 8 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : form_dial csv ldw 51 0 sgw 0 ct0 ldw 9 0 sgw 0 ct1 ldw 1 0 sgw 0 ct2 sgw 0 ct3 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 llw 10 0 sgw 0 ii1 llw 12 0 sgw 0 ii2 llw 14 0 sgw 0 ii3 llw 16 0 sgw 0 ii4 llw 18 0 sgw 0 ii5 llw 20 0 sgw 0 ii6 llw 22 0 sgw 0 ii7 llw 24 0 sgw 0 ii8 jsr aes lgw io0 0 ret ret efn 0 : form_center csv ldw 54 0 sgw 0 ct0 ldw 0 0 sgw 0 ct1 ldw 5 0 sgw 0 ct3 ldw 1 0 sgw 0 ct2 ldw 0 0 sgw 0 ct4 lll 8 0 sgl 0 ai0 jsr aes lgw io1 0 lla 12 0 sow 0 0 0 lgw io2 0 lla 16 0 sow 0 0 0 lgw io3 0 lla 20 0 sow 0 0 0 lgw io4 0 lla 24 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : form_error csv ldw 53 0 sgw 0 ct0 ldw 1 0 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 sgw 0 ct3 llw 8 0 sgw 0 ii0 jsr aes lgw io0 0 ret ret efn 0 : form_alert csv ldw 52 0 sgw 0 ct0 ldw 1 0 sgw 0 ct3 sgw 0 ct2 sgw 0 ct1 ldw 0 0 sgw 0 ct4 llw 8 0 sgw 0 ii0 lll 10 0 sgl 0 ai0 jsr aes lgw io0 0 ret ret efn 0 : fsel_input csv ldw 90 0 sgw 0 ct0 ldw 0 0 sgw 0 ct4 sgw 0 ct1 ldw 2 0 sgw 0 ct3 sgw 0 ct2 lll 8 0 sgl 0 ai0 lll 12 0 sgl 0 ai1 jsr aes lgw io1 0 lla 16 0 sow 0 0 0 lgw io0 0 ret ret efn 0 : aes csv lag aes0 0 tad 0 1 ldw 200 0 trp 2 ret efn 0 : vdi csv lag vdi0 0 tad 0 1 ldw 115 0 trp 2 ret efn 0 /* * the GEM library * contains both AES and VDI stuff, though not all of it */ #include "gem.h" extern short ct0, ct1, ct2, ct3, ct4, ct5, ct6, ct7; extern short ii0, ii1, ii2, ii3, ii4, ii5, ii6, ii7, ii8, ii9, ii10, ii11, ii12, ii13, ii14, ii15; extern short io0, io1, io2, io3, io4, io5, io6, iox[40]; extern short pi0, pi1, pi2, pi3, pi4, pi5, pi6, pi7, pix[6]; extern short po0, po1, po2, po3, pox[12]; extern short *ai0, *ai1; extern short *ao0; extern short *vdi0, *vdi1, *vdi2, *vdi3, *vdi4, *vdi5; extern short *aes0, *aes1, *aes2, *aes3, *aes4, *aes5; extern short global[16]; /* * the c runtime start up routine for GEM processes * no argv argc stuff, no stdio (use TOS routines for file access) * * assumes a startup prg.s of * . _bstk 2048 * . _estk 4 * taa 7 6 * lll 4 0 * sgl _estk * lag _estk 7 * jsr _cprg * plus definitions for all the above externs */ #define SETBLK 0x4A #define TERM 0x4C _cprg(tpa) long tpa; { int i; long x, *lp; /* compute size of program, give memory back to TOS */ lp = tpa; x = lp[3] + lp[5] + lp[7] + 0x100; if (trap(1, SETBLK, 0, tpa, x)) appl_exit(-1); /* set up the aespb and vdipb arrays */ aes0 = &ct0; aes1 = global; aes2 = &ii0; aes3 = &io0; aes4 = &ai0; aes5 = &ao0; vdi0 = &ct0; vdi1 = &ii0; vdi2 = &pi0; vdi3 = &io0; vdi4 = &po0; /* init standard i/o */ _ioinit(); /* run the program */ i = main(); /* close up shop */ appl_exit(i); } #define vdc(op,pi,ii,xx,yy) ct0=op;ct1=pi;ct2=ct4=0;ct3=ii;ct5=xx;ct6=yy;vdi() /* open virtual workstation */ v_opnvwk(in, h, out) struct vdi_openin *in; short *h; struct vdi_openout *out; { vdi0 = &ct0; vdi1 = in; vdi2 = &pi0; vdi3 = out; vdi4 = &(out->devicetyp); vdc(100, 0, 11, 0, 1); *h = ct6; vdi0 = &ct0; vdi1 = &ii0; vdi2 = &pi0; vdi3 = &io0; vdi4 = &po0; } /* close virtual workstation */ v_clsvwk(h) short h; { vdc(101, 0, 0, 0, h); } v_clrwk(h) short h; { vdc(3, 0, 0, 0, h); } /* cursor control */ v_enter_cur(h) short h; { /* enter cursor mode - shows cursor */ vdc(5, 0, 0, 3, h); } v_exit_cur(h) short h; { /* exit cursor mode - removes cursor */ vdc(5, 0, 0, 2, h); } v_rvon(h) { /* reverse video on - cursor text */ vdc(5, 0, 0, 13, h); } v_rvoff(h) { /* reverse video off - cursor text */ vdc(5, 0, 0, 14, h); } v_curhome(h) { /* home cursor */ vdc(5, 0, 0, 8, h); } vs_curaddress(h, r, c) { /* put cursor on row r (0-24) and col. c (0-79) */ ii0 = c; ii1 = r; vdc(5, 0, 2, 11, h); } /* screen operations */ v_eeos(h) { /* erase from cursor to end of screen */ vdc(5, 0, 0, 9, h); } /* polymarkers */ v_pmarker(h, count, xy) short xy[]; { /* plot markers at xy coords. passed */ vdi2 = xy; vdc(7, count, 0, 0, h); vdi2 = &pi0; } vsm_color(h, color) { /* sets the color that marker is plotted with */ return vdi_attr(h, 20, color); /* color: 0 - numcolors */ } vsm_height(h, height) { /* set the height of plotted markers (not of type 1) */ pi0 = 0; pi1 = height; /* height: in pels, 1 - maxy */ vdc(19, 1, 0, 0, h); return po1; } vsm_type(h, type) { /* set marker type - returns type selected */ return vdi_attr(h, 18, type); /* type: 1 - nummarktyp */ } vqm_attributes(h, at) struct vdi_mattr *at; { /* query marker attributes */ vdi3 = at; vdi4 = &(at->markwid); vdc(36, 0, 0, 0, h); vdi3 = &io0; vdi4 = &po0; } /* polylines */ v_pline(h, count, xy) short xy[]; { /* draw multi-segment line */ vdi2 = xy; vdc(6, count, 0, 0, h); /* count >= 2 */ vdi2 = &pi0; } vsl_color(h, color) { /* set line color - returns color selected */ return vdi_attr(h, 17, color); } vsl_ends(h, begin, end) { /* set line end styles */ ii0 = begin; ii1 = end; vdc(108, 0, 2, 0, h); } vsl_type(h, type) { /* set line type - returns type selected */ return vdi_attr(h, 15, type); } vsl_udsty(h, pat) { /* set user defined line type pattern */ vdi_attr(h, 113, pat); /* e.g. dash line type is: 0xFF00 */ } vsl_width(h, w) { /* set line width - returns actual width */ pi0 = w; vdc(16, 1, 0, 0, h); return po0; } vql_attributes(h, at) struct vdi_lattr *at; { /* query line attributes */ vdi3 = at; vdi4 = &(at->linewid); vdc(35, 0, 0, 0, h); vdi3 = &io0; vdi4 = &po0; } /* text */ vst_alignment(h, hin, vin, hout, vout) short *hout, *vout; { /* set text alignment */ ii0 = hin; ii1 = vin; vdc(39, 0, 2, 0, h); *hout = io0; *vout = io1; } vst_color(h, color) { /* set text color - color selected returned */ return vdi_attr(h, 22, color); } vst_effects(h, effects) { /* set text effects - effects selected returned */ return vdi_attr(h, 106, effects); } /* set text height - absolute mode */ vst_height(h, height, wch, hch, wcl, hcl) int *wch, *hch, *wcl, *hcl; { pi0 = 0; pi1 = height; /* height: distance from baseline to top of char. cell */ vdc(12, 1, 0, 0, h); *wch = po0; *hch = po1; *wcl = po2; *hcl = po3; } vst_point(h, height) { /* set text height - points mode, height returned */ /* distance between baselines of two consecutive lines */ return vdi_attr(h, 107, height); } vst_rotation(h, angle) { /* set baseline vector - angle selected returned */ return vdi_attr(h, 13, angle); /* angle expressed in .1s of a degree */ } vst_font(h, font) { /* set font - returns font selected */ return vdi_attr(h, 21, font); } vswr_mode(h, mode) { /* set writing mode - mode selected returned */ return vdi_attr(h, 32, mode); } v_curtext(h, s) char *s; { _vdi_tcpy(5, 0, 12, h, s); } v_gtext(h, x, y, s) char *s; { pi0 = x; pi1 = y; _vdi_tcpy(8, 2, 0, h, s); } _vdi_tcpy(op, pin, p5, h, s) char *s; { short *ip, tbuf[140]; int i; vdi1 = tbuf; for (ip = tbuf, i = 0; (i < 140) && (*s != '\0'); ++i) { *ip++ = *s++; } vdc(op, pin, i, p5, h); vdi1 = &ii0; } vqt_attributes(h, at) struct vdi_tattr *at; { /* query text attributes */ vdi3 = at; vdi4 = &(at->charwid); vdc(38, 0, 0, 0, h); vdi3 = &io0; vdi4 = &po0; } /* graphic primitives */ v_arc(h, x, y, r, sa, ea) { /* draw arc - portion of a circle */ ii0 = sa; /* start angle - .1s of degree */ ii1 = ea; /* end angle */ pi0 = x; /* center - x coord. */ pi1 = y; /* center - y coord. */ pi6 = r; /* radius */ vdc(11, 4, 2, 2, h); } v_bar(h, xy) int *xy; { /* draw a bar (box) */ pi0 = *xy; pi1 = *++xy; pi2 = *++xy; pi3 = *++xy; vdc(11, 2, 0, 1, h); } v_circle(h, x, y, r) { /* draw a circle */ pi0 = x; pi1 = y; pi4 = r; vdc(11, 3, 0, 4, h); } v_contourfill(h, x, y, color) { /* fill area enclosing x,y */ pi0 = x; pi1 = y; ii0 = color; /* color < 0: boundry of any color other than xy's */ vdc(103, 1, 1, 0, h); } v_ellarc(h, x, y, xr, yr, sa, ea) { /* draw an elliptical arc */ ii0 = sa; /* start angle */ ii1 = ea; /* end angle */ pi0 = x; /* center point x */ pi1 = y; /* center point y */ pi2 = xr; /* x radius */ pi3 = yr; /* y radius */ vdc(11, 2, 2, 6, h); } v_ellpie(h, x, y, xr, yr, sa, ea) { /* draw an elliptical pie slice */ ii0 = sa; ii1 = ea; pi0 = x; pi1 = y; pi2 = xr; pi3 = yr; vdc(11, 2, 2, 7, h); } v_ellipse(h, x, y, xr, yr) { /* draw an ellipse */ pi0 = x; pi1 = y; pi2 = xr; pi3 = yr; vdc(11, 2, 0, 5, h); } v_rbox(h, xy) short *xy; { /* draw a rounded box */ pi0 = *xy; /* xy coordinates of lower left and upper right corners */ pi1 = *++xy; pi2 = *++xy; pi3 = *++xy; vdc(11, 2, 0, 8, h); } v_rfbox(h, xy) short *xy; { /* draw a rounded filled box */ pi0 = *xy; /* xy coordinates of lower left and upper right corners */ pi1 = *++xy; pi2 = *++xy; pi3 = *++xy; vdc(11, 2, 0, 9, h); } v_recfl(h, xy) short *xy; { /* draw a filled rectangle */ pi0 = *xy; /* xy coordinates of diagonally opposite corners */ pi1 = *++xy; pi2 = *++xy; pi3 = *++xy; vdc(114, 2, 0, 0, h); } /* area fill and attributes */ v_fillarea(h, count, xy) short xy[]; { vdi2 = xy; /* fill area defined by a multi-segment line */ vdc(9, count, 0, 0, h); /* count >= 2 */ vdi2 = &pi0; } vsf_color(h, color) { /* set fill color */ return vdi_attr(h, 25, color); } vsf_perimeter(h, v_flag) { /* set fill perimeter visibility */ return vdi_attr(h, 104, v_flag); /* 0 = invisible, 1 = visible */ } vsf_interior(h, style) { /* set fill interior style */ return vdi_attr(h, 23, style); } vsf_style(h, style) { /* set fill style */ /* interior pattern: 0-23, interior hatch: 0-11 */ return vdi_attr(h, 24, style); } vsf_updat(h, fill, planes) int *fill; { /* set user defined fill pattern */ int n; n = planes << 4; /* 16 words per plane */ vdi1 = fill; vdc(112, 0, n, 0, h); vdi1 = &ii0; } vqf_attributes (h, at) struct vdi_fattr *at; { /* inquire current fill area attributes */ vdi4 = at; vdc(37, 0, 0, 0, h); vdi4 = &po0; } /* pixel operation */ v_get_pixel(h, x, y, pel, color) short *pel, *color; { /* get pixel value */ pi0 = x; pi1 = y; vdc(105, 1, 0, 0, h); *pel = io0; *color = io1; } vro_cpyfm(h, mode, xy, src, des) short xy[]; struct mfdb *src, *des; { struct mfdb **p; p = (struct mfdb **) &ct7; *p = src; *++p = des; ii0 = mode; vdi2 = xy; vdc(109, 4, 1, 0, h); vdi2 = &pi0; } vrt_cpyfm(h, mode, pxy, src, dst, color) int *pxy; struct mfdb *src, *dst; { struct mfdb **p; p = &ct7; *p++ = src; *p = dst; ii0 = mode; ii1 = color; ii2 = 0; vdi2 = pxy; vdc(121, 4, 3, 0, h); vdi2 = &pi0; } vr_trnfm(h, src, dst) struct mfdb *src, *dst; { struct mfdb **p; p = &ct7; *p++ = src; *p = dst; vdc(110, 0, 0, 0, h); } vq_color(h, index, set_flag, rgb) short rgb[]; { /* inquire color representation */ ii0 = index; /* color to enquire about */ ii1 = set_flag; /* 0 = values set; 1 = values realized */ vdc(26, 0, 2, 0, h); rgb[0] = io1; /* red intensity - .1% */ rgb[1] = io2; /* green intensity */ rgb[2] = io3; /* blue intensity */ } vs_color(h, index, rgb) short rgb[]; { /* set color representation */ ii0 = index; ii1 = rgb[0]; /* red */ ii2 = rgb[1]; /* green */ ii3 = rgb[2]; /* blue */ vdc(14, 0, 4, 0, h); } vq_key_s(h, status) int h, *status; { ct0 = 128; ct1 = ct2 = ct3 = 0; ct6 = h; vdi(); *status = io0; } /* mouse functions */ v_show_c(h, mstyle) { /* show mouse */ ii0 = mstyle; vdc(122, 0, 1, 0, h); } v_hide_c(h) { /* hide mouse */ vdc(123, 0, 0, 0, h); } vsc_form(h, form) struct vdi_form *form; { /* define mouse shape */ vdi1 = form; vdc(111, 0, 37, 0, h); vdi1 = &ii0; } vq_mouse(h, pstatus, px, py) short *pstatus, *px, *py; { /* get mouse's status */ vdc(124, 0, 0, 0, h); *pstatus = io0; *px = po0; *py = po1; } vdi_attr(h, op, attr) { /* implements many common routines */ ii0 = attr; vdc(op, 0, 1, 0, h); return io0; } /* GEM application init and exit */ appl_init() { ct0 = 10; ct2 = 1; ct1 = ct3 = ct4 = 0; aes(); return io0; } appl_exit(i) { trap(1, TERM, i); } /* VDI routines for the GEM library */ vq_extnd(handle, owflag, outint *out; { int i, j, *intout, *ptsout; ct0 = 102; ct1 = 0; ct3 = 1; ct6 = handle; ii0 = owflag; vdi(); intout = &io0; for (i = 0; i < 45; i++) out[i] = intout[i]; ptsout = &po0; for (j = 0; j < 12; j++) out[i++] = ptsout[j]; } /* * GEM:VDI set clipping rectangle * flag = 0 no clipping * flag = 1 clipping on * pxy[] should contain the upper left and bottom right coords */ vs_clip(handle, flag, pxy) int *pxy; { ct0 = 129; ct1 = 2; ct3 = 1; ct6 = handle; ii0 = flag; vdi2 = pxy; vdi(); vdi2 = &pi0; } /* GEM:VDI put justified text on the screen */ v_justified(handle, x, y, string, len, wspace, cspace) char *string; { int *ip; ct0 = 11; ct1 = 2; ct6 = handle; ii0 = wspace; ii1 = cspace; ip = &ii2; for (ct3 = 2; *ip++ = *string++; ct3++) ; pi0 = x; pi1 = y; pi2 = len; vdi(); } /* AES: resource handling */ rsrc_gaddr(type, index, addr) long **addr; { ct0 = 112; ct1 = 2; ct2 = ct4 = 1; ct3 = 0; ii0 = type; ii1 = index; aes(); *addr = ao0; return io0; } rsrc_saddr(type, index, addr) long *addr; { ct0 = 113; ct1 = 2; ct2 = ct3 = 1; ct4 = 0; ii0 = type; ii1 = index; ai0 = addr; aes(); return io0; } /* graphics handling */ graf_handle(wchar, hchar, wbox, hbox) int *wchar, *hchar, *wbox, *hbox; { ct0 = 77; ct2 = 5; ct1 = ct3 = ct4 = 0; aes(); *wchar = io1; *hchar = io2; *wbox = io3; *hbox = io4; return io0; } graf_rubberbox(x, y, minw, minh, lastw, lasth) int *lastw, *lasth; { ct0 = 70; ct1 = 4; ct2 = 3; ct3 = ct4 = 0; ii0 = x; ii1 = y; ii2 = minw; ii3 = minh; aes(); *lastw = io1; *lasth = io2; return io0; } graf_dragbox(dw, dh, sx, sy, bx, by, bw, bh, endx, endy) int *endx, *endy; { ct0 = 71; ct1 = 8; ct2 = 3; ct3 = ct4 = 0; ii0 = dw; ii1 = dh; ii2 = sx; ii3 = sy; ii4 = bx; ii5 = by; ii6 = bw; ii7 = bh; aes(); *endx = io1; *endy = io2; return io0; } graf_movebox(w, h, sx, sy, dx, dy) { ct0 = 72; ct1 = 6; ct2 = 1; ct3 = ct4 = 0; ii0 = w; ii1 = h; ii2 = sx; ii3 = sy; ii4 = dx; ii5 = dy; aes(); return io0; } graf_growbox(bx, by, bw, bh, ex, ey, ew, eh) { ct0 = 73; ct1 = 8; ct2 = 1; ct3 = ct4 = 0; aes2 = &bx; aes(); aes2 = &ii0; return io0; } graf_shrinkbox(ex, ey, ew, eh, bx, by, bw, bh) { ct0 = 73; ct1 = 8; ct2 = 1; ct3 = ct4 = 0; aes2 = &ex; aes(); aes2 = &ii0; return io0; } graf_watchbox(tree, obj, instate, outstate) int *tree; { ct0 = 75; ct1 = 4; ct2 = ct3 = 1; ct4 = 0; ii1 = obj; ii2 = instate; ii3 = outstate; ai0 = tree; aes(); return io0; } graf_slidebox(tree, parent, obj, vh) int *tree; { ct0 = 76; ct1 = 3; ct2 = ct3 = 1; ct4 = 0; ii0 = parent; ii1 = obj; ii2 = vh; ai0 = tree; aes(); return io0; } graf_mouse(type, shape) int *shape; { ct0 = 78; ct1 = ct2 = ct3 = 1; ct4 = 0; ii0 = type; ai0 = shape; aes(); return io0; } graf_mkstate(x, y, mstate, kstate) int *x, *y, *mstate, *kstate; { ct0 = 79; ct1 = ct3 = ct4 = 0; ct2 = 5; aes(); *x = io1; *y = io2; *mstate = io3; *kstate = io4; return io0; } /* window handling */ wind_get(handle, gfld, gw1, gw2, gw3, gw4) int *gw1, *gw2, *gw3, *gw4; { ct0 = 104; ct1 = 2; ct2 = 5; ct3 = ct4 = 0; ii0 = handle; ii1 = gfld; aes(); *gw1 = io1; *gw2 = io2; *gw3 = io3; *gw4 = io4; return io0; } wind_create(kind, x, y, w, h) { ct0 = 100; ct1 = 5; ct2 = 1; ct3 = ct4 = 0; ii0 = kind; ii1 = x; ii2 = y; ii3 = w; ii4 = h; aes(); return io0; } wind_set(handle, field, s1, s2, s3, s4) { ct0 = 105; ct1 = 6; ct2 = 1; ct3 = ct4 = 0; ii0 = handle; ii1 = field; ii2 = s1; ii3 = s2; ii4 = s3; ii5 = s4; aes(); return io0; } wind_open(handle, x, y, w, h) { ct0 = 101; ct1 = ct2 = 5; ct3 = ct4 = 0; ii0 = handle; ii1 = x; ii2 = y; ii3 = w; ii4 = h; aes(); return io0; } wind_close(handle) { ct0 = 102; ct1 = ct2 = 1; ct3 = ct4 = 0; ii0 = handle; aes(); return io0; } wind_delete(handle) { ct0 = 103; ct1 = ct2 = 1; ct3 = ct4 = 0; ii0 = handle; aes(); return io0; } wind_find(x, y) { ct0 = 106; ct1 = 2; ct2 = 1; ct3 = ct4 = 0; ii0 = x; ii1 = y; aes(); return io0; } wind_update(n) { ct0 = 107; ct1 = ct2 = 1; ct3 = ct4 = 0; ii0 = n; aes(); return io0; } wind_calc( type, kind, xi, yi, wi, hi, xo, yo, wo, ho) int *xo, *yo, *wo, *ho; { ct0 = 108; ct1 = 6; ct2 = 5; ct3 = ct4 = 0; ii0 = type; ii1 = kind; ii2 = xi; ii3 = yi; ii4 = wi; ii5 = hi; aes(); *xo = io1; *yo = io2; *wo = io3; *ho = io4; return io0; } /* event handling */ event_multi( flags, clicks, mask, state, af, ax, ay, aw, ah, bf, bx, by, bw, bh, buff, lo, hi, ox, oy, obut, ostate, okret, obret) int *ox, *oy, *obut, *ostate, *okret, *obret; { ct0 = 25; ct1 = 16; ct2 = 7; ct3 = 1; ct4 = 0; ii0 = flags; ii1 = clicks; ii2 = mask; ii3 = state; ii4 = af; ii5 = ax; ii6 = ay; ii7 = aw; ii8 = ah; ii9 = bf; ii10 = bx; ii11 = by; ii12 = bw; ii13 = bh; ii14 = lo; ii15 = hi; ai0 = buff; aes(); *ox = io1; *oy = io2; *obut = io3; *ostate = io4; *okret = io5; *obret = io6; return io0; } /* object handling */ objc_draw(tree, start, depth, xclip, yclip, wclip, hclip) int *tree; { ct0 = 42; ct1 = 6; ct2 = ct3 = 1; ct4 = 0; ii0 = start; ii1 = depth; ii2 = xclip; ii3 = yclip; ii4 = wclip; ii5 = hclip; ai0 = tree; aes(); return io0; } objc_find(tree, start, depth, x, y) int *tree; { ct0 = 43; ct1 = 4; ct2 = ct3 = 1; ct4 = 0; ii0 = start; ii1 = depth; ii2 = x; ii3 = y; ai0 = tree; aes(); return io0; } objc_offset(tree, object, xoff, yoff) int *tree, *xoff, *yoff; { ct0 = 43; ct1 = 1; ct2 = 3; ct3 = 1; ct4 = 0; ii0 = object; ai0 = tree; aes(); *xoff = io1; *yoff = io2; return io0; } objc_edit(tree, object, ch, idx, kind, newidx) int *tree, *newidx; { ct0 = 46; ct1 = 4; ct2 = 2; ct3 = 1; ct4 = 0; ii0 = object; ii1 = ch; ii2 = idx; ii3 = kind; ai0 = tree; aes(); *newidx = io1; return io0; } objc_change(tree, object, resvd, x, y, w, h, state, redraw) int *tree; { ct0 = 47; ct1 = 8; ct2 = ct3 = 1; ct4 = 0; ii0 = object; ii1 = resvd; ii2 = x; ii3 = y; ii4 = w; ii5 = h; ii6 = state; ii7 = redraw; ai0 = tree; aes(); return io0; } /* menu handling */ menu_bar(tree, show) int *tree; { ct0 = 30; ct1 = ct2 = ct3 = 1; ct4 = 0; ii0 = show; ai0= tree; aes(); return io0; } menu_icheck(tree, item, check) int *tree; { ct0 = 31; ct1 = 2; ct2 = ct3 = 1; ct4 = 0; ii0 = item; ii1 = check; ai0 = tree; aes(); return io0; } menu_enable(tree, item, enable) int *tree; { ct0 = 32; ct1 = 2; ct2 = ct3 = 1; ct4 = 0; ii0 = item; ii1 = enable; ai0 = tree; aes(); return io0; } menu_tnormal(tree, title, normal) int *tree; { ct0 = 33; ct1 = 2; ct2 = ct3 = 1; ct4 = 0; ii0 = title; ii1 = normal; ai0 = tree; aes(); return io0; } menu_text(tree, item, text) int *tree; char *text; { ct0 = 34; ct1 = ct2 = 1; ct3 = 2; ct4 = 0; ii0 = item; ai0 = tree; ai1 = text; aes(); return io0; } menu_register(id, string) char *string; { ct0 = 35; ct1 = ct2 = ct3 = 1; ct4 = 0; ii0 = id; ai0 = string; aes(); return io0; } /* form handling */ form_pf(fmt, args) char *fmt; int args; { extern char _pfb[1]; _dopf(_pfb, fmt, &args); form_alert(0, _pfb); } form_do(tree, start) int *tree; { ct0 = 50; ct1 = ct3 = 1; ct2 = 2; ct4 = 0; ii0 = start; ai0 = tree; aes(); return io0; } form_dial(flag, sx, sy, sw, sh, bx, by, bw, bh) { ct0 = 51; ct1 = 9; ct3 = ct2 = 1; ct4 = 0; ii0 = flag; ii1 = sx; ii2 = sy; ii3 = sw; ii4 = sh; ii5 = bx; ii6 = by; ii7 = bw; ii8 = bh; aes(); return io0; } form_center(tree, x, y, w, h) int *tree, *x, *y, *w, *h; { ct0 = 54; ct1 = 0; ct3 = 5; ct2 = 1; ct4 = 0; ai0 = tree; aes(); *x = io1; *y = io2; *w = io3; *h = io4; return io0; } form_error(num) { ct0 = 53; ct1 = ct2 = 1; ct3 = ct4 = 0; ii0 = num; aes(); return io0; } form_alert(button, string) char *string; { ct0 = 52; ct1 = ct2 = ct3 = 1; ct4 = 0; ii0 = button; ai0 = string; aes(); return io0; } /* AES file selector */ fsel_input(dir, file, button) char *dir, *file; int *button; { ct0 = 90; ct1 = ct4 = 0; ct2 = ct3 = 2; ai0 = dir; ai1 = file; aes(); *button = io1; return io0; } /* AES and VDI support routines */ aes() { /* * load address of aes parameter block into a0 * transfer a0 to d1 * load 200 into d0 * trap #2 */ asm( lag aes0 0 tad 0 1 ldw 200 0 trp 2 ); } vdi() { /* * load address of vdi parameter block into a0 * transfer a0 to d1 * load 115 into d0 * trap #2 */ asm( lag vdi0 0 tad 0 1 ldw 115 0 trp 2 ); } /* gem/vdi definitions and structures */ struct object { int next; /* index of next object in the tree */ int start; /* index of first subordinate */ int last; /* index of last subordinate */ int type; /* type of the object */ int flags; /* selectability of the objects */ int status; /* state of the object */ int *spec; /* pointer to object data structure */ int x; /* x coord relative to parent */ int y; /* y coord relative to parent */ int w; /* width of the object */ int h; /* height of the object */ }; /* object types */ #define BOX 20 #define TEXT 21 #define BOXTEXT 22 #define IMAGE 23 #define PROGDEF 24 #define IBOX 25 #define BUTTON 26 #define BOXCHAR 27 #define STRING 28 #define FTEXT 29 #define FBOXT 30 #define ICON 31 #define TITLE 32 /* object flags */ #define NONE 0x00 #define SELECT 0x01 #define DEFAULT 0x02 #define EXIT 0x04 #define EDIT 0x08 #define RBUTTON 0x10 #define LASTOBJ 0x20 #define TOUCHX 0x40 #define HIDE 0x80 #define INDIR 0x100 /* object status */ #define CROSSED 0x02 #define CHECKED 0x04 #define DISABLE 0x08 #define OUTLINE 0x10 #define SHADOW 0x20 struct tedinfo { char *text; /* string to be output */ char *tmplt; /* template for the string */ char *valid; /* permission string for input */ int font; /* character set (normal 3, small 5) */ int res1; /* reserved */ int just; /* justify (left 0, right 1, center 2) */ int color; /* text color */ int res2; /* reserved */ int thick; /* border thickness -127 to 128 */ int txtlen; /* length of the string */ int tmplen; /* length of the template */ }; /* * vdi structure definitions and defines */ /* color indices */ #define WHITE 0 #define BLACK 1 #define RED 2 #define GREEN 3 #define BLUE 4 #define CYAN 5 #define YELLOW 6 #define MAGENTA 7 #define LOW_WHITE 8 #define GREY 9 #define LIGHT_RED 10 #define LIGHT_GREEN 11 #define LIGHT_BLUE 12 #define LIGHT_CYAN 13 #define LIGHT_YELLOW 14 #define LIGHT_MAGENTA 15 /* writing modes */ #define WR_REPLACE 1 #define WR_TRANSPARENT 2 #define WR_XOR 3 #define WR_REVTRANS 4 /* marker types */ #define DOT_MTYPE 1 #define PLUS_MTYPE 2 #define ASTERISK_MTYPE 3 #define SQUARE_MTYPE 4 #define X_MTYPE 5 #define DIAMOND_MTYPE 6 /* end styles */ #define SQUARE_ESTYLE 0 /* default */ #define ARROW_ESTYLE 1 #define ROUND_ESTYLE 2 /* line types */ #define SOLID_LTYPE 1 #define LONG_DASH_LTYPE 2 #define DOT_LTYPE 3 #define DASHDOT_LTYPE 4 #define DASH_LTYPE 5 #define DASHDOTDOT_LTYPE 6 #define USERDEF_LTYPE 7 /* text alignment */ #define LEFTJUST_HOR 0 /* default */ #define CENTERJUST_HOR 1 #define RIGHTJUST_HOR 2 #define BASELINE_VER 0 /* default */ #define HALFLINE_VER 1 #define ASCENTLINE_VER 2 #define BOTTOM_VER 3 #define DESCENT_VER 4 #define TOP_VER 5 /* text effects */ #define THICK_EFCT 1 #define LIGHT_EFCT 2 #define SKEW_EFCT 4 #define UNDERLINE_EFCT 8 #define OUTLINE_EFCT 16 #define SHADOW_EFCT 32 /* fill interior styles */ #define HOLLOW_IS 0 #define SOLID_IS 1 #define PATTERN_IS 2 #define HATCH_IS 3 #define USERDEF_IS 4 /* raster copy modes */ #define ALL_ZEROS 0 #define S_AND_D 1 #define S_AND_NOTD 2 #define S_ONLY 3 #define NOTS_AND_D 4 #define NOCHANGE 5 #define S_XOR_D 6 #define S_OR_D 7 #define NOTS_AND_NOTD 8 #define NOTS_XOR_NOTD 9 #define NOT_D 10 #define S_OR_NOTD 11 #define NOT_S 12 #define NOTS_OR_D 13 #define NOTS_OR_NOTD 14 #define ALL_ONES 15 struct vdi_openin { /* used in v_opnvwk */ short linetype, /* 0 to 6 */ linecolor, /* 0=white 1=black */ marktype, /* 0 to 6 */ markcolor, textfont, textcolor, fillstyle, fillcolor, promptflag; }; struct vdi_openout { /* used in v_opnvwk */ short maxx, maxy, flag, pelwidth, pelheight, numcharhght, numlinetyp, numlinewid, nummarktyp, nummarksiz, numgfonts, numpatterns, numhatch, numcolors, numgdp, gdplist[10], gdpattr[10], doescolor, rotstext, canfill, pixelops, locateflg, valuatflg, choiceflg, stringflg, stationtyp, devicetyp, numwrite, inputlevel, alignstext, inkingflg, rubberband, maxndcx, maxndcy, version[5]; }; struct vdi_mattr { /* used in vqm_attributes */ short marktyp, markcolor, markmode, markwid, markhgt; }; struct vdi_lattr { /* used in vql_attributes */ short linetyp, linecolor, linemode, beginstyle, endstyle, linewid; }; struct vdi_fattr { /* used in vqf_attributes */ short insidestyle, color, style, wrmode, perimeter; }; struct vdi_tattr { /* used in vqt_attributes */ short textface, color, angle, halign, valign, wrmode, charwid, charhgt, charcellw, charcellh; }; struct vdi_form { /* used in vsc_form */ short xhotspot, yhotspot, maskcolor, pntrcolor, maskshape[16], pntrshape[16]; }; /* * Memory Form Definition Block * */ struct mfdb { char *fd_addr; /* Address of upper left corner of first */ /* raster plane. If NULL then screen */ short fd_w; /* Form width in pels */ short fd_h; /* Form height in pels */ short fd_wdwidth; /* Form width in words */ short fd_stand; /* Form format 0= device spec 1=standard */ short fd_nplanes; /* Number of memory planes */ short dummy[3]; }; /* * C library for MJC 2.0 - startup, stdio, TOS, malloc * - now cr/nl mapping * - fopen handles binary or text options * - MAXBUF is now 1024 for speed * - exec passes on current process' environment */ /* max number of args in argv[] */ #define MAXARG 50 /* header file for stdio implementation */ #define MAXBUF 1024 #define MAXIO 8 struct file { char mode; /* free or open for read/write */ char fd; /* GEMTOS file descriptor */ int idx; /* next slot in buf read/written */ int len; /* length of the buffer */ char buf[MAXBUF]; /* i/o buffer */ }; /* these are the allowed modes */ #define FREE 0 #define RD 1 #define WR 2 #define RDWR 3 #define BINARY 4 /* these should match what's found in stdio.h, except for FILE */ #define FILE struct file #define EOF (-1) #define NULL (0L) #define EOS ((char)0) /* these are the GEMDOS trap commands */ #define CREATE 0x3C #define OPEN 0x3D #define CLOSE 0x3E #define READ 0x3F #define WRITE 0x40 #define LSEEK 0x42 #define SETBLK 0x4A #define EXIT 0x4C /* * the c runtime start up routine for ttp processes * * assumes a startup sttp.s of * . _bstk 2048 * . _estk 4 * taa 7 6 * lll 4 0 * sgl _estk * lag _estk 7 * jsr _cttp */ _cttp(tpa) long tpa; { extern int _argc; extern char *environ; extern char *_argv[MAXARG]; extern FILE *stdin, *stdout, *_fopen(); char *b, *w, *in, *out; int i; long x, *lp; if (tpa == NULL) { /* this happened to me once; I don't know why */ _ps("null tpa\n\r"); return 1; } /* compute size of program, give memory back to TOS */ lp = tpa; x = lp[3] + lp[5] + lp[7] + 0x100; if (trap(1, SETBLK, 0, tpa, x)) exit(-1); /* parse the command line */ _argc = 1; _argv[0] = "yc"; environ = (char *) lp[11]; b = tpa + 0x81; in = out = NULL; while (*b) { while (*b && *b <= ' ') b++; w = b; while (*b && *b > ' ') b++; if (*b) *b++ = 0; if (*w == '<') in = w+1; else if (*w == '>') out = w+1; else if (_argc < MAXARG) _argv[_argc++] = w; } _argv[_argc] = 0L; /* init stdio and re-direct if necessary */ _ioinit(); if (in) { if (_fopen(stdin, in, "r") == NULL) _cant(in); } if (out) { if (*out != '>') { /* create */ if (_fopen(stdout, out, "w") == NULL) _cant(out); } else { /* append */ if (_fopen(stdout, ++out, "a") == NULL) _cant(out); } } /* run the program */ i = main(_argc, _argv, environ); /* close up shop */ if (in) fclose(stdin); if (out) fclose(stdout); exit(i); } /* initialize standard i/o */ _ioinit() { int i; extern FILE *stdin, *stdout, *stderr; extern FILE _iobuf[1]; for (i = 0; i < MAXIO; i++) { _iobuf[i].mode = FREE; _iobuf[i].idx = _iobuf[i].len = 0; } stdin = &_iobuf[0]; stdin->fd = 0; stdout = &_iobuf[1]; stdout->fd = 1; stderr = &_iobuf[2]; stderr->fd = 1; stdin->mode = RDWR | BINARY; stdout->mode = stderr->mode = RDWR; } /* trouble redirecting output */ _cant(s) char *s; { _ps("can't redirect "); _ps(s); _ps("\n\r"); exit(1); } /* exit the program */ exit(n) { trap(1, EXIT, n); } /* execute a program: mode=0 -> load and go; mode=3 -> load and return */ exec(file, args, mode) char *file, *args; int mode; { extern char *environ; return trap(1, 0x4B, mode, file, args, environ); } /* get environment variable */ char * getenv(name) char *name; { extern char *environ; char *p, *q; for (p = environ; *p; ) { for (q = name; *p++ == *q++; ) ; if (p[-1] == '=' && q[-1] == 0) return p; while (*p++) ; } return NULL; } /* data for _cttp */ int _argc; char *_argv[MAXARG]; char *environ; /* data for standard i/o */ FILE _iobuf[MAXIO], *stdin, *stdout, *stderr; /* get options from command line */ extern char *strchr(); extern char *optarg; extern int optind, opterr, optsubind; getopt(argc, argv, optstr) char *argv[], *optstr; { char *o, c; if (++optind == argc) return EOF; o = argv[optind]; if (*o == '-') { c = o[++optsubind]; if (c == '-') return EOF; optstr = strchr(optstr, c); if (optstr == NULL) { if (opterr == 0) { _ps("unknown option: "); _ps(o); _ps("\n\r"); } optsubind = 0; return '?'; } if (optstr[1] == ':') { optarg = (o[optsubind + 1] != (char)0) ? o + optsubind + 1 : argv[++optind]; optsubind = 0; if (optarg == NULL) { if (opterr == 0) { _ps("missing arg: "); _ps(o); _ps("\n\r"); } return '?'; } } else if (o[2] != (char)0) { optind -= 1; } return c; } return EOF; } char *optarg; int optind, opterr, optsubind; _ps(s) char *s; { while (*s) trap(1, 2, *s++); } /* * stdio routines */ /* return file descriptor of a stream */ fileno(s) FILE *s; { return s->fd; } /* read a stream */ fread(buf, sz, n, s) char *buf; FILE *s; { int r; long nn; nn = (long) n * (long) sz; if ((r = trap(1, READ, s->fd, nn, buf)) < 0) r = 0; else r = r / sz; return r; } /* write on a stream */ fwrite(buf, sz, n, s) char *buf; FILE *s; { int r; long nn; nn = (long) n * (long) sz; if ((r = trap(1, WRITE, s->fd, nn, buf)) < 0) r = 0; else r = r / sz; return r; } /* seek and ye shall find */ fseek(s, offset, mode) FILE *s; long offset; { lseek(s->fd, offset, mode); } /* re-open a stream */ FILE * freopen(name, mode, fp) char *name, *mode; FILE *fp; { FILE *fopen(); fclose(fp); return fopen(name, mode); } /* close a stream */ fclose(s) FILE *s; { if (s != NULL) { if ((s->mode & RDWR) == WR) fflush(s); if (s->fd > 5) trap(1, CLOSE, s->fd); s->mode = FREE; } } /* get a string from a stream */ char * fgets(b, n, f) char *b; int n; FILE *f; { int c, i; c = getc(f); if (c == EOF) return NULL; n--; for (i = 0; i < n && c != EOF; c = getc(f)) { b[i++] = c; if (c == '\n') break; } b[i] = 0; return b; } /* open a stream */ FILE * fopen(name, mode) char *name, *mode; { int i; FILE *_fopen(); for (i = 0; i < MAXIO && _iobuf[i].mode != FREE; i++) ; if (i >= MAXIO) return NULL; return _fopen(&_iobuf[i], name, mode); } FILE * _fopen(s, name, mode) FILE *s; char *name, *mode; { int m, fd; if (strcmp(name, "PRT:") == 0) { fd = 3; m = RDWR; } else if (strcmp(name, "CON:") == 0) { fd = 0; m = RDWR; } else if (strcmp(name, "AUX:") == 0) { fd = 2; m = RDWR; } else { if (*mode == 'w') { fd = trap(1, CREATE, name, 0); m = WR; } else if (*mode == 'r') { fd = trap(1, OPEN, name, 0); m = RD; } else if (*mode == 'a') { if ((fd = trap(1, OPEN, name, 1)) < 0) fd = trap(1, CREATE, name, 0); else if (trap(1, LSEEK, 0L, fd, 2) < 0L) fd = -1; m = WR; } else { /* anything goes here, usually '+' */ fd = trap(1, OPEN, name, 3); m = RDWR; } } if (mode[1] == 'b') m |= BINARY; if (fd < 0) return NULL; s->len = s->idx = 0; s->fd = fd; s->mode = m; return s; } /* put a string onto the stream */ fputs(s, f) char *s; FILE *f; { while (*s) putc(*s++, f); } /* get a string from stdin */ char * gets(b) char *b; { int c; char *r; r = b; if ((c = getc(stdin)) == EOF) return NULL; while (c != '\n' && c != EOF) { *b++ = c; c = getc(stdin); } *b = 0; return r; } /* get a character from standard input */ getchar() { return getc(stdin); } /* get a character from a stream, map CR/NL to NL, handle console */ getc(s) FILE *s; { int i, l, c, r, m; if (s == NULL) return EOF; m = (s->mode & RDWR); if (m == RDWR) { l = trap(1, READ, s->fd, (long) 1, s->buf); if (l != 1) return EOF; i = 0; } else if (m == RD) { i = s->idx; while (i >= s->len) { l = trap(1, READ, s->fd, (long) MAXBUF, s->buf); if (l <= 0) { s->idx = s->len = 0; return EOF; } s->len = l; i = 0; } s->idx = i + 1; } else return EOF; c = s->buf[i] & 255; if (s->fd == 0) { /* tty input */ if (c == '\r') trap(1, 2, (c = '\n')); else if (c == 0x04) /* control D */ c = EOF; } if (c == '\r' && !(s->mode & BINARY)) c = getc(s); return c; } /* output characters to a stream */ putchar(c) { putc(c, stdout); } puts(s) char *s; { while (*s) putc(*s++, stdout); putc('\n', stdout); } putc(c, s) int c; FILE *s; { int i, m, r = 0; if (s == NULL) return EOF; if (c == '\n' && !(s->mode & BINARY)) r = putc('\r', s); r = 0; m = s->mode & RDWR; if (m == RDWR) { s->buf[0] = c; r = trap(1, WRITE, s->fd, (long) 1, s->buf); } else if (m == WR) { if (s->idx == MAXBUF) r = fflush(s); s->buf[s->idx] = c; s->idx = s->idx + 1; } else return EOF; return r <= 0 ? EOF : r; } /* flush out a buffer */ fflush(s) FILE *s; { int r; if (s->idx > 0) r = trap(1, WRITE, s->fd, (long) s->idx, s->buf); s->idx = 0; return r <= 0 ? EOF : r; } /* * TOS routines */ /* duplicate a file descriptor */ dup(fd) { return trap(1, 0x45, fd); } dup2(fold, fnew) { return trap(1, 0x46, fold, fnew); } /* get current directory: drive=0 -> current drive, drive=1 -> A:, etc */ getdir(buf, drive) char *buf; { return trap(1, 0x47, buf, drive); } /* * list the disk directory * pat != NULL - set the DTA buffer, do an SFIRST * pat == NULL - do a SNEXT */ listdir(pat, buf, mode) char *pat, *buf; { if (pat) { trap(1, 0x1A, buf); return trap(1, 0x4E, pat, mode); } else return trap(1, 0x4F); } /* seek to a position in a file */ lseek(fd, offset, mode) int fd; long offset; int mode; { return trap(1, 0x42, offset, fd, mode); } /* unlink a file */ unlink(name) char *name; { return trap(1, 0x41, name); } /* close a file */ close(fd) { trap(1, 0x3E, fd); } /* create a file */ creat(f, m) char *f; { return trap(1, 0x3C, f, m); } /* open a file */ open(f, m) char *f; { return trap(1, 0x3D, f, m); } /* read a file */ read(fd, buf, sz) int fd, sz; char *buf; { return trap(1, 0x3F, fd, (long) sz, buf); } /* unix-like write system call */ write(fd, buf, sz) int fd, sz; char *buf; { return trap(1, 0x40, fd, (long) sz, buf); } /* * chmod(name, mode) * mode = 0x00 - normal file (read/write) * 0x01 - read only file * 0x02 - hidden file * 0x04 - system file * 0x08 - file is volume label * 0x10 - file is a subdirectory * 0x20 - file is written and closed correctly */ chmod(name, mode) char *name; int mode; { return trap(1, 0x43, name, mode, 0); } /* malloc, free, realloc: dynamic memory allocation */ #define MAXHUNK 20000 struct header { struct header *next; long size; }; char * realloc(r, n) struct header *r; unsigned n; { struct header *p, *q; char *malloc(); long *src, *dst; long sz; p = r - 1; sz = (n + sizeof(struct header) + 7) & ~7; if (p->size > sz) { /* block too big, split in two */ q = ((long) p) + sz; q->size = p->size - sz; free(q + 1); p->size = sz; } else if (p->size < sz) { /* block too small, get new one */ dst = q = malloc(n); if (q != NULL) { src = r; n = p->size - sizeof(struct header); while (n > 0) { *dst++ = *src++; n -= sizeof(long); } } free(r); r = q; } /* else current block will do just fine */ return r; } char * calloc(n, sz) unsigned n, sz; { char *r, *s, *malloc(); unsigned total; total = n * sz; if ((r = s = malloc(total)) != NULL) { while (total--) *s++ = 0; } return r; } char * malloc(n) unsigned n; { extern struct header _base; struct header *p, *q; long sz, asz; /* add a header to required size and round up */ sz = (n + sizeof(struct header) + 7) & ~7; /* look for first block big enough in free list */ p = &_base; q = _base.next; while (q != NULL && q->size < sz) { p = q; q = q->next; } /* if not enough memory, get more from the system */ if (q == NULL) { asz = (sz < MAXHUNK) ? MAXHUNK : sz; q = trap(1, 0x48, asz); if (((long)q) < 0L) /* no more memory */ return NULL; p->next = q; q->size = asz; q->next = NULL; } if (q->size > sz + sizeof(struct header)) { /* chop it up */ q->size -= sz; q = ((long) q) + q->size; q->size = sz; } else { /* unlink from free list */ p->next = q->next; } /* skip over header, hope they don't touch it */ return ++q; } free(r) struct header *r; { extern struct header _base; struct header *p, *q, *t; /* move back to uncover the header */ r--; /* find where to insert it */ p = &_base; q = _base.next; while (q != NULL && q < r) { p = q; q = q->next; } /* merge after if possible */ t = ((long) r) + r->size; if (q != NULL && t >= q) { r->size += q->size; q = q->next; } r->next = q; /* merge before if possible, otherwise link it in */ t = ((long) p) + p->size; if (t >= r) { p->size += r->size; p->next = r->next; } else p->next = r; } struct header _base = { NULL, 0L }; /* a UNIX style time command */ extern int _ma[]; long time(tloc) long *tloc; { int n, hms, y, m, d; long t; n = getdate(); y = (n >> 9) & 127; m = (n >> 5) & 15; d = n & 31; hms = gettime(); t = (1460 * y) / 4 + ((y % 4) ? 1 : 0) + _ma[m] + d; t = 2L * (long)(hms & 31) + 60L * (long)((hms >> 5) & 63) + 3600L * (24L * t + (long)((hms >> 11) & 31)); if (tloc != NULL) *tloc = t; return t; } getdate() { return trap(1, 0x2A); } gettime() { return trap(1, 0x2C); } int _ma[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; /* setjmp/longjmp thanks to Bruce Szablak, use setjmp.h! */ setjmp(buf) char **buf; { asm( lll 8 0); asm( tda 0 0); /* a0 has pointer to buffer */ asm( tad 6 0); /* d0 has current link pointer */ asm( sol 0 0 0); /* save clp */ asm( lol 6 0 0); /* d0 has old link pointer */ asm( sol 0 4 0); /* save olp */ asm( lol 6 4 0); /* d0 has return address */ asm( sol 0 8 0); /* save ret */ return 0; } longjmp(buf, rc) char **buf; { asm( lll 8 0); asm( tda 0 0); /* buf in a0 */ asm( llw 12 0); /* rc in d0 */ asm( lol 0 0 1); /* current link pointer */ asm( tda 1 6); /* now in a6 */ asm( lol 0 4 1); /* old link pointer */ asm( sll 1 0); /* now on stack */ asm( lol 0 8 1); /* return address */ asm( sll 1 4); /* now on stack */ return; /* longjmp! */ } exit(n) int n; Exit a program; N is the program return value. getopt(argc, argv, optstr) char *argv[], *optstr; Parses a programs argument vector. The optstr argument lists all possible program options, e.g. "abc:d" says that there are four options: a, b, c, and d, with c requiring an argument. The function returns the option or EOF when no more are present. For options that require an argument, the argument is found in "optarg", a global char pointer. See a UNIX manual for more info. fprintf(fp, fmt, args) FILE *fp; char *fmt; int args; A printf that writes to a standard I/O file. printf(fmt, args) char *fmt; int args; A function that prints a formatted output string to standard output. fscanf(f, fmt, args) FILE *f; char *fmt; int *args; A scanf that reads a standard I/O file. scanf(fmt, args) char *fmt; int *args; A function that reads arguments from the keyboard. sscanf(s, fmt, args) char *s; char *fmt; int *args; A scanf that reads from the given string. fileno(s) FILE *s; Returns the TOS file descriptor associated with a standard I/O stream. fread(buf, sz, n, s) char *buf; FILE *s; Read a standard I/O stream into buf. The sz is the size of each element and n is the number of elements. fwrite(buf, sz, n, s) char *buf; FILE *s; Write buf onto a standard I/O stream. The sz is the size of each element and n is the number of elements. fseek(s, offset, mode) FILE *s; long offset; Seek to a particular location on a standard I/O stream. See TOS documentation. fclose(s) FILE *s; Close a standard I/O stream. char * fgets(b, n, f) char *b; int n; FILE *f; Read a string, at most n characters, into buffer b from stream f. Keeps the newline. Returns EOF if nothing is there. FILE * fopen(name, mode) char *name, *mode; Open a standard I/O stream. Modes can be "r" for read, "w" for write, "a" for append. Can also handle "CON:", "PRT:", and "AUX:" to get access to keyboard/console, printer, and auxiliary ports. fputs(s, f) char *s; FILE *f; Write a string onto a standard I/O stream. char * gets(b) char *b; Get a string from stdin. Drop the trailing newline. Returns EOF if nothing is there. getchar() Get a character from stdin. Returns EOF if nothing is there. getc(s) FILE *s; Get a character from a standard I/O stream. Returns EOF if nothing is there. putchar(c) Write a character onto stdout. puts(s) char *s; Write a string onto stdout. Adds a newline. putc(c, s) int c; FILE *s; Write a character onto the given standard I/O stream. This is a buffered write. fflush(s) FILE *s; Flush the output buffer associated with the standard I/O stream. dup(fd) A TOS routine to duplicate a file descriptor. exec(file, args, env, mode) char *file, *args, *env; int mode; Execute a program. The file argument is the path of the program to be executed. The args argument will form the programs argv[], it is like a string, except that the first byte must contain the length of the string (ask TOS why). I always use a mode of 0 to load-and-run a program. getdir(buf, drive) char *buf; Get the current directory of a given drive. If drive = 0, use current drive. Drive = 1 implies A:, 2 B:, etc. listdir(pat, buf, mode) char *pat, *buf; List a directory. The pat argument is the pattern (e.g. *.C). The buf argument is a DTA buffer (see a TOS manual). This function is designed to be called many times, each call returning another match to the search pattern in buf. On the second and subsequent calls, pat should be NULL. A return of zero indicates success, non-zero indicates error or end. The mode argument also limits the search based on the files's attributes. I use 0 for files and 0x10 for directories. In the DTA buffer, bytes 30 through 43 are the program name. lseek(fd, offset, mode) int fd; long offset; int mode; Set the file pointer for the given file descriptor fd. If mode = 0, offset directly sets the file pointer. If mode = 1, offset is added to the current file pointer. If mode = 2, the file pointer is set offset bytes past the current end of the file. unlink(name) char *name; Remove the named file. close(fd) Close a file. creat(f, m) char *f; Create a file named f with attributes m. open(f, m) char *f; Open a file named f. If m = 0, read only. If m = 1, write only. If m = 3, read or write. read(fd, buf, sz) int fd, sz; char *buf; Read sz bytes of file fd into buffer buf starting at the current file pointer. This advances the file pointer sz bytes. Note, sz is an integer! Returns the number of bytes read. write(fd, buf, sz) int fd, sz; char *buf; Write sz bytes of buffer buf onto file fd. chmod(name, mode) char *name; int mode; Change the attributes of a file. * mode = 0x00 - normal file (read/write) * 0x01 - read only file * 0x02 - hidden file * 0x04 - system file * 0x08 - file is volume label * 0x10 - file is a subdirectory * 0x20 - file is written and closed correctly sprintf(buf, fmt, args) char *buf, *fmt; int args; A printf that stores the formatted output into buf instead of writing it out. char * realloc(r, n) struct header *r; unsigned n; Change the size of a malloc'ed piece of memory. char * calloc(n, sz) unsigned n, sz; Allocate sz bytes and zero them out. char * malloc(n) unsigned n; { Allocate n bytes from the system. free(r) struct header *r; Return a previously allocated piece of memory back to the system. char * strcat(s1, s2) char *s1, *s2; { Concatenate string s2 onto string s1. Returns a pointer to s1. char * strncat(s1, s2, n) char *s1, *s2; int n; Concatenate string s2 onto string s1, which is no more than n bytes long. strcmp(s1, s2) char *s1, *s2; Compare string s1 to string s2. Returns less than, equal, or greater than zero if the s1 is less than, equal, or greater than s2. strncmp(s1, s2, n) char *s1, *s2; int n; Same as strcmp, except that it only looks at n characters. char * strcpy(s1, s2) char *s1, *s2; Copy string s2 into string s1; char * strncpy(s1, s2, n) char *s1, *s2; int n; Same as strcpy except it copies at most n characters. strlen(s) char *s; Returns the length of a string. char * strchr(s, c) char *s; int c; Searches string s for character c. Returns a pointer to the first occurence or NULL if not found. char * strrchr(s, c) char *s; int c; Same as strchr(), except it searches from the end of the string towards the beginning. char * strpbrk(s1, s2) unsigned char *s1, *s2; Scans over the string in s1 looking for characters in string s2. Stops at the first occurence and returns a pointer to its location. Returns NULL if it didn't find anything. char * strtok(s1, s2) unsigned char *s1, *s2; Tokenizes a string s1. The first call should have a non-NULL s1, which is remembered on subsequent calls. String s2 contains the token separators. strspn(s1, s2) unsigned char *s1, *s2; Skips over the string s1 as long as it contains the characters found in string s2. Returns a pointer into s1. strcspn(s1, s2) unsigned char *s1, *s2; Same as strspn, except the inverse condition (i.e. skips s1 as long as it does not contain s2 characters). long strtol(s, p, base) char *s, **p; Convert a number in a string to a (long) integer. Handles octal and hex constants as well as decimal. If p is non-NULL, the end of the number is stored there. char * strlower(s) char *s; Convert all uppercase characters in s to lowercase. char * strupper(s) char *s; Convert all lowercase characters in s to uppercase. memcpy(m1, m2, n) char *m1, *m2; Copy n bytes from m2 to m1. long time(tloc) long *tloc; Return the number of seconds since 1980. If tloc is non-nil, then the value is stored there as well. getdate() gettime() Get the current date and time in TOS format. setjmp(buf) char **buf; Initializes a buffer to allow one to do a non-local goto. See a UNIX manual. longjmp(buf, rc) char **buf; Actually do the non-local goto. lib.a: lib.s fmtio.s str.s math.s cat fmtio.s lib.s str.s math.s >lib.a gem.a: gem.c d:cc.ttp -o gem.a gem.c /* C library for MJC 2.0 - floating point and long arithmetic */ /* * my floating point routines * * 32 bit floating point format * bit function * 31 sign * 24-30 exponent (excess 64) * 0-23 fraction */ #define NULL 0L #define EXCESS 64 #define DIGITS 24 #define MAXFRAC 0xFFFFFF #define MAXEXP 0x7F #define MAXBITS 32 #define sign(x) ((x >> 31) & 1) #define exp(x) (((x >> 24) & MAXEXP) - EXCESS) #define frac(x) (x & MAXFRAC) #define negate(x) (x ^ 0x80000000L) /* long to float */ long _ltof(n) long n; { int s; long _fnorm(); if (s = (n < 0L)) n = -n; return _fnorm(s, DIGITS, n); } /* float to long */ long _ftol(u) long u; { int e, s; long f; s = sign(u); e = exp(u); f = frac(u); if (e <= 0) { /* no fractional part */ return 0L; } else if (e < DIGITS) { f = f >> (DIGITS - e); } else if (e == DIGITS) { /* already there! */ } else if (e < MAXBITS) { f = f << (e - DIGITS); } else { _ferr("ftol overflow\n\r"); f = 0x7FFFFFFF; } return s ? -f : f; } long _fcmp(x, y) long x, y; { return (sign(x) && sign(y)) ? y - x : x - y; } long _fneg(x) long x; { return negate(x); } long _fsub(u, v) long u, v; { long _fadd(); return _fadd(u, negate(v)); } long _fadd(u, v) long u, v; { int t, sw, eu, ev, ew; long fu, fv, fw, _fnorm(); if (u == 0L) return v; if (v == 0L) return u; eu = exp(u); ev = exp(v); fu = sign(u) ? -frac(u) : frac(u); fv = sign(v) ? -frac(v) : frac(v); t = eu - ev; if (t <= -DIGITS) { /* u << v */ fw = fv; ew = ev; } else if (t <= 0) { /* u <= v */ if (t) fu >>= -t; fw = fv + fu; ew = ev; } else if (t < DIGITS) { /* u > v */ fv >>= t; fw = fv + fu; ew = eu; } else { /* u >> v */ fw = fu; ew = eu; } if (sw = (fw < 0)) fw = -fw; return _fnorm(sw, ew, fw); } long _fmul(u, v) long u, v; { int sw, ew, eu, ev; long fu, fv, fw, _fnorm(); if ((fu = frac(u)) == 0) return 0L; if ((fv = frac(v)) == 0) return 0L; eu = exp(u); ev = exp(v); sw = sign(u) ^ sign(v); ew = eu + ev - 8; fw = (fu >> 8) * (fv >> 8); return _fnorm(sw, ew, fw); } long _fdiv(u, v) long u, v; { int sw, ew; long _fnorm(); long b, fu, fv, fw; if ((fu = frac(u)) == 0) return 0L; if ((fv = frac(v)) == 0) return 0L; sw = sign(u) ^ sign(v); ew = exp(u) - exp(v) + 1; fw = 0L; b = 1L << (DIGITS - 1); while (b) { if (fu >= fv) { fw += b; fu -= fv; } b >>= 1; fv >>= 1; } return _fnorm(sw, ew, fw); } /* ascii to float, needs no other support routines */ long atof(s) char *s; { int e, i, c, sgn; unsigned long ipart, fpart, f, bit, div; long _fnorm(); /* get to the start of the digits */ while (*s && *s <= ' ') s++; if ((sgn = (*s == '-')) || *s == '+') s++; /* get the integer and fraction parts */ ipart = 0L; while (*s >= '0' && *s <= '9') ipart = ipart * 10L + (*s++ - '0'); fpart = 0L; if (*s == '.') { s++; /* 9 digits of precision please */ for (i = 0; i < 9; i++) { if (*s >= '0' && *s <= '9') c = *s++ - '0'; else c = 0; fpart = fpart * 10L + c; } div = 500000000; } /* normalize the integer part, then work in the fraction */ if (ipart) { f = _fnorm(sgn, DIGITS, ipart); e = exp(f); } else e = f = 0L; if (fpart && e < DIGITS) { /* room for the fraction part */ f = frac(f); bit = 1L << (DIGITS - 1 - e); /* add the fraction's bits to f */ while (bit && fpart) { if (fpart >= div) { fpart -= div; f |= bit; } bit >>= 1; div >>= 1; } if (fpart) f++; /* round up */ f = _fnorm(sgn, e, f); } /* now handle an exponent factor, if any */ if (f && (*s == 'e' || *s == 'E')) { i = 0; s++; if ((c = (*s == '-')) || *s == '+') s++; for (i = 0; *s >= '0' && *s <= '9'; s++) i = i * 10 + (*s - '0'); if (c) i = -i; while (i > 0) { e = exp(f); f = frac(f); f = _fnorm(sgn, e, f * 10L); i--; } while (i < 0) { e = exp(f); f = frac(f); f = _fnorm(sgn, e, f / 10L); i++; } } return f; } long _fnorm(s, e, f) int s, e; unsigned long f; { if (f == 0) { return 0L; } else { while (f & 0xFF000000L) { f = (f >> 1) + (f & 1); e++; } while ((f & 0x800000L) == 0) { f = f << 1; e--; } } if (e >= EXCESS) { _ferr("float overflow\n\r"); return ((long)s << 31) | 0x7FFFFFFFL; } else if (e < -EXCESS) { _ferr("float underflow\n\r"); return 0L; } /* pack the result */ return ((long)s << 31) | (((long)(e + EXCESS) & MAXEXP) << DIGITS) | (f & MAXFRAC); } _ferr(s) char *s; { while (*s) trap(1, 2, *s++); } /* * stuff for long binary ops (both signed and unsigned) * a and b are the left and right arguments to the binary operator * * div and mod are done by long division, shift b up until >= a, then * back down, subtracting when appropriate * * mul is done by shifts and adds */ long _lmul(a, b) long a, b; { int neg = 0; long _ulmul(); if (a < 0L) { neg++; a = -a; } if (b < 0L) { neg++; b = -b; } a = _ulmul(a, b); return neg & 1 ? -a : a; } long _ldiv(a, b) long a, b; { int neg = 0; long _ldivmod(); if (a < 0L) { neg++; a = -a; } if (b < 0L) { neg++; b = -b; } a = _ldivmod(a, b, 0); return neg & 1 ? -a : a; } long _lmod(a, b) long a, b; { long _ldivmod(); if (a < 0L) a = -a; if (b < 0L) b = -b; return _ldivmod(a, b, 1); } long _ulmul(a, b) unsigned long a, b; { long result; result = 0L; while (a) { if (a & 1L) result += b; a >>= 1L; b <<= 1L; } return result; } long _uldiv(a, b) long a, b; { long _ldivmod(); return _ldivmod(a, b, 0); } long _ulmod(a, b) long a, b; { long _ldivmod(); return _ldivmod(a, b, 1); } long _ldivmod(a, b, rem) unsigned long a, b; int rem; { int i = 0; unsigned long result = 0L; if (b) { while ((a > b) && !(b & 0x80000000L)) { i++; b <<= 1L; } while (1) { if (a >= b) { a -= b; result++; } if (i == 0) break; i--; result <<= 1L; b >>= 1L; } return rem ? a : result; } else i/0; /* should case a "divide zero" trap */ } /* * OSBIND.H Mnemonic names for operating system calls * * Adapted from Dale Schumacher's version to Mark Johnson C by Eric Gisin. * Notes: * There are bugs in MJ C's macro expansion. * If you get syntax errors using these macros, * Try enclosing the macro call with asm() and compile. * Then look at the yc.out to see the macro expansion. */ /* * GEMDOS (trap1) */ #define Pterm0() trap(1,0x00) #define Cconin() trap(1,0x01) #define Cconout(c) trap(1,0x02,c) #define Cauxin() trap(1,0x03) #define Cauxout(c) trap(1,0x04,c) #define Cprnout(c) trap(1,0x05,c) #define Crawio(data) trap(1,0x06,data) #define Crawcin() trap(1,0x07) #define Cnecin() trap(1,0x08) #define Cconws(s) trap(1,0x09,s) #define Cconrs(buf) trap(1,0x0A,buf) #define Cconis() (int)trap(1,0x0B) #define Dsetdrv(d) trap(1,0x0E,d) #define Cconos() trap(1,0x10) #define Cprnos() trap(1,0x11) #define Cauxis() trap(1,0x12) #define Cauxos() trap(1,0x13) #define Dgetdrv() (int)trap(1,0x19) #define Fsetdta(dta) trap(1,0x1A,dta) #define Super(ptr) trap(1,0x20,ptr) #define Tgetdate() (int)trap(1,0x2A) #define Tsetdate(date) trap(1,0x2B,date) #define Tgettime() (int)trap(1,0x2C) #define Tsettime(time) trap(1,0x2D,time) #define Fgetdta() trap(1,0x2F) #define Sversion() (int)trap(1,0x30) #define Ptermres(save,rv) trap(1,0x31,save,rv) #define Dfree(buf,d) trap(1,0x36,buf,d) #define Dcreate(path) trap(1,0x39,path) #define Ddelete(path) trap(1,0x3A,path) #define Dsetpath(path) trap(1,0x3B,path) #define Fcreate(fn,mode) trap(1,0x3C,fn,mode) #define Fopen(fn,mode) trap(1,0x3D,fn,mode) #define Fclose(H) trap(1,0x3E,H) #define Fread(H,cnt,buf) trap(1,0x3F,H,cnt,buf) #define Fwrite(H,cnt,buf) trap(1,0x40,H,cnt,buf) #define Fdelete(fn) trap(1,0x41,fn) #define Fseek(where,H,how) trap(1,0x42,where,H,how) #define Fattrib(fn,rwflag,attr) trap(1,0x43,fn,rwflag,attr) #define Fdup(H) trap(1,0x45,H) #define Fforce(Hstd,Hnew) trap(1,0x46,Hstd,Hnew) #define Dgetpath(buf,d) trap(1,0x47,buf,d) #define Malloc(size) trap(1,0x48,size) #define Mfree(ptr) trap(1,0x49,ptr) #define Mshrink(ptr,size) trap(1,0x4A,0,ptr,size) #define Pexec(mode,prog,tail,env) trap(1,0x4B,mode,prog,tail,env) #define Pterm(rv) trap(1,0x4C,rv) #define Fsfirst(filespec,attr) (int)trap(1,0x4E,filespec,attr) #define Fsnext() (int)trap(1,0x4F) #define Frename(zero,old,new) trap(1,0x56,zero,old,new) #define Fdatime(timeptr,H,rwflag) trap(1,0x57,timeptr,H,rwflag) /* * BIOS (trap13) */ #define Bconstat(DEV) trap(13,1,DEV) #define Bconin(DEV) trap(13,2,DEV) #define Bconout(DEV,c) trap(13,3,DEV,c) #define Rwabs(rwflag,buf,n,sector,d) trap(13,4,rwflag,buf,n,sector,d) #define Setexc(vnum,vptr) trap(13,5,vnum,vptr) #define Tickcal() trap(13,6) #define Getbpb(d) trap(13,7,d) #define Bcostat(DEV) trap(13,8,DEV) #define Mediach(d) trap(13,9,a) #define Drvmap() trap(13,10) #define Getshift() trap(13,11,-1) #define Kbshift(data) trap(13,11,data) /* * XBIOS (trap14) */ #define Initmous(type,param,vptr) trap(14,0,type,param,vptr) #define Physbase() trap(14,2) #define Logbase() trap(14,3) #define Getrez() (int)trap(14,4) #define Setscreen(lscrn,pscrn,rez) trap(14,5,lscrn,pscrn,rez) #define Setpallete(palptr) trap(14,6,palptr) #define Setcolor(colornum,mixture) trap(14,7,colornum,mixture) #define Floprd(buf,x,d,sect,trk,side,n) trap(14,8,buf,x,d,sect,trk,side,n) #define Flopwr(buf,x,d,sect,trk,side,n) trap(14,9,buf,x,d,sect,trk,side,n) #define Flopfmt(b,x,d,spt,trk,sd,i,m,v) trap(14,10,b,x,d,spt,trk,sd,i,m,v) #define Midiws(cnt,ptr) trap(14,12,cnt,ptr) #define Mfpint(vnum,vptr) trap(14,13,vnum,vptr) #define Iorec(ioDEV) trap(14,14,ioDEV) #define Rsconf(baud,flow,uc,rs,ts,sc) trap(14,15,baud,flow,uc,rs,ts,sc) #define Keytbl(nrml,shft,caps) trap(14,16,nrml,shft,caps) #define Random() trap(14,17) #define Protobt(buf,serial,dsktyp,exec) trap(14,18,buf,serial,dsktyp,exec) #define Flopver(buf,x,d,sect,trk,sd,n) trap(14,19,buf,x,d,sect,trk,sd,n) #define Scrdmp() trap(14,20) #define Cursconf(func,rate) trap(14,21,func,rate) #define Settime(time) trap(14,22,time) #define Gettime() trap(14,23) #define Bioskeys() trap(14,24) #define Ikbdws(len_minus1,ptr) trap(14,25,len_minus1,ptr) #define Jdisint(vnum) trap(14,26,vnum) #define Jenabint(vnum) trap(14,27,vnum) #define Giaccess(data,reg) trap(14,28,data,reg) #define Offgibit(ormask) trap(14,29,ormask) #define Ongibit(andmask) trap(14,30,andmask) #define Xbtimer(timer,ctrl,data,vnum) trap(14,31,timer,ctrl,data,vnum) #define Dosound(ptr) trap(14,32,ptr) #define Setprt(config) trap(14,33,config) #define Kbdvbase() trap(14,34) #define Kbrate(delay,reprate) trap(14,35,delay,reprate) #define Prtblk(pblkptr) trap(14,36,pblkptr) #define Vsync() trap(14,37) #define Supexec(funcptr) trap(14,38,funcptr) . _bstk 2048 . _estk 4 taa 7 6 lll 4 0 sgl 0 _estk lag _estk 7 jsr _cprg . ct0 2 . ct1 2 . ct2 2 . ct3 2 . ct4 2 . ct5 2 . ct6 2 . ct7 2 . ct8 2 . ct9 2 . ct10 2 . ii0 2 . ii1 2 . ii2 2 . ii3 2 . ii4 2 . ii5 2 . ii6 2 . ii7 2 . ii8 2 . ii9 2 . ii10 2 . ii11 2 . ii12 2 . ii13 2 . ii14 2 . ii15 2 . io0 2 . io1 2 . io2 2 . io3 2 . io4 2 . io5 2 . io6 2 . iox 80 . pi0 2 . pi1 2 . pi2 2 . pi3 2 . pi4 2 . pi5 2 . pi6 2 . pi7 2 . pix 20 . po0 2 . po1 2 . po2 2 . po3 2 . po4 2 . po5 2 . pox 20 . ai0 4 . ai1 4 . ai2 4 . ao0 4 . ao1 4 . ao2 4 . aes0 4 . aes1 4 . aes2 4 . aes3 4 . aes4 4 . aes5 4 . vdi0 4 . vdi1 4 . vdi2 4 . vdi3 4 . vdi4 4 . vdi5 4 . global 32 typedef char *jmp_buf[3]; /* * stdio.h * * the standard i/o header */ #define FILE char #define EOF (-1) #define NULL (0L) extern FILE *stdin, *stdout, *stderr, *fopen(); extern long mfree(), time(), strtol(); extern char *gets(), *fgets(), *malloc(), *realloc(), *calloc(); extern char *strcat(), *strncat(), *strcpy(), *strncpy(); extern char *strchr(), *strrchr(), *strpbrk(), *strtok(); extern char *strlower(), *strupper(); /* C library - strings */ #define EOS 0 #define NULL 0L atoi(s) char *s; { long strtol(); return (int) strtol(s, NULL, 10); } long atol(s) char *s; { long strtol(); return strtol(s, NULL, 10); } #define MASK(c) ((int)(c) & 0xff) extern char *_tokptr; char * strcat(s1, s2) char *s1, *s2; { char *r; r = s1; if (*s1) while (*++s1); while (*s1++ = *s2++); return r; } char * strncat(s1, s2, n) char *s1, *s2; int n; { char *r; if (n <= 0) return s1; r = s1; if (*s1) while (*++s1); while (n-- && (*s1++ = *s2++)); while (n-- > 0) *s1++ = EOS; return r; } strcmp(s1, s2) char *s1, *s2; { while (*s1) { if (*s1++ != *s2++) return MASK(*--s1) - MASK(*--s2); } return -MASK(*s2); } strncmp(s1, s2, n) char *s1, *s2; int n; { if (n <= 0) return 0; while (*s1 && --n) { if (*s1++ != *s2++) return MASK(*--s1) - MASK(*--s2); } return MASK(*s1) - MASK(*s2); } char * strcpy(s1, s2) char *s1, *s2; { char *r; r = s1; while (*r++ = *s2++); return s1; } char * strncpy(s1, s2, n) char *s1, *s2; int n; { char *r; if (n <= 0) return s1; r = s1; while (n && (*r++ = *s2++)) --n; while (n--) *r++ = EOS; return s1; } strlen(s) char *s; { int n; for (n = 0; *s++; ++n) ; return n; } char * strchr(s, c) char *s; int c; { do { if (*s == c) return s; } while (*s++); return NULL; } char * strrchr(s, c) char *s; int c; { char *l; l = NULL; while (*s) if (*s++ == c) l = s - 1; return l; } char * strpbrk(s1, s2) unsigned char *s1, *s2; { int n; long bitmap[16]; if (*s1 || *s2) return NULL; _setbits(s2, bitmap); n = *s1; do { if (bitmap[n >> 5] & (1 << (n & 31))) return s1; } while (n = *--s1); return NULL; } char * strtok(s1, s2) unsigned char *s1, *s2; { if (s1 != NULL) _tokptr = s1; if (*_tokptr == EOS) return NULL; s1 = _tokptr + strspn(_tokptr, s2); _tokptr = s1 + strcspn(s1, s2); if (_tokptr == s1) return NULL; if (*_tokptr != EOS) *_tokptr++ = EOS; return s1; } char *_tokptr; strspn(s1, s2) unsigned char *s1, *s2; { long n; long bitmap[8]; if ((*s1 == 0) || (*s2 == 0)) return 0; _setbits(s2, bitmap); s2 = s1; for (n = *s1; bitmap[n >> 5] & (1L << (n & 31)); n = *++s1) ; return s1 - s2; } strcspn(s1, s2) unsigned char *s1, *s2; { long n; long bitmap[8]; if ((*s1 == 0) || (*s2 == 0)) return 0; _setbits(s2, bitmap); s2 = s1; bitmap[0] |= 1L; /* so that eos exits loop */ for (n = *s1; (bitmap[n >> 5] & (1L << (n & 31))) == 0L; n = *++s1) ; return s1 - s2; } _setbits(s, m) unsigned char *s; long m[]; { unsigned long n; for (n = 8; n; ) m[--n] = 0L; while (n = *s++) { m[n >> 5] |= 1L << (n & 31); } } long strtol(s, p, base) char *s, **p; { long r; int sign, bn, bcl, bcu, c; r = 0L; sign = 0; bn = (base < 11) ? ('0' - 1) + base : '9'; bcl = ('a' - 10) + base; bcu = ('A' - 10) + base; while (*s == ' ' || *s == '\t') ++s; if (*s == '-') { sign = 1; ++s; } if (*s == '0') { if ((s[1] == 'x' || s[1] == 'X') && (base == 16)) s += 2; } for (c = *s ; ; c = *++s) { if (c >= '0' && c <= bn) c = c - '0'; else if (c >= 'a' && c < bcl) c = c - 'a' + 10; else if (c >= 'A' && c < bcu) c = c - 'A' + 10; else { if (p != NULL) *p = s; return sign ? -r : r; } r = r * base + c; } } char * strlower(s) char *s; { char c, *p; for (p = s; c = *p; ++p) if (c >= 'A' && c <= 'Z') *p = c - ('A' - 'a'); return s; } char * strupper(s) char *s; { char c, *p; for (p = s; c = *p; ++p) if (c >= 'a' && c <= 'z') *p = c - ('a' - 'A'); return s; } memcpy(m1, m2, n) char *m1, *m2; { while (n-- > 0) *m1++ = *m2++; } . _bstk 2048 . _estk 4 taa 7 6 lll 4 0 sgl 0 _estk lag _estk 7 jsr _cttp . 5.. BUG C 6XHD C 8LORDER C :MK C =CSS C NP/* help for debugging, use special ttp.s */ #define super(stk) trap(1, 0x20, stk) struct dump { long magic; long data[8]; long addr[8]; long pc; long usp; int stk[4]; int status; long upc; int more[8]; } d; struct header { short magic; long text; long data; long bss; long sym; long rsvd0; long rsvd1; short rsvd2; } h; struct sym { char name[8]; short type; long value; } s; long tpa, upc; main(argc, argv) char *argv[]; { extern long *_estk; printf("tpa=%lx\n", tpa = *_estk); getdump(); showdump(); if (argc > 1) getfnc(argv[1], upc - (tpa + 0x100)); } getdump() { long stk; char *src, *dst; int sz; stk = super(0L); mcopy(&d, 0x380L, sizeof d); super(stk); } showdump() { int i; long n; if (d.magic != 0x12345678) { printf("no dump available\n"); return; } printf("exception #%d\n", (short)(d.pc >> 24)); printf(" data address\n"); for (i = 0; i < 8; i++) printf("%d: %8lx %8lx\n", i, d.data[i], d.addr[i]); printf("pc=%lx usp=%lx upc=%lx\n", d.pc & 0xFFFFFF, d.usp, upc = d.upc); } getfnc(name, pc) char *name; long pc; { int fd; long n, lseek(); struct sym fnc; if ((fd = open(name, 0)) < 0) printf("can't open %s\n", name); else if (read(fd, &h, sizeof h) != sizeof h) printf("can't read header of %s\n", name); else if (h.sym == 0L) printf("no symbols in %s\n", name); else if (lseek(fd, h.text+h.data, 1) < 0L) printf("premature EOF on %s\n", name); else { *fnc.name = 0; fnc.value = 0; for (n = h.sym; n > 0; n -= sizeof s) { read(fd, &s, sizeof s); if (s.value > fnc.value && s.value <= pc) mcopy(&fnc, &s, sizeof fnc); } printf("bug at %ld words after '%s'\n", pc - fnc.value, fnc.name); } } mcopy(dst, src, sz) char *dst, *src; { while (sz--) *dst++ = *src++; } /* dump the contents of a file in hex words */ #include main(argc, argv) int argc; char *argv[]; { int i; FILE *f; for (i = 1; i < argc; i++) { printf("%s\n", argv[i]); if ((f = fopen(argv[i], "rb")) != NULL) { hd(f); fclose(f); } } return 0; } hd(f) FILE *f; { int offset, cnt, hi, lo, i, word[8]; offset = 0; cnt = 8; while (cnt == 8) { puthex(offset, 4); putchar(':'); putchar(' '); for (cnt = 0; cnt < 8; ) { if ((hi = getc(f)) == EOF) break; offset++; if ((lo = getc(f)) == EOF) { word[cnt++] = (hi << 8); break; } else { word[cnt++] = (hi << 8) + lo; offset++; } } for (i = 0; i < cnt; i++) { puthex(word[i], 4); putchar(' '); } for ( ; i < 8; i++) printf(" "); printf(" | "); for (i = 0; i < cnt; i++) { putcx(word[i] >> 8); putcx(word[i]); } putchar('\n'); } if (cnt != 0) { puthex(offset, 4); putchar('\n'); } } puthex(n, size) { if (size > 1) puthex(n >> 4, size - 1); putchar("0123456789ABCDEF"[n & 15]); } putcx(c) { c = c & 255; if (c >= 32 && c <= 127) putchar(c); else putchar('.'); } /* check the library ordering */ #include "stdio.h" int last_def; char word[100]; main(argc, argv) char *argv[]; { int i; char *getword(); FILE *fp; if ((fp = fopen(argv[1], "r")) == NULL) { printf("can't open %s\n", argv[1]); exit(0); } while (getword(fp, word)) { if (strcmp(word, ":") == 0) { define(getword(fp, word)); } else if (strcmp(word, "jsr") == 0) { use(getword(fp, word)); } else if (word[0] == 'l' && word[1] == 'g') { use(getword(fp, word)); } else if (word[0] == 's' && word[1] == 'g') { getword(fp, word); use(getword(fp, word)); } } } char * getword(fp, s) FILE *fp; char *s; { int c; char *r = s; c = getc(fp); while (c != EOF && c <= ' ') c = getc(fp); if (c == EOF) return NULL; while (c != EOF && c > ' ') { *s++ = c; c = getc(fp); } *s = 0; return r; } #define S_NIL 0 #define MAXSYM 10000 #define MAXSPC 20000 /* max symbol space */ char sym[MAXSPC]; /* space for symbols */ int lsym = 0; /* end of symbol space */ char *symptr[MAXSYM]; /* pointer to the symbol string */ int symtype[MAXSYM]; /* type of the symbol */ int symval[MAXSYM]; /* value of a symbol */ lookup(nm) char *nm; { int i, start; start = i = *nm; while (symptr[i]) { if (strcmp(nm, symptr[i]) == 0) return i; i++; if (i == MAXSYM) i = 0; if (i == start) { fprintf(stderr, "symbol table full"); return 0; } } symptr[i] = &sym[lsym]; while (sym[lsym++] = *nm++) ; sym[lsym++] = 0; symtype[i] = symval[i] = 0; if (lsym >= MAXSPC) { fprintf(stderr, "symbol space full"); return 0; } return i; } define(s) char *s; { int id; if (s != NULL) { /* printf("define %s\n", s); */ last_def = id = lookup(s); symval[id] = 1; } } use(s) char *s; { int id; if (s != NULL) { /* printf(" using %s in %s\n", s, symptr[last_def]); */ id = lookup(s); if (symval[id]) printf("%s should come after %s\n", s, symptr[last_def]); } } /* * simple make program * * make [options] [targets] * * options are * -i ignore non-zero program returns * -f file makefile name (default is "makefile") * -n don't execute any commands * -t just touch the targets, don't build * -r ignore built-in rules * -d debug flag (noisy output) * -h hold the screen * * this program reads a makefile to build the named targets * a makefile contains rules, macro definitions, or dependencies * an example makefile might be: * * # this is a sample makefile for a spreadsheet * OBJ = main.s io.s calc.s * ss: $(OBJ) ss.h * d:as.ttp d:ttp.s $(OBJ) -L d:lib.a * * there are built-in rules to convert .c to .s, .c to .ttp, and .c to .prg */ #include #define MAXLINE 160 #define MAXSYM 100 #define MAXRULE 30 #define MAXARG 75 #define TIME 0x2C #define DATE 0x2A #define EXEC 0x4B #define RENAME 0x56 #define GSDTOF 0x57 #define SETDRV 0x0E #define GETDRV 0x19 #define GETDSK 0x36 #define MALLOC 0x48 typedef struct x0 { /* structure for command lists */ char *cmd; /* pointer to the command line */ struct x0 *next; /* pointer to the next one */ } Command; typedef struct x1 { /* structure for dependencies */ int dep; /* name of a parent */ struct x1 *next; /* pointer to next parent */ } Depend; typedef struct { /* structure for rules */ int from; /* the extension of the parent */ int to; /* the extension of the child */ Command *cmd; /* the commands to make the child */ } Rule; FILE *in; /* makefile input file handle */ int eof; /* eof flag for makefile input stream */ int no_exec = 0; /* don't execute the commands */ int debug = 0; /* debug output flag */ int ignore = 0; /* ignore non-zero returns */ int norules = 0; /* no built-in rules */ int hold = 1; /* hold the screen (for GEM users */ char line[MAXLINE]; /* buffer containing current input line */ char extra[MAXLINE]; /* extra buffer for macro expansion */ char name[MAXLINE]; /* space for making up names */ char *macro[MAXSYM]; /* pointer to the macros */ char *sym[MAXSYM]; /* pointer to the symbol names */ Depend *depend[MAXSYM]; /* pointer to dependencies */ Command *command[MAXSYM]; /* index into commands */ Rule rules[MAXRULE]; /* rules */ int lrule = 0; /* last rule used */ int firstsym = -1; /* what's first dependency declared */ char base[MAXLINE]; /* buffer for '*' macro */ char target[MAXLINE]; /* buffer for '@' macro */ char *save(); /* save a string */ char *alloc(); /* allocate space */ Command *cmdlist(); /* make up a command list */ Command *add_cmd(); /* add a command to a command list */ long date(); /* get the date of a file */ char *av[MAXARG]; /* argv for built-in's */ int ac; /* argc for built-in's */ FILE *xin; /* stdin for built-in commands */ FILE *xout; /* stdout for built-in commands */ main(argc, argv) char *argv[]; { int i, err, tch; char *name; i = 1; name = "makefile"; tch = err = 0; for (i = 1; i < argc && *argv[i] == '-'; i++) { switch (argv[i][1]) { case 'f': case 'F': i++; name = argv[i]; break; case 'i': case 'I': ignore = 1; break; case 'd': case 'D': debug = 1; break; case 't': case 'T': tch = 1; break; case 'n': case 'N': no_exec = 1; break; case 'r': case 'R': norules = 1; break; case 'h': case 'H': hold = !hold; break; default: printf("unknown option: %s\n", argv[i]); err = 1; break; } } if (err) error("usage: make [-i -n -t -r -d -h -f file] [targets]\n"); if (tch) { while (i < argc) touch(argv[i++]); } else { init(); input(name); if (i == argc && firstsym >= 0) make(firstsym); else { for ( ; i < argc; i++) if (!assign(argv[i])) make(lookup(argv[i])); } } bye(0); } /* initialize the symbol table and add built-in rules */ init() { int i; Command *cp; rules[0].cmd = NULL; for (i = 0; i < MAXSYM; i++) sym[i] = NULL; if (norules) return; /* built-in rules */ cp = NULL; cp = add_cmd(cp, " d:\\cc.ttp $*.c"); cp = add_cmd(cp, " d:\\as.ttp -o $*.ttp d:\\ttp.s yc.out -L d:\\lib.a"); cp = add_cmd(cp, " rm yc.out"); add_rule(".c", ".ttp", cp); cp = NULL; cp = add_cmd(cp, " d:\\cc.ttp $*.c"); cp = add_cmd(cp, " d:\\as.ttp -o $*.prg d:\\prg.s yc.out -L d:\\gem.a d:\\lib.a"); cp = add_cmd(cp, " rm yc.out"); add_rule(".c", ".prg", cp); cp = NULL; cp = add_cmd(cp, " d:\\cc.ttp -o $*.s $*.c"); add_rule(".c", ".s", cp); } /* read in and parse the makefile */ input(name) char *name; { if (!findfile(name)) return; getline(); while (!eof) { if (*line == '#') getline(); else if (macdef()) getline(); else if (*line == '.') rule(); else if (*line > ' ') dependency(); else getline(); } fclose(in); } /* search high and low for a makefile */ findfile(name) char *name; { int i, drv, r; /* someday, turn a full pathname into a chdir */ if (in = fopen(name, "r")) /* try current directory first */ return 1; drv = trap(1, GETDRV); for (i = 0; i < 4; i++) { /* try A:, B:, C:, D: */ r = trap(1, SETDRV, i); if (in = fopen(name, "r")) { printf(" run from %c:\n", i + 'A'); return 1; } } trap(1, SETDRV, drv); return 0; } /* read in a line from the makefile */ getline() { int c; char *l; l = line; c = getch(); while (c != EOF && c != '\n') { if (c == '\\') { if ((c = getch()) == '\n') c = ' '; else *l++ = '\\'; } *l++ = c; if (c <= ' ') { /* skip spaces */ while (c != EOF && c != '\n' && c <= ' ') c = getch(); } else c = getch(); } *l = 0; eof = (c == EOF); } /* get a character from the file, strip out '\r' */ getch() { int c; while ((c = getc(in)) == '\r') ; return c; } /* expand all the macro's in the current line */ expand() { int done; char *e, *l, *m; while (1) { e = extra; l = line; done = 1; while (*e++ = *l++) if (*l == '$') done = 0; if (done) break; e = extra; l = line; while (*e) { if (*e == '$') { e++; m = name; if (*e == '(') { /* multi letter macro */ e++; while (*e != ')') *m++ = *e++; e++; } else *m++ = *e++; /* one letter macro */ *m = 0; if (m = macro[lookup(name)]) { while (*m) *l++ = *m++; } else error("$(%s) not defined", name); } else *l++ = *e++; } *l = 0; } } /* read in a rule, ".from.to:" followed by command lines */ rule() { int i, j; char to[10], from[10], *l; l = line; i = j = 0; if (*l != '.') error("bad rule entry"); do { from[j++] = *l++; } while (*l && *l != '.'); from[j] = 0; if (*l != '.') error("bad rule entry"); j = 0; do { to[j++] = *l++; } while (*l && *l != ':'); to[j] = 0; add_rule(from, to, cmdlist()); } /* build a list of commands, return pointer to them */ Command * cmdlist() { Command *r; r = NULL; getline(); while (*line && *line <= ' ') { r = add_cmd(r, save(line)); getline(); } return r; } /* check for a command line macro def and process if there */ assign(s) char *s; { char *p; for (p = s; *p && *p != '='; p++) ; if (*p == '=') { *p++ = 0; add_mac(s, save(p)); return 1; } else return 0; } /* check for a macro def and process if there */ macdef() { char *l, *b, *e; l = line; while (*l && *l <= ' ') l++; b = l; while (*l && *l > ' ') l++; e = l; while (*l && *l <= ' ') l++; if (*l++ == '=') { /* got a macro */ *e = 0; add_mac(b, save(l)); return 1; } else return 0; } /* parse a dependency, "child [children]*: [parents]*" */ dependency() { int i, j, target[20], depend[20]; Command *cmd; expand(); i = namelist(target, 0); if (line[i] != ':') error("bad dependency rule"); i = namelist(depend, i+1); cmd = cmdlist(); for (i = 0; target[i]; i++) { for (j = 0; depend[j]; j++) add_dep(target[i], depend[j]); set_cmd(target[i], cmd); } if (firstsym < 0) firstsym = target[0]; } /* gather up a list of names in the input line */ namelist(list, i) int *list; { int t, j; t = 0; while (line[i] && line[i] != ':') { while (line[i] && line[i] <= ' ') i++; j = 0; if (line[i]) { while (line[i] && line[i] > ' ' && line[i] != ':') name[j++] = line[i++]; name[j] = 0; list[t++] = lookup(name); } } list[t] = 0; return i; } /* add a new command to the end of a command list */ Command * add_cmd(cp, cmd) Command *cp; char *cmd; { Command *p, *r; p = alloc((short)sizeof(Command)); p->cmd = cmd; p->next = NULL; if (cp == NULL) r = p; else { r = cp; while (cp->next) cp = cp->next; cp->next = p; } return r; } /* add a parent (target) to a child (dependency) */ add_dep(target, dep) { Depend *p; if (debug) printf("add_dep(%s,%s)\n", sym[target], sym[dep]); p = alloc((short)sizeof(Depend)); p->dep = dep; p->next = depend[target]; depend[target] = p; } /* add a macro */ add_mac(name, str) char *name, *str; { if (debug) printf("add_mac(%s,%s)\n", name, str); macro[lookup(name)] = str; } /* add a command list to a target */ set_cmd(target, cp) Command *cp; { if (debug) printf("set_cmd(%s,%lx)\n", sym[target], cp); command[target] = cp; } /* add a rule */ add_rule(from, to, cp) char *from, *to; Command *cp; { if (debug) printf("add_rule(%s,%s,%lx)\n", from, to, cp); rules[lrule].from = lookup(from); rules[lrule].to = lookup(to); rules[lrule].cmd = cp; if (++lrule >= MAXRULE) error("too many rules"); rules[lrule].cmd = NULL; } /* build a child by first building the parents */ make(child) { int mkflag; long chdate; Command *cp; Depend *dp; if (debug) printf("make(%s)\n", sym[child]); chdate = date(sym[child]); mkflag = 0; if (dp = depend[child]) { while (dp) { make(dp->dep); if (check(dp->dep, chdate)) mkflag = 1; dp = dp->next; } } else mkflag = 1; if (mkflag) { strcpy(target, sym[child]); add_mac("@", target); if (cp = command[child]) { unlink(target); execute(cp); } else chkrule(child, chdate); } } /* set the date/time of the named file to the present */ touch(name) char *name; { int fd, r; long dt; if ((fd = open(name, 2)) >= 0) { dt = (trap(1, DATE) && 0xFFFF) | (trap(1, TIME) << 16); if (r = trap(1, GSDTOF, &dt, fd, 1)) perror(r, name); close(fd); } else error("cannot open %s (%d)\n", name, fd); } /* get the date/time of the named file */ long date(name) char *name; { int fd; unsigned long dt; if ((fd = open(name, 0)) >= 0) { trap(1, GSDTOF, &dt, fd, 0); dt = ((dt >> 16) & 0xFFFFL) | (dt << 16); /* swap words */ close(fd); } else dt = 0L; if (debug) printf("date of %s is %lx\n", name, dt); return dt; } /* compare the date/time of the named file against the child date */ check(parent, chdt) long chdt; { long pardt; pardt = date(sym[parent]); return (pardt > chdt); } /* see if there are any rules that we can use to build the child */ chkrule(child, chdate) long chdate; { Rule *r; char *s, *e; int i, j, ext, parent, parbase; s = sym[child]; for (j = i = 0; base[i] = s[i]; i++) if (s[i] == '.') j = i; if (j == 0) return 0; e = &s[j]; base[j] = 0; parbase = lookup(base); ext = lookup(e); for (i = lrule; --i >= 0; ) { r = &rules[i]; if (r->to == ext) { strcpy(extra, base); strcat(extra, sym[r->from]); parent = lookup(extra); make(parent); add_mac("*", sym[parbase]); if (check(parent, chdate)) { unlink(sym[child]); execute(r->cmd); return; } } } } /* execute a list of commands */ execute(cp) Command *cp; { int r; while (cp) { strcpy(line, cp->cmd); expand(); printf(" %s\n", line); if (!no_exec && (r = system(line)) && !ignore) perror(r, "command failed"); cp = cp->next; } } /* do something, either built-in (rm, mv) or exec a program */ args(s) char *s; { /* built and argc, argv for the built-in's */ char *strtok(); ac = 1; s = strtok(s, " \t"); xin = stdin; xout = stdout; while (ac < MAXARG && s != NULL) { if (*s == '>') { if (s[1] == '>') xout = fopen(s+2, "a"); else xout = fopen(s+1, "w"); } else if (*s == '<') xin = fopen(s+1, "r"); else av[ac++] = s; s = strtok(NULL, " \t"); } av[ac] = NULL; } rm() { /* remove a file */ int i, r, rr; rr = 0; for (i = 1; i < ac; i++) { if ((r = unlink(av[i])) != 0 && r != -33) { /* not deleted but was found */ perror(r, av[i]); rr = r; } } return rr; } mv() { /* rename a file */ int r; if (ac == 3) { unlink(av[2]); if (r = trap(1, RENAME, 0, av[1], av[2])) { printf("rename didn't work (%d), try copy\n", r); if ((r = cp()) == 0) unlink(av[1]); } } return r; } cp() { /* copy a file */ int r; FILE *in, *out; r = 1; if (ac == 3) { if (in = fopen(av[1], "rb")) { if (out = fopen(av[2], "wb")) { xcat(in, out); r = 0; fclose(in); fclose(out); } else error("cannot create %s\n", av[2]); fclose(in); } else error("cannot copy %s\n", av[1]); } return r; } cat() { /* cat a file */ int i, r; FILE *in; r = 0; for (i = 1; i < ac; i++) { if ((in = fopen(av[i], "r")) == NULL) { r = 1; error("cannot cat %s", av[i]); } else xcat(in, xout); } return r; } xcat(i, o) FILE *i, *o; { /* do the real work of cat */ int c; while ((c = getc(i)) != EOF) putc(c, o); fclose(i); } grep() { int i; char *p, *fgets(); FILE *in, *fopen(); strlower(p = av[1]); for (i = 2; i < ac; i++) { if (in = fopen(av[i], "r")) { while (fgets(extra, MAXLINE, in)) { strlower(extra); if (match(p, extra)) printf("%s:\t%s", av[i], extra); } fclose(in); } else printf("cannot open %s\n", av[i]); } return 0; } match(pat, line) char *pat, *line; { char *p, *l; while (*line) { p = pat; l = line++; while (*p++ == *l++) if (*p == 0) return 1; } return 0; } xfree() { long m, dsz[4]; int c, drv; if (ac > 1 && (c = *av[1]) >= 'A' && c <= 'P') drv = c - 'A'; else drv = trap(1, GETDRV); trap(1, GETDSK, dsz, drv + 1); m = trap(1, MALLOC, -1L); printf("%ld free bytes in memory, ", m); printf("%ld free bytes on %c:\n", dsz[0]*dsz[2]*dsz[3], drv+'A'); return 0; } struct bltin { char *name; int (*func)(); } btbl[] = { { "rm", rm }, { "mv", mv }, { "cp", cp }, { "cat", cat }, { "grep", grep }, { "free", xfree }, { NULL, NULL } }; system(s) char *s; { int i, r; char *p; while (*s && *s <= ' ') s++; for (p = extra; *s && *s > ' '; ) *p++ = *s++; *p = 0; for (i = 0; btbl[i].name != NULL; i++) { if (strcmp(extra, btbl[i].name) == 0) { args(s); r = (*btbl[i].func)(); if (xin != stdin) fclose(xin); if (xout != stdout) fclose(xout); return r; } } if ((r = strlen(s+1)) >= 128) error("command line too long"); else { *s = r; r = trap(1, EXEC, 0, extra, s, ""); } return r; } /* symbol table lookup */ lookup(s) char *s; { int i, start; upper(s); /* too bad TOS filenames are always uppercase */ start = i = *s; while (sym[i]) { if (strcmp(s, sym[i]) == 0) return i; if (++i >= MAXSYM) i = 0; if (i == start) error("too many symbols"); } sym[i] = save(s); command[i] = macro[i] = depend[i] = 0L; return i; } /* convert a string to all uppercase in place */ upper(s) char *s; { register int c; for ( ; c = *s; s++) { if (c >= 'a' && c <= 'z') *s = c - 'a' + 'A'; } } /* save a string */ char * save(s) char *s; { char *r, *alloc(); r = alloc(strlen(s)+1); strcpy(r, s); return r; } /* allocate some space */ char * alloc(n) { char *r, *malloc(); if ((r = malloc(n)) == NULL) error("out of free space"); return r; } bye(n{ if (hold) { printf("(press any char)\n"); getchar(); } exit(n); } perror(r, s) char *s; { char *p; switch (r) { case -32: p = "invalid function number"; break; case -33: p = "file not found"; break; case -34: p = "pathname not found"; break; case -35: p = "too many open files"; break; case -36: p = "access not possible"; break; case -37: p = "invalid handle"; break; case -39: p = "not enough memory"; break; case -46: p = "invalid drive spec"; break; case -49: p = "no more files"; break; default: sprintf(p = extra, "error %d", r); } error("%s: %s", p, s); } /* complain and get out */ error(s, a, b, c, d) char *s; long a, b, c, d; { printf("** "); printf(s, a, b, c, d); printf("\n"); bye(1); } /* * spread sheet program * commands are copy, read, write, print, blank, format, quit * labels begin with ' and are limited in length * numbers are stored fixed point (2 decimal places) in longs */ #include "stdio.h" /* sizes */ #define MAXROW 100 #define MAXCOL 25 #define MAXLINE 100 #define MAXNODE 5000 #define MAXSTR 16 /* screen locations */ #define FRAMEW 5 #define FRAMEH 1 #define CURCELL 22 #define MSG 23 /* default values for width, format, and justify */ #define DEFWID 10 #define DEFFMT 2 #define DEFJST 'l' /* screen and keyboard defines */ #define ESC 27 #define DEL 127 #define HELP 0x6200 #define UNDO 0x6100 #define INS 0x5200 #define CLR 0x4700 #define UP 0x4800 #define DOWN 0x5000 #define LEFT 0x4B00 #define RIGHT 0x4D00 #define BACKSP 8 #define LJUST 'l' #define RJUST 'r' /* cell types */ #define FREE 0 #define STRING 1 #define VALUE 2 #define CELL 3 #define ERR 4 #define ADD '+' #define SUB '-' #define MUL '*' #define DIV '/' #define NEG '_' #define SUM '@' /* cell structures */ typedef struct { int type; long a, b, c, d; } Node; typedef struct { int type; char s[MAXSTR]; } String; typedef union { Node n; String s; } Cell; Cell *cell[MAXROW][MAXCOL]; /* cell pointers */ Cell space[MAXNODE]; /* Cell space */ Cell *nextfree; /* free list of nodes */ Cell extra; /* an extra one when empty */ int freecnt; /* count of free nodes */ char linebuf[MAXLINE]; /* keyboard input buffer */ char showbuf[MAXLINE]; /* buffer for show routine */ char filename[MAXLINE]; /* load/save file name */ char prname[MAXLINE]; /* print file name */ char prwin[MAXLINE]; /* print window */ int crow, ccol; /* current cursor row and col */ int frow, lrow; /* first and last displayed row */ int fcol, lcol; /* first and last displayed col */ char width[MAXCOL]; /* width of the columns */ char format[MAXCOL]; /* format of the columns */ char justify[MAXCOL]; /* justification of the cols */ int loc[MAXCOL]; /* screen location of the cols */ char *parstr; /* string for expr parser */ char tokstr[MAXLINE]; /* string for next token */ int reframe; /* need to reframe */ int redisp; /* need to recalc the display */ main(argc, argv) char *argv[]; { int c; init(); if (argc > 1) loadss(argv[1]); while (1) { display(); switch (c = get()) { case 'b': blank(); break; case 'c': copy(); break; case 'd': delete(); break; case 'e': edit(); break; case 'f': setformat(); break; case 'g': go(); break; case 'i': insert(); break; case 'l': load(); break; case 'p': print(); break; case 'q': quit(); break; case 's': save(); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '\'': case '(': case '=': enter(c); break; case UP: case DOWN: case LEFT: case RIGHT: movecur(c); break; default: help(); break; } } } /* initialize the spreadsheet */ init() { int r, c; for (r = 0; r < MAXROW; r++) for (c = 0; c < MAXCOL; c++) cell[r][c] = NULL; crow = ccol = 0; frow = fcol = 0; reframe = redisp = 1; for (c = 0; c < MAXCOL; c++) { width[c] = DEFWID; format[c] = DEFFMT; justify[c] = DEFJST; } nextfree = NULL; freecnt = 0; for (r = 0; r < MAXNODE; r++) free(&space[r]); extra.n.type = ERR; erase(); } /* draw a frame on the screen displaying current window rows and cols */ frame() { int sz, i; lrow = frow + 20; if (lrow > MAXROW) lrow = MAXROW; sz = FRAMEW; for (lcol = fcol; lcol < MAXCOL && sz + width[lcol] < 80; lcol++) { loc[lcol] = sz; sz += width[lcol]; } move(0, FRAMEW); reverse(1); for (i = fcol; i < lcol; i++) { sprintf(linebuf, "%c..............................", 'a'+i); outstr(stdout, width[i], LJUST, linebuf); } for (i = frow; i < lrow; i++) { move(FRAMEH + i - frow, 0); clrline(); sprintf(linebuf, "%d.....", i); outstr(stdout, FRAMEW, LJUST, linebuf); } revers0); clrbelowww(); redisp = 1; } /* refresh the contents of the current display window */ display() { int r, c, n; Cell *p; char *content(); if (reframe) frame(); if (redisp) { for (r = frow; r < lrow; r++) { for (c = fcol; c < lcol; c++) { if (p = cell[r][c]) { move(FRAMEH+r-frow, loc[c]); value(stdout, c, p); } } } } move(0, 0); /* how much free space left */ n = ((long)freecnt * 100L) / (long)MAXNODE; sprintf(linebuf, "%d%%", n); outstr(stdout, FRAMEW, LJUST, linebuf); move(CURCELL, 0); /* what is the content of current cell */ clrbelow(); printf("%c%d: %s", ccol+'a', crow, content(cell[crow][ccol], 0)); move(FRAMEH+crow-frow, loc[ccol]); /* place cursor */ reframe = redisp = 0; } /* output the value of the cell */ value(fp, c, p) FILE *fp; Cell *p; { int i, wid, fmt, jst; char *s, *ntoa(); long n, eval(); wid = width[c]; fmt = format[c]; jst = justify[c]; if (p == NULL) outstr(fp, wid, jst, ""); else if (p->s.type == STRING) outstr(fp, wid, jst, p->s.s); else { n = eval(p); outstr(fp, wid, jst, ntoa(n, fmt)); } } /* get a line from a file */ rdline(fp, bp) FILE *fp; char *bp; { int i, c; for (i = 0; (c = getc(fp)) != '\n' && c != EOF; i++) if (c >= ' ') *bp++ = c; *bp = 0; return i; } /* get a line from the keyboard */ char * getline(prompt, start) char *prompt, *start; { int i, j, n, c, plen, change; move(MSG, 0); clrline(); for (plen = 2; *prompt; plen++) put(*prompt++); ps("? "); i = 0; if (start) { while (linebuf[i] = start[i]) put(linebuf[i++]); } n = i; while ((c = get()) != '\r') { change = 0; switch (c) { case LEFT: if (i) i--; break; case RIGHT: if (i < n) i++; break; case BACKSP: if (i == 0) break; i--; case DEL: if (i == n) break; n--; for (j = i; j < n; j++) linebuf[j] = linebuf[j+1]; change++; break; case ESC: return NULL; break; case INS: c = ' '; default: if (c < ' ' || c > DEL) break; for (j = n; j > i; j--) linebuf[j] = linebuf[j-1]; n++; linebuf[i++] = c; change++; break; } if (change) { j = (i ? i-1 : 0); move(MSG, plen+j); while (j < n) put(linebuf[j++]); put(' '); } move(MSG, plen+i); } linebuf[n] = 0; return (n ? linebuf : NULL); } /* move the cursor, if move goes outside the window, adjust frame */ movecur(c) { switch (c) { case UP: if (crow) crow--; if (crow < frow) { frow--; reframe++; } break; case DOWN: if (crow < MAXROW-1) crow++; if (crow >= lrow) { frow++; reframe++; } break; case LEFT: if (ccol) ccol--; if (ccol < fcol) { fcol--; reframe++; } break; case RIGHT: if (ccol < MAXCOL-1) ccol++; if (ccol >= lcol) { fcol++; reframe++; } break; } } /* time to go */ quit() { char *s; if (s = getline("quit", "yes")) { if (*s == 'y') { move(24, 0); exit(0); } } } /* expression entry parsing */ char * next() { int c; char *s; while ((c = *parstr) && c <= ' ') parstr++; s = tokstr; if (alphanum(c)) { while (alphanum(*parstr)) *s++ = *parstr++; } else *s++ = *parstr++; *s = 0; return tokstr; } /* create a new node */ Cell * mkcell(t, a, b, c, d) long a, b, c, d; { Node *p; if ((p = nextfree) == NULL) { move(MSG, 0); printf("out of space"); return &extra; } else { freecnt--; nextfree = p->a; p->type = t; p->a = a; p->b = b; p->c = c; p->d = d; return p; } } /* parse the string (pointed at by parstr) into an expression tree */ Cell * parse() { char *s; Cell *x, *factor(), *tail(); x = factor(); s = next(); x = tail(x, *s); } /* more parsing, here we look for operators */ Cell * tail(x, op) Cell *x; { int p; char *s; Cell *y, *factor(); while (1) { if (!(p = prec(op))) return x; y = factor(); s = next(); if (prec(*s) > p) y = tail(y, *s); x = mkcell(op, x, y); op = *s; } } /* return the precedence of the given operator */ prec(op) { switch (op) { case '+': case '-': return 1; case '*': case '/': return 2; case '@': return 3; default: return 0; } } /* parse a factor of an expression */ Cell * factor() { char *s; int i, c, cr, cc; long aton(); Cell *x, *y; if (!(s = next())) return NULL; switch (c = *s) { case '\'': x = mkcell(STRING, 0L, 0L); s = x->s.s; for (i = 0; i < MAXSTR && (*s++ = *parstr++); i++) ; return x; case '-': x = factor(); return mkcell(NEG, x, 0L); case '(': return parse(); default: if (c >= 'a' && c <= 'z') { y = cc = c - 'a'; x = cr = atoi(s+1); return mkcell( check(cr, cc) ? CELL : ERR, x, y); } else if (c >= '0' && c <= '9') { x = aton(s); return mkcell(VALUE, x, 0); } else { move(MSG, 0); printf("bad factor: %s", s); return NULL; } } } /* set the value of a cell */ setvalue(r, c, x) long x; { Cell *p; if (p = cell[r][c]) free(p); cell[r][c] = x; } /* free up all space associated the given pointer */ free(p) Node *p; { switch (p->type) { case ADD: case SUB: case MUL: case DIV: case SUM: free(p->b); case NEG: free(p->a); } p->type = FREE; p->a = nextfree; nextfree = p; freecnt++; } /* get a filename from the user and load a spreadsheet */ load() { char *s; if (s = getline("load file", filename)) { loadss(s); } } /* load a spreadsheet file */ loadss(name) char *name; { FILE *fp; int c; char *s; strcpy(filename, name); if (fp = fopen(name, "r")) { init(); while (rdline(fp, parstr = linebuf)) { s = next(); switch (c = *s) { case '=': s = next(); ccol = *s - 'a'; crow = atoi(s+1); if (check(crow, ccol)) setvalue(crow, ccol, parse()); break; case 'f': if (s = next()) { c = atoi(s); if (s = next()) width[c] = atoi(s); if (s = next()) format[c] = atoi(s); if (s = next()) justify[c] = *s; } break; } } reframe = redisp = 1; chkframe(); fclose(fp); } else { printf(" can't open ", name); get(); } } /* save a spreadsheet on a file */ save() { int r, c; FILE *fp; char *name, *content(); if (name = getline("save file", filename)) { strcpy(filename, name); fp = fopen(name, "w"); for (r = 0; r < MAXROW; r++) for (c = 0; c < MAXCOL; c++) if (cell[r][c]) { fprintf(fp, "= %c%d %s\n", c+'a', r, content(cell[r][c], 0)); } for (c = 0; c < MAXCOL; c++) if (width[c] != DEFWID || format[c] != DEFFMT || justify[c] != DEFJST) fprintf(fp, "f %d %d %d %c\n", c, width[c], format[c], justify[c]); fclose(fp); } } /* print a report onto a file */ print() { char *s; FILE *fp; int r, c, trow, tcol, brow, bcol; if (!(s = getline("print window", prwin))) return; strcpy(prwin, s); if (!window(s, &trow, &tcol, &brow, &bcol)) return; if (s = getline("file name", NULL)) { strcpy(prname, s); fp = fopen(s, "w"); for (r = trow ; r <= brow; r++) { for (c = tcol; c <= bcol; c++) value(fp, c, cell[r][c]); putc('\n', fp); } fclose(fp); } } /* prompt for a cell name and move the cursor to that cell */ go() { char *p; if (p = getline("go to cell", NULL)) { if (*p >= 'a' && *p <= 'z') { ccol = *p - 'a'; crow = atoi(p+1); if (crow < 0) crow = 0; if (crow >= MAXROW) crow = MAXROW-1; if (ccol < 0) ccol = 0; if (ccol >= MAXCOL) ccol = MAXCOL-1; chkframe(); } } } chkframe() { if (crow < frow || crow >= lrow || ccol < fcol || ccol >= lcol) { frow = crow; fcol = ccol; reframe = 1; } } /* make a copy of a cell */ Cell * copyx(p, sr, sc, dr, dc) Node *p; { int r, c; Cell *x, *y; if (p == NULL) return NULL; switch (p->type) { case ADD: case SUB: case MUL: case DIV: case SUM: x = copyx(p->a, sr, sc, dr, dc); y = copyx(p->b, sr, sc, dr, dc); return mkcell(p->type, x, y); case CELL: r = p->a - sr + dr; c = p->b - sc + dc; return mkcell( check(r, c) ? CELL : ERR, (long)r, (long)c); default: return mkcell(p->type, p->a, p->b, p->c, p->d); } } /* prompt for where to copy to, and then copy it */ copy() { char *s; Cell *src; int r, c, trow, tcol, brow, bcol; if (!(s = getline("destination", NULL))) return; if (!window(s, &trow, &tcol, &brow, &bcol)) return; src = cell[crow][ccol]; for (r = trow; r <= brow; r++) for (c = tcol; c <= bcol; c++) setvalue(r, c, copyx(src, crow, ccol, r, c)); redisp = 1; } /* insert a row or a column */ insert() { char *s; if (s = getline("insert (row or col)", NULL)) { if (*s == 'r') insrow(); else if (*s == 'c') inscol(); else return; reframe = 1; } } insrow() { int r, c; Cell *p; for (r = MAXROW-2; r >= crow; r--) { for (c = 0; c < MAXCOL; c++) { p = copyx(cell[r][c], r, c, r+1, c); setvalue(r+1, c, p); } } for (c = 0; c < MAXCOL; c++) setvalue(crow, c, NULL); } inscol() { int r, c; Cell *p; for (c = MAXCOL-2; c >= ccol; c--) { width[c+1] = width[c]; format[c+1] = format[c]; justify[c+1] = justify[c]; for (r = 0; r < MAXROW; r++) { p = copyx(cell[r][c], r, c, r, c+1); setvalue(r, c+1, p); } } width[ccol] = DEFWID; format[ccol] = DEFFMT; justify[ccol] = DEFJST; for (r = 0; r < MAXROW; r++) setvalue(r, ccol, NULL); } /* delete a row or a column */ delete() { char *s; if (s = getline("delete (row or col)", NULL)) { if (*s == 'r') delrow(); else if (*s == 'c') delcol(); else return; reframe = 1; } } delrow() { int r, c; Cell *p; for (r = crow; r < MAXROW-2; r++) { for (c = 0; c < MAXCOL; c++) { p = copyx(cell[r+1][c], r+1, c, r, c); setvalue(r, c, p); } } } delcol() { int r, c; Cell *p; for (c = ccol; c < MAXCOL-2; c++) { width[c] = width[c+1]; format[c] = format[c+1]; justify[c] = justify[c+1]; for (r = 0; r < MAXROW; r++) { p = copyx(cell[r][c+1], r, c+1, r, c); setvalue(r, c, p); } } } /* enter a new expression into the cell */ enter(c) { char str[2]; if (c != '=') sprintf(str, "%c", c); else *str = 0; if (parstr = getline("enter", str)) { setvalue(crow, ccol, parse()); redisp = 1; } } /* fill the line buffer with the (unevaluated) contents of the cell */ char * content(p, cp) Cell *p; { *linebuf = 0; showx(p, cp); return linebuf; } /* recursive support routine for content() */ showx(p, cp) Node *p; { int op, np; char *ntoa(); if (p == NULL) return; switch (op = p->type) { case ERR: sprintf(showbuf, "ERR"); break; case FREE: sprintf(showbuf, "FREE"); break; case STRING: sprintf(showbuf, "'%s", ((String *)p)->s); break; case CELL: sprintf(showbuf, "%c%d", (short) (p->b + 'a'), (short) p->a); break; case VALUE: sprintf(showbuf, "%s", ntoa(p->a, 2)); break; case ADD: case SUB: case MUL: case DIV: case SUM: np = prec(op); if (np < cp) strcat(linebuf, "("); showx(p->a, np); sprintf(linebuf, "%s%c", linebuf, p->type); showx(p->b, np); if (np < cp) strcat(linebuf, ")"); *showbuf = 0; break; case NEG: strcat(linebuf, "-"); showx(p->a, cp); *showbuf = 0; break; default: sprintf(showbuf, "ERR%d", p->type); break; } strcat(linebuf, showbuf); } /* erase the current cell */ blank() { char *s; if (s = getline("blank this cell", "yes")) { if (*s == 'y') { setvalue(crow, ccol, NULL); move(FRAMEH+crow-frow, loc[ccol]); outstr(stdout, width[ccol], LJUST, ""); } } } /* edit the contents of the current cell */ edit() { char *s; s = content(cell[crow][ccol], 0); if (parstr = getline("edit", s)) { setvalue(crow, ccol, parse()); redisp = 1; } } /* prompt for new column formats and change them */ setformat() { char *s; int w; sprintf(linebuf, "%d", format[ccol]); if (s = getline("fixed decimal", linebuf)) { w = atoi(s); format[ccol] = (w > 2 ? 2 : w); redisp = 1; } sprintf(linebuf, "%d", width[ccol]); if (s = getline("column width", linebuf)) { w = atoi(s); width[ccol] = (w < 2 ? 2 : w); reframe = 1; } sprintf(linebuf, "%c", justify[ccol]); if (s = getline("left or right justify", linebuf)) { if (*s == 'l' || *s == 'r') { justify[ccol] = *s; reframe = 1; } } } /* display a help message */ help() { move(MSG, 0); printf("cell entry: type \"= expr\" or \"'label\" "); move(MSG+1, 0); printf( "commands: blank copy delete edit format goto insert load print quit save"); get(); } /* evaluate a cell entry */ long eval(p) Node *p; { int x, y; long a, b, sum(); if (p == NULL) return 0L; switch (p->type) { case FREE: case STRING: case ERR: return 0L; case VALUE: return p->a; case CELL: x = p->a; y = p->b; return eval(cell[x][y]); case SUM: return sum(p->a, p->b); break; case ADD: a = eval(p->a); b = eval(p->b); return a+b; case SUB: a = eval(p->a); b = eval(p->b); return a-b; case MUL: a = eval(p->a); b = eval(p->b); return (a*b)/100; case DIV: a = eval(p->a); b = eval(p->b); return (a*100)/b; case NEG: a = eval(p->a); return -a; } } long sum(lp, rp) Node *lp, *rp; { long n; int br, bc, er, ec, r, c; n = 0L; if (lp->type == CELL && rp->type == CELL) { br = lp->a; bc = lp->b; er = rp->a; ec = rp->b; for (r = br; r <= er; r++) for (c = bc; c <= ec; c++) n += eval(cell[r][c]); } return n; } /* parse a window definition, e.g. "a0.z99" */ window(s, tr, tc, br, bc) char *s; int *tr, *tc, *br, *bc; { *tc = *s - 'a'; *tr = atoi(s+1); while (*s && *s++ != '.') ; if (*s) { *bc = *s - 'a'; *br = atoi(s+1); } else { *bc = *tc; *br = *tr; } return check(*tr, *tc) && check(*br, *bc); } /* range check on a row and column */ check(r, c) { return r >= 0 && r < MAXROW && c >= 0 && c < MAXCOL; } /* convert a string to an integer */ atoi(s) char *s; { int n, c; if (s == NULL) return 0; for (n = 0; isdig(c = *s++); ) n = n * 10 + c - '0'; return n; } /* convert a string to a "fixed point" number (i.e. "123.45") */ long aton(s) char *s; { int c, i; long n; n = 0L; if (s == NULL) return 0L; for (n = 0; isdig(c = *s++); ) n = n * 10 + (c - '0'); if (c == '.') c = *s++; for (i = 0; i < 2; i++) { n = n * 10; if (isdig(c)) { n = n + (c - '0'); c = *s++; } } return n; } /* check the types of the characters */ isdig(c) { return c >= '0' && c <= '9'; } alphanum(c) { if (c >= 'a' && c <= 'z') return 1; if (c >= 'A' && c <= 'Z') return 1; if (c == '.') return 1; return isdig(c); } /* convert the fixed point number back to a string */ char * ntoa(n, fmt) long n; { int i, neg; if (neg = n < 0) n = -n; i = 16; linebuf[--i] = 0; do { linebuf[--i] = n % 10 + '0'; n = n / 10; if (i == 13) linebuf[--i] = '.'; } while (n); while (i > 11) { if (i == 13) linebuf[--i] = '.'; else linebuf[--i] = '0'; } if (fmt == 0) linebuf[12] = 0; else if (fmt == 1) linebuf[14] = 0; if (neg) linebuf[--i] = '-'; return &linebuf[i]; } /* output a string of width n to the stream fp */ outstr(fp, wid, jst, s) FILE *fp; char *s; { int i; if (jst == RJUST) { for (i = 0; s[i]; i++) ; for ( ; i < wid; i++) putc(' ', fp); } for (i = 0; i < wid && *s; i++) putc(*s++, fp); if (jst == LJUST) { for ( ; i < wid; i++) putc(' ', fp); } } /* keyboard input and screen output/control */ get() { long c; c = trap(1, 7); if (c & 0xFF) return (short)c; /* ascii character */ else return (short)(c >> 8); /* scan code */ } move(row, col) { put(ESC); put('Y'); put(row+' '); put(col+' '); } erase() { put(ESC); put('E'); } clrline() { put(ESC); put('K'); } clrbelow() { put(ESC); put('J'); } reverse(on) { put(ESC); put(on ? 'p' : 'q'); } put(c) { trap(1, 2, c); } ps(s) char *s; { while (*s) put(*s++); } Distribution Disk - Shareware Atari ST C compiler - version 2.0 copyright 1988 - Mark A. Johnson 5315 Holmes Place Boulder, CO 80303 GEnie login: MAJOHNSON This disk contains a shareware C compiler for your use and enjoyment, pass it on to anyone freely as long as it includes this note. I bought my 520ST in April 1986. Almost all the software I have is either public domain or shareware. I have supported the shareware idea in the past, but I'd like to see it happen for myself. If you like what you find here, please send a donation along with your name and address. I send out a newsletter to discuss bugs, enhancements, and hints now and then. I hope you enjoy this software. It is not for sale by anyone, and I reserve all rights to its ownership. Feel free to pass it on to other ST owners, but please pass on the whole disk, including this "readme" file. This is the distribution disk for version 2.0 of the compiler. It contains the basic compiler tools, libraries, source for the libraries, source for a number of useful tools, and (hardly any) documentation. The compiler can handle the full language specified in Kernigan & Ritchie's "The C Programming Language." To save space, the distribution is contained in three ARC files: mjc.arc - the compiler development environment lib.arc - source code for the libraries srcdoc.arc - source code for a few useful tools and documentation I've also included ARC.TTP to allow you to unpack the disk. Here's a description of the files contained in the all the archives: Programs cc.ttp - translates C code to intermediate code as.ttp - translates intermediate code to machine code ue.ttp - public domain microEmacs editor mk.ttp - simple UN*X style "make" program eternal2.prg- a PD ramdisk, survives resets ramdisk.dat - data file for ramdisk autodisk.prg- Moshe Braner's autoboot floppy copy to ramdisk on boot Libraries and Header Files prg.s - startup intermediate code for .PRG programs ttp.s - startup intermediate code for .TTP programs lib.a - library used to create .TTP programs gem.a - library used to create .PRG programs lib.c - source for most of lib.a math.c - source for the long and floating point math routines str.c - source for the string routines fmtio.c - source for printf, scanf, and all its friends gem.c - source code for gem.a stdio.h - header for the standard i/o routines setjmp.h - header for setjmp/longjmp routines gem.h - header for GEM AES routines osbind.h - header for "standard" GEMTOS bindings Source code ss.c - a simple spreadsheet program hd.c - a hex dump program mk.c - the make program used in the development environment lorder.c - a library checker (makes sure the order is ok) bug.c - tells you what happened in a crash Documentation as.doc - documentation on the intermediate code readme.doc - this file eternal2.doc- describes ramdisks in general and eternal2 in particular autodisk.doc- describes what autodisk.prg does and how to use it I have a 520ST with one single-sided floppy, so this disk is really a collection of many disks I use. Let's get started by making an autobooting development environment disk. Copy MJC.ARC and ARC.TTP to a fresh floppy and extract all the files out of MJC.ARC (see ARC.DOC). Then do the following (in order): create an AUTO folder copy ETERNAL2.PRG into AUTO copy AUTODISK.PRG into AUTO copy RAMDISK.DAT into AUTO the following files should be in the root directory UE.TTP CC.TTP AS.TTP MK.TTP TTP.S LIB.A DESKTOP.INFO Now, whenever you boot the system with this disk, it will prompt you for the date (it's important to tell it the truth, MK.TTP uses file timestamps to tell whether or not to build something), copy all the files to the ramdisk, and then puts you back on the desktop. The compiler (CC.TTP) is preprocessor, parser, and code generator all rolled into a single program. Please refer to the "C Programming Language" by K&R. The compiler has the following features beyond K&R: - symbol names can be any length - built-in 6800 trap generator "trap(NUM, arg1, arg2, ...)" - structure assignments - register variables - "assembler" escapes - enum's The floating point is homebrew and new to version 2.0, I am sure it is slow and buggy. Be forewarned. If anyone can improve the floating point code (see MATH.C in the library source), please let me know so I can incorporate it into future releases. The output of the compiler is ascii text and each line maps into a single instruction. This intermediate code is as terse as I can make it (to save disk space) but is still readable (by me at least). (I have plans to improve this to make things easier for an optimizer). The output of the compiler is always placed in a file called "yc.out" in the current directory. Any error messages are displayed on the screen. If "-o filename" is present on the command line, output will be placed in the specified file instead of YC.OUT. The other options to CC.TTP include "-I directory" which gives the compiler optional directories to search for include files, and "-D name" or "-D name=value" which lets you #define things on the command line. The assembler (AS.TTP) reads the intermediate code in a single pass and keeps everything in memory before generating the file "ya.out" in the current directory. The size limit of the program to be compiled is basically the size of the available memory. The "ya.out" file should be renamed to one of the standard extensions (.TTP, .PRG, .TOS) before executing it. The command line of the assembler should always list a startup file first (see ttp.s or prg.s) then the intermediate files of the program, then "-L" followed by any libraries. Any errors encountered by the assembler terminates assembly. A "-m" argument to the assembler will include the symbol table (standard Atari format) in the output file. A "-o filename" argument will place the output in the specified file instead of in YA.OUT. Finally, for those times when the command line is too short (it's only 128 characters on the ST) a "-f filename" allows AS.TTP to read in its list of files to be assembled from a file. A library is simply intermediate code, but is handled differently by the assembler than regular intermediate code. Intermediate code (the files before "-L") are read and processed directly; all symbols and code are accepted without question. A library is read without processing until a symbol is found that is needed but not defined. From that point on, the library is read and processed until the next symbol is encountered. At the next symbol, the "needed but not defined" test is applied again and processing or scanning continues as necessary. The libraries include TOS, VDI, and AES routines taken from the Abacus books. See lib.doc for some info on the library routines. I have also included basic routines. I have included the source for LIB.A and GEM.A. A lot of library routines you would expect to see are missing, and for that I apologize. My next major project for the compiler is to port Dale Schumaker's DLIB package to MJC. Creating .TTP programs is straightforward and better tested than .PRG (GEM) program creation. In a .TTP process, the main function is called with the standard arguments: main(argc, argv) int argc; char *argv[]; Redirection of input and output using >outfile, >>appendfile, or 861223 FUNCTION This program is to be placed in the \AUTO folder on the boot disk, AFTER the RAMdisk program. (It assumes the reset-immune RAM disk is already installed.) After asking the user for the current time and date, and setting the ST's two clocks accordingly, this program copies the whole floppy disk data, FATs, directory and all, onto the RAMdisk. (It first finds out which sector is the last one actually holding data, and copies all sectors up to that one.) HINTS For best results: Freshly format a disk, make an AUTO directory, put in it first RAMDISK.PRG and then AUTODISK.PRG, then put on the disk all other files you want to load to the RAMdisk at boot time, but no others. You can set these files up in folders if you want: first make the folders, then put the files on the disk directly into the folders. For maximum speed do not make any deletions of files, nor copy files from the disk to itself. You may save the desktop (with the RAMdisk icon installed, and perhaps the RAMdisk's window open) on the disk, too. Make sure the RAMdisk is more than big enough to hold all those files. ACKNOWLEDGEMENTS This program made possible in part by Eric Terrell, who posted "eternal.s". The method of setting the ST's clocks is borrowed from "settime", posted by Allan Pratt of Atari. WARNINGS This program is for booting off a floppy disk. For hard disks (or future, very large, floppies) the program (and/or the RAMdisk program) needs some tweaking, at least at the points marked ">>>>". This program will not work with "copy protected" disk formats, including the "FAST" format with its "dead" sectors. */ ` xHN N *O*m - ЭЭм!"ҍ¼.A// Bg?<JNA m"m -So Q m -SBQ(m)M*mN lHhNX/,?,N6\?<N?<A?<NAXNuNV?BG0RG nf0S@>N^NuNV/.?< N \Hl?< N \?<N TBgNTN^NuNVH&n/ NX> Gm Gg Go`H|0 +H|0A+H|0 +H|0A Gf+H|0 +H|0A`BD Fm Fn Em E;n Dm D;o`,0@@2AA2AA??<-NX f0<`Hl?< N\0<LN^NuNVH&n/ NX> Gg`H|0 +H|0A|P+H|0 +H|0A+H|0 +H|0A Dm Dwn Fm F n Em Eo`(0@@2AAE??<+NX f0<`Hl@?< N\0<LN^NuNVHAn-HHl?< N\?<NT-@ .=@ .=@0.| @g@0.@| @g0?.?<+NzX f?.?<-NdX f`|Hl?< ND\Hn?< N6\.HABA T/NjXJ@fHl?< N\Hn?< N\.HABA T/NXJ@f?<*NTH/?<,NT" H¼Ё-@/.?<N~\Hl?< N\?<NT=@?.Bg?<HnBg?<N, g HlNlX2<.H|.H|A=@.H|=@<<.H|=F.H|n.H|=@2<.H|.H|A=@2<.H|.H|A=@2<.H|.H|A=@2<.H|.H|A=@2<.H|.H|A=@:< 0H:B?< N4\-@ |.&P/.?< N\ -@ n0ng HlNX n hADf Hl$NX n1|AD n1n0. n1@ n1E n1n0.F n1@ 0< nhF n1@ Hl4?< N|\0.H0.@?.??/ Bg?<N g /.NTXE><2.F0<2HHA>SG0 KH|g0.H2.0>:Hŋ02.FAo:.F?.??/ Bg?<N g /.NXHlH?< N\B`R PmLN^NuNuNV?.NT nn0<`?.?<>NPX9@g0<`0<N^NuNV?.?<LN*XN^NuNV/ AB&H`0+ |g/ N*X AB"Ҽm?.NT&_N^NuNV/ &n/ NDXJ@g0<`00+ |g /+NXBk ?+ N,TJ@g0<`0<&_N^NuNVH&n0+ |f0<`.0+ |gV0+ |f0<`v0+ |g?<B?+ NhP?/+?+ NP @f0<`@k 0Hѫ`$ k o?<0+D@H/?+ NP'@&Bk0<LN^NuNV nl <`?.?./. ?<BN -@ m .`?<?.B?<BN| -@?<?.B?<BNb -@ nf .Ю -@ `$ nf .Ю -@ `0.g <`b . oHn . /?.?<@N Bg?./. ?<BN ]|9@g <` `Bl . N^NuNV/.?<IN\N^NuNVBn`&0.A0nf0.ABPRn nLmN^NuNV?>.=|0A"HPgXHf0(>N^Nu)I)J)_NM"l$l/,Nu)I)J)_NN"l$l/,Nu)I)J)_NA"l$l/,NuNV`4 nH| f?< ?<NX nRH??<NX0. Sn J@fN^NuNV` nRH??<NX0. Sn J@fN^NuNV` nRH??<NRX0. Sn J@fN^NuNVH0&n $KA|-H nf?./ N4\=n`L nf?./ N`\=n`. nf?./ Np\=n`-KBn?.NZTJ@f`H| f |o@ H-@/./.?.?<@N| 9@Hg0<`0,n/./<?.?<@NF 9@ @g0<`tRnR -@`R ned` 6.ƼЃ$@ H-@/./.?.?<@N 9@Hg0<`0,nBl0.L N^NuCB"2"2 2"2"2"22"2"2"22"2x9|@Nu Hit any key Illegal time (bad format or out of range) Illegal date (bad format or out of range) Error reading disk!E AUTODISK by Moshe Braner Enter the time (hhmm[ss]): Enter the date (yymmdd): Error reading boot sector! Disk and RAMdisk incompatible! Old RAM disk! Copying data... AUTODISK finished, no errors CON:AUX:PRT: ******** ETERNAL2 RAM disk documentation (short version) ******** This is a reset-proof RAM disk which can be configured to use any drive identifier or size. It can also be resized or removed. To use this RAM disk, put ETERNAL2.PRG in your floppy disk AUTO folder. Be sure it is the first file you put in AUTO. You can create a RAMDISK.DAT file (see next paragraph) and place it in AUTO as well. Reboot, then Install the correct desktop icon and Save Desktop (from the menu). By default, the drive identifier is H and the size is 100 Kbytes. However, if the file \AUTO\RAMDISK.DAT exists, the RAM disk spec will be read from it instead (this should be a 4-byte ASCII file). Finally, though, you can override both of the above by holding down the Alt key while booting, in which case you will be prompted to enter the RAM disk spec from the keyboard (or hold down Caps Lock to prevent the RAM disk from being created at all). The RAM disk spec must be specified as: Yxxx where Y is a drive i #include "d:stdio.h"; main(){ int n,x; printf("Enter a Number "); scanf("%d",&n); printf("\n"); x=n*n; printf("The Square of %d is %d \n",n,x); printf("Press Any Key to Return the the desktop \n \n"); getchar(); } isk to not be created at all. The configuration must be given in this form (four ASCII characters). It can either be stored in the file \AUTO\RAMDISK.DAT, or can be typed from the keyboard if Alt was held down while booting. NOTE: the RAMDISK.DAT file can be created with any text editor, or you can use the program RAMCONF.TOS to create it. Do NOT use the program CONFGRAM.TOS that was included with an earlier version of this RAM disk, as it creates a binary (not ASCII) RAMDISK.DAT file (and obviously, do not use any RAMDISK.DAT file created by this program). "Reset-proof" means that you can put your original boot disk into the floppy disk drive and press the reset button, and after the reboot the files on the RAM disk will still be there. Thi`d0*O.|*m - ЭЭм// ?<?<JNA B?< NA\#X(|6*|."U6?/</<??<?NA (??<>NAX 9Qg@ flB9S3V333BBB | 9o. 9o9U ЁQ`pd3t м&"ҹ2Ҽl#6`#.\6.#rF#vR#~L |"U~"Q yN"Ҽ #r"Ҽ2#v"Ҽ#~ U2093 U0/9X?< NA\BgNAd ofpNu of 9.Nu of y."or2/ p 0/ $ f(/fI2< QSfNu/fI2<?QSfNuNNN\auto\ramdisk.datEnter ramdisk spec: :|(  (  fThe default ramdisk spec is h100 (100k ramdisk on