@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED736 FREE SECTORS COPYING---D1:DIRECK.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 138ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u This is a redistribution of ACE C.It contains all the original stuff that was posted last year, but in ARCform. In oT}rder to save space, I packagedCC8 separately. See CC8.ARC.ginal stuff that was posted last year, but in ARCform. In o=K?BLg?Can't find D1:ENGINE.OBJ @ VYD?EBJ V"ND?E BI Vl IHEDB V V}0­D?E?8HI V B VL,ace @(<3T.AUE.AC.A5E.ABOA& W}@sAXA|A4A||dA.7A /E&x@|/E, ||aA|XBFA||aA|ZBFA^B|OA|r"A GEf@ X}dB|OA$;@|w"A IEf@tB|OA$;@ni$;@( XABOA=A1A ,, ,,,,,,!,',*,-,0,3,9,B,H Y},T,W,Z,o,r,u,~,,,,,,,,,,,,,(fA$At${ArA$A( (rAfArr Z}FA|r"AfABrOArA$A( BOAr@AnBRARA1A } The ACEC C Compiler [} by John Palevich and Ralph WaldenCCCC%sCan't open: %sCan't open: %sPress a key to exit to DOScan't open %s \}filename (or RETURN to exit)? niT ViT,0,n XiB 'E1T, 5E 9E OE SE AE KE EE CE =E +E -E }1T," ]} QE ME^9E ;EijjxAE&ik~ EEjkU~&9jkU~&!jv$2jk~vp$jk~&Tj ^}vp$jl~&ojvp$j l~&j]k$jl~&j$jlq~$i +Ej ;E+EYE+EIE _}A T RiRiViT&\kRin jRin J&PkRiRin :Ri ,,>, 1ERin H:kRin H&Hk1 `}E> 1E1E2Rin Ri$j KE&jkl~ WE1TU~3T`UE, 1E&k1E"J&kh`WE,1E $wkhWE, h4lFAhr a}"A KEfk6l~ } missing closing bracketextern char int char int #include#defineCan't nest include filesHOpe b}n failure on include file(sU~&gl( |nzls~sz7E( (|H|ls~||z&ln  c}l|zn l|zn  $l|1{ ||z6s|OA:sU~m,n :   h},,< ?E. ?E`z&Ko( sU~^os~$en( 3TUE,&uoEE&|o $psU~&owp$ps~&ow i}p$ps~&oq$ps~os~&obUE*q SE$ps~os~& pbUEwq SE$ps~&$pdq SE j}$ps~6ps~&IpbUEt SE$ps~&dp:rp SE$ps~vpt~&pbUESrp SE$p t~&prp k} SE$pt~pt~&pbUE v SE$pt~&p$pp SESE  tU~p"t~ ^AE4tU~&qEE&q7t~ l}$#qeo$qbAE (|Xi|=E|z|reor/ =E XiItU~uqr( |z|ܛreor/ =E m} Xir( ( |Xi|=E|z||z|||rwqreo$reoNtU~ rTt~rpr n}ܛr Xir/ =E|( `zGr/ (||gr( n/nܛ( (B'EH&re o}t~|'E .BZ&rn&r$r .$rjBrvt~n&rnܛ$rnܛ( ]must be cons p}tant]illegal function or declaration%s(missing open paren)illegal argument name),expected commacharint wrong nu q}mber argsasmNeeded address*[,expected commachar int $(if(if while(while do switch(switch returnbreak;break r} continuefor(for ;;missing semicolon$)missing final endelsewhiledo with no whileNo active whilesNo active whiles s}(||| |Xi|=E|z|||GyzIyzKyzNyU~ tVyU~&t\y~|z| t}&u|$9u|n%u|&/uyy~rryU~Luy~yU~ cuyU~&iu$u|z|rܛr u}eoyU~ uyU~ uyU~&u$unܛru&u$t&urܛnr Xir v}/ =E|( ( |Xi|=E|z||z||z||z|||yzyU~`vpryU~vp w}rrܛryU~vyzrܛreorܛr Xir/ =E|( yU~vy~ (( x}( (&w&w`z&w( yU~&-w$2w|H|Bwyz||z&wn ewJ&vwn  $ y}wwzyU~&w|Sl&w$w|rrrr1{ $w$wyU~w( $v( ((&x&x`z z}&w( yU~& x$xhH| xyzhz&1xhzyU~&mx|Sl&exbx|>$jx$x {}~xJ&x$xhr=En{ =E~/ =E$x$wyU~x( $w( (T RiRiViT&CyRin  |}yRin y| $ y| $+yRin $y| $+y| Ri[Rin Ri$x( ()$(defaultcase 'case' or 'd }}efault' expectedconstant needed:Missing colondefaultcase defaultcase $)(;;)):Missing colon*[,*[,( ~}q~y`}~;z`z& z$;z|zu`n}U~8z$;z$y}z&Uzrr$\zr( q }~}~xz3TUE, }~ }rOA}~ rU~z}~ }~ (TViJ&zrr~&z( n }$z( (T,0,nXiJ&*{rr~&{( n$z( rz Ri&B{Ri ViT,0,Z&\{}~ }Vi RiVir~Rin  Rin  Rin  Rin  Ri ,,< Vin ViRi rz Ri&{Ri XiT, }.Z&{~~Xi RiXir~Rin  Rin  Rin  Rin  Ri ,,< Xin XiRi q~3TUE, } Ab| 3TUE,~~ ^9E 0R9N: 'EB, .H&|-~~ 1E1Ef|'EDD 'EFF`1E*,$| } |&|'E . 'E 'EB|D~~$}'E . 3TUE, 3T, UE 3TUE,>}EE&3} C}~$}~ &}GEX }} EE KE 3Ei}GE 3E3T3E~f}3EAKE&} KE$} GE$} $C} ),);illegal symbol name%s already defined }see abovemissing bracketnot definedGLOBAL symbol table overflowlocal symbol table overflowtoo many active whilesno act }ive whiles~i~C}~$U~r~ ~~C}~ *N*p*****+f+++?3TOA 1E1EUE~$~^1E$~ }RA$~CrOA@ hdA UE WE3TUE,~|&^UE$~~3TUE,Ti&Ti 8h`WE,Ti ~~$Ti"h` }WE,~ 3TUE,"3TUE,nJ~3TUE,\h`WE,~ h`WE,~ $Mh`WE,~ $Ti'h`WE,~ 3T }UE,'3TUE,X~3TUE,\h`WE,~ h`WE,~ $h`WE,~ $Ti~&~ 1E&HWEhWE,1E }aA, WE$ 1E3TUE,~1EL:&$q^1E$Nh`WE,~ $k~$h`WE,~ $ hWE, UE 3ThaAn WE h }H|ȀyzC`5E*,-EnQ-EQ-E,haAn, -E~C`5E*,-EnQQ-E,3TUE,aA 1E-E1En, -E }-Eh> }k~ %s^ %smissing quotemissing apostrophemacro table full(|ʁ&|r( (|ʁ&|r~&Ɓ| }ʁ&Á|r$( (|r~&crr0$)~& krr0$)~&&srr0$) ~&@{ }rr0$)~&Zrr0$)~&trr0$)~&rr0$)~&rr0$)~ }&‚rr0$)~&܂rr0$)"~&"zn&`|ʁ&|rrJ( $)(  }( (?zn&M`rr`|&i|rcH}kH&r|͔&Wr"J( (( }(1$~H&҃( &r9ED 9E9ED 9Evܛ }( (((q~&~H&d( &tr9ED 9E`T3)U~&҄ }&r`T3$( (((q~,~H&( &% }r9ED 9E`T3/U~&&lr`T3$E( (( }jq~3TUE,|JJޅ2~Jޅ5~J&( &r&f8~HJ&&; }~HJ&\>U~&R`j&Kr$Y( $c( $( ((q~3TUE,^JJ }@~J&( &r&C~H& F~&`&r$( $( $( } ((އq~3TUE,&JJRH~J&]( &mr&ڇK~HJ&N~ }HJ&ЇQU~&Ƈ`އ&r$͇( $ׇ( $m( ((q~S~HJ&V }~HJ&(( &8r&Y~&g`&`r$\~&`&r }$( $8( (({q~_~HJ&a~HJ&c~HJ&f~HJ& }( i~J/l~J&:( &Jr&o~&`{&rr*,J }*,J&$J$r~&`{&ljr*,J*,J&+$J $3TUE, }<HJ&"u~HJ&vUED UE`{&Cr*,Je*,J&o$J$3TUE, }>HJ&x~HJ&UED UE`{&r*,J*,J&#$J$( $J }( ,+=-=*=/=%=<<=>>=&=^=|==?||||&&&&|||=|||=|^=^=^&=&&&=&==!===!=<><=>=>><<<=>=<<> }>(|r.q~X~[~^~b~&( &΋rr&*fU~&`|.&|r }$'i~& `|.&|r$'( $΋( (|rq~3TUE,+[3TUE,-J&e( l~wo }~&( &rr&}rU~&`|&|rr|͔&ČW|r͔&݌uWucr|$zt }~&s`|& |rr|͔&W|r͔&7uWuknPH&f`T3r| }$z( $( (|r~q~3TUE,*3TUE,/3TUE,%J&ō( v~y~|~&덂( } &rr&zU~&$`|&|rs$w~&J`|~&C|r{$w~&p`|~&i|r }$w( $( (U~&Վr~zn&`rr˜nĎ˜rJ( $T~&)r~ }zn&`rrלnלrJ( $T~&Rr~&Drr( $T~&{r~ }&mrr( $T~&r~&rr`T3( $T~&r~&Ώrr|n& }nn $nn( $T~&zr~+~|nnn n&V( Tr }tnn ( $T|r~&鐂zn&`rr˜nĐ˜rJלn }ߐל( $T~&Mzn& `rrלn(לrJ˜nC˜( $T( ( } >><<<<=>>=>><<+=-=+-*=/=%=*/%++---$-!*&illegal address++--(|r|nq~3TUE, }[H3TUE,(H&ޒ&ޒڙU~& ܙ~$5n "rr$5n 5~`zn T }Wcnnnn $ے~&Ԓy$’n rry$’ry|n }$ے( $ꑂ풂( n  Trt( ( (nU~&[|rʁ~&M|rʁ }$5z( |H|&||z&rnnn n nnn n ߓ }nn ( $( ||z&mn mnnn Dn =nn ( } Trtnnn ( ||1{ nn( |&”nn( $ }ɔ~( nݔ n&  n&n&n$In&Innnn }nn nen$qn n&n&nM$n& zzr } rn&וT7E3$jr&T7E3$j1TU~&f+E 7E3TUE,"23TUE,$2YE`+E,~ $+E } .R&H~^UEYE`+E, T7E $j  (|4U~&t6~&3TUE,~|( 3TU }E,0^UE3TUE,TiTixHޖTiXH&얀^UE$3TUE,Ti&yTi~|&"|r0Ti0.,$sTih@Ti@ }P&>TiGL&OTi7.Ti$wTi`P&cTigL&tTiW.Ti$w$y|r0Ti,$sTi*H&3TUEn,~|&ė^UEr }n7E0$$sTi/H&3TUEn,~|&^UErn7E2$$sTi+H&3TUEn,~|&6^UErn }p7E$$sTi-H&R3TUEn,~|&p^UErn7E.$$s$y^UE$&|@n 7E(  7E8U~ } ~Ti'J&ƘTi&ݘ7E>, 7E$n7E 3TUE.,TiTi\Ti ~TiTin Tif'} } Tit3 Tib?~ TiuK TidW Tilc Tiro Tim{ Tig Tie Ti~|&֙Ti }0.Ti3TUE,~|&֙Ti 03T`UE,0.,Ti$Ti [can't subscriptcan't subscript]((,)invalid expression()st }ring space exhausted-+'IE%Ar3 n fn H&wIE%A$IE%Art IE%An } : ,,>,=E.3 n ؚn H&IE%A$IE%Ant IE%A$! }IE%Aɞ <IE%A$G IE%A  IE%A  IE%A  IE%A=En =E IE%A IE%Art }n\=E. =E IE%A IE%An\=E. =Eɞ IE%Ar  IE%Ar IE%Ar } .IE%Ar3r =E. 1E1E&SIE%A1E3 IE%A ߞ ߞ ߞ ߞ ߞ  } ߞ ߞ ߞ ߞ  IE%A !IE%A "IE%A #IE%A $ߞ %ߞ &ߞ 'ߞ (ߞ ) }ߞ *ߞ +ߞ ,ߞ -ߞ IE%AIE%A<IE%A IE%AIE%A r IE% }AIE%A<IE%A r IE%AIE%A<IE%A IE%AIE%A<IE%A } IE%AIE%A<IE%A IE%AIE%A<IE%A (|rIE%AIE%A }<IE%A&vIE%A$IE%A( T.2n' =E. =E =En =E IE%A=E. =E *+ƅɈ }ƅȠƅȱƅˠ ``_0:A [ a{``_0:A[a{LJ*Ȫ` } ,/`ȱ*눩L* ȱ `ƅɈƅȱʱѠ `ʠ`ƅˈƅʱeȥ }iL*`΄̱ȱɠʱ"Ѡ L$+̥ΰ L+ʱ Q*蘠Ș ȱ`_0:A }[a{`ٱƅɈƅȠƅȱƅˠʑȱʑ Q*` *``g?Ș ȱ`_0:A U/* ACEC IO ROUTINES *//* To reduce the CCC file size, no arguements are defined in the assembly *//* language functio}ns. The arguements that should be passed if any, *//* will be in the comment after the function name. *//* *//* Be sure t}o read the file FLOAT.TXT for a description of floating point *//* functions. *//* */abs() /* (i) RETURNS absolute value o}f integer (removes the sign if any) *//* same as Basic only with an integer value */ asm 0x2C03;alpha() /* (c) RETURNS 1 }if c is aplabetic, 0 if not ('_' is alphabetic) */ asm 0x2C06;atof() /* (fp,asc) converts aschii to floating point. */ a}sm 0x2C09;bgets() /* (addr,len,iocb) get len# of bytes from iocb and put into addr./* RETURNS: actual length transferred */} asm 0x2C0C;bputs() /* (addr,len,iocb) put len# of bytes into iocb. *//* returns 1 if okay, else negative error number */} asm 0x2C0F;cgetc() /* (iocb) returns char from iocb, else negative of error number */ asm 0x2C12;cgets() /* (addr,iocb}) gets a record from iocb (everything up to the *//* next RETURN. Returns the length *//* Like BASIC: INPUT #iocb,str$ */} asm 0x2C15;ciov() /* (iocb,command,addr,len,ax1,ax2) RETURNS: Y register (Y=1 if okay) *//* Like Basic XIO command *//* }Used to call Operating System CIO. Use -1 to ignore any operand */ asm 0x2C18;clear() /* (addr,len) put zero into locatio}ns from addr through addr+len.*/ asm 0x2C1B;clog() /* (a,b) b=clog(a) Floating Point only! (same as Basic) */ asm 0x2C1E};close() /* (iocb) close iocb (same as BASIC: CLOSE #iocb)*/ asm 0x2C21;color() /* (col) set color for plotting (same as }Basic) */ asm 0x2C24;copen() /* (name,mode) open filename in mode specified *//* r-read, w-write, u-update, a-append, d-d}irectory *//* example: copen(filename,'r'); */ asm 0x2C27;cputc() /* (c,iocb) put byte c to iocb. RETURNS: - if error */}/* same as BASIC: PUT #iocb,c */ asm 0x2C2A;cputs() /* (addr,iocb) send string at addr to iocb. RETURNS: - if error */ a}sm 0x2C2D;dpeek() /* (addr) RETURNS word at addr */ asm 0x2C30;dpoke() /* (addr,word) poke word into addr. RETURNS: previ}ous value (word) */ asm 0x2C33;drawto() /* (x,y) draw to x,y using color specified in color(c) */ asm 0x2C36;exit() /* }return to DOS */ asm 0x2C39;exp() /* (a,b,c) c=a^b (floating point only!) */ asm 0x2C3C;fadd() /* (a,b,c) c=a+b (floati}ng point only!) */ asm 0x2C3F;fast() /* turn off screen, turn on critic - results in faster computations *//* [see slow()}] */ asm 0x2C42;fdiv() /* (a,b,c) c=a/b floating division */ asm 0x2C45;find() /* (addr,len,c) look for character c sta}rting at addr though addr+len *//* returns position, or -1 if not found */ asm 0x2C48;fmul() /* (a,b,c) c=a*b floating mu}ltiplication */ asm 0x2C4B;fsub() /* (a,b,c) c=a-b floating subtraction */ asm 0x2C4E;ftoi() /* (f.p.) return integer v}alue of floating point (will round off decimal part) */ asm 0x2C51;getchar() /* returns aschii key and echos it to the scr}een */ asm 0x2C54;getkey() /* returns asckii key but does not affect the screen *//* Same as BASIC: OPEN #1,0,4,"K:":GET }#1,var */ asm 0x2C57;gets() /* (addr) returns a string from the editor *//* Same as BASIC: INPUT STR$ */ asm 0x2C5A;gr}aphics() /* (num) closes, then opens iocb #6 in graphics mode specified (same as Basic) */ asm 0x2C5D;gtime() /* returns t}he integer value of the internal clock in 60ths of a second *//* to clear the clock, use the C function: dpoke(19,0); */ a}sm 0x2C60;itof() /* (i,fp) converts integer i to floating point (fp) */ asm 0x2C63;locate() /* (x,y) returns the color at} screen location x,y *//* (same as Basic) */ asm 0x2C66;log() /* (a,b) b=log(a) floating point only! (same as Basic) */ } asm 0x2C69;match() /* (s1,s2) return false if strings are different, 1 if the same *//* It will return a 1 if s2 is equal }to s1 even if s1 is longer. *//* Example: match("testpattern","test"); will return true (1) */ asm 0x2C6C;move() /* (from},to,len) move len# of bytes at address one, to address two. *//* No check is made to see if from string is overwriting to st}ring */ asm 0x2C6F;normalize() /* (filename,ext) will convert filename to uppercase, *//* append the extension if there i}sn't one already, *//* and add D1: to the front if a drive isn't specified *//* Example: normalize(fname,"C") where fname="}test" will change fname to: *//* "D1:TEST.C" *//* One can change the default drive with the statement: *//* poke(dpeek(0x2}CB4),'n'); where n is the drive number *//* To make it permanent, you must now save it to ENGINE.OBJ *//* The load paramete}rs can be found by using COMPACT.COM. (see COMPACT.TXT) */ asm 0x2C72;open() /* (iocb,ax1,ax2,fname) same as Basic open *}/ asm 0x2C75;peek() /* (addr) returns byte at addr (same as Basic) */ asm 0x2C78;plot() /* (x,y) plot point at x,y. Po}int color set by color(c) */ asm 0x2C7B;poke() /* (addr,c) poke c into addr, returns previous value */ asm 0x2C7E;posit}ion() /* (x,y) position cursor at x,y (same as Basic) */ asm 0x2C81;printf() /* see file PRINTF.TXT for explanation */ a}sm 0x2C84;putchar() /* (c) send c to the screen */ asm 0x2C87;rnd() /* (n) return random integer between 0 and n inclusiv}e. *//* if you want 0-255, use rnd(0) which is faster */ asm 0x2C8A;sfind() /* (s1,s2) search for string s2 in s1 and ret}urn position if found, *//* else return -1 */ asm 0x2C8D;slow() /* turn on screen again after fast() */ asm 0x2C90;sou}nd() /* (voice,pitch,distortion,volume) same as Basic */ asm 0x2C93;stick() /* (n) returns value of joystick #n */ asm 0}x2C96;strcat() /* (s1,s2) append string 2 to end of string 1 */ asm 0x2C99;strcmp() /* (s1,s2) subtracts string 2 from st}ring 1. *//* It will return the first non-zero difference. *//* Example: strcmp("Ab","ab") returns -32 *//* Example: strcm}p("ab","Ab") returns 32 *//* Example: strcmp("ab","ab") returns 0 */ asm 0x2C9C;strcpy() /* (to,from) copy string 2 to st}ring 1 */ asm 0x2C9F;strig() /* (n) return trigger button value of joystick #n */ asm 0x2CA2;strlen() /* (str) returns }length of string */ asm 0x2CA5;tolower() /* (c) return lowercase value of c */ asm 0x2CA8;toupper() /* (c) returns uppe}rcase value of c */ asm 0x2CAB;usr() /* (addr,args) does a JSR to addr, returns integer (A=low byte, X=high byte *//* 0xB}F=number of arguements, 0xC6=stack pointer to arguements */ asm 0x2CAE;val() /* (addr) returns integer value of string at }addr (same as Basic) */ asm 0x2CB1;closeall() $( /* close all iocb's */ int i; for(i=1;i<8;++i) close(i);$)getre}ad(s,ext) /* get the file name from the user, *//* normalize it with the extension, and open it for reading *//* Returns th}e iocb number */char s[],ext[];$( int iocb; getname(s); iocb=0; while(iocb<1) $( normalize(s,ext); iocb=cop}en(s,'r'); if(iocb<1) $( printf("can't open %s\n",s); getname(s); $) $) return iocb;$)getname(s) /*} request the filename from the user */char s[];$( printf("filename (or RETURN to exit)? "); gets(s); if(!s[0]) $( } putchar(''); putchar(''); exit(); $)$) printf("filename (or RETURN to exit)? "); gets(s); if(!s[0]) $( 5asm.txt------- Assembly language runs about 10times faster than ACE C and takes upabout a third of the space. ACE C }provides the ability to define afunction as an assembly languageroutine via the asm statement. Todefine the function use }: func() $( asm address-of-function; Note that asm acts like aclosing brace, signaling the end ofthe function. Y }ou need not includeany arguments in func(). Anyarguments between the parenthesiswill be placed on a stack in theorder th }at they occur. When yourroutine gets control, the pointer tothe stack will be at $C6, and thenumber of arguments passed w }ill bein $BF. To get the low byte of anarguement use: LDY #argumentnumber*2 LDA ($C6),YTo get the high byte, use LD}Y#arguementnumber*2+1. If you want to return aninteger, load A with the low byte,and X with the high byte. To return}a character, load A with thecharacter, and X with a zero. Endyour code with an RTS. The page zero locations whichar}e free are $80 through $B5, and$C8 through $CF. ACE C uses theOperating System's floating pointregisters, so though you m}ay usethem, don't leave a value in themexpecting it to be there the nexttime your routine is called. Twoadditional locat}ions that may be ofvalue to you are $B7 - color fromcolor(c), and $B6 the graphics in559 before fast() was used. ENGI}NE.OBJ starts at $2C00, soyou may use memory from LOMEM (value in $2E7) up to that. Also$400-$57F, and $600-$6FF is free.} ($400-47F is the cassette buffer). LINK will tell you where the stackstarts, so you could figure out asafe place well ab}ove that. Assemble your program with theextension ".OBJ". Be sure toinclude it in the ".LNK" file withthe extension }".OBJ". The order itappears is not relevant. Note thatboth ENGINE.OBJ and ENGLOAD.OBJ usethe load/run address at $2E0.}OBJ". The order itappears is not relevant. Note thatboth ENGINE.OBJ and ENGLOAD.OBJ usethe load/run address at $2E0. There are several differencesbetween BLUE C and ACE C. The ACE Ccompiler runs 10 to 15 times faster,especially when} using #define's. The Linker runs 4 to 5 times fasterand the execution time of programsis about twice as fast. To maximiz}espeed ACE C eliminates the followingchecks:1) Eliminates check for differentversions. If you link an ACE C".CCC" file }with DEEP BLUE C'sDBC.OBJ your computer will crash.2) Eliminates check for the stackoverwritting into the screen.3) Elimi}nates check for division byzero.Here are the more noticeabledifferences between the twocompilers:1) ACE C does not allo}w imbeddedcomments or comments to continue tothe next line.2) ACE C does not allow the tabcharacter to be used as a space}.3) ACE C does accept programs withline numbers.4) ACE C does do constant evaluationat compile time.5) ACE C asm is VERY} different thenBLUE C. Don't use an assemblyprogram for BLUE C with ACE C. (SeeASM.TXT)6) The fprintf function from BLU }E Cwill work as a printf function inACE C. (printf checks to see if aniocb was included). The printffunction is part of!} ENGINE.OBJ.7) Most BLUE C functions have beenrewritten in assembly language andare part of ENGINE.OBJ. They runfaster, "}and take up less space.8) BLUE C loads at $3000; ACE Cloads at $2C00.9) The psuedo code has been extendedby 27 instructio#}ns. These newinstructions are used when FASTC.COMhas been used on a ".CCC" file. There is no check for a bad codecaused $}by a messed up file.10) The usr(addr,arg1,arg2,...) actsjust like the asm function. (SeeASM.TXT)for a bad codecaused g/* This program formats C files *//* See CFORMAT.TXT for a detailed explanation of what if does *//* */#define PAD 2 /* nu&}mber of spaces to indent after a "$(" */#define SPACE 32#define TAB 127#define EOL 155int iocb,count,i,length,csflag,dfla'}g,iocb2;char s[20],c,lastchar,nextchar,*bufptr,*endptr,bak[20];main() $( int backup; char *maxsize,*address; /* address(} MUST be the last variable defined!!! */ address=&address+100; /* This is the address for the text */ maxsize=0xBC00-addr)}ess; /* Maximum text length */ printf("\f\t The ACE C Formatter\n\t by Ralph Walden\n\n"); printf("^M will insert a r*}eturn\n^N will delete through the next return\n\n"); while(1) $( /* loop until user indicates no more files via getname() f+}unction */ dflag=csflag=iocb=count=lastchar=c=backup=0; slow(); getname(s); printf("Do you want a back-up? (Y,}/N)"); if(tolower(getkey())=='y') backup=1; putchar('\n'); fast(); closeall(); strcpy(bak,s); normali-}ze(s,"C"); if(backup) $( if(i=find(bak,strlen(bak),'.')) *(bak+i)=0; /* erase the period */ normalize(bak,"BA.}K"); printf("\u%s <<< %s\n\n",s,bak); $) else printf("\u%s (no back-up)\n\n",s); if((iocb=copen(s,'r'))</}1) $( printf("Can't open %s\n",s); continue; $) length=bgets(address,maxsize,iocb); /* read in all of the0} text *//* address points to the stack, to which was added a safety margin of 100 *//* This gives us an area for the buffer1}. address MUST be the last variable defined! */ close(iocb); if(length>=maxsize) $( printf("Text exceeds %dK\n2}You wouldn't be able to link\nit either!\n",length/1024); continue; $) if(backup) $( if((iocb2=copen(bak,3}'w'))>0) $( bputs(address,length,iocb2); /* write all of the text to a backup */ close(iocb2); $) 4} else $( printf("I can't open %s\nShall I continue without a back-up?\n(Y/N)",bak); if(toupper(getkey())!='Y'5}) continue; $) $) endptr=address+length; /* get the length of the text */ *(endptr+1)=EOL; /* to avoid some6} checks for end of buffer */ if((iocb=copen(s,'w'))<0) $( printf("Can't open %s\n",s); continue; $) b7}ufptr=address; while((i=find(address,length,TAB))>=0) *(bufptr+i)=SPACE; /* convert tabs to spaces */ while(*bufptr==8}SPACE) ++bufptr; /* remove any starting spaces */ for(;bufptr'd') && (c != EOL)) out(*bufptr++); if(c==13) c=EOL; /* convert control M to a RETURN */ switch(c) $( :} case SPACE: /* remove all but one space */ out(SPACE); while(*bufptr==SPACE) ++bufptr; --bufpt;}r; /* in order to read next character */ break; case 'b': /* handles "break" statements */ if(mat<}ch(bufptr,"break;")) $( if(dflag) $( /* break after a default */ count-=PAD; csflag=d=}flag=0; $) else if(csflag) $( /* break after a case */ count-=PAD; csflag>}=0; $) $) out(c); break; case 'c': /* handles "case" statement */ ?} if(match(bufptr,"case ")) $( csflag=1; /* indicate we are dealing with a case */ count+=PAD; /* incr@}ease the indentation */ $) out(c); break; case 'd': /* handles "default" statement */ A} if(match(bufptr,"default")) $( ++dflag; /* indicate that we have a default */ count+=PAD; B} $) out(c); break; case '0': /* convert all hex to upper case */ out(c); C} if(tolower(*(bufptr+1))=='x') $( out(*(bufptr+1)); bufptr+=2; while(hex(*bufptr)) out(D}toupper(*bufptr++)); --bufptr; /* so we will read it at top of loop */ $) break; caseE} '$': /* this handles $( and $) */ nextchar= *(bufptr+1); lastchar= *(bufptr-1); if(nextchar=='F}(') $( if((lastchar != SPACE) && (lastchar != EOL) && (*(bufptr-2) != EOL)) out(SPACE); /* add a space */ G} count+=PAD; $) out(c); if(nextchar==')') count-=PAD; break; case '&': /*H} separate || and && with spaces */ case '|': lastchar= *(bufptr-1); if(lastchar==c) $( I} out(c); if(*(bufptr+1)!=SPACE) out(SPACE); $) else if((*(bufptr+1)==c) && (lastchar!=SPACE)J}) $( out(SPACE); out(c); $) else out(c); break; case '/': /* thK}is handles comments */ if(*(bufptr+1)=='*') $( out(*bufptr++); /* '/' */ out(*bufptr++); /*L} '*' */ while(1) $( /* find the end of the comment */ while((*bufptr != EOL) && (*bufptr != '*')) $M}( out(*bufptr++); $) out(*bufptr); if(*bufptr == EOL) $( /* if the N}comment continues to the next line, we must add a '/*' */ i=1; while(*(bufptr+i)==SPACE) ++i;O} if(*(bufptr+i) != '/') $( out('/'); /* start the new line with a comment it it isn't alreaP}dy there */ out('*'); out(SPACE); $) $) else Q}if(*(bufptr+1)=='/') break; /* end of comment */ ++bufptr; /* not the end of the comment, so we continue the loR}op */ $) $) else out(c); break; case EOL: /* this handles all returns */ S} out(c); if((bufptr+2)='0' && c<='9') || ^}(tolower(c)>='a' && tolower(c)<='f')) return 1; else return 0;$)haracter or not */char c;$( if((c>='0' && c<='9') || D CFORMAT.COM is a means forformatting your C programs. Run itusing the "L" option from DOS. CFORMAT.COM will normali!`}ze thefilename you give it with ".C". Thebackup option creates a file withthe extension ".BAK" and then copysyour origin!a}al file to"filename.BAK". This enables you toretrieve the original fromfilename.BAK. CFORMAT examines allof your progra!b}m that is notsurronded by quotes or comments andmakes the following changes:1) Replace all tabs with spaces (thecompiler !c}won't accept tabs).2) The lines following a $( will beindented 2 spaces until the closing$).3) The instruction "asm" will!d} beindented 2 spaces.4) Lines after a "case" or a"default" will be indented 2 spacesuntil a "break;" is encountered. Not!e}e: you can end a "case" or"default" with a "return" or"continue", which CFORMAT will notinterpret to be the end of thecas!f}e/default statement. You can getaround this by ALWAYS ending a"case" or "default" with a "break;",even if there was alrea!g}dy a"continue;" or "return;".5) All spaces at the beginning ofthe line are removed except for theindenting described in 2!q}1B%DOS SYSB*)DUP SYSBS00READMETXTByUACEC COMB:ACECIO C BASM TXTB BLUE TXTB:%CFORMAT C B_CFORMAT TXTB xCOMPACT C B(ENGINE OBJBENGLOAD OBJB!FASTC COMBFASTC TXTB FILECMP C B FLOAT TXTB"GRAPHICSC BINTRO TXTB# LINK COMB.PMDEMO C B@PRIME C BFPRINTF TXTBKTREADTHISTXT, 3, and 4. Multiple spaces within a line willbe replaced by a single space.6) || and && will have a singlespace around t!r}hem.7) If a /* is found, a check is madeto see if there is a */ before theend of the line. If not, it willput a /* at th!s}e beginning of thenext line if there isn't onealready. This continues until thenext */ is found. If none is found,the e!t}ntire program will be turnedinto a large comment. (A goodreason for using the providedback-up option.) The following!u} control codes maybe inserted in you source code forspecial effects:1) If a control N is used,everything through the next!v} returnis deleted. (This is a way tocombine two lines)2) If a control M is used, it isreplaced with a return character,!w}thereby creating a new line. The source for CFORMAT is inthe CFORMAT.C file so that you cancustomize the program., {/* File compacter. This will compact files with multiple load segments. *//* It is useful for .COM files produced by C, and%y} assembly language object files. *//* Binary file must not exceed 6K! (about 49 sectors) */char *buf,*begin,*end,*place,*en%z}dbuf,name[20];main() $(int iocb,tmp; iocb=getread(name,"COM"); buf=0x5000; endbuf=bgets(buf,0x6000,iocb)+buf; if(ge%{}tint(buf) != 0xFFFF) $( printf("Not a binary file!\n"); getkey(); exit(); $) buf+=2; /* get past the header *%|}/ place=buf; while(1) $( if((begin=getint(place))<0) break; /* end of file? */ end=getint(place+2); /* end of fir%}}st module */ printf("\n%x - %x",begin,end); tmp=(end-begin)+5+place; if(tmp>=endbuf) break; /* end of file */ %~} if(getint(tmp)==(end+1)) $( /* compact it */ printf(" Compacted"); *(place+2)=*(tmp+2); *(place+3)=*(tmp%}+3); move(tmp+4,tmp,endbuf-tmp); endbuf-=4; $) else place=tmp; $) close(iocb); copen(name,'w'); b%}uf-=2; /* this is to get the header we discarde at the beginning */ iocb=bputs(buf,endbuf-buf,iocb); close(iocb); putch%}ar(155); slow();$)getint(where)char *where;$( if(where>endbuf) return -1; /* end of the file */ return *where+(*(wh%}ere+1)<<8);$)();$)getint(where)char *where;$( if(where>endbuf) return -1; /* end of the file */ return *where+(*(wh$,(?L:6L,2L5LU4Lt5Li5L-L3L+-L6L!5L2L1L3L-L1LW.La.L1L6L4L4LO5L4L.L4L4L45L,L,L3L]1L5L4L1L4L5L-L2L)}3L/.L1L=.L1L/L-L3LD2L_5L5L3L.L.L-L3L{2L2L2L2L{.2lȱňı88必ƥDZ…ȱ…ťi ,ԆL!)}8 , 46`* 76`L, `ƅˈƅʈƅɈƅ` -ƝB EƝD IƝH ƝJ )}K VIi`` -L,BHI V0ڢ`ȱ G-FȌ- tLw- -ձʑ `ƙȥ)}̱ȑ`ƙȄͦʥ``ƅɈƅȢ`ƅȱƅ̠ƅȱȪ̑Ȋ` /.HȱȪh` -ȅȱ)}ͥˑȥʈȦͥ`ƅƅ إԅ) ٥0Ԧ`IIi` -L- - 80`` -V/F\/)}G]/\/]/ƅȱƅL*/҅Ɉƅȭ]/\/\/]/V/Ȅʩ΅ϩ %$ U/L0/`( 46 z)}-ԆբL!8ȱ% 2-Lp/.Lp/AL/ȱ: 0蝀懲詛 ٥ ԅΤLp/ԅϤLp/)}DL0ȱIՈIiL0Ոƅ إ'0ȄΥΐ U/ R0L0 R0Υ U/LD0 - U/)}Π0. U/Le0)LU/溤`XL0ȄƅՈƅԥH)JJJJi0:i U/h)i0:i U/ )}L0L0/C ʱ U/L0SL4ʱƅȱƅť K1L0ΰ U/ K1LH1 K1ΰ U/L0 U/)}``BP B VBD1EƝK)IJLt-S:ƅ`ƅVȱƅTƅU` 1 0`Lz- 1`BLt- 1 )} - BIƅɝEƝDȠˆ 2󩛑Lt- - BLt-ƍ+2ƍ*2ƿƿiƐLt0`8Hƪh` -̄ͱʅα)}ͥ``ȱܱƅɈƅȢ`{a `A[i L2 -Π 2Ȉȱ :* )}D1:șȈ..Ȅ̤αʤ̑`@i`ƝDȱƝEBȱƆ 2)}ARWUD`   J V0JJJJ`Lz-ƨx`ƨТ`ȭ Ȑ Ң`ƝEƝDB)}I V0 ($`Lz- -L3 -B0ƝKƝDȱƝELv3FL0ʱƪȱƨ ؠ0.)ȩ.ȩ0ȩ)}L0ȱ)LA4ƅƅ ؠƅȱƅL4ƙșʙ`̈` u4 L4 u4 (L4 u4 fL4 u4 `L4 -)}ș ޠʈ`ƅȱƅȱƅȱƅ L4ƪȱƨ ޠƪȱƨ ݠƅȱƅL4 -ș L4ƅɈƅȠ)} ٦ԥ`//B`/B` 5 BLt- 5B VHI`` -ƝIƝHƝEƝD` - )}``_A [ a{``ҩ҈) ƝҠ) Ƞ)` - ȈȈ`LL)}i56i66i1i1i1i1$i86%i96/©6í@@L7@"66l iàL)}7…ȱ…ťiÈԑL7…ȱ…ťiåՑĈԑL7ȱňĥԑĥ8êc;%7d;&7Lt…ȱ…ťi)}ÈąԄL7…ȱ…ťiñąՈąL7eȱeL6ȱňĥԑĥȑĈL7ԅԄL7ԪȱԈՆL7i‘)}ȱ‘L6…ȱ…L6iԑȑL7ԱԊȦձՊL7iȱª¨„ iiȑÈL7ȱ)}Í;88L7±ŠȦñÊL7ªȱ…ƈL7 L\8L6 ȥLB=L,=q…q…L6&L7)}eԅȱeՅՈL78ԅȱՅՈL7ԅՅȱ :ԥL7 9L8 9ԥL7ȱդL:ԅȱՅՈL7E)}ȱEՅՈL7%ԅȱ%ՅՈL7ȱJfՈL7ȱL7ȱ*ՈL7ԱL78ԅԩՅL7)}EԅԩEՅL7L7L78Ԫȱ`ȱL7ȱԄL7 90 90 90ʊ 90)}ȱՐɱԐȱՐзԐЭȱՐЎԐL9ȱՐ԰L9&&& L: )}`ɀE ɀf8ਊ s:$ 8$P 8`E0 IIL; 8)}Ff eeFfff$ 8`,'7E7e7666v777777j877!8E8\8u88888888)}9%969G9o99999999:::%:7:K:`:~8;+0>L>h>>>><<<<>??…ȱ…ťiÈią ȱ)}iąՈL7ȱĈL7…ȱ…ťiñąՈąiȱiĈL7…ȱ…ťi8ą԰ ȱąՈL7ȱąՈL7…)}ȱ…ťiñąՈą8ĐL7ȱĈL7tmL(=P]L(=…ȱ…8ԈĪCL(=…ȱ…8ԈĪ)}0)L<=8ªԥiàL7Ԅՠªȱ…Æ L78ª0ƊL<=˥ԈL<=ФԈL)}(=q…ԥq…L6…ȱ…ťiåqąԥqąՈL7eȱeťiåiđđL7eȱeťi)}L <eȱeťiL?<eȱeťiLn<eȱeťiL<eȱeťiő)}L6eȱeňeԅȱeՅL6eȱeťiñ‘ąՈ‘ąL6eȱeűąՈąL6eȱeňąԄ)}L6 ԄL7L7L?:6ȱeťiñ‘ąՈ‘ąL6eȱeűąՈąL6eȱeňąԄ(*S??Lo?Can't find D1:ENGINE.OBJ @ VaD?EBJ VVD?E BI Vl IHEDB V0ʭD-}?E?8HI V B VL,o? VVD?E BI Vl IHEDB V0ʭD,G$GH$H$G\?G$GH$H$G\@G$GH$H$H\AH$HH$H1}$)H\B)H\C)H\D)H\E)H$6HH$H$>H\F>H$KHH$H$XH\GXH\HXH$eHH$H$mH\mH$zHH$H$H\H$HH$H1}$H$H $H$H$H$@ gJNJmMgJ~ gJ .,.,&HgJ~gJ~ xxx$H H1}aIH gJ~n,I nrr)M>BMnH^gJ^PJ gJ~ gJgJ ^PJ (&INM1}SJNMSJ:JMSJrM NJfI>JSJM$yI$I( $yI( %s -- ***ERROR***%s is greater than %dK bytes%d new 1}instructions%d new instructionNo new instructionsCCCCan't open: %s.H Fh LhKFF F(gJn J1}I$JgJn JI|gJngJn JgJn JgJnH&-KgJn"JgJn#J;L( $J: M( 1}gJn#-KgJn""K=L( $-K< M( NKgJn NKgJn H&K)M)M,BMHgJn1} gJ^PJlJ( KgJn KgJn H&KHH@aIH( 3LgJnkJkJL1}LkJ HLkJH&3LH>aIH( HLgJn H&LgJnkJkJffLkJJ{LkJhzLkJ1}L&LH9aIH( LHAaILHFaIH( 1}HaIH HaIH gJ~gJ~n>, gJ~ gJ~n< ,, , ,1},,,,,,!,$,',*,-,0,3,6,9,<,?,B,E,H,K,N,Q,T,W,Z,],`,c,f,i,l,o,r,u,x,{,~,,,,,1},,,,,,,,,,,,,(f5N$+Nt$NrM$%N( (rNfNrrM|rM1}fNNrMrN$HN( NMrMnNMMM can't open %sfilename (or RETURN to exit)?1} g?NNrMrN$HN( NMrMnNMMM can't open %sfilename (or RETURN to exit)?0 FASTC.COM will optimize ".CCC"files, lowering execution time20-30%. A ".CCC" file is composedof "psuedo" instructio5}ns to beexecuted by ENGINE.OBJ. FASTC looksfor certain sequences ofinstructions, and replaces them witha faster single i5}nstruction. RunFASTC by using the "L" option fromDOS. When it requests a filename,specify a file already compiled byACE5} C. FASTC will automatically addthe extension ".CCC". The screenwill be turned off while FASTCchanges the file. When it5} is done,the number of new instructions willbe displayed.creenwill be turned off while FASTCchanges the file. When it4>/* File compare *//* This program will compare two files and tell you if they are the same */int n1,n2,count,c,c2,a1,a2,a3;9}char name1[20],name2[20];main() $( printf("Filename #1? "); gets(name1); printf("Filename #2? "); gets(name2); no9}rmalize(name1," "); normalize(name2," "); if((n1=copen(name1,'r'))<0) $( printf("can't open %s\n",name1); getkey(9}); exit(); $) if((n2=copen(name2,'r'))<0) $( printf("can't open %s\n",name2); getkey(); exit(); $) a19}=a2=a3=count=0; fast(); while((c=cgetc(n1))>=0) $( if(c!=(c2=cgetc(n2))) $( slow(); printf(" Files are di9}fferent at %d\n%s != %s\n%d != %d $%x != $%x",count,name1,name2,c,c2,c,c2); printf(" '%c' != '%c'\n",c,c2); 9}printf("$%x $%x $%x >%x< $%x $%x $%x\n",a1,a2,a3,c,cgetc(n1),cgetc(n1),cgetc(n1)); exit(); $) ++count; a1=a9}2; a2=a3; a3=c; $) if((cgetc(n2)>0)) $( slow(); printf("%s is larger than %s\n",name2,name1); exit();9} $) slow(); printf("%s == %s\n",name1,name2); exit();$) printf("%s is larger than %s\n",name2,name1); exit();8A ACE C has a limited support offloating point by using thefunctions defined in ACECIO.C. Todefine a floating point nu=}mber, use: char name[6];. Floating point willbe the same as Basic only instead ofusing operators like + and -, etc.,you =}must use one of the followingfunctions: (for the examples, a,b,care presumed to have been previouslydefined as: char a[6],=}b[6],c[6];)atof(a,str) - convert the string toa floating point and put it in a. Example: atof(a,"3.14276") - same asBASI=}C A=3.14276clog(a,b) same as Basic B=CLOG(A)exp(a,b,c) same as Basic C=A^Bfadd(a,b,c) same as Basic C=A+Bfdiv(a,b,c) sam=}e as Basic C=A/Bfmul(a,b,c) same as Basic C=A*Bfsub(a,b,c) same as Basic C=A-Bftoi(a) this will return the integervalue o=}f a. This is NOT the same asBasic INT(A). Basic simply removesthe decimal portion, whereas ftoi(a)will round the number =}either up ordown. Example: atof(a,"1.9"); x=ftoi(a); - setsx=2. BASIC: A=1.9: X=INT(A) setsX=1.itof(i,a) converts the=} integer i tofloating point and puts it in a(opposite of ftoi)log(a,b) same as Basic B=LOG(A)NOTE: any var may be used i=}n thefunctions. Example: fadd(a,a,a) isthe same as Basic A=A+A. To dosomething like A=B, usemove(b,a,6);.y be used i<r/* graphics and game i/o *//* */#define RAMTOP 0x6A#define PMCOLOR 0x2C0#define SDMCTL 0x22F#define GRACTL 0xD01D#definA}e CHBASE 0x2F4#define PMBASE 0xD407#define PLSIZE 0xD008#define HPOSPL 0xD000#define PLTOPF 0xD004#define PLTOPL 0xD00CA}#define HITCLR 0xD01E#define OLDCHSET 0xE000#define GRAF 0xD00Dchar *playbase,*charbase,playsize;/* *//* initialize playA}ers *//* */pminit() /* this must be called before any use of the following PM functions */$( int i; charbase=(peek(RAMA}TOP)-12)<<8; poke(PMBASE,peek(RAMTOP)-8); playbase=(peek(RAMTOP)-8)<<8; poke(RAMTOP,peek(RAMTOP)-16); graphics(0); A}pmgraphics(0); move(OLDCHSET,charbase,1024); poke(CHBASE,charbase>>8);$)pmflush() /* call this before returning to DOS A}to turn off PM graphics */$( pmgraphics(0); poke(CHBASE,OLDCHSET>>8); poke(RAMTOP,peek(RAMTOP)+16); graphics(0);$)A}/* Set up PM graphics *//* i=0 > inhibits PM graphics *//* i=1 > single line resolution *//* i=2 > double line resolution A}*/pmgraphics(i)int i;$( int j; if(i) $( poke(SDMCTL,i==1 ? 0x3E : 0x2E); /* enable DMA */ poke(GRACTL,3); A}playsize= (i==1) ? 8 : 7; clear(playbase,2048); playbase += (i==1) ? 1024 : 512; for(j=0;j<4;++j) poke(HPOSPL+j,0A}); $) else $( poke(SDMCTL,0x22); poke(GRACTL,0); for(j=0;j<4;++j) $( poke(HPOSPL+j,0); poke(GRAF+A}j,0); $) $)$)hitclear() /* clears the collision registers */$( poke(HITCLR,0);$)pmcolor(n,hue,intensity) /* workA}s like setcolor(), defines color of player n */char n,hue,intensity;$( poke(PMCOLOR+n,(hue<<4)+intensity);$)/* define pA}layer width *//* width=0 > normal width *//* width=1 > double normal width *//* width=3 > four times normal width */pmwidA}th(n,width)char n,width;$( poke(PLSIZE+n,width);$)/* *//* hitpf() and hitpl() return a 1 if who collided with hitwho, A}otherwise it will return 0. *//* if hitwho is minus, a collision with any hitwho will return a 1 *//* */hitpf(who,hitwho) A}/* player-playfield collisions */int who,hitwho;$( if(hitwho<0) return peek(PLTOPF+who); /* if hitwho is minus, check forA} any collision */ return (1<>>Code ends at $%x <<<Can't re-readmainNo main()acecan't re-open fileunknown file J}type.OBJ.CCCunknown file type(|rr`R&0n; $欂ɜ&&rϴ( $( nJ}nѬn&U ,, ˬܬn ܬ$X$\$3ˬܬnܬn>, Ѭ, ˬܬѬn, ܬ$X$;\J};$ܬnܬn>, Ѭ'R&qѬ'.*,ˬ$Ѭ*,ˬܬn ܬ$X$q\\$Eܬnܬn>,J}'. Ѭܬn ܬܬ,{( (  rϴ@ rr@ϴ @ ìˬ Ŭ ŬEŬpì.EJ }ìɬZˬ Ŭ ì ɬu<ɬu &vv$c :<: ìhJ!} n ӬѬn& $۬\$`ܬ$$\$AܬnJ"}ܬnܬn ܬ$$I\I$wӬܬn,ܬn>,wܬn ܬ$$\$ܬn ܬ$$\$ܬnJ#}n>, Ѭf'űѬ*,w$ٱѬ'.*,wܬn ܬ$$ű\$+ܬnܬn>, Ѭܬn ܬdѬh%`ܬJ$}$$$\3$cˬܬnܬn>,, ˬܬn ܬ$$p\p\p$ܬܬn(n, ܬ$$$ J%}$$$$ѰܬެJ&-ܯ  ѬѬ5$Ҳ^Ѭ$Ѭ,2200) $( dx[n]=-1; continue; $) if(y[n]223) $( dy[n]=-1; continue; $)/* if wN<}e were looking for who we collided with, we would use hitpl(who,hitwho) */ if(hitpl(n,-1)) $( /* did it hit anyone? */N=} dx[n]=rnd(3)-1; while(!(dx[n]=rnd(3)-1)); while(!(dy[n]=rnd(3)-1)); y[n]+=dy[n]; plmoN>}ve(n,x[n],y[n],shape[n]); pmclear(n); chget(rnd(127)+1,shape[n]+2); /* new shape drawn from character base */N?} hitclear(); $) $) $)$) chget(rnd(127)+1,shape[n]+2); /* new shape drawn from character base */L-/* Sieve of Eratosthenes *//* See BYTE , January 1983, for comparision with other computers *//* Takes about 5 minutes to rRA}un, with the screen off */#define TRUE 1#define FALSE 0#define SIZE 8190char flags[SIZE+1];main() $( int i,prime,k,couRB}nt,iter; printf("10 iterations\n"); fast(); dpoke(19,0); for(iter=1;iter <= 10;++iter) $( count=0; for(i=0;i RC}<= SIZE;++i) flags[i]=TRUE; for(i=0;i <= SIZE;++i) $( if(flags[i]) $( prime=i+i+3; for(k=i+prime;kabcd<"); produces >abcd%s<","abcd"); produces >abcd%10s<","abcd"); prVS}oduces > abcd%-10s<","abcd"); produces >abcd >,(op)=,&&,||,?:,(coZh}mma),(op)= (example: var += 3(var=var+3).)5) Statements: asm, break, case,continue, default, do, else, for,if, return, swZi}itch, while.6) #define and #include.7) Constants: decimal, hexadecimal,octal, backslash.Unsupported features of C (theseZj} areNOT in ACE C):1) Structures, unions.2) Multidimensional arrays.3) Full floating pointimplementation (See FLOAT.TXT).Zk}4) Functions returning anything butint.5) Unary operator: sizeof.6) Binary operator: type casting.Differences from stanZl}dard C:1) The last clause of a "switch"statement, either "case" or"default" must be terminated with a"break", "continue",Zm} or "return".2) Characters are unsigned, andrange from 0-255.3) Standard C allows lines tocontinue onto the next line. AZn}CE Cis much more particular. ACE Callows code to begin with linenumbers, therefore, unnumbered linesMUST begin with a noZo}n-number (Spaceor character) or it will be deleted. Strings and comments may NOTcontinue onto the next line.4) C source cZp}ode lines can be amaximum of 199 characters long afterany expansion from #define's.5) Functions may have a maximum of126 Zq}arguments.6) When ACE C encounters a /*, itconsiders that the end of the line. Therefore, comments may not beimbedded witZr}hin a line, and they maynot cross over to a new line.7) ACE C will do constant evaluationat compile time provided there isZs}nothing (Space, parenthesis, etc.)between the numbers and operators: num=5*6; will be num=30; at runtime. num=5*(6); wilZt}l remain thesame. Evaluation is strictly rightto left, and there is no order ofprecedence: num=5*6+1; is num=35. Use a Zu}space or parenthesis tooverride constant evaluation.8) A tab character is not "whitespace", i.e. the compiler will tryto Zv}compile it. (See CFORMAT.TXT forconverting tabs into spaces.)9) ACE C has an assembly languageinterface. Read the file AZw}SM.TXTfor a description of its use. BLUEC users: asm on ACE C is VERYdifferent; be sure to read ASM.TXT!10) Braces in stZx}andard C arereplaced with $( and $). The tildeis replaced with $-.11) Variables may not be definedwithin a statement.BZy}ACKSLASH: Use of the backslashwithin a single or double quote willgenerate the following codes:\b - backspace delete\d - Zz}cursor down\e - escape\f - clear screen\g - bell\l - cursor left\m - control M (can be used as aRETURN on IDS printers)Z{}\n - return\r - cursor right\t - tab\u - cursor upAdditionly, a back space followed bya number will convert the numberZ|} toits actual value. "\65\66" wouldgenerate the string "AB". NOTE: youcannot put a control comma (graphicsheart) withinZ}} a string since this isthe end of the string character; youmust use \0.USING ACE C: Here's a brief summaryof how to get Z~}a C program running. A more extensive descriptionfollows.1) Enter the program using the texteditor of your choice and savZ}e it todisk with the extension ".C", withor without line numbers.2) Load ACEC and compile theprogram.3) Load LINK and liZ}nk the program.4) Load the program (which willautomatically run).1) EDITING: You may use any texteditor that creates ascZ}hii files,with or without line numbers, toenter the source program. Note:CFORMAT.COM will do a lot of theformatting of aZ} C program for you(See CFORMAT.TXT). You must savethe file with the extension ".C".2) COMPILING: The compiler andlinkerZ} require 48k so you mustremove any cartridges before runningthem. You run the compiler fromAtari DOS using the 'L' optionZ}. Thecompiler filename is ACEC.COM. FromOS/A+ DOS, just type ACEC, and pressRETURN. The compiler will ask forthe filenZ}ame, which it willnormalize with the extension ".C". The compiler will then create a filewith the extension ".CCC" for useZ} bythe linker. When you press RETURNafter the filename, the screen willbe turned off while the program iscompiled. If aZ}ny error isencountered all compilation willstop, the screen will be turned on,and the line with an error messagewill be dZ}isplayed. Take note of theerror and press a key, which willreturn you to DOS. If compilationis done without errors, the Z}screenwill be turned back on, and a listof all the functions in the programwill be displayed. Press RETURN togo back to Z}DOS, or type in anotherfilename to compile. Note: thelargest ".CCC" file you can have isabout 9K. It's safer to createsZ}everal small files and link themtogether then to have one largefile. Compiler directives in thesource file: #definZ}e - whenever the compilerencounters the first string (allcharacters until the next space) itwill replace it with the seconZ}dstring (everything to the end of theline or comment). Example: #defineEOL 155; putchar(EOL); - this willbe changed to pZ}utchar(155). Note:constant evaluation will be done onthe second string. #include filename - this willinclude the filenZ}ame specified. Thefilename will be normalized with theextension ".H" The included fileis usually used as a header fileZ}containing extern declarations.3) LINKING: The linker joinstogether all files that are to bepart of the same program. Z}You mustfirst create a file with theextension ".LNK" which contains alist of the programs to linktogether. The only fileZ} typesallowed are ".CCC" and ".OBJ"(object). All filenames arenormalized with the extension".CCC", so the extension is nZ}eededonly for ".OBJ" files. (Assemblylanguage files should have theextension ".OBJ".) The last filemust be either "ENGIZ}NE.OBJ" or"ENGLOAD.OBJ". "ENGLOAD.OBJ" willresult in "ENGINE.OBJ" being loadedfrom D1: whenever the program isrun. "ENGZ}INE.OBJ" is about 4000bytes long, whereas ENGLOAD.OBJ isonly about 130 bytes. Load the linker in the samemanner as tZ}he compiler (the filenameis LINK.COM). The linker willrequest the name of the link file,which will be normalized with theZ}extension ".LNK". The linker willthen create a file with theextension ".COM" which is ready torun. ACE C is actually a Z}P-codeinterpreter and the code to run it,plus numerous IO functions describedin ACECIO.C, is in the fileENGINE.OBJ. To aZ}ccess the IOroutines in ENGINE.OBJ you must alsoinclude the file ACECIO in your LNKfile. NOTE: both ACEC.COM andLINK.COMZ} require ENGINE.OBJ to be ondrive #1, as they use ENGLOAD.OBJ. If the linker does not find a LNKfile, it will create theZ} followingfile: filename.CCC ACECIO.CCC ENGLOAD.OBJ4) RUNNING: Run your program thesame way you run the linker andZ}compiler. The extension will alwaysbe ".COM", which need not beincluded if you are using OS/A+ DOS. When your program is Z}runningcorrectly, you can use FASTC.COM onthe ".CCC" files which will speed upyour program by 20-30%. (SeeFASTC.TXT.)BZ}E SURE TO READ ALL THE .TXT FILES,AND LOOK AT THE .C FILES FOREXAMPLES.d upyour program by 20-30%. (SeeFASTC.TXT.)BXL