@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`  `8  ɐ     `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.D8:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D8: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 ALLOWED697 FREE SECTORS COPYING---D8:COPY32.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- 128ɛ+,' 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 D8uLRS:H` B V`BDEhK)I JLVUVT`H 2` BHIhLV }}~ɛ  ;} 2T} ` RUN"D:MENU*.*"  \`bU}b U*.*"  \`b{ [ +'0@@A0@@[0@@2'!(} W}Π$('(POL(DThis Disk is full of ACTION! files marked with the Extender .O(ZHE(=Note: ACTION! is re X}quired to access these disk files.H(d--(%Also, there are several documentationna^(Vfiles marked with the Exten Y}der that you will want to read and/or print out.a(x,,($So... get out your ACTION! cartridge((( and start t Z}o examine these greatRO(Groutines so that you can begin to use them in your own programming.R(-*("Type to be [}gin using this disk!-(D:MENUso that you can begin to use them in your own programming.R(-*("Type to be &NARD ARRAY SYSNAM(6)+CARD ARRAY SYSLIB(19),SYSIO(53), SYSGR(10),* SYSMISC(12),SYSBLK(5)]},SYSSTR(5)*CARD ARRAY LIB(19),IO(53),GR(10),MISC(12),e BLK(5),STR(5)F?$CARD ARRAY LIBX(19),I^}OX(53),GRX($ MISCX(12),BLKX(5),STRX(5)~~~~;~&; Set up the library lists for _}scanner~;~PROC SetupLib()~BYTE It~m~-SYSNAM(0)="SYSLIB" ;Library names9~SYSNAM(1)`}="SYSIO"!~SYS!"#%&'()*+,-./;<=>?@[\]^(3)SC"}SY(4)="SYSBLK"} (c)1983 Action Computer Servicesa}  B JKIHiDiELV`L  BLV` Ll b}L &` Fj`8冨凪` EӅӥ `ʆǪƩ Ɛeec}` +ƦʆǢ &Ɛeǐ O OL +'&&&8儨児祂*L&&*ń8&&d}L `hihiHHȱȱLc !#3`LJJJJ`He}ȩh L< L< pL< xL< ~H8`HhHh L<  Bf}HI V䅠L< L Ԇ ؠPIPP`P xL< !L%! /!L!S:F!E:K![\ZUVT`g}`Ѣ !`ȱѢĦ`膡``ťƤe8夰L!h} Ƥ8`ŦeѠe桊L!9Q Q&PjP}PsP iP CP&OjOOO O sO& OjNNi}N N Li"""L}"SYSLIB"v m"*(m"L"SYSIO"ȑ m"*(m"L"SYSGR"ȑĈ j}m"*(m"L"SYSMISC"ȑꈑ m"*(m"L#SYSBLK#ȑ m"*(m"L@#SYSSTR#ȑ9""k}ȑ m"*(m"Ly#Clos#ȑt m"*(m"L#Output#ȑ m"*(m"L#In#ȑ l}m"*(m"L#XIOstr#ȑ㈑ m"*(m"L$Opn$ȑ  m"*(m"L2$Prt$ȑ. m"*(m"m}LX$Error$ȑR m"*(m"L~$Break$ȑx m"*(m"L$LShift$ȑ m"*(m"L$RShiftn}$ȑň m"*(m"L$SetSign$ȑ숑 m"*(m"L%SS1%ȑ m"*(m"L>%SMops%ȑ8o} m"*(m"Ld%MultB%ȑ^ m"*(m"L%MultI%ȑ m"*(m"L%DivI%ȑ m"*p}(m"L%RemI%ȑψ m"*(m"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mL >!#LE  `L8F  LcF  FB )  }#""FF#LF5"6"# m5"*(m6"qȱq#LF#!"""FF#L0G9"}:"# m9"*(m:"qȱq#LF#%"&"PGPG#LGF=">"# m="*(m>"q}ȱq#LEG#)"*"GG#LGA"B"# mA"*(mB"qȱq#LG#-"."}HH#L>H*E"F"# mE"*(mF"qȱq#LG#1"2"^H^H#LHrI"J"# mI}"*(mJ"qȱq#LSH"J"I6"L5"K D""J!"I:"L9"K D&"J%"I>"L="K }D*"J)"IB"LA"K D."J-"IF"LE"K D2"J1"IJ"LI"K D  `LQI(Ȍ' ' V@}LI I;LI' A&8&'ŮLI(LILI&' A C&i''L}I`FLa"ltBIȑӈ }mLIIIIIȌIIIJJILJImIIiHHImIIi _BhhImIIi}I.LwJIIImIIiI:LJȌIILJILJII8IELJIIIiILKI}IiIDI1I:IȌIII!K!KILIKIiImIIiIILKII_K_KILK}FImIIiIIILTK`*LKR ]!} LK$ - Scans Action! source filesK  LK"and identifies whic}h library callsK  LL are used, as well as the runtimeK  LEL$system modules required to assemble.L  LpL Copyright} (c) 1984, Harold Long.LO  LL$Permission granted to distribute forLz  LLnon-commercial purposes.L  LL ź}ҠӠŠšL   P!LM Input File? M   P!L3MOutput File? P:M#   LEMK:MB} U P! ) ) I P!LM M~ P! ) P! 9 9 I }P!LM M P! 9 LNCorrect (Y/N)? N  KKIYKIyKIN KInL$N}K KIY KIyLVM  ) U 9 U f"LN NILN 5F   P!LNšN  ``}KK KIY KIyLVM  ) U ͅ9 U f"LN NILN 5F   P!LNšN  ``8;; FORMAT.ACT - Formats Action! sources; with indented DO-OD, IF-FI pairs.;; by Harold Long;; Source should be in simpl}e form, i.e.,; one keyword per line, no "DO mumble OD"; constructions, etc.;CHAR ARRAY SOURCE(255), ;Temporary } DEST(255), ;String arrays KEYWORD ;Test word pointerCARD ARRAY POS(6),NEG(6),RES(6),TEMP(6), LEAD(6) ;Keyword ar}raysBYTE I,J,K ;CountersBYTE CurPos=[0], ;Current character pointer LastPos=[0], ;Last Character position Spaces=}[0], ;Current indent value NextSpace=[0], ;Next line indent value Indent=[2] ;Number of spaces per indentINT Tem}pSpace=[0] ;Back up this line only;; Setup keyword arrays with desired values; To include additional words, add to list; }and modify Foo(0) to reflect total number; of words in list.;PROC Setup() POS(0)=2 ;Number of words in list POS(1)=}"IF" ;Roughly sorted by frequency POS(2)="DO" NEG(0)=3 NEG(1)="FI" NEG(2)="OD" NEG(3)="RETURN" RES(0)=3 RES(1)="MO}DULE" RES(2)="PROC" RES(3)="FUNC" TEMP(0)=2 TEMP(1)="ELSE" TEMP(2)="ELSEIF" TEMP(3)="RETURN" LEAD(0)=4 LEAD(1)="BYT}E" LEAD(2)="CARD" LEAD(3)="INT" LEAD(4)="CHAR" TempSpace=-Indent Spaces=IndentRETURN;; Strip out all leading spaces}.; Returns with stripped data in; SOURCE;PROC Strip() FOR I=1 to SOURCE(0) ;Count spaces DO IF SOURCE(I)#32 THEN ;Exi}t on first non-space char EXIT FI OD IF SOURCE(I)=155 THEN SOURCE(0)=0 SOURCE(1)=155 FI IF SOURCE(0)#0 THEN Sc}opyS(DEST,SOURCE,I,SOURCE(0)) ;Move to delete spaces ScopyS(SOURCE,DEST,1,DEST(0)) ;Put back in source record FIRETURN;}; Extract substring: returns with; start:(end-1) inclusive string in; DEST;PROC SubStr(BYTE Start, BYTE End) IF End>Sta}rt THEN DEST(0)=(End-Start) FOR I=1 to DEST(0) DO DEST(I)=SOURCE(Start+I-1) OD ELSE DEST(0)=0 DEST(1)=155} FIRETURN;; Find delimiter: returns next occurrence; of space char in SOURCE;BYTE FUNC FindLim(BYTE Start, BYTE End) }IF End>Start THEN FOR I=Start TO End DO IF SOURCE(I)=32 THEN EXIT FI OD ELSE I=0 FIRETURN(I);;} Test for lower case character;BYTE FUNC IsLower(BYTE c) IF (c>='a) AND (c<='z) THEN RETURN(1) FIRETURN(0);; Shift }to upper case if lower;BYTE FUNC ToUpper(BYTE c) IF IsLower(c) THEN c==-$20 FIRETURN(c);; Force substring to upper }case just; in case you forgot...;PROC SubUp() BYTE c FOR I=1 to DEST(0) DO c=DEST(I) DEST(I)=ToUpper(c) ODRETURN}; Test Positive indent; examine DEST; for match with positive keyword;BYTE FUNC TestPos() BYTE Match Match=0 FOR I=1 T}O POS(0) DO KEYWORD=POS(I) IF SCompare(DEST,KEYWORD)=0 THEN Match=Indent FI ODRETURN(Match);; Test Negative in}dent; examine DEST; for match with negative keyword;BYTE FUNC TestNeg() BYTE Match Match=0 FOR I=1 to NEG(0) DO KEYW}ORD=NEG(I) IF Scompare(DEST,KEYWORD)=0 THEN Match=Indent FI ODRETURN(Match);; Test for Reset; cancel any; outsta}nding pos/neg indents;BYTE FUNC TestRes() BYTE Match Match=0 FOR I=1 to RES(0) DO KEYWORD=RES(I) IF Scompare(DEST,K}EYWORD)=0 THEN Match=Indent FI ODRETURN(Match);; Test for Temporary reset; back up; line one space to emphasize wo}rd.;BYTE FUNC TestTemp() BYTE Match Match=0 FOR I=1 to TEMP(0) DO KEYWORD=TEMP(I) IF Scompare(DEST,KEYWORD)=0 THEN} Match=Indent FI ODRETURN(Match);; Test for 'leader' word, e.g., complex; expression such that keyword may follow;}BYTE FUNC TestLead() BYTE Match Match=0 FOR I=1 to LEAD(0) DO KEYWORD=LEAD(I) IF SCompare(DEST,KEYWORD)=0 THEN Ma}tch=1 FI ODRETURN(Match);; File handler; ;; Opens Foo.ACT as input and; Foo.FCT as output. Default; filename is "T}EST".;PROC FOpen(BYTE ARRAY FName) BYTE ARRAY INAME(16) ;Input file name BYTE ARRAY ONAME(16) ;Output file BYTE ARRAY }IEXT=".ACT" BYTE ARRAY OEXT=".FCT" IF FName(0)=0 THEN Scopy(Fname,"D:TEST") FI FOR I=1 TO FName(0) DO INAME(I)=FNa}me(I) ONAME(I)=FName(I) OD FOR I=FName(0)+1 TO FName(0)+4 DO INAME(I)=IEXT(I-FName(0)) ONAME(I)=OEXT(I-FName(0)}) OD INAME(0)=FNAME(0)+4 ONAME(0)=FNAME(0)+4 OPEN(2,INAME,4,0) ;Input is read only OPEN(3,ONAME,8,0) ;Output is} write onlyRETURN;; Process Record; inputs a line from; Foo.ACT, strips it, tests for leading; keywords, adjusts indent}ation, and; outputs to Foo.FCT.PROC ProcRec() InputSD(2,SOURCE) ;Get record Strip() ;Delete leading spa}ces IF SOURCE(0)>0 THEN ;Skip blank lines CurPos=FindLim(1,SOURCE(0)) ;Find delimiter SubStr(1,CurPos) ;extract s}ubstring SubUp() ;Upper case IF TestLead() THEN ;Complex expression? LastPos=Curpos+1 CurPos=FindLim}(LastPos,Source(0)) ;Get next word SubStr(LastPos,Curpos) ;Extract SubUp() ;Upper case FI IF TestRes()#}0 OR SOURCE(1)='; THEN Spaces=Indent TempSpace=-Indent FI Spaces==-TestNeg() NextSpace=TestPos() TempSpace==-Te}stTemp() CurPos=Spaces+TempSpace+1 FOR I=1 TO 254 ;Blank target line DO DEST(I)=32 OD DEST(0)=254 DE}ST(255)=155 SAssign(DEST,SOURCE,Curpos,SOURCE(0)+CurPos) ScopyS(SOURCE,DEST,1,SOURCE(0)+Curpos) TempSpace=0 FI PrintD}E(3,SOURCE) ;Write record Spaces==+NextSpaceRETURNPROC Main()BYTE ARRAY File(20) CLOSE(2) CLOSE(3) GRAPHICS(0) } ;CLEAR SCREEN POSITION(10,2) PRINTE("Action! Formatter") POSITION(2,4) PRINTE("Formats Action! source files with}") POSITION(2,5) PRINTE("indented DO-OD, IF-FI, etc. pairs.") POSITION(2,7) PRINTE("Specify input file as Dn:mumble") PO}SITION(2,8) PRINTE("Input extension of .ACT is assumed.") POSITION(2,9) PRINTE("Output file will be Dn:mumble.FCT") Posit}ion(2,11) PRINT("Input: ") INPUTS(File) FOpen(File) Setup() WHILE EOF(2)=0 DO ProcRec() OD CLOSE(2) CLOSE(3) POSI}TION(2,13) PRINTE("DONE!")RETURNile) FOpen(File) Setup() WHILE EOF(2)=0 DO ProcRec() OD CLOSE(2) CLOSE(3) POSI% ;++++++++++++++++++++++++++++++++++++; EPSON/ATASCII PRINT FORMATTER ; Prints listed BASIC programs and; text using E}pson bit mode graphics; to print non-ASCII characters;; With suitable changes to the Epson; specific variables immediatel}y ; below, this program will work with; a number of other graphic printers.;; (c)1983 Leo G. Laporte; BOX 21248}; San Jose, CA 95151; CIS PPN # 70215,1022; Placed in public domain 12/8/83.;++++++++++++++++++++++++++++}++++++++ BYTE rts = [$60], ; OSA+ bug fix bank = $D500 ; Atari DOS bug fix MODULE DEFINE TR}UE="1", FALSE="0", BOOL="BYTE", KEY = "0", FILE = "1", EPSON = "2", } MAXLINE = "55" ; max # of lines per page ; Epson specific stuff CHAR ARRAY grmode = [4 27 75 8 0], ; i}nitializes bit-mode graphics (ESC K 8 0) ; and tells printer that eight graphic ; data bytes will follo}w. italics_on = [2 27 '4], ; if you have an older Epson w/o italics italics_off = [2 27 '5] ; change }these strings to another suitable font CHAR formfeed = [12] ;----------------------------------}--; PROCEDURE DECLARATIONS;------------------------------------ PROC grprint(CHAR chr) ; does a graphic print of non-AS}CII; characters BYTE ARRAY mask =[128 64 32 16 8 4 2 1], ; bit values D7 to D0 CHARSET = $E000, ; location }of character set in ROM grdata(8) ; character data array BYTE offset, ; current character data byte b}it, ; current bit in byte byt ; graphic data byte BOOL bit_set, ; is bit set? flag inv_flag ; invers}e char? CARD charloc ; location of character data ; check for inverse character IF (chr & 128) THEN inv_flag }= TRUE chr ==& 127 ; strip off inverse bit ELSE inv_flag = FALSE FI ; find character data in ROM IF c}hr < 32 THEN charloc = (chr + 64) * 8 ELSEIF chr > 31 AND chr < 96 THEN charloc = (chr - 32) * 8 ELSE cha}rloc = chr * 8 FI ; rotate char data for Epson Zero(grdata, 8) ; clear character graphics data FOR offset = 0 }TO 7 ; step through char data DO FOR bit = 0 TO 7 DO bit_set = CHARSET(charloc + offset) & mask}(bit) IF inv_flag THEN IF bit_set = FALSE THEN grdata(bit) ==+ mask(offset)  } FI ELSEIF bit_set THEN grdata(bit) ==+ mask(offset) FI OD OD  }; dump character data PrintD(EPSON, grmode) FOR byt = 0 TO 7 DO IF grdata(byt) = 155 THEN ;prevent sendi }ng CR and thereby grdata(byt) = 151 ;cancelling graphics mode (only FI ; occurs du }ring printing of inverse A) PutD(EPSON, grdata(byt)) OD RETURN ;----------------------------------- PROC feed }(BYTE lines) ; feeds "lines" lines BYTE i FOR i = 1 TO lines DO PutDE(EPSON) OD RETURN ;-------}----------------------------- PROC indent(BYTE col) ; tabs to col BYTE space = [32], i FOR i = 1 TO col DO PutD(}EPSON, space) OD RETURN ;------------------------------------ BYTE FUNC PrintTEXT(CHAR ARRAY line) ; prints TEXT inp}ut line CHAR eol = [155], chr BYTE cnt, col CARD linecnt ; number of lines output cnt = 1 ; current character }in linecol = 0 ; current printer columnlinecnt = 0 ; lines printed chr = line(cnt) IF chr = eol THEN PutDE(EP}SON) RETURN (1) FI WHILE chr <> eol DO IF ; printable character (chr > 31 AND ch}r < 123 AND chr <> 96) THEN PutD(EPSON, chr) col ==+ 1 ELSE grprint(chr) col ==+ 2 FI} IF (col > 80) THEN PutDE(EPSON) linecnt ==+ 1 col = 0 FI cnt ==+ 1 chr = line(cnt)} ; get next char OD PutDE(EPSON)linecnt ==+ 1 RETURN (linecnt) ;------------------------------------ BYTE FUNC Pri}ntBASIC(CHAR ARRAY line) ; prints BASIC input line CHAR space = [32], invsp = [160], colon = [58],} semic = [59], eol = [155], quote = [34], comma = [44], chr BYTE cnt, col, tab BOOL inqu}otes CARD linecnt ; number of lines output cnt = 1 ; current character in linecol = 0 ; current printer columnli}necnt = 0 ; lines printedinquotes = FALSE chr = line(cnt) IF chr = eol THEN RETURN (0) FI ; drop leading spaces...} WHILE chr = space DO cnt ==+ 1 chr = line(cnt) OD ; print line number... WHILE (chr >= '0 A}ND chr <= '9) DO PutD(EPSON, chr) col ==+ 1 cnt ==+ 1 chr = line(cnt) OD ; outp}ut a space... IF chr = space THEN PutD(EPSON, chr) cnt ==+ 1 chr = line(cnt) ELSE PutD(EPSON, space) FI } col ==+ 1 ; set tab... tab = col ; now print rest of line... WHILE chr <> eol DO } IF chr = quote THEN IF inquotes THEN inquotes = FALSE ELSE inquotes = TRUE FI FI} IF ; printable character (chr > 31 AND chr < 123 AND chr <> 96) THEN PutD(EPSON, chr) col ==+ 1  } ELSE grprint(chr) col ==+ 2 FI ; should we break line?... IF !} (col > 65 AND ; close to R margin (chr = space OR ; break line chr = invsp OR ; at a logical c"}hr = comma OR ; spot if chr = semic)) ; possible OR (chr = colon AND inquotes = #}FALSE) ; separate BASIC commands OR (col > 80) ; unconditional line break ; yes... THEN PutDE(EP$}SON) linecnt ==+ 1 indent(tab) col = tab ; no... FI cnt ==+ 1 chr = line(cn%}t) ; get next char OD feed(2) ; end of input linelinecnt ==+ 2 RETURN (linecnt) ;-----------------------------------&}-- PROC main() CHAR ARRAY source(20), title1(75), title2(75), choice(10), '} line(255) BYTE consol = $D01F, ; start key invflg = $2B6, ; inverse off shflok = $2BE, ; shift(} lock crsinh = $2F0, ; cursor off linecnt, linetot CARD page = [1] ; pages printed BOOL basic Bank)} = 0 Put(125) ; clear screen Setcolor(2,12,2) PutE() PrintE(" EPSON/ATASCII PRETTY PRINTER") PrintE(" (c*})1983 Leo G. Laporte") PutE() PrintE(" File must be LISTed BASIC or TEXT") PutE() Print("Enter source file > ") +}invflg = 0 ; inverse off shflok = 64 ; caps lock InputS(source) PutE() PrintE("Enter header line #1 (max 75 char,}s)") Print(">") InputMD(KEY, title1, 75) PutE() PrintE("Enter header line #2") Print(">") InputMD(KEY, title2, -}75) PutE() Print("Is this a (B)ASIC or (T)ext file? ") invflg = 0 ; inverse off shflok = 64 ; caps lock Inpu.}tMD(KEY, choice, 10) IF choice(1) = 'T THEN basic = FALSE ELSE basic = TRUE FI Position(2,22) crsinh =/} 1 Print(" PRESS -START- TO BEGIN PRINTING") Position(2, 17) consol = 8 WHILE consol <> 6 ; wait for start D0}O consol = 0 OD Close(FILE) Close(EPSON) Open(FILE, source, 4) Open(EPSON, "P:", 8) 1} PutDE(EPSON) PrintD(EPSON, italics_on) PrintDE(EPSON, title1) PrintDE(EPSON, title2) PrintD(EPS2}ON,"Page ") PrintCDE(EPSON, page) PrintD(EPSON, italics_off) feed(2) linetot = 6 InputMD(FILE, lin3}e, 255) WHILE EOF(FILE) = FALSE DO IF basic THEN linecnt = PrintBASIC(line) ELS4}E linecnt = PrintTEXT(line) FI linetot ==+ linecnt IF linetot >= MAXLINE THEN ; n5}ext page PutD(EPSON, formfeed) page ==+ 1 PrintD(EPSON, italics_on) PrintDE(E6}PSON, title1) PrintDE(EPSON, title2) PrintD(EPSON,"Page ") PrintCDE(EPSON, page) PrintD(7}EPSON, italics_off) feed(2) linetot = 6 FI Print(".") InputMD(FILE, lin8}e, 255) OD PutDE(EPSON) ;flush buffer Close(FILE) Close(EPSON) crsinh = 0 Graphics(0)RETURN 9}  PutDE(EPSON) ;flush buffer Close(FILE) Close(EPSON) crsinh = 0 Graphics(0)RETURN  PROC SIO=$E453() MODULE ; The purpose of this program is to read; ATARI DOS 3 files and conve;}rt them to; ATARI DOS 2 files.BYTE ARRAY Buffer_in(128)=$8000BYTE ARRAY Buffer_out(125)=$8080BYTE Ddevic=$300, ; devic<}e serial bus id D1-D4 ($31-$34) Dunit=$301, ; disk or device # Dcomnd=$302, ; operation command code $52=get s=}ector $50=put sector Dstats=$303, ; status & operation info $40=read $80=write Dbuflo=$304, ; buffer low addres>}s Dbufhi=$305, ; buffer hi address Dbytlo=$308, ; bytes to be transferred low address Dbythi=$309, ; byt?}es to be transferred hi address Daux1=$30A, ; sector address low to be read/written Daux2=$30B, ; sector addr@}ess hi to be read/written SHFLOK=$2BE, ; Flag for shift lock CONSOL=$D01F, ; Address for Option/Select/Start KeyA}s CRSINH=$2F0, ; Cursor inhibit flag CH=$2FC ; Internal hardware valeBYTE I,MCARD Sector BYTE AB}RRAY filename_in(16) BYTE ARRAY filename_out(16) BYTE Byte_countCARD Sectors_to_read, ; total sectors in file SectorC}_count ; counter to match total sectorsBYTE dev,cmd,aux1,aux2CARD addr,size,target_sectorBYTE max_bytes_in_last_sectoD}rBYTE Number_drivesBYTE First_passCARD Total_bytes_in_bufferBYTE Stop_at_end_of_bufferBYTE POINTER Big_buffBYTE YesBYTE}E An_errorBYTE Startup=[0];****************************************************************MODULE ; BLKIO.ACT; (c) 1983F} ACS; Copyright (c) 1983; by Action Computer Services (ACS);; This software may be incorporated in; other software packG}ages providing; that this copyright notice is also; incorporated as well.; version 1.0; last modified August 25, 1983BH}YTE CIO_status;***************************************************************CHAR FUNC CIO=*(BYTE dev, CARD addr, I} size, BYTE cmd, aux1, aux2); see hardware manual for description; of CIOV.; IOCB# = dev; ICCOM = cmd; ICBA = aJ}ddr; ICBL = size; ICAX1 = aux1; ICAX2 = aux2; ICAX1 and ICAX2 are not set if aux1=0; The first byte of addr is paK}ssed to; CIO in the A register. The status; on return from CIO is stored in; CIO_status. If status=$88 then; EOF(dev) iL}s set to a non-zero value.; No other error checking is performed; and the result of the CIOV call is; returned as the resuM}lt of this FUNC.[$29$F$85$A0$86$A1$A$A$A$A$AA$A5$A5$9D$342$A5$A3$9D$348$A5$A4$9D$349$A5$A6$F0$8$9D$34A$A5$A7$9D$34B$98$9DN}$345$A5$A1$9D$344$20$E456$8C CIO_status$C0$88$D0$6$98$A4$A0$99 EOF$60];*************************************************O}**************CARD FUNC ReadBlock=*(BYTE dev, CARD addr, size); Reads size bytes from dev into addr.; P}Returns number of bytes read (may; be < size if EOF). Set EOF flag if; EOF is encountered. Status is ; saved in CIO_staQ}tus.[$48$A9$7$85$A5$A9$0$85$A6$A5$A3$5$A4$D0$6$85$A0$85$A1$68$60$68$20 CIO$BD$348$85$A0$BD$349$85$A1$60];***************R}************************************************PROC WriteBlock=*(BYTE dev, CARD addr, size); Writes siS}ze bytes from addr to dev.; Status is saved in CIO_status.[$48$A9$B$85$A5$A9$0$85$A6$A5$A3$5$A4$D0$2$68$60$68$4C CIO]MODT}ULE ; end BLKIO.ACT;****************************************************************PROC Input_disk() Put($7D) ; CleaU}r screen PrintE("}") ; get users attention SetColor(2,3,4) ; Color is Red-orange Position(1,10) PrintE("Insert input DOV}S3 disk into drive 1") PrintE(" Push RETURN when disk is ready") M=InputB() SetColor(2,9,4) ; return color to blue W}RETURN;***************************************************************PROC Output_disk() Put($7D) ; Clear screen PrinX}tE("}") ; get users attention SetColor(2,12,4) ; Color is Green Position(1,10) PrintE("Insert output DOS2 disk into drive Y}1") PrintE(" Push RETURN when disk is ready") M=InputB() SetColor(2,9,4) ; return color to blue RETURN;**********Z}*****************************************************PROC Read_Sector()Ddevic=$31Dunit=1Dcomnd=$52 ; read comman[}dDstats=$40 ; set 2 way status to a readDbuflo=$00 ; setting buffer address loDbufhi=$80 ; sett\}ing buffer address hiDbytlo=$80 ; set number of bytes to be transfered to 128Dbythi=$00Daux2=Sector/256Daux1=Se]}ctor-Daux2*256SIO() ; call serial I/O routineIF Sector>24 THENPosition(10,13)Print("Sector read=======>")^}PrintCE(Sector)Position(10,14)Print("target end sector=>")PrintCE(target_sector)Sector==+1FIIF Dstats=1 THEN RETURN _}FI PutE() Print("Error in read sector. Error code=") PrintBE(Dstats) Close(1) Close(2) Break();*******`}********************************************************PROC Scroll_colors()BYTE wsync=54282, vcount=54283, clr=5a}3272, ctr, chgclr, incclr CH=$FF DO FOR ctr=1 TO 4 DO incclr=chgclr ; set base color to incrementb} DO wsync=0 ; wait for end of scan line clr=incclr ; change displayed color incclr==+1 ; change luc}minance UNTIL vcount&128 ; end of screen test OD OD chgclr==+1 UNTIL CH<>$FF OD RETURN;**********d}*****************************************************PROC Print_directory()BYTE ARRAY directory(17)BYTE I,J,K,L,M,N,IIPue}t($7D) ; Clear screen PrintE(" <====== Directory ======>") FOR I=16 TO 23 DO Sector=I Read_Sector() FORf} J=1 TO 8 DO K=(J-1)*16 L=K+15 N=1 FOR M=K TO L DO directory(N)=Buffer_in(M) Ng}==+1 OD IF directory(1)<>$00 AND directory(1)<>$80 THEN Print(" ") FOR II=2 TO 12 q}?b%DOS SYSb*)DUP SYSbSAUTORUN SYSbVMENU bi\LIBSCAN COMb0FORMAT ACTbEEPSON ACTbh:DOS3TO2 ACTb.DESMAC ACTb)CMPTODSKACTb.ACTDEFS ASMb/0HEXASEG COMbS_UTILITYSDOC DO PrintF("%C",directory(II)) OD PrintE(" ") FI OD OD PutE() PutE() Print("r} Push RETURN to continue") Scroll_colors() SetColor(2,9,4) ; return color to blue RETURN;********************s}*******************************************PROC See_if_again() Put($7D) ; Clear screen PrintE("}") ; get users attentit}on SetColor(2,15,4) ; Color is Lt. Orange Position(1,10) PrintE(" Shall we start again?") PrintE(" Input a Y to restart")u} CH=$FF DO UNTIL CH<>$FF OD Yes=CH RETURN;***************************************************************PROC v}Start_screen() BYTE Do_directory Put($7D) ; Clear screen PrintE("}") ; get users attention SetColor(2,1,4) ; Color isw} Gold Position(1,10) PrintE("Push START for directory") PrintE(" or any other key to continue") Do_directory=0 CH=$FFx} CONSOL=$08 DO IF CONSOL=6 THEN Do_directory=1 FI UNTIL Do_directory=1 OR CH<>$FF OD IF Do_directory=1 THEN Print_diry}ectory() FI Put($7D) ; Clear screen CH=$FF SetColor(2,9,4) ; return color to blue RETURN;**********************z}*****************************************PROC Write_Sector() dev=2 ; device number cmd=$0B {} ; command byte aux1=0 aux2=0 IF Number_drives=1 THEN IF First_pass=0 THEN Open(2,filename_out,8,0)|} ELSE Open(2,filename_out,9,0) FI FI WriteBlock(dev,addr,size)First_pass=1Byte_count=0IF CIO_status=}}1 THEN IF Number_drives=1 THEN Close(2) FI RETURN FI PutE() Print("Error in write sector. Error code=") PrintBE(CI~}O_status) Close(1) Close(2) Break();***************************************************************}PROC Fill_big_buff()BYTE iFOR i=0 TO 124 DO Big_buff^=Buffer_out(i) Big_buff=$8100+Total_bytes_in_buffer+ } i+1 OD Total_bytes_in_buffer==+125 Byte_count=0 IF Total_bytes_in_buffer=6000 THEN size=6000 Outp}ut_disk() Write_Sector() Total_bytes_in_buffer=0 Big_buff=$8100 Input_disk() FI RETURN;********************}*****************************************PROC Fill_Buffer_Out()DOBuffer_out(Byte_count)=Buffer_in(I)I==+1Byte_count==+1}IF Byte_count=125 THEN IF Number_drives=2 THEN Write_Sector() ELSE Fill_big_buff() FI FI UNTIL I=128 OR I=Stop_at}_end_of_bufferODI=0 RETURN;***************************************************************PROC Read_directory()BYTE} ARRAY directory(17),check_directory(13)BYTE I,J,K,L,M,N,IIAn_error=0FOR I=0 TO 12DOcheck_directory(I)=$20ODJ=filena}me_in(0) ; Length of stringK=1FOR I=3 TO JDOIF filename_in(I)<>$2E THEN ; Search for "." check_directory(K)=filenam}e_in(I) K==+1 ELSE K=9 FIOD FOR I=16 TO 23 DO Sector=I Read_Sector() FOR J=1 TO 8 DO K=(J-1})*16 L=K+15 N=1 FOR M=K TO L DO directory(N)=Buffer_in(M) N==+1 OD L=0 } FOR K=2 TO 12 DO IF directory(K)<>check_directory(K-1) THEN L=1 FI UNTIL L=1 OD IF L=0 THEN } Sector=directory(14)*8+25 ; start sector Sectors_to_read=directory(16)*2+1 max_bytes_in_last_sector=directory(1}5) IF max_bytes_in_last_sector>128 THEN max_bytes_in_last_sector==-128 Sectors_to_read==+1 FI } Put($7D) ; Clear screen Print("For file=") PrintE(filename_in) Print("Sectors to read=") PrintCE(Sec}tors_to_read) Print("Bytes in last sector read=") PrintBE(max_bytes_in_last_sector) target_sector=Sector+Secto}rs_to_read-1 RETURN FI OD OD An_error=1 PrintE("Error**** file not found") Close(1) Close(2) RETUR}N;***************************************************************PROC Set_one(BYTE ARRAY filename) BYTE M FOR M=1 }TO 13 DO filename(15-M)=filename(13-M) OD filename(1)=$44 ; "D" filename(2)=$3A ; ":" } filename(0)==+2 ; increase length pointer RETURN;***************************************************************P}ROC Set_two(BYTE ARRAY filename) BYTE M FOR M=1 TO 12 DO filename(16-M)=filename(13-M) OD } filename(1)=$44 ; "D" filename(2)=$32 ; "2" filename(3)=$3A ; ":" filename(0)==+3 ; increase len}gth pointer RETURN;***************************************************************PROC Get_number_of_drives() DOP}utE()PutE()PrintE("DOS 3 to 2 Convertor")Print("Number of drives (1-2)=>")Number_drives=InputB()IF Number_drives<1 OR N}umber_drives>2 THEN Put($7D) PrintE("===========================") PrintE("===========================") P}rintE("===========================") PrintE("===========================") PrintE(" ")} PrintE("Incorrect number of drives ") Print(" Input a 1 or 2, not a ") PrintBE(Number_drives) PrintE}(" ") PrintE("===========================") PrintE("===========================") } PrintE("===========================") PrintE("===========================") FI UNTIL Number_drives=1 OR Number_d}rives=2 OD RETURN;***************************************************************PROC main()BYTE Last_byte_countYes=}$2BDO ; Start of loop until Yes<>$2B "Y"Poke($779,$50) ; turn off write verifyPut($7D) ; Clear screenClose(1)}Close(2)SHFLOK=$40 ; Set as upper caseIF Startup=0 THEN Get_number_of_drives() FI Startup=1Yes=0FOR I=0 }TO 14DOfilename_in(I)=$20ODSector_count=0Total_bytes_in_buffer=0Stop_at_end_of_buffer=128First_pass=0Start_screen()}Print("Filename for input=D1:")InputS(filename_in)Set_one(filename_in) IF Number_drives=1 THEN Print("Filename for o}utput=D1:") InputS(filename_out) Set_one(filename_out) Big_buff=$8100 addr=$8100 Input_disk() ELSE Print(}"Filename for output=D2:") InputS(filename_out) Set_two(filename_out) addr=$8080 size=125 Open(2,filename_out,}8,0) ; open for output FI; Find input file's first sector and; number of sectors in fileRead_directory()IF An_error}=0 THEN CRSINH=1 ; turn off cursorByte_count=0I=0DO Sector_count==+1Read_Sector() ; call serial I/O routine}Fill_Buffer_Out() UNTIL Sectors_to_read-1=Sector_countODRead_Sector() ; call serial I/O routineStop_at_end_of_}buffer=max_bytes_in_last_sectorFill_Buffer_Out()IF Byte_count=0 AND Number_drives=2 THEN CRSINH=0 ; turn on cursor RET}URN FI IF Total_bytes_in_buffer=0 AND Number_drives=1 AND Byte_count=0 THEN CRSINH=1 ; turn on cursor CRSINH=0 ; turn }on cursor RETURN FIIF Number_drives=2 THENsize=Byte_countWrite_Sector() ELSELast_byte_count=Byte_countOutput_disk()}size=Total_bytes_in_bufferWrite_Sector() ; Write big buffer; write remaining in little bufferaddr=$8080size=Last_byte_cou}ntWrite_Sector() FIClose(1)Close(2) FI ; End of An_error=0 loop CRSINH=0 ; turn on cursorSee_if_again() UNT}IL Yes<>$2B OD ; End of Main loop SetColor(2,9,4) ; return color to bluePut($7D) ; Clear screenCH=$FFRETURN UNTx; ______________________________ ; V1.1Paul Wu ; MINI-DISASSEMBLER ; !} ;;  For disassembling Action programs;;  Append this program to the end of; the user progra!}m. Compile it then; run it....;;  Use Š to pause action and; [] key to escape the listing and; ctrl-1 to!}ggles output suspension.;;  Reboot program if garbages appear; in the listing.;; ______________________________; !} 10/20/84; (c)1984 by G.D.C.; ;PROC Menu()CARD usradd !} PrintE("") PrintE(" ɭҠ㩱") PrintE(" ") Prin!}tE("") Print(" User program starts at >") usradd=PeekC($491) PrintCE(usradd) PrintE("") PrintE("")RETURNCA!}RD FUNC Start()CARD startadd Print("  Start address[decimal] >") startadd=InputC()RETURN(startadd)CARD FUNC End()!}CARD endadd Print("  End address [decimal] >") endadd=InputC()RETURN(endadd)PROC Dev()BYTE key,flag device=0 !} Print("  Output: creen,rinter >") DO key=GetD(7) PrintF("%C",key) IF key='P THEN Close(5) Open(5,"P:!}",8) device=5 flag=1 ELSEIF key='S THEN flag=1 ELSE Print("") flag=0 FI UNTIL flag=1 ODRETURN!}PROC Sl() Print("(")RETURNPROC Sr() Print(")")RETURN PROC Sx() Print(",X")RETURN PROC Sy() Print(",Y!}")RETURNCARD FUNC B3(CARD add)BYTE a,b a=Peek(add+1) b=Peek(add+2) PrintF("%H",b,a) add=add+2RETURN(add)CA!}RD FUNC B2(CARD add)BYTE a a=Peek(add+1) PrintF("%H",a) add=add+1RETURN(add)BYTE FUNC Des(BYTE n,content)BYTE A!}RRAY Assem1="BRK0ORA1???0???0???0ORA2ASL2???0PHP0ORA1ASL0???0???0ORA6ASL6???0BPL2ORA5???0???0???0ORA3ASL3???0CLC0ORA8???0???0!}???0ORA7ASL7???0JSR6AND4???0???0BIT2AND2ROL2???0PLP0AND0ROL0???0BIT6AND6ROL6???0",Assem2="BMI2AND5???0???0???0AND3ROL3???0SE!}C0AND8???0???0???0AND7ROL7???0RTI0EOR4???0???0???0EOR2LSR2???0PHA0EOR0LSR0???0JMP6EOR6LSR6???0BVC2EOR5???0???0???0EOR3LSR3???!}0CLI0EOR8???0???0???0EOR7LSR7???0",Assem3="RTS0ADC4???0???0???0ADC2ROR2???0PLA0ADC1ROR0???0JMP9ADC6ROR6???0BVS2ADC5???0???0?!}??0ADC3ROR3???0SEI0ADC8???0???0???0ADC7ROR7???0???0STA4???0???0STY2STA2STX2???0DEY0???0TXA18103STY6STA6STX6???0",Assem4="BCC!}2STA5???0???0STY3STA3STX???0TYA0STA8TXS0???0???0STA7???0???0LDY1LDA4LDX1???0LDY2LDA2LDX2???0TAY0LDA1TAX0???0LDY6LDA6LDX6???0!}BCS2LDA5???0???0LDY3LDA3LDX???0CLV0LDA8TSX0???0LDY7LDA7LDX8???0",Assem5="CPY0CMP4???0???0CPY2CMP2DEC2???0INY0CMP0DEX0???0CP!}Y6CMP6DEC6???0BNE2CMP6???0???0???0CMP3DEC3???0CLD0CMP8???0???0???0CMP7DEC7???0CPX0SBC4???0???0CPX2SBC2INC2???0INX0SBC0NOP0???!}0CPX6SBC6INC6???0",Assem6="BEQ2SBC5???0???0???0SBC3INC3???0SED0SBC8???0???0???0SBC7INC7???0???0"BYTE x,ch,flag FOR x=1 T!}O 3 DO IF n=1 THEN ch=Assem1(content*4-4+x) flag=Assem1(content*4) ELSEIF n=2 TH!}EN ch=Assem2((content-48)*4-4+x) flag=Assem2((content-48)*4) ELSEIF n=3 THEN !} ch=Assem3((content-96)*4-4+x) flag=Assem3((content-96)*4) ELSEIF n=4 THEN !} ch=Assem4((content-144)*4-4+x) flag=Assem4((content-144)*4) ELSEIF n=5 THEN !} ch=Assem4((content-192)*4-4+x) flag=Assem4((content-192)*4) ELSEIF n=6 THEN !} ch=Assem4((content-240)*4-4+x) flag=Assem4((content-240)*4) FI PrintF("%!}C",ch) OD Print(" ")RETURN(flag)CARD FUNC Desm(CARD add)BYTE b,c,content,flagCARD cont content=Peek(add) !} IF device=5 THEN PrintF("%C",126) ELSEIF device=0 THEN PrintF("%C",content) FI Print(" ") cont=PeekC(add) Pr!}intF("%H",cont) Print(" ") content=content+1 IF content=0 THEN Print("???") flag=0 ELSEIF content<49 THEN fla!}g=Des(1,content) ELSEIF content<96 THEN flag=Des(2,content) ELSEIF content<145 THEN flag=Des(3,content) !} ELSEIF content<193 THEN flag=Des(4,content) ELSEIF content<241 THEN flag=Des(5,content) ELS!}E flag=Des(6) FI IF flag='9 THEN Sl() add=B3(add) Sr() ELSEIF flag='8 THEN add=B3(add) Sy() ELSEIF flag='7 !}THEN add=B3(add) Sx() ELSEIF flag='6 THEN add=B3(add) ELSEIF flag='5 THEN Sl() add=B2(add) Sr() Sy() !} ELSEIF flag='4 THEN Sl() add=B2(add) Sx() Sr() ELSEIF flag='3 THEN add=B2(add) Sx() !}ELSEIF flag='2 THEN add=B2(add) ELSEIF flag='1 THEN Print("#") add=B2(add) ELSEIF fla!}g='0 THEN Print(" ") ELSEIF flag=' THEN add=B2(add) Sy() FIRETURN(add)PROC Desmbler()BYTE key,!}decadd,ctrCARD startadd,endadd,addBYTE ARRAY strdec,strdecfi=" " Close(5) device=0 Poke(82,0) Poke(766,0) !} Menu() startadd=Start() endadd=End() Dev() IF startadd=0 THEN startadd=1 ELSEIF endadd=startadd THEN enda!}dd=startadd+1 FI Poke(766,1) PrintE("") PrintE(" ") FOR add=startadd TO enda!}dd DO StrC(add,strdec) FOR ctr = 1 TO 5 DO strdecfi(ctr)=32 OD SAssig!}n(strdecfi,strdec,1,5) Print(" ") Print(strdecfi) Print(" ") PrintF("%H",add) Print(" ") !} add=Desm(add) key=Peek(754) IF key=33 THEN WHILE Peek(753) DO OD E!}LSEIF key=28 THEN Desmbler() FI PrintE("") OD Desmbler()RETURN DO OD E YMODULE ; CMPTODSK.ACT; Copyright (c) 1983; by Action Computer Services; All Rights Reserved; version 1.0; last modifi%}ed October 22, 1984; Compile to disk for ACTION! ; compiler. Note that all ARRAY; declarations that generate storage; m%}ust be before the first procedure; declaration or else the address of; the storage will not be setup; correctly (all dimen%}sioned ARRAYs; which are not assigned an initial; value except BYTE/CHAR arrays of; size 256 or less). Local ARRAY; decl%}arations in the main PROC (last; procedure in program) are also; allowed. Note: there must be at ; least one PROC/FUNC i%}n program.; Output file name will be same name; as program being compiled with; extention .OBJ; IF AN ERROR OCCURS DURI%}NG; COMPILATION, YOU SHOULD USE; "/" to close all open files:; >/; change dev in SPLEnd below to direct; output to%} printer.DEFINE STRING = "CHAR ARRAY"DEFINE JMP = "$4C" ; JMP addr16TYPE INSTR=[BYTE op CARD addr]INSTR Segvec=$4C6INS%}TR SPLvec=$4DDINSTR MonCmd=$4FBINSTR OldMonBYTE oldDevice, curBank=$4C9BYTE pf, Zop=$8A, tZop, devCARD curproc=$8E, cod%}e=$ECARD codeBase=$491, codeSize=$493CARD codeOff=$B5CARD globals, gsizeCARD totalSize, codeStartCHAR ARRAY cmdLine(0)=$%}590BYTE ARRAY bank(0)=$D500BYTE ARRAY zpage(32), temps(16)PROC InitMon(); add "/" command to monitor which; closes cha%}nnels 1-5 and warm; starts cartridge. CHAR cmdchar=$591 BYTE i, WARMST=$8 DEFINE JMPI="$6C"; make sure right comman%}d IF cmdchar#'/ THEN [JMP OldMon] FI bank(0) = 0 ; init library routines FOR i = 1 TO 5 DO Close(i) OD WARMST%} = 1[JMPI $BFFA] ; warm start cart.INCLUDE "BLKIO.ACT"PROC Save(); save state of variables used by; both compiler an%}d library routines bank(0) = 0 ; init library routines tZop = Zop MoveBlock(zpage, $B0, $1B) ; to $CA MoveBlock(temp%}s, $5F0, 16)RETURNPROC Restore(); restore state of variables used by; both compiler and library routines CARD tcodeOf%}f Zop = tZop tcodeOff = codeOff MoveBlock($B0, zpage, $1B) ; to $CA MoveBlock($5F0, temps, 16) codeOff = tcodeOff%} bank(curBank) = 0RETURNPROC WriteHdr() PutCD(5, $FFFF) PutCD(5, codeStart) PutCD(5, codeStart+totalSize-1) Wri%}teBlock(5, globals, gsize)RETURNPROC WriteCode() codeSize = code - codeBase PrintD(dev, curproc) PrintD(dev, ": ")%} PrintCDE(dev, codeSize) totalSize = totalSize + codeSize WriteBlock(5, codeBase, codeSize) code = codeBase codeOff %}= codeOff + codeSizeRETURNPROC SegEnd() Save() IF pf THEN ; print locals WriteCode() ELSE pf = 1 global%}s = codeBase gsize = code - codeBase codeBase = code totalSize = gsize codeStart = globals + codeOff Writ%}eHdr() FI Restore()RETURNPROC SPL() ; dummy proc for call belowPROC SPLEnd() CHAR c BYTE nxttoken=$D3, i, n, b%}uf=$9B^ CARD nxtaddr=$C9, start=$2E2 STRING inbuf(0)=$5C8, name STRING out(17) DEFINE PLA = "$68", STA = "$%}8D" Save() dev = 0; to get output to printer:; dev = 4; Close(4) Open(4, "P:", 8, 0); get output name IF nxttok%}en=30 THEN ; command line name = nxtaddr ELSE ; editor buffer name = inbuf FI; see if device needed n = 0 I%}F name(2)#': AND name(3)#': THEN out(1) = 'D out(2) = ': n = 2 FI; get name without extension FOR i = 1 TO name(%}0) DO c = name(i) IF c='. THEN EXIT FI IF c>'Z THEN c = c & $5F FI out(i+n) = c OD; add extension ou%}t(i+n) = '. out(i+n+1) = 'O out(i+n+2) = 'B out(i+n+3) = 'J out(0) = i + n + 3 PutE() Print("output file is ") %} PrintE(out) PutE() Close(5) Open(5, out, 8, 0) buf = 0 ; clear buf used by Open pf = 0 ; no proc decl yet; JSR %}for return so that we come; back here after compilation [ PLA STA SPL+1 PLA STA SPL+2 ] SPL = SPL +%} 1 ; get right address Restore() SPL() Save(); ignore space for arrays code = codeBase + codeSize WriteCode()%} PutCD(5, $2E2) PutCD(5, $2E3) PutCD(5, start) Close(5) Open(5, out, $C, 0) WriteHdr() Close(5) PutDE(dev) %} PrintCD(dev, totalSize) PrintDE(dev, " bytes of code") Restore() codeOff = 0RETURN; only code generated before In%}it is; allocated space. Init will be; garbage collected (well kind of).PROC Init() CARD codeBlock, bsize, csize, nBloc%}k CARD POINTER cur, next; link in our routines Segvec.op = JMP Segvec.addr = SegEnd SPLvec.op = JMP SPLvec.addr =%} SPLEnd OldMon.op = MonCmd.op OldMon.addr = MonCmd.addr MonCmd.op = JMP MonCmd.addr = InitMon; allocate our routine%} so it won't; go away. codeBlock = codeBase - 4 next = $80 ; AFbase DO cur = next next = next^ UNTIL next=0 %}OR next=codeBlock OD IF next=0 THEN PutE() Put($FD) PrintE("I can't allocate space for your code") PrintE("Y&}ou better Boot and try again!") RETURN FI; assume we can split block csize = @codeBlock-codeBlock nBlock = next^&} bsize = next(1) - csize next = @codeBlock cur^ = next next^ = nBlock next(1) = bsize codeBase = next + 4RETURN$};; ADEFS.ASM;; Copyright 1983 by Action Computer Services; All Rights Reserved.;; last modified July 29, 1983;*}RAMzap = 1 ; to zap or not to zap, that is the question?;; Page Zero defs:;; Alloc/Free defs, also used by compilerAFba*}se EQU $80AFlast EQU $82AFcur EQU $84AFsize EQU $86AFbest EQU $88props EQU $88AFbsze EQU $8Aop EQU $8AlstToken *}EQU $8B ; prev. token value; current window data / comp. varssp EQU $8Cchoff EQU $8Dlnum EQU $8EcurProc EQU $8E *}; 2 bytesdirty EQU $8Ftop EQU $90 ; -> top linebot EQU $92 ; -> bottom linewhaddr EQU $92 ; -> current DO framecu*}r EQU $94 ; -> current linex EQU $96 ; don't use in comp.y EQU $97 ; don't use in comp.nlines EQU $98chan *}EQU $98 ; current input fileyTop EQU $99defFlg EQU $99indent EQU $9AstackPtr EQU $9A ; op stack offsetbuf EQU $9B * }; -> edit bufinsert EQU $9D ; insert/replace flagdelNxt EQU $9E ; ->, USED BY LEX; arguments and tempsargs EQU $A0arg* }0 EQU $A0arg1 EQU $A1arg2 EQU $A2arg3 EQU $A3arg4 EQU $A4arg5 EQU $A5arg6 EQU $A6arg7 EQU $A7arg8 E* }QU $A8arg9 EQU $A9arg10 EQU $AAarg11 EQU $ABarg12 EQU $ACarg13 EQU $ADarg14 EQU $AEarg15 EQU $AF; compiler v* }arsstBase EQU $B0 ; s.t. base (page)stGlobal EQU $B1 ; global hash tablestLocal EQU $B3 ; local hash tablecodeOff EQU* } $B5 ; relocation offsetdevice EQU $B7 ; default deviceglobal EQU $B8 ; global/local flagstack EQU $B9 ; value stac*}kframe EQU $BB ; -> current framesymtab EQU $BD ; -> next s.t. entrystMax EQU $BF ; s.t. top (page)addr EQU $*}C0 ; token addresstoken EQU $C2 ; token value; following defs can be used during; program execution (user program)dirt*}yF EQU $C3spLn EQU $C4 ; error char curLn EQU $C5 ; error linecurNxt EQU $C7 ; next error linenxtAddr EQU $*}C9 ; next token address; $CB-$CD never referencedstG2 EQU $CE ; only used if big s.t.arrayPtr EQU $D0 ; array mem. lis*}tspNxt EQU $D2 ; next error charnxtToken EQU $D3 ; next token value;; ACTION! vars ($480 - $57D);w1 EQU $480 ;*} window 1 datatop1 EQU $48FChCvt EQU $490 ; char convertcodeBase EQU $491 ; 2 bytescodeSize EQU $493 ; 2 bytesstSp *} EQU $495 ; s.t. size (pages)mpc EQU $496 ; edit/mon flaggbase EQU $497 ; 2 bytestype EQU $499list EQU $49*}A ; listing flagnumArgs EQU $49BcmdLn EQU $49C ; command line offsetparam EQU $49DopMode EQU $49EcurWdw EQU $49F *} ; window memory offsetcurY EQU $4A0 ; current Y reg (0/1/unknown)lastCh EQU $4A1 ; last charcurCh EQU $4A2 ; cur*}rent charSpareM EQU $4A3 ; -> spare memnumWd EQU $4A5 ; number of windowsallocErr EQU $4A6 ; INC on Alloc errordelBu*}f EQU $4A7 ; 6 bytesfrstChar EQU $4AD ; used for big s.t.tagList EQU $4AE ; 2 bytesChCvt1 EQU $4B0w2 EQU $4B1 ; *}window 2 databckgrnd EQU $4C0 ; background colorprocSP EQU $4C1 ; Break stack pointerargBytes EQU $4C2trace EQU $4C3 *} ; trace flagbigST EQU $4C4 ; big s.t. flag; $4C5 availableJmps EQU $4C6 ; see EDIT.CAR; Jump table goes to $4FF*}SegEnd EQU $4C6 ; segment RAM veccurBank EQU $4C9 ; current ROM bankstMask EQU $4CA ; BIGST maskError EQU $4CB ; *}Error RAM vecwSize EQU $4CE ; split window sizelineMax EQU $4CF ; editor line maxChCvt2 EQU $4D0ExpEnd = $4D1 ; e*}xpression RAM vecDclEnd = ExpEnd+3 ; declaration RAM vecCGEnd = DclEnd+3 ; code generator RAM vecAREnd = CGEnd+3 ; arra*}y ref RAM vecSPLEnd = AREnd+3 ; end RAM vecAlarm = SPLEnd+3 ; Bell RAM vecEOLch = Alarm+3 ; editor EOL charLSH = EOLc*}h+1 ; math routines:; LShift; RShift; MultI; DivI; RemI; SArgsChCvt3 EQU $4F0tvDisp EQU $4F1 ; display on/offDis* }pTb EQU $4F2 ; misc RAM vecs:; normal character in ed; ctrl-shift char in edSmtEnd = $4F8 ; statement RAM vec; illegal mo*!}nitor command RAM vecSTMrAdr = $4FE ; ST lookup routine addresssubBuf EQU $500 ; 40 bytesfindBuf EQU $528 ; 40 bytesn*"}umBuf EQU $550 ; 24 bytesstkBase EQU $577opStack EQU $580; $580 TO ? is used for output of; FASC routine. Should not *#}exceed; 16 bytes, $58F (worst case?).tempBuf EQU $590 ; 40 bytesargTypes EQU $5B8 ; 8 bytesEOF EQU $5C0 ; 8 bytes*$}inbuf EQU $5C8 ; 36 bytesabt EQU $5EC ; 4 bytestemps EQU $5F0 ; 16 bytes;; system vars;WARMST EQU $8DOSVE*%}C EQU $ADOSINI EQU $Ccode EQU $E ; ap. high mem.BRKKEY EQU $11RTCLOK EQU $12ADRESS EQU $64LMARGIN EQU $52RMARGIN E*&}QU $53ROWCRS EQU $54COLCRS EQU $55DINDEX EQU $57SAVMSC EQU $58OLDROW EQU $5AOLDCOL EQU $5BOLDADR EQU $5EOLDCHR EQU $5*'}DcsrCh = $5DRAMTOP EQU $6AFR0 EQU $D4FR1 EQU $E0CIX EQU $F2INBUFF EQU $F3FLPTR EQU $FCSDMCTL EQU $22FTXTMS*(}C EQU $294TABMAP EQU $2A3COLOR4 EQU $2C8MEMTOP EQU $2E5MEMLO EQU $2E7CH EQU $2FCLBUFF EQU $580 ; fp ASCII bufC*)}ONSOL EQU $D01FKBCODE EQU $D209DMACTL EQU $D400WSYNC EQU $D40AAFP EQU $D800FASC EQU $D8E6IFP EQU $D9AAFPI **}EQU $D9D2FADD EQU $DA66FSUB EQU $DA60FMUL EQU $DADBFDIV EQU $DB28LOG EQU $DECDLOG10 EQU $DED1EXP10 EQU $D*+}DCCPLYEVL EQU $DD40ZFR0 EQU $DA44ZF1 EQU $DA46FLD0R EQU $DD89FLD0P EQU $DD8DFLD1R EQU $DD98FLD1P EQU $DD9CFS*,}T0R EQU $DDA7FST0P EQU $DDABFMOVE EQU $DDB6COLDSV EQU $E477;; window record offsets;Wsp EQU 0Wch EQU 1Wlnum*-} EQU 2Wdirty EQU 3Wtop EQU 4Wbot EQU 6Wcur EQU 8Wx EQU 10Wy EQU 11Wnlns EQU 12 ; num linesWyTop EQU *.}13Windent EQU 14;; system defs;EOL EQU $9BESC EQU $1B;; bank switching defs;ML = $B000EL = $A000LL = $A000*/};LL = $8000CL = $A000;CL = $9000BANK = $D500EBANK = 3LBANK = 0CBANK = 4ching defs;ML = $B000EL = $A000LL = $A000(O@oVl CINPUT!@ (c)1983 Action Computer Services  B J.1}KIHiDiELV`Lh@ h@ BLV`L@@l L@ &` Fj.2}`8冨凪` @EӅӥ @`ʆǪƩ Ɛee` AƦʆǢ &Ɛeǐ.3} /A /AL@ A'&&&8儨児祂*L@&&*ń8&&L@ A`hihi.4}HHȱȱL@c !#3`L@JJJJ`Hȩh @LB @L.5}B P@LB X@LB ^@H8`HhHh BLB BHI V䅠LB LBԆ.6} ؠPIPP` BP X@LB BL CH- B8塪墨hLC ,CLB$ B&.7}*i0:0i BƦ`护°ڱ%ȱ%E BLzC担CS rBLzCI %CLzCH QCLzC CLzCS:CE:C[.8}\ZUVT```ťƤe8夰LDL:D6D6DALZDZ6DLZD6Di 6D6D.9}`LdD`D`D0LD9`DLD``hLD ADD DLDDiDi0DDDD`DD.:}ͅDDL`EDDDD ADD LEDi0DLEDi7DDmDDiD8DDDDDDD AD.;}DLDDmDDiDDmDDi`8~}LFEELQGEEEmEEi 7DEEE aDLGLQGEE QAmEi80E.?}ELFE 7DEEId EIiL_HEEȱ0LHEE8񮅠񮅡E DEEEiE.@}EiE8EEEEEEEiEiiEiEi-L\HEEE DE.A}EEiEEiELFJEIuLHEEE DEEEiEEiELFJEIx EIhL I.B}EEE DEEEiEEiELFJEIoL\IEEE D.C}EEEiEEiELFJEIbLIEEE DEEEiEEiELFJEIsLIE.D}EEEEiEEiELFJEIeLJEEEEE BLFJEIcL1JEEEEiEEiEEE.E}EEEEEEEE͜EE0LmJEEEILJE͝ELJ8EEEILJ0E BLJ0E BLwJEEE.F}͛ELJE͛EELJEmEEiE BELJEL!KE͝EL!K E B8EELKL-KEE BLE`( .G}u,Lh)LBK A1K 4K3K6K5K8K7K:K9KK=K2K1K E`LK@@@@@@ @ @ @ .H}@)@,@-@.@`LKKK BKK BKKK`LKKK K@@KL L`@I @IL6L.@K K@.I}@LGL.@@@@@K K@@8@@@@i @i @@I @ILL,@.@K K@@LL@I .J}@ILL-@.@K K@@``LLL,@L6MLL%ELL EL M; Routine inits at vector $LL yBL"M%4.4H%E@.K}@ML E-@LMLDM%EMAL ELlM; Routine runs at vector $MQL yBLM%4.4H%E@@MyL E.@LNLM%E%E.L}ML ELM;ML fBLMPROC ML yB@L yBLM_MޭL yB @L CLM = $ML yBL N%H@@NL EL'N.M}() [N"L fBLHN; Segment contains N4L yB @ @L CLiN bytes.NaL fBLN SET $E = $NvL yBLN%H%E@@N.N}L ELN SET $491 = $NL yBLN%H%E@@NĭL E`0LNNN @Ȍ @ @O @OO @O @LONN B)@.O}NL)O`L.O$O,N yBLAO%2.2H)@O;N E @ @ ALOLyO OwN fBLO @ @LN`LOOL.P}O]OO fBLO ; End of OO yB@O yBLO_O̭O yB@ @O CLO segment.O筒O fB @@` CL P AP+@ lB.Q}PP+@ 5B*@ lBPP*@ 5B*@LyP K*@ K+@ L.@LvP+@*@ N+@ OLEP*@ lB+@ lB`LPPPa.R}LPz͆PLP``LPPP PLP8P PP`0X: 3ȱC*LPPPPPȌPPPQ.S}QPLQPmPPiHHPmPPi PhhPmPPiI.LxQPPPmPPiI:.T}LQȌPPLQPLQPP8PELQPPPiPLRPPiPDP1P:PȌPP.U}P"R"RPLJRPiPmPPiPPLRPP`R`RPLRPmPPiPPPLUR` B.V}  8LRRRRRRRR̈́RLRRmRRiI:LRLRRLRRiRRRRRSS̈́R.W}L-SRmRRiI.L'SL-SRLRRR8RRR DR@ C`3E83 .3m4L{SĢ .X}CR C} B BLS$ - Action! segment generator.S _BLS%Transforms binary files into hex codeS _BLT%loadabl.Y}e/editable by Action! languageS _BLMT%cartridge. Copyright (c) 01-Jan-1985,T' _BL{T#Harold Long, Bolton MA. Version 1.3.Z}TW _BLT$Permission granted to distribute forT _BLTnon-commercial purposes.T _B B  CLT Input File? T _B .[} CLUOutput File? P:U _B lBL%UK:U" 5B C BSW BSW P CLqU U^ .\}rB C BSW rB C BSg BSg P CLU U rB C BSg rB B BLUCorre.]}ct (Y/N)? U rB BwSwSIYwSIywSIN wSInLVwS BwSIY wSIyL6USW RSgSW P`L\V@ @ xSL`V``.^}YV(Y/U rB BwSwSIYwSIywSIN wSInLVwS BwSIY wSIyL6USW RSgSW P`L\V@ @ xSL`V``, These programs were written using Action! Action! is a Trademark of Action Computer Serv2`}ices Portions of these programs are copyright (c) 1984, A.C.S. Action! utilities user's guide.2a} Copyright (c) 1985, Harold Long, Bolton, MA. Forward: Included on the evaluation disk a2b}re three program developmentutilities which assist the programmer in producing clean, maintainablecode. These programs wer2c}e developed by the author as part of his ownlibrary of personal production tools, and are in use daily. "Libscan" (L2d}IBrary SCANner) is designed to assist the programmer inselecting subroutines from the Action! run time library when producin2e}gportable object binaries. Its main purpose is to analyze source programsand report on each and every run time routine cal2f}led from the mainprogram. Using this report, the programmer can edit the run time library,and delete unused routines, thus2g} producing the smallest possible objectcode, shorter load times, and possible optimization of library useage. "Hexas2h}eg" (HEXAdecimal SEGment) provides an easy bridge betweenmacro code (machine language) and Action! PROCedure calls. Until H2i}exaseg,the programmer was required to code and list the machine language routine,and then manually transform the listing in2j}to Action! code blocks. Besidesbeing time-consuming, this manual process is highly prone to theintroduction of transcripti2k}on errors and subsequent bugs. "Format" (program FORMATter) provides an easy mechanism to clean upsource code, espec2l}ially just prior to archiving. By rigorously followinga conservative approach to program taxonomy, more maintainable code i2m}sproduced. Format supports this effort by implementing consistent rulesfor placement and indentation of program statements2n}, and can be extendedto include additional statement forms and keywords. 1.0 LIBSCAN - Libscan is provided as a r2o}unnable object file, withno user-settable options. Libscan's primary purpose is to analyze yoursource program for calls to2p} the cartridge library and provide a hard-copyoutput. Table output is organized by library section, with calls to thatsect2q}ion itemized and counted. 1.1 Libscan is run from DOS level, as a standard utility (.COM)file. The user screen asks2r} for input and output device/file specifica-tions, and includes a Yes/No prompt before execution. No changes are madeto th2s}e source file. Previously existing output files written to disk areoverwritten. 1.2 Operation - Libscan parses the 2t}input file line by line,character by character. The Action! 'special character' set is used asdelimiters, plus the space (2u}$20, 32) character. Contiguous sets ofnon-delimiter characters form "words", which are then tested against eachword in the2v} Action! library. If found, these words cause an internalarray of library call counters to be incremented. Any 'embedded' 2w}callsrelated to that word (for example, "Open" calls "ChkErr") is internallyappended to the input line for subsequent proce2x}ssing. In this manner, alllevels of embedded call can be checked. When EOF(input) is reached,Libscan will summarize and p2y}rint the library calls used. Sample output: (Expansion of "PrintF" statement) 2z} D1:PTEST.ACT Total calls to SYSLIB: 4 Individual calls to routines: Output: 1 Error: 2 B2{}reak: 1 Total calls to SYSIO: 26 Individual calls to routines: ChkErr: 3 Break1: 2 Print:2|} 1 PrintD: 1 CCIO: 2 Put: 2 PutD: 2 PutD1: 3 CToStr: 2 PrintC: 1 PNum2}}: 1 PrintCD: 1 PrintI: 1 PrintID: 1 PrintH: 1 PrintF: 1 PF2: 1 Total calls 2~}to SYSGR: 0 Total calls to SYSMISC: 0 Total calls to SYSBLK: 0 Total calls to SYSSTR: 0 2} NOTE The scan comparison routine is case sensitive. "PRINTE" will be int2}erpreted as "PrintE"; correct language syntax and capitalization rules must be followed for rou2}tine to function properly. For optimization, set the Action! compiler to case-sensitive opera2}tion, and ensure that your source program compiles without error PROIR to running Libscan. 2} 1.3 Restrictions - Certain run-time library routines (particularlythose in SYSLIB) are not called directly by user stat2}ements or otherlibrary routines. Included in this category are SArgs, SMOps, mathfunctions, etc.; Libscan does not explic2}itly check for compiler assignedcalls, and users are cautioned to INCLUDE SYSLIB in its entirety toensure that these routi2}nes are available during runtime. Library words used in a quoted string or comment field (such as'PrintE(" the d2}oor") ; to follow' will be counted as if theywere actually used in a statement. Users should examine both strings 2}andcomments if they believe a library call is incorrectly reported. Parsing of lines with multiple commands and/or e2}xcessive commentlength may cause internal overflow of the text buffer. (For example,"PrintF" expands to 30 individual libr2}ary calls.) Buffer overrun willcause incomplete expansion of embedded calls. Users are cautioned to keepline length to le2}ss than 80 characters, and to only include one librarycall per statement. 2.0 HEXASEG - Hexaseg provides a convenie2}nt means of includingshort (up to 8K) sections of object code as Action! source. Hexaseg willconvert object binary files t2}o hexadecimal files, suitably formatted forre-compilation by Action!. 2.1 Hexaseg is run from DOS level, as a standa2}rd utility (.COM)file. The user screen asks for input and output device/file specifica-tions, and includes a Yes/No prompt2} before execution. No changes are madeto the source file. Previously existing output files written to disk areoverwritten2}. 2.2 Operation - Hexaseg examines the input file for standard Atariloadable file header format (first word is $FFFF2}, next word is loadpoint,third word is end-1), computes the length of the segment, and convertseach byte of the segment to 2}hexadecimal notation. If more than one headeris encountered, Hexaseg will properly close the current segment, and beginwri2}ting another segment at the new load address. Loadpoints $2E0 and $2E2are treated as RUNADR and INITAD, respectively. Each2} output segmentincludes a pair of SET statements to position the final code at the samelocation as originally SAVEd. These2} can be removed or edited as required. Sample input: (MAC/65 format) 0000 10 .OPT OBJ,NO EJE2}CT 0000 20 *= $0100 ;Stack space... 0100 30 BEGIN 0100 ADE202 40 2} LDA $02E2 ;Get init vector 0103 8DE002 50 STA $02E0 ;and stick in 0106 ADE302 60 LDA 2}$02E3 ;run vector. 0109 8DE102 70 STA $02E1 010C 6CE002 80 JMP ($02E0) ;go get 'em! 2} 010F 90 *= $02E0 02E0 0001 0100 .WORD BEGIN Sample output: ; PRO2}C JMPINIT_0 = $100() [ ; Segment contains 15 bytes. SET $E = $100 SET $491 = $100 $AD$E2$02$8D$E02}$02$AD$E3$02$8D$E1$02 $6C$E0$02] ; End of JMPINIT_0 segment. ; Routine runs at vector $0100 22}.3 Restrictions - Binary programs over 8K bytes in length can beprocessed by Hexaseg, but cannot be loaded by the Action! ed2}itor due tomemory space limitations. (They can, however, be re-compiled from disk.) 3.0 FORMAT - Format is provid2}ed in both binary (.COM) and sourceformats to provide user flexibility. The binary version is set up tohandle standard Act2}ion! declarations, and the source version may bemodified to add user-defined declarations of commonly used data andfunction2} types. Both versions provide for user setting of indentation value. 3.1 Format may be run (in binary mode) with the2} cartridge eitherinstalled or not, as desired. The source version requires the cartridge.The initialization screen asks fo2}r input and output file specifications,and "Indent level", i.e., the number of spaces to use when indenting linesinside DO-2}OD, etc. constructions. 3.2 Operation - Format scans the first few characters of each line,and executes the followin2}g decisions: a) If the first non-blank character is a semi-colon (;), then putthat character in column 1. This left2}-justifies all comment lines. b) If the first word in the line is MODULE, PROC, or FUNC (or somevariation like BTE F2}UNC), then left-justify that line. c) If the first word in the line is DO or IF, then right justifythat line +n space2}s. d) If the first word in the line is OD or FI, then left justify line-n spaces. e) If the first word in the 2}line is ELSE, ELSEIF, or RETURN,temporarily left justify the line -n spaces. f) Otherwise, print it at the current j2}ustification level. Sample input: PROC TEST() ;Indented comment BYTE foo FOR fo2}o=0 TO 20 DO ;inline comment PrintBE(foo) OD RETURN Sample output: 2} PROC TEST() ;Indented comment BYTE foo FOR foo=0 TO 20 DO ;inline comm2}ent PrintBE(foo) OD RETURN 3.3 Restrictions - Format will NOT properly handle complex2}statements of the form "IF mumble THEN mumble FI", or "DO mumble OD".Input lines using this form will cause incorrect inden2}tation levels. Embedded RETURNs may or may not cause de-synchronization of indent levelsdepending on where they occur. All2} indent levels are reset when MODULE,PROC, or FUNC is declared.onization of indent levelsdepending on whereine runs at v2}ector $0100 2.3 Restrictions - Binary programs over 8K bytes in length can beprocessed by Hexaseg, but cannot be lo2}aded by the Action! editor due tomemory space limitations. (They can, however, be re-compiled from disk.), but cannot be lo0k