ML}  X c0C)HCCH Mhhݩh `eCDiCD`  RWH   * 1H0芢@) Y0.Ș`i#(PMRR\ \b Pgi 0 @ $ ࠮UY   0DDԝLH}iN@ )?HI   Y0`HIJH)* J j *  hJJJ)HJ   h i   }  YS S0 i`ϣ߳ϣ߳H J3x}j2h)1 |9 ӭ45(420 *(0241өX.`  J *^)Lkl  }v*PE 5 LN(G = gh ` ghgL ( = LG(0d( L ^E0O +)$IC} H K8 f e h |  _ 8cd CDLI CFa M  LG J^)La`2' }")*F$F$F$F$F$ 5 )ШF/Șa]`efС,LI/A! L^)Za`@ ܬ/^)( }")")`$F$F$F 5$/L /aF@__(LN`ae$$%8(`()` J 0 =LG J^)^>_f t Fg }Ch) |kl5\   Zc[d ?akl LI@^Le>_ >L vJjjj^^ e } fE]_agh`LI:$ȱ$@+[_#{ 0  Խji! ai 0 = I   } U C H h  ˰ 0  F  | Le =  ,  S `LI ,/ 0 v/ | Ơ?} ѩ/  S /L_0?MdLc >_MfLe N`aLGLIcLdMaNLG }J"(+ըHH`Q R !   $ . FȑF! /GF \H"+0+* }! F sLIcm: J~cTF1F  *c+)5! c (, c)1JJJc(c*d} I ,0  Xi Y dF4 5 ,8,0 ʩ0H =h     i} D UDbbFLIvij`*&!ߍ*@h ] 0 ^0`ߍ c 0l$$%}()()%*&J%H,@hH hH@,h $% 8i8$(%)0hhH ]h`() c 0H c 0 h}`hhh&JJ ](ll  LI0 |/qcdHH 99 H H  I9 9 } NY =H  I8 d c  |FcdL HII/ Ih8`h`Lcdc`cd`u F }E KE]LG/auF a0BF/aɜɛ׽]E F  |W  KFL FREE SECTORS C}H) *Fh ):FȽ F FCIH' H0 1h0d  i:Fȩ/F.a`CD/}08HDICIHȰ/F`ȱ$>.+.i ȱ$:刄H !A T Hȱ$*?ȝ 2. ? [_}{ ,0-:) 0$:>WI  IТ,LIH  0hLd v i j`C ?(  0(C.` }E 5! .ii  c0N EE < PC)0')AY)ע ? 0E088FG \}dc  (HhLcL3 ^J ^ L}fe 0=ghecfdefa``_Z_0  _ >LXH}FhȑFȽaF^0 ] FFL>ekfl\cZd[L> ef7  ?0^ 0 FJJ]1FfȱFeȱF``B}!08`]EE < 8. 5D}iji( LʩLXW!)   XȌVȌY W`VVW}H8 hYaHXY8 XH hHH \h hX` 5Hh I8ih( l ( l(!`}L\CJfCJfCJfCDfC` |V  HII  INYh `h`c)8jHciPdijIjFIjFIjh` | }V I38 8H0 I  ' H LI8jY8j NYY &I &I &IHeH.!}eIif  `!.莼 2Jjj }.b Ȉ!b FG` ɩLI z "} e H^04 \ Ȍ  8 i h !`I0 `C Y0.`DOS #}SYS I  ` vݩ.C/`WV.b۩bѤC9`CLU R  ,F0(Bߝ$}DEI V0 : , BLVDE`D1:*AR28hhJ ȱHȱIȱBȱDȱEeeHHL%}V)  1*  ,,p-  0  &  '0   L)l, 0 &} &LD1:MEM.SAVE:D1:DUP.SYSSYS,DOS.SYShh =L4,  VLT :C :}T)CD1:DOS.SYS n  * \*`آ R'S )ɀ@  _))% CError lo(}ading MEM.SAV or memory!  0* l*m*n*o* R Hn*JSDn*J-=o* 0m*ʈд =}MYDOS 4)}.53/3- Copyright 1988,˛Disks 1S- 4R D: = D1:ˢ = =1-8.Dir of D1:-D8: *. Dir of D:A. *}Disk Directory K. Save MemoryB. Run Cartridge L. Load MemoryC. Copy File(s) M. Run at AddressD. Delete File(s) N. L+}oad MEM.SAVE. Rename File(s) O. Change Config.F. Lock File(s) P. Set DensityG. Unlock File(s) Q. Make DirectoryH. Wr,}ite DOS Files R. Pick DirectoryI. Initialize Disk S. Set RAMdisk #J. Duplicate Disk V. Set Verify Flag  @-}( 0  =Select Item ( for menu):@  =ɛL)1L,*L,:W@ ,,L=No such item!.}L4,-0{ ПFull directory name?Z"L.Directo3}ry to be used as 'D:'? @ A(5)L.(I: ȱޝL4, CInvalid directory!L@( 4})0Lp-File source, destination? '( @C۩ڭ8邅ܭC BC'0 @(ߍeލd)DЍ) ? C' 5}B Bȱޙ':>Ȍ)C0J* .B D'ȱ/.* #,ɛȝD' ߰ B ?,(0L4, 'u6}t)D'3?&' .'ȽD'?&'  .ٓ'Q?''(#) = =-->' =Q7} =YR_o (J)  0?Cݖ''BU)`''utz0( "?(L0L4,L@nDisk to FORMAT: 8}A B)UTލ1 =(Press for Enhanced Dns)Type to Format Drive 1: =AIYZNj[R VL@L49},D1:DUP.SYSDrive to write DOS files to? AH1:*U)2T) Z B hpT) J<2UT:}C٩ة۩.کL;Source, Destination (Sectors)? A)((C'( A)((((( @(0% =Insert b;}oth disks, type = B( A((/( OB(( CDrives not compatible!J)j)C'Hs''<}h(ɛy CInvalid options! Y@-&& Y@)׍&&(&&&۩ک&&&&8* C4&&&& C48=}*8)ܭ)ݥɂC, CNot enough memory! ک&&`(Mh  & >L@&i &&>}&&mm   >  &((&թԥԍ(Ս(((( ( ((C((?}ԍ((,(0"( (( >m)m) & &("L4,  ( BL4,(, =Insert DESTIN@}ATION disk, press =N T) b( 0U) @((ԭ(խ( ( (((L4Drive, new density: A}AC'ɛ CDrive unchanged.(ު90٨Ȍ(SD  |BL)xԌҭHӭ@@ ʎӆ@B}ӭ@@ :  $ӹ@hөԥX` Aˠ =RAM disk present? =NL;8 =xlon C}or E type RAMdisk? =Aό  L   M   A1| H6: ' =No extra memory available!L;8L7D} & & & =Use default config for 0)ȩ = =K? =NL8 =Size(K)? ? Y@FjFjFjFjE}: =Page sequence? ? [@o* =RAM disk drive no? = 09) `9 -9**H***) 9 Ȋ)h9 F}@@ H'h(#''/'(ɛ ? [@(@: 3 ʽ' L8 =Duplicated sequence number!LG}7 =Wrong number of entries!L7K큅쀄 =Verify WRITEsH}? &; =Number of File Buffers? ? Y@  6 L),R( ?;L4,Drive number or : =ɛL[99L60Ȍ(I} =Remove drive? =Y =Is drive configurable? =YЂ =High capacity drive? =Yy =Is drive double sided? =YJ} 5; =Tracks/side? ? Y@#0M P( 5; =Step rate? =4/ 5; ?;L4, =Drive size (in sectors)? ? Y@K}H(h B;L4,RAM disk drive no? +8L4,Verify WRITEs? &;L4, =WNPp`(`(  L|BSAVE:filename,stL}art,end(,init(,run)) @TUH [@Cp` J< [@؆8օڊ CInvalid START-END range!۩ [@ M} [@ hԄՠAȌZ B04*  0$ڍXۍY֍T׍U,0LCLC SCL@ֆ׌`Load MEN}M.SAV from what file? 0#L4,L@Load from what file?) @TU&̩Z B &0&-&а&INO}IZ'RV0II CNO CARTRIDGE!Ԇխ  )LIRun from what address? ?ɛP} [@ CAddress must be 1-4 hex digits! BHILV =`hh =HH` =0{a HɛQ} = =h` =L4, > = pHH >hh`K: p `(()( i ɀ((L@(`(BD(0>HHR}''>I>U>I>ɛ(ɛ (>(`͓>DH(`(HI`(v5 = =( @B( 3>@S}A (J B0}((HHIIDDEE B @(CɈP(#B = =( @BL2?(B>>((ڤ ܝHT}ݝI VL>L@(" B !B T)  B(L& R XY( @&:0H&()&U} ) .) & ) .)ʩ)`ލD&ߍEBIʎH( V0`ԩ ؠL@ȱM@ȱ)N@ V} CError -- 000&`$8f nAԄձG/ $<68i/(Ԧ`H&եԦ&&eԅheԅԊe(iLe@&&W}&&ԅLe@B ? nA?*(ɛ:./2SX(0ȱ/.ɛ(ލC'ި0X}#:Ȱ :ފ :ȱ: : ~AD ~Aޥ`(eޅީe߅`(` @LA @TUȪ: CFile name noY}t allowed!: )  s( >0+L TUD CNot a disk file!(0` =Insert SOURCE disk, press Z} =,(pӮ(A(O lB |BlB`1(L$ b)de BJKO [}L@O` B()*)))`ȱޙ)):>Ȍ)`D:`OS.SYS,DOS.SYShh =L4,  VLT :C :C\},pLsLF#Խ٩Յ׆  L"C`David R. Eichel rel.ver.1/1/90OS.SYShh =L4,  VLT :C :CSd!X; ***************************nX; Set up initial conditionsx!X; ***************************;; Place to assem^}ble it$TOPj;; Where the top is stored+CURPAG;; To store page being cleared!X; ***************************X; B_}egin with calculations!X; *************************** 7;; # of parameters off stackQTOP;; Find the top ;;; Get read`}y for subtraction"S>;; Find first page to clearPCURPAG;; We'll need it&Q>;; To insert it in memory later+PCURPa}AG;; Low byte of page # is zero%>;; For use as a counter(X; **********************************'X; Now we'll enterb} the clearing loop"(X; **********************************,1LOOPP@CURPAG7;; The first byte is cleared61;; Lower the cc}ounter@'HLOOP;; If >zero, page not done yetJ,#CURPAG;; Let's move on to the next pageT'QCURPAG;; Need to see if we're dd}one^RTOP;; Is CURPAG >TOP?h$FLOOP;; No, last page coming up!rDLOOP;; No, keep clearing|:;; Go back to BASIC we're du0100 ; ***************************0110 ; Set up initial conditions0120 ; ***************************0130 *= $0600 ; f} Place to assemble it0140 TOP = 106 ; Where the top is stored0150 CURPAG = $CD ; To store page being cleared0160 g}; ***************************0170 ; Begin with calculations0180 ; ***************************0190 PLA ; # of p h}arameters off stack0200 LDA TOP ; Find the top0210 SEC ; Get ready for subtraction0220 SBC #8 i} ; Find first page to clear0230 STA CURPAG ; We'll need it0240 LDA #0 ; To insert it in memory later0250 j} STA CURPAG-1 ; Low byte of page # is zero0260 LDY #0 ; For use as a counter0270 ; ******************************* k}***0280 ; Now we'll enter the clearing loop0290 ; **********************************0300 LOOP STA (CURPAG-1),Y ; The first l} byte is cleared0310 DEY ; Lower the counter0320 BNE LOOP ; If >zero, page not done yet0330 INC CUR m}PAG ; Let's move on to the next page0340 LDA CURPAG ; Need to see if we're done0350 CMP TOP ; Is CURPAG >TOP? n}0360 BEQ LOOP ; No, last page coming up!0370 BCC LOOP ; No, keep clearing0380 RTS ; Go back to B o}ASIC BEQ LOOP ; No, last page coming up!0370 BCC LOOP ; No, keep clearing0380 RTS ; Go back to B hj8̠ͩ̈ͥj`e coming up!0370 BCC LOOP ; No, keep clearing0380 RTS ; Go back to B$ 1{ORI )-@@0)Number of bytes"Get each bytr}e1A5%1POKE byte in correct location( Finish POKEing data286-F:A,8Now relocate display lists}, as above<A&@F +P'A'Restore top of memoryZ)@ )Set timer to zert}od66-?:A6,6Call our machine language routinen8(F:@ ,'@`8How many seconds did it take?x##Separu}ate DATA from program'((104,165,106,56,233,8,133,205,169,0'++133,204,160,0,145,204,136,208,251,230$',,205,165,205,197v},106,240,243,144,241,96 D:CH7_1.BAS33,8,133,205,169,0'++133,204,160,0,145,204,136,208,251,230$',,205,165,205,197+?ORICLEAR$;@0,$Set up the string )-@x}@0)Number of bytes"Get each byte+67<,.>:,+Insert byte into string( Finish POKEing data2y}86-F:A,8Now relocate display list, as above<A&@F +P'A'Restore top of mez}moryZ)@ )Set timer to zerod66-?:C:,,6New location of the clearing routinen8(F:@ ,'@`8{}How many seconds did it take?x##Separate DATA from program'((104,165,106,56,233,8,133,205,169,0'++133,204,160,0,|}145,204,136,208,251,230$',,205,165,205,197,106,240,243,144,241,96 D:CH7_1A.BAS3,8,133,205,169,0'++133,204,160,0,XqORI286-F:A,8Now relocate display list, as above<A&@F +~}P'A'Restore top of memoryZ)@ )Set timer to zerod# B#Call our ML routinen8(F:}@ ,'@`8How many seconds did it take?x##Separate DATA from program N1.6-?:C:hj8̠ͩ̈ͥj}`,,1$ D:CH7_1B.BASseconds did it take?x##Separate DATA from program N1.6-?:C:hj8̠ͩ̈ͥjd!X; ***************************nX; Set up initial conditionsx!X; *************************** FROM̖ TO }Π%X; *******************************.X; Initialize and set up indirect addresses%X; ******************************* }(7;; Remove # of parameters from stack#7;; Get high byte of destination(PTO;; Store it in high byte of TO"7;; Get l }ow byte of destination$PTO;; Store it in low byte of TO"Q>;; Even page boundary LSB=0(PFROM;; Low byte of indirect }address&Q>;; Page of character set in ROM+PFROM;; Completes indirect addresses%X; ******************************* }"&X; Now let's transfer the whole set,%X; *******************************6&$>;; 4 pages in the character set@%>;; In }itialize counterJLOOPQ@FROM7;; Get a byteTP@TO7;; And relocate it^1;; Is page finished?h HLOOP;; No - keep relocat }ingr#FROM;; Yes - high byte|&#TO;; High byte - for next page 0;; Have we done all 4 pages?HLOOP;; No - keep }going:;; Yes, so return to BASIC&#TO;; High byte - for next page 0;; Have we done all 4 pages?HLOOP;; No - keep #0100 ; ***************************0110 ; Set up initial conditions0120 ; ***************************0130 *= $0600014$}0 FROM = $CC0150 TO = $CE0160 ; *******************************0170 ; Initialize and set up indirect addresses0180 ; $}*******************************0190 PLA ; Remove # of parameters from stack0200 PLA ; Get high byte$} of destination0210 STA TO+1 ; Store it in high byte of TO0220 PLA ; Get low byte of destination0230 $} STA TO ; Store it in low byte of TO0240 LDA #0 ; Even page boundary LSB=00250 STA FROM ; Low byte of$} indirect address0260 LDA #$E0 ; Page of character set in ROM0270 STA FROM+1 ; Completes indirect addresses028$}0 ; *******************************0290 ; Now let's transfer the whole set0300 ; *******************************0310 L$}DX #4 ; 4 pages in the character set0320 LDY #0 ; Initialize counter0330 LOOP LDA (FROM),Y ; Get a byte0340 $} STA (TO),Y ; And relocate it0350 DEY ; Is page finished?0360 BNE LOOP ; No - keep relocating0370 $} INC FROM+1 ; Yes - high byte0380 INC TO+1 ; High byte - for next page0390 DEX ; Have we done all 4 p$}ages?0400 BNE LOOP ; No - keep going0410 RTS ; Yes, so return to BASICEX ; Have we done all 4 p$\!hhhΩ̩̑͢Έ`oing0410 RTS ; Yes, so return to BASICEX ; Have we done all 4 p((F#6ORICHSERELOCATE / B/Set up machine language ro,}utine6-F:A,Top of RAM?6-+&@,$AV?Place for relocated character set(*A&@*,}Make room for it2' +'Set up new display list<!@ !Set timerF*6-?:C:,<,*Relocate the whol,}e setP0(F:@ ,'@`0How long did it take?ZIt took 0.03 seconds N(;@4,(Set it up as a string*N,}+-@@4+Set up the string4N"Get a byte>N,67<,.>:,,Stuff it into the stringHN% %Repeat unti,}l string is doneRN$All done, go back\N++104,104,133,207,104,133,206,169,0,133fN))204,169,224,133,205,162,4,160,0,17,}7pN--204,145,206,136,208,249,230,205,230,207zN202,208,242,96 D:CH7_2.BASfN))204,169,224,133,205,162,4,160,0,17,V9d!X; ***************************nX; Set up initial conditionsx!X; *************************** FROM̖ TO0}Π%X; *******************************.X; Initialize and set up indirect addresses%X; *******************************0}%7;; Pull # of parameters off stack7;; Get high byte of source,PFROM;; Store it in high byte of FROM7;; Get low b0}yte of source(PFROM;; Store it in low byte of FROM#7;; Get high byte of destination(PTO;; Store it in high byte of0} TO"7;; Get low byte of destination$PTO;; Store it in low byte of TO 7;; No high byte exists (= 0)"%7;; Get low byte 0}- number of pages,#>;; Put # of pages in X register6%X; *******************************@#X; Now let's transfer everythingJ0}%X; *******************************T%>;; Initialize counter^LOOPQ@FROM7;; Get a bytehP@TO7;; And relocate itr1;0}; Is page finished?| HLOOP;; No - keep relocating#FROM;; Yes - high byte*#TO;; High byte - now for next page0}0;; Have we done all pages?HLOOP;; No - keep going:;; Yes, so return to BASICTO;; High byte - now for next page0U0100 ; ***************************0110 ; Set up initial conditions0120 ; ***************************0130 *= $06000144}0 FROM = $CC0150 TO = $CE0160 ; *******************************0170 ; Initialize and set up indirect addresses0180 ; 4}*******************************0190 PLA ; Pull # of parameters off stack0200 PLA ; Get high byte of4} source0210 STA FROM+1 ; Store it in high byte of FROM0220 PLA ; Get low byte of source0230 STA FROM 4} ; Store it in low byte of FROM0240 PLA ; Get high byte of destination0250 STA TO+1 ; Store it in high4} byte of TO0260 PLA ; Get low byte of destination0270 STA TO ; Store it in low byte of TO0280 PLA4} ; No high byte exists (= 0)0290 PLA ; Get low byte - number of pages0300 TAX ; Put # of pa4}ges in X register0310 ; *******************************0320 ; Now let's transfer everything0330 ; ************************4}*******0340 LDY #0 ; Initialize counter0350 LOOP LDA (FROM),Y ; Get a byte0360 STA (TO),Y ; And relocate it4}0370 DEY ; Is page finished?0380 BNE LOOP ; No - keep relocating0390 INC FROM+1 ; Yes - high byte04}400 INC TO+1 ; High byte - now for next page0410 DEX ; Have we done all pages?0420 BNE LOOP ; No 4}- keep going0430 RTS ; Yes, so return to BASIC DEX ; Have we done all pages?0420 BNE LOOP ; No 4< hhhhhhh̑Έ`, so return to BASIC DEX ; Have we done all pages?0420 BNE LOOP ; No 8'FORICHSETRANSFER / B/Set up machine language ro<}utine6-F:A,Top of RAM?6-+&@,$AV?Place for relocated character set(*A&@*<}Make room for it2' +'Set up new display list<:!6-?:C:,<BsD<<@,:Transfer the whole setF N(<};@3,(Set it up as a string*N+-@@3+Set up the string4N"Get a byte>N,67<,.>:,,Stuff it<} into the stringHN% %Repeat until string is doneRN$All done, go back\N--104,104,133,205,104,133,204,104,133,207<}fN++104,133,206,104,104,170,160,0,177,204pN--145,206,136,208,249,230,205,230,207,202zN208,242,96 D:CH7_3.BAS7<{Md'X; *********************************nX; Initialize locationsx'X; ********************************* ;; Safe pl@}ace for routine$YLOC;; Indirect address for Y$XLOC;; To remember X position*STICK;; Hardware STICK(0) loca@}tion-HPOSP0;; Horizontal position player 0'X; *********************************X; Now read the joystick #1'X; *@}********************************7;; Keep the stack neatQSTICK;; Get joystick valueM>;; Is bit 0 = 1?"FUP;; No @}- 11, 12 or 1 o'clockQSTICK;; Get it againM>;; Is bit 1 = 1?"FDOWN;; No - 5, 6 or 7 o'clockSIDEQSTICK;; Get @}it again"M>;; Is bit 3 = 1?,#FLEFT;; No - 8, 9 or 10 o'clock6QSTICK;; Get it again@M>;; Is bit 4 = 1?J#FRIGHT;@}; No - 2, 3 or 4 o'clockT+:;; Joystick straight up - exit to BASIC^'X; *********************************h#X; Now move play@}er appropriatelyr#X; Starting with upward movement|'X; *********************************$UP%>;; Setup for moving byte @}1 "YLOC;; Now 1 less than YLOCUP1Q@YLOC7;; Get 1st byte!1;; To move it up one positionP@YLOC7;; Move it3;; N@}ow original value3;; Now set for next byte)> ;; Are we done? DUP1;; NoESIDE;; Forced branch!!!'X; ***********@}**********************X; Now move player down'X; *********************************"DOWN%>;; Move top byte first @}DOWN1Q@YLOC7;; Get top byte3;; To move it down screen&P@YLOC7;; Move it0!1;; Now back to starting value:1;; Set for@} next lower byteD!IDOWN1;; If Y >= 0 keep goingN3;; Set to zeroXQ>;; To clear top bytebP@YLOC7;; Clear itl#YLOC@};; Now is 1 higherv,;; Setup for forced branchDSIDE;; Forced branch again'X; *********************************#X; N@}ow side-to-side - left first'X; ********************************* LEFT"XLOC;; To move it leftQXLOC;; Get itPHPO@}SP0;; Move it!:;; Back to BASIC - we're done'X; *********************************X; Now right movement'X; **********@}***********************"RIGHT#XLOC;; To move it rightQXLOC;; Get itPHPOSP0;; Move it !:;; Back to BASIC - we're @}done*******************"RIGHT#XLOC;; To move it rightQXLOC;; Get itPHPOSP0;; Move it !:;; Back to BASIC - we're @0100 ; *********************************0110 ; Initialize locations0120 ; *********************************0130 *= $0D}600 ; Safe place for routine0140 YLOC = $CC ; Indirect address for Y0150 XLOC = $CE ; To remember X position01D}60 STICK = $D300 ; Hardware STICK(0) location0170 HPOSP0 = $D000 ; Horizontal position player 00180 ; ******************D}***************0190 ; Now read the joystick #10200 ; *********************************0210 PLA ; Keep the stacD}k neat0220 LDA STICK ; Get joystick value0230 AND #1 ; Is bit 0 = 1?0240 BEQ UP ; No - 11, 12 or 1D} o'clock0250 LDA STICK ; Get it again0260 AND #2 ; Is bit 1 = 1?0270 BEQ DOWN ; No - 5, 6 or 7 o'cloD}ck0280 SIDE LDA STICK ; Get it again0290 AND #4 ; Is bit 3 = 1?0300 BEQ LEFT ; No - 8, 9 or 10 o'clock03D}10 LDA STICK ; Get it again0320 AND #8 ; Is bit 4 = 1?0330 BEQ RIGHT ; No - 2, 3 or 4 o'clock0340 D} RTS ; Joystick straight up - exit to BASIC0350 ; *********************************0360 ; Now move player appropriaD}tely0370 ; Starting with upward movement0380 ; *********************************0390 UP LDY #1 ; Setup for moving byD}te 10400 DEC YLOC ; Now 1 less than YLOC0410 UP1 LDA (YLOC),Y ; Get 1st byte0420 DEY ; To move it up onD}e position0430 STA (YLOC),Y ; Move it0440 INY ; Now original value0450 INY ; Now set for next D}byte0460 CPY #10 ; Are we done?0470 BCC UP1 ; No0480 BCS SIDE ; Forced branch!!!0490 ; ***********D}**********************0500 ; Now move player down0510 ; *********************************0520 DOWN LDY #7 ; Move top bD}yte first0530 DOWN1 LDA (YLOC),Y ; Get top byte0540 INY ; To move it down screen0550 STA (YLOC),Y ; Move iD}t0560 DEY ; Now back to starting value0570 DEY ; Set for next lower byte0580 BPL DOWN1 ; If D}Y >= 0 keep going0590 INY ; Set to zero0600 LDA #0 ; To clear top byte0610 STA (YLOC),Y ; Clear iD}t0620 INC YLOC ; Now is 1 higher0630 CLC ; Setup for forced branch0640 BCC SIDE ; Forced branch D}again0650 ; *********************************0660 ; Now side-to-side - left first0670 ; *********************************D}0680 LEFT DEC XLOC ; To move it left0690 LDA XLOC ; Get it0700 STA HPOSP0 ; Move it0710 RTS ; BaD}ck to BASIC - we're done0720 ; *********************************0730 ; Now right movement0740 ; **************************D}*******0750 RIGHT INC XLOC ; To move it right0760 LDA XLOC ; Get it0770 STA HPOSP0 ; Move it0780 RTS D} ; Back to BASIC - we're donemove it right0760 LDA XLOC ; Get it0770 STA HPOSP0 ; Move it0780 RTS D"Sh)) ).)/`̱̈ ȑ̈ȩΥ΍`Υ΍` HPOSP0 ; Move it0780 RTS HZ%&vTOPMBASINITINITYHYLJOYSTICKL} )6-F:A,&@)Save 8 pages,A,Make room for P/M Graphics" +"Reset display listL}(#6-$AV#Set up P/M area2,BBy,Tell Atari where PMBASE is<$6-A $Initial X positionF$6-@L}P$Initial Y positionP.AY@F.Double line resolutionZ+B2w@+Enable P/M Graphicsd" BL}"Set up our routinen(-%A%A@(P/M MemoryxClear it out   Could use ERASE$ hereL}!* #BP*Player data is stored here46-%A%4Where player will be in memory,-%@,Player iL}s 8 bytes high"Get player data" "Put it in proper place And so on...#B2H#Set up X posL}ition66-P:'AV,6High byte of initial Y position*6-+%A%,&$AV*Low byte,A,Tell ML}L routine where Y is,A,Tell ML routine where Y is,A,Tell ML routine where X is'A@hL}'Make player red6-?:C:,,Let's try it! ApJust loop... N*;@,*Where to put ML routine*L}N+-@@+Length of routine4N"Get a byte>N&67<,.>:,&Put it into stringHN  $All doneRN%%L}104,173,0,211,41,1,240,22,173,0\N$$211,41,2,240,32,173,0,211,41,4fN%%240,46,173,0,211,41,8,240,47,96pN++160,1,198,204,L}177,204,136,145,204,200zN**200,192,10,144,245,176,224,160,7,177N,,204,200,145,204,136,136,16,247,200,169N**0,145,204,L}230,204,24,144,203,198,206N**165,206,141,0,208,96,230,206,165,206N141,0,208,96,0,208,96a%%255,129,129,129,129,129,L}129,255 D:CH7_4.BASN**165,206,141,0,208,96,230,206,165,206N141,0,208,96,0,208,96a%%255,129,129,129,129,129,L:d'X; *********************************n!X; Setup of simple DLI routinex'X; ********************************* ;; P}Safe place for routine WSYNC Ԗ!COLPF2;; Background color'X; *********************************X; Now for the P}DLI routine'X; ********************************* 5;; Save value in accumulatorQ>B;; For a dark red colorPWSYNC;; P}See discussionPCOLPF2;; Put new color in'X; *********************************#X; Let's restore the accumulator'X; *P}********************************7;; Restore it9;; And we're finished*********#X; Let's restore the accumulator'X; *PJ0100 ; *********************************0110 ; Setup of simple DLI routine0120 ; *********************************0130 T} *= $0600 ; Safe place for routine0140 WSYNC = $D40A0150 COLPF2 = $D018 ; Background color0160 ; *********************T}************0170 ; Now for the DLI routine0180 ; *********************************0190 PHA ; Save value in accT}umulator0200 LDA #$42 ; For a dark red color0210 STA WSYNC ; See discussion0220 STA COLPF2 ; Put new colT}or in0230 ; *********************************0240 ; Let's restore the accumulator0250 ; *********************************T}0260 PLA ; Restore it0270 RTI ; And we're finishedmulator0250 ; *********************************TL HB ԍh@ ; Restore it0270 RTI ; And we're finishedmulator0250 ; *********************************XIHIBYTSIMPDLILOBYTD ( B(Setup simple DLI routin\}e36-P:C:,'AV,3Where is our DLI routine?%6-C:,&$AV%Its low byte(/A/Set up low byte of]} new vector2"A"Set up high byte<>%6-F:A`,%F:Aa,$AV>Where is display list?F=$%@F:]}%@,%A(=Set display list bit 7P#BBA#Enable DLIsZ##But the color change stays N-;@]},-Relocatable code in string*N6-@@6Length of simple DLI routine4N"Get a byte>N&67<,.>:,]}&Put it into stringHN  $FinishedRN))72,169,66,141,10,212,141,24,208,104\N64,246,243 D:CH8_1.BAS,.>:,\vd'X; *********************************nX; Set up initial conditionsx'X; *********************************Ca}OLPF2Ж WSYNC ԠOFFSET'X; *********************************X; Save registers!!'X; **********************a}***********5;; Save the accumulatorC;; And the Y register5;; Easy way to save it'X; ******************************a}***X; The routine itself'X; ********************************* %OFFSET;; Get initial offset&QOFFSET8;; Get colora} from table%PWSYNC;; Wait for horizontal sync"PCOLPF2;; Change color,#OFFSET;; For next color6QOFFSET;; Are we doa }ne?@#ROFFSET;; Stores # of colorsJ!DSKIP;; No - exit DLI routineT Q>;; Yes^"POFFSET;; Reset offset counterh'X; *a }********************************r%X; Remember to restore registers!!|'X; *********************************SKIP7;; Set ua }p to restore Y?;; Restore Y7;; Restore accumulator9;; Exit from DLI routine************************SKIP7;; Set u`T0100 ; *********************************0110 ; Set up initial conditions0120 ; *********************************0130 *e }= $06000140 COLPF2 = $D0180150 WSYNC = $D40A0160 OFFSET = $04000170 ; *********************************0180 ; Save regie}sters!!0190 ; *********************************0200 PHA ; Save the accumulator0210 TYA ; And the Ye} register0220 PHA ; Easy way to save it0230 ; *********************************0240 ; The routine itself0250 e}; *********************************0260 LDY OFFSET ; Get initial offset0270 LDA OFFSET+2,Y ; Get color from tablee}0280 STA WSYNC ; Wait for horizontal sync0290 STA COLPF2 ; Change color0300 INC OFFSET ; For next color031e}0 LDA OFFSET ; Are we done?0320 CMP OFFSET+1 ; Stores # of colors0330 BCC SKIP ; No - exit DLI routine0340e} LDA #0 ; Yes0350 STA OFFSET ; Reset offset counter0360 ; *********************************0370 ; Remember te}o restore registers!!0380 ; *********************************0390 SKIP PLA ; Set up to restore Y0400 TAY e} ; Restore Y0410 PLA ; Restore accumulator0420 RTI ; Exit from DLI routinee Y0400 TAY df"HH ԍhh@ore accumulator0420 RTI ; Exit from DLI routinee Y0400 TAY h)OHTABLEDLILDDLBE . B.Set up DLI routinm}e in a stringG6-P:C:,'AV,*6-C:,&$AVGGet address of DLI routineE +'0@Em}Start with black background(4 #Ap4Be sure we're reading the right data21-@'1Number of data in tm}able<"Get a byteF7A&%7Put the color into the page 4 tableP Finish copying tableZ9A$m}9Start with zero offset into tabled1A%@'1Put number of colors herev-6-F:A`,%F:Aa,$AVm}%@vNormal DL instructions start with the seventh byte of the display list56-&@5The beginning of the dm}isplay listA-@AThe first 3 bytes are skip 8 scan lines>%A@>Set DLIs even on the skipped m}scan lines!!! Finish these threeH%AHSet a DLI even on the "load memory scan" instruction2-%m}@"2Change all of the 2s to 130sA0Set DLIs Finished=AA=Tell Atari whm }ere our routine is-BBA-Enable the interrupts99Gives us something to look at through the colorsm!}All finished666,22,38,54,70,86,102,118,134,150,166,182,198,214;;230,246,246,230,214,198,182,166,150,134,118,102,8m"}6,70"54,38,22,6 N ;@5, Set up string*N2 #B`2Be sure we're reading correct data4N4-@@5m#}4Number of bytes in routine>N"Get a byteHN167<,.>:,1Put a byte in place in stringRN  $Finish stringm$}\N##72,152,72,172,0,4,185,2,4,141fN%%10,212,141,24,208,238,0,4,173,0pN!!4,205,1,4,144,5,169,0,141,0zN4,104,168,104,6m%}4 D:CH8_2.BAS4,185,2,4,141fN%%10,212,141,24,208,238,0,4,173,0pN!!4,205,1,4,144,5,169,0,141,0zN4,104,168,104,6ld'X; *********************************nX; The equates we'll usex'X; ********************************* COUNTq'}1VVBLKD$ COUNT2ªSETVBV\ MUSIC`RETURNb SND VOL'X; *************************q(}********!X; PLA to keep the stack clean'X; *********************************7'X; *********************************q)}!X; Initialize counters to zero'X; *********************************"Q>,&PCOUNT1;; Timing counter for notes6#PCOUNTq*}2;; Which note is playing@'X; *********************************JX; Now reset deferred vectorT'X; ************************q+}*********^%> ;; Low byte of routineh$>;; High byte of routiner!Q>;; We want deferred vector| SETVBV;; Set vectorq,}:;; Initialization complete'X; *********************************X; VBI routine itself'X; **************************q-}******* #COUNT1;; For timing note$COUNT1;; Is note finished?(> ;; If >=12 it is doneDNO;; Not yet finisq.}hed Q>;; Yes, so set volume = 0PVOL;; Now note turned off NO(>;; 15/60 seconds gone?"EPLAY;; Yes, so play nexq/}t note!RETURN;; No, let it ridePLAYQ>;; Reset counterPCOUNT1;; For timing&$COUNT2;; Get correct note0QMUSq0}IC9;; From table:PSND;; Set its frequencyDQ>;; Distortion = 10 ($A)NPVOL;; Volume = 6X!#COUNT2;; Setup for next nq1}oteb$COUNT2;; Are we done?l(>;; If = 8, we are donevDDONE;; No Q>;; Yes - reset counter toPCOUNT2;; Start oq2}ver againDONE!RETURN;; All finished%X; *******************************X; Table of Musical Notes%X; **************q3}*****************` =======**************************X; Table of Musical Notes%X; **************p30100 ; *********************************0110 ; The equates we'll use0120 ; *********************************0130 *= $u5}06000140 COUNT1 = $C00150 VVBLKD = $02240160 COUNT2 = $C20170 SETVBV = $E45C0180 MUSIC = $06600190 RETURN = $E4620200 u6}SND = $D2000210 VOL = $D2010220 ; *********************************0230 ; PLA to keep the stack clean0240 ; *********u7}************************0250 PLA 0260 ; *********************************0270 ; Initialize counters to zero0280 ; ***u8}******************************0290 LDA #00300 STA COUNT1 ; Timing counter for notes0310 STA COUNT2 ; Which nu9}ote is playing0320 ; *********************************0330 ; Now reset deferred vector0340 ; *****************************u:}****0350 LDY #$20 ; Low byte of routine0360 LDX #$06 ; High byte of routine0370 LDA #7 ; We want deu;}ferred vector0380 JSR SETVBV ; Set vector0390 RTS ; Initialization complete0400 ; ***********************u<}**********0410 ; VBI routine itself0420 ; *********************************0430 *= $06200440 INC COUNT1 ; For tu=}iming note0450 LDX COUNT1 ; Is note finished?0460 CPX #12 ; If >=12 it is done0470 BCC NO ; Not yet u>}finished0480 LDA #0 ; Yes, so set volume = 00490 STA VOL ; Now note turned off0500 NO CPX #15 ; 15/6u?}0 seconds gone?0510 BCS PLAY ; Yes, so play next note0520 JMP RETURN ; No, let it ride0530 PLAY LDA #0 ; Ru@}eset counter0540 STA COUNT1 ; For timing0550 LDX COUNT2 ; Get correct note0560 LDA MUSIC,X ; From table0570uA} STA SND ; Set its frequency0580 LDA #$A6 ; Distortion = 10 ($A)0590 STA VOL ; Volume = 60600 IuB}NC COUNT2 ; Setup for next note0610 LDX COUNT2 ; Are we done?0620 CPX #8 ; If = 8, we are done0630 BCC uC}DONE ; No0640 LDA #0 ; Yes - reset counter to0650 STA COUNT2 ; Start over again0660 DONE JMP RETURN ; AlluD} finished0670 ; *******************************0680 ; Table of Musical Notes0690 ; *******************************0700 uE} *= $06600710 .BYTE 243,243,217,243,204,243,217,243le of Musical Notes0690 ; *******************************0700 t;h   \` S Lb½`ҩ¦Lb`g**************************0700 x[% . B.POKE in initialization routine# B#POKE in VBI routine}H}3 B3POKE in table of notes to be played('6-?:A6,'Turn on the music!2%%Will not turn off the music!}I}8J/ #BP/Be sure to get the correct dataBJ:-A6AR:Length of initialization routineLJ"Get a byte}J}VJ Put it in place`J  $All donejJ**104,169,0,133,192,133,194,160,32,162tJ6,169,7,32,92,228,96 N1 #B}K}P1Be sure to read in the right data*N/-AhA/Length of VBI routine4N"Get a byte>N Put it }L}in placeHN  $FinishedRN((230,192,166,192,224,12,144,5,169,0\N&&141,1,210,224,15,176,3,76,98,228fN((169,0,133,19}M}2,166,194,189,96,6,141pN))0,210,169,166,141,1,210,230,194,166zN--194,224,8,144,4,169,0,133,194,76,98,228R# #BP#R}N}ead the right dataR3-A2A93Length of the music tableR"Get a byte&R! !Put it into the table0R}O}  $All done:R%%243,243,217,243,204,243,217,243 D:CH8_3.BASGet a byte&R! !Put it into the table0R|Kd'X; *********************************nX; Origin and equatesx'X; *********************************;; Must be iQ}n string DLIST;; Where DL will be&SAVMSCX;; Display memory addressSDLSTL0;; DL address!SETVBV\;; To R}set VB vector'X; *********************************#X; Initialization routine to setX; up new display list and"X; insS}ert the scrolling routineX; into the vertical blankX; interrupt.'X; *********************************INIT7;; KeepT} stack neatQ>p;; 8 blank scan linesPDLIST;; Into the firstPDLIST;; 3 lines of the"PDLIST;; Display List,U}%>;; # of lines in DL6$>;; Set counter@#Q>R;; EMS + Graphics 0 + scrollJPDLIST9;; Into display listT2;; Keep cV}ounter going^(QSAVMSC;; Get display memory addresshPDLIST9;; Into display listr2;; Keep counter going|QSAVMSC;; W}Get high byte;;; Set up for subtractS>;; Make room for displayPDLIST9;; Into display list2;; Keep counter goinX}g1;; One line finished&LOOPQ>R;; LMS + horizontal scrollPDLIST9;; Into display list2;; Keep counter going QDY}LIST9;; Get last memory,;; Set up for additionO>;; Line is 250 bytesPDLIST9;; Into display list2;; Keep couZ}nter goingQDLIST9;; Get high byteO>;; See discussionPDLIST9;; Into display list&2;; Keep counter going01;[}; Another line done:HLOOP;; Finished? NODQ>A;; YES - JVB instructionNPDLIST9;; Into display listX2;; Keep counter \}goingbQ>;; Page 6 low bytelPDLIST9;; Into display listvPSDLSTL;; Tell Atari also2;; Keep counter goingQ>;; ]}Page 6 high bytePDLIST9;; Into display listPSDLSTL;; Tell Atari'X; *********************************#X; Insert^} scrolling routine into"X; the deferred vertical blank.'X; *********************************7;; Get routine's addressځ_}>;; To X register7;; Finish address?;; To Y registerQ>;; Deferred vector SETVBV;; Set the vector :;; All f`}inishedo X register7;; Finish address?;; To Y registerQ>;; Deferred vector SETVBV;; Set the vector :;; All f0100 ; *********************************0110 ; Origin and equates0120 ; *********************************0130 *= $060b}0 ; Must be in string0140 DLIST = $0600 ; Where DL will be0150 SAVMSC = $58 ; Display memory address0160 SDLSTL = $c}0230 ; DL address0170 SETVBV = $E45C ; To set VB vector0180 ; *********************************0190 ; Initialization roud}tine to set0200 ; up new display list and0210 ; insert the scrolling routine0220 ; into the vertical blank0230 ; interrupe}t.0240 ; *********************************0250 INIT PLA ; Keep stack neat0260 LDA #$70 ; 8 blank scan linesf}0270 STA DLIST ; Into the first0280 STA DLIST+1 ; 3 lines of the0290 STA DLIST+2 ; Display List0300 LDY g}#24 ; # of lines in DL0310 LDX #3 ; Set counter0320 LDA #82 ; EMS + Graphics 0 + scroll0330 STA Dq}qb#DOS SYSb6'DUP SYSB]CH7_1 M65B eCH7_1 ASMBpCH7_1 OBJBqCH7_1 BASBwCH7_1A BASB}CH7_1B BASB CH7_2 M65B CH7_2 ASMBCH7_2 OBJBCH7_2 BASB CH7_3 M65B CH7_3 ASMBCH7_3 OBJBCH7_3 BASBCH7_4 M65BCH7_4 ASMBCH7_4 OBJBCH7_4 BASBCH8_1 M65BCH8_1 ASMBCH8_1 OBJBCH8_1 BASBCH8_2 M65B CH8_2 ASMBCH8_2 OBJBCH8_2 BASB&CH8_3 M65B4CH8_3 ASMBFCH8_3 OBJB GCH8_3 BASBPCH8_4 M65BaCH8_4 ASMBCH8_4 OBJB CH8_5 M65BCH8_5 ASMBCH8_5 OBJB CH8_5 BASB CH9_1 M65B CH9_1 ASMBCH9_1 OBJBCH9_2 M65B CH9_2 ASMBCH9_2 OBJBCH9_3 M65B CH9_3 ASMBCH9_3 OBJBCH9_4 M65BCH9_4 ASMBCH9_4 OBJB CH9_5 M65BCH9_5 ASMBCH9_5 OBJB CH9_6 M65BCH9_6 ASMB#CH9_6 OBJB$CH9_7 M65B2CH9_7 ASMBECH9_7 OBJB FCH9_8 M65BQCH9_8 ASMB_CH9_8 OBJ$`CH10_1 M65LIST,X ; Into display list0340 INX ; Keep counter going0350 LDA SAVMSC ; Get display memory address0360 r} STA DLIST,X ; Into display list0370 INX ; Keep counter going0380 LDA SAVMSC+1 ; Get high byte0390 Ss}EC ; Set up for subtract0400 SBC #24 ; Make room for display0410 STA DLIST,X ; Into display list0420 t} INX ; Keep counter going0430 DEY ; One line finished0440 LOOP LDA #82 ; LMS + horizontal scroll0u}450 STA DLIST,X ; Into display list0460 INX ; Keep counter going0470 LDA DLIST-3,X ; Get last memory04v}80 CLC ; Set up for addition0490 ADC #250 ; Line is 250 bytes0500 STA DLIST,X ; Into display list05w}10 INX ; Keep counter going0520 LDA DLIST-3,X ; Get high byte0530 ADC #0 ; See discussion0540 x} STA DLIST,X ; Into display list0550 INX ; Keep counter going0560 DEY ; Another line done0570 y}BNE LOOP ; Finished? NO0580 LDA #65 ; YES - JVB instruction0590 STA DLIST,X ; Into display list0600 INXz} ; Keep counter going0610 LDA #0 ; Page 6 low byte0620 STA DLIST,X ; Into display list0630 STA SD{}LSTL ; Tell Atari also0640 INX ; Keep counter going0650 LDA #6 ; Page 6 high byte0660 STA DLIST,|}X ; Into display list0670 STA SDLSTL+1 ; Tell Atari0680 ; *********************************0690 ; Insert scrolling rou}}tine into0700 ; the deferred vertical blank.0710 ; *********************************0720 PLA ; Get routine's a~}ddress0730 TAX ; To X register0740 PLA ; Finish address0750 TAY ; To Y register0760 } LDA #$07 ; Deferred vector0770 JSR SETVBV ; Set the vector0780 RTS ; All finished Y register0760 kbhpRXY8舩RiiA01hh \`d Y register0760 id'X; *********************************nX; Set up equates and originx'X; ********************************* D}LISTHSCROLԠXITVBVb'X; *********************************%X; Save accumulator and X register'X; *******}**************************5;; Save accumulatorA;; Transfer X register5;; And save it'X; **************************}*******!X; Do the fine scrolling first'X; *********************************$>;; 8 bits per character!LOOP&HSCROL};; Scroll the 1st0;; Set up for next scroll"!ILOOP;; Loop until 8 are done,$>;; Reset scroll register6&HSCROL;; T}o beginning@'X; *********************************J!X; Now we'll coarse scroll oneT'X; *********************************^}$>;; Counterh)LOOP2QDLIST9;; Get display memoryr,;; Before addition|O>;; Raise it by 1 PDLIST9;; In displ}ay listQDLIST9;; Get high byteO>;; Add carry in PDLIST9;; In display list2;; Move forward in2;; Displ}ay list2;; 3 bytes(>H;; 24 * 3 = 72DLOOP2;; Not finished'X; *********************************X; Now restore r}egisters'X; *********************************7;; First, X register>;; Restored7;; Then accumulator!XITVBV;; Ex}it from VB'X; *********************************7;; First, X register>;; Restored7;; Then accumulator!XITVBV;; Ex 0100 ; *********************************0110 ; Set up equates and origin0120 ; *********************************0130 *}= $06000140 DLIST = $06000150 HSCROL = $D4040160 XITVBV = $E4620170 ; *********************************0180 ; Save accu}mulator and X register0190 ; *********************************0200 PHA ; Save accumulator0210 TXA }; Transfer X register0220 PHA ; And save it0230 ; *********************************0240 ; Do the fine scrollin}g first0250 ; *********************************0260 LDX #7 ; 8 bits per character0270 LOOP STX HSCROL ; Scroll th}e 1st0280 DEX ; Set up for next scroll0290 BPL LOOP ; Loop until 8 are done0300 LDX #7 ; Reset} scroll register0310 STX HSCROL ; To beginning0320 ; *********************************0330 ; Now we'll coarse scroll }one0340 ; *********************************0350 LDX #0 ; Counter0360 LOOP2 LDA DLIST+4,X ; Get display memory037}0 CLC ; Before addition0380 ADC #1 ; Raise it by 10390 STA DLIST+4,X ; In display list0400 LD}A DLIST+5,X ; Get high byte0410 ADC #0 ; Add carry in0420 STA DLIST+5,X ; In display list0430 INX } ; Move forward in0440 INX ; Display list0450 INX ; 3 bytes0460 CPX #72 ; 24 * 3 = 720470} BCC LOOP2 ; Not finished0480 ; *********************************0490 ; Now restore registers0500 ; ****************}*****************0510 PLA ; First, X register0520 TAX ; Restored0530 PLA ; Then accumu}lator0540 JMP XITVBV ; Exit from VBirst, X register0520 TAX ; Restored0530 PLA ; Then accumu*/HHԢiiHhhLbster0520 TAX ; Restored0530 PLA ; Then accumu6@DUMMDLSCROLLSCROLL < B<Sets up string to form modified }display list; B;Sets up string with scrolling routine in iti-B@B@+@/ iPuts} lines into display memory so we can see the scroll(6-?:C:,N)67<,.>:,)Insert it into }stringHN  $All finishedRN%%104,169,112,141,0,6,141,1,6,141\N##2,6,160,24,162,3,169,82,157,0fN%%6,232,165,88,157},0,6,232,165,89pN&&56,233,24,157,0,6,232,136,169,82zN&&157,0,6,232,189,253,5,24,105,250N%%157,0,6,232,189,253,5,105,0,}157N&&0,6,232,136,208,228,169,65,157,0N""6,232,169,0,157,0,6,141,48,2N$$232,169,6,157,0,6,141,49,2,104N$$170,104,}168,169,7,32,92,228,960u$;@H,$Length of routine:u$-@@H$Get it allDu"Get a byteNu&67<},.>:,&Put it into stringXu  $All donebu&&72,138,72,162,7,142,4,212,202,16lu%%250,162,7,142,4,212,162,0,189,4v}u 6,24,105,1,157,4,6,189,5,6u&&105,0,157,5,6,232,232,232,224,72u##144,232,104,170,104,76,98,228 D:CH8_5.BASv{d'X; *********************************nX; First set up equatesx'X; ********************************* ICDNO}A ICCOMB ICBALD ICBAHE ICAX1J CIOVV'X; ********************************* X; Now CLOSE #4 }for insurance'X; *********************************$>@;; #$40 for IOCB #4Q> ;; CLOSE command bytePICCOM9;; X = I}OCB #4 CIOV;; Let CIO do the CLOSE'X; *********************************"X; Now we'll open the directory"'X; ********}*************************,$>@;; Again, #$40 = IOCB46Q>;; Disk drive #1@PICDNO9;; Put drive # hereJQ>;; For OPEN}TPICCOM9;; Command byte^Q>;; For disk directoryhPICAX19;; Store 6 hererQ>FILE;; See discussion|%PICBAL9;; L}ow byte buffer addressQ>FILE;; See discussion&PICBAH9;; High byte buffer address CIOV;; Let CIO OPEN it:;; }All done'X; *********************************X; Now we need the filename'X; *********************************FILE }AD:*.*A=X; *********************************X; Now we need the filename'X; *********************************FILE 0100 ; *********************************0110 ; First set up equates0120 ; *********************************0130 *= $0}6000140 ICDNO = $03410150 ICCOM = $03420160 ICBAL = $03440170 ICBAH = $03450180 ICAX1 = $034A0190 CIOV = $E4560200 ; }*********************************0210 ; Now CLOSE #4 for insurance0220 ; *********************************0230 LDX #$4}0 ; #$40 for IOCB #40240 LDA #$0C ; CLOSE command byte0250 STA ICCOM,X ; X = IOCB #40260 JSR CIOV ; L}et CIO do the CLOSE0270 ; *********************************0280 ; Now we'll open the directory0290 ; *********************}************0300 LDX #$40 ; Again, #$40 = IOCB40310 LDA #1 ; Disk drive #10320 STA ICDNO,X ; Put drive} # here0330 LDA #3 ; For OPEN0340 STA ICCOM,X ; Command byte0350 LDA #6 ; For disk directory0360 } STA ICAX1,X ; Store 6 here0370 LDA #FILE&255 ; See discussion0380 STA ICBAL,X ; Low byte buffer address0390 }LDA #FILE/256 ; See discussion0400 STA ICBAH,X ; High byte buffer address0410 JSR CIOV ; Let CIO OPEN it0420 } RTS ; All done0430 ; *********************************0440 ; Now we need the filename0450 ; ********************}*************0460 FILE .BYTE "D:*.*",$9B***********************0440 ; Now we need the filename0450 ; *********************.@ B V@ABJ)DE V`D:*.*************0440 ; Now we need the filename0450 ; ********************5d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX}2K CIOVV'X; *********************************"X; Now we load in required data"'X; **********************}***********,$>;; Since it's IOCB06Q> ;; For put record@PICCOM9;; Command byteJQ>MSG;; Low byte of MSGTPICB}AL9;; into ICBAL^ Q>MSG;; High byte of MSGhPICBAH9;; into ICBAHrQ>;; Length of MSG|PICBLH9;; high byteQ}>;; Length of MSGPICBLL9;; See discussion'X; *********************************X; Now put it to the screen'X; ***}****************************** CIOV:'X; *********************************X; The message itself'X; *************}********************!MSG AA SUCCESSFUL WRITE!A=*****************************X; The message itself'X; *************50100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *}********************************0280 ; Now we load in required data0290 ; *********************************0300 LDX #0} ; Since it's IOCB00310 LDA #9 ; For put record0320 STA ICCOM,X ; Command byte0330 LDA #MSG&255 ; Lo}w byte of MSG0340 STA ICBAL,X ; into ICBAL0350 LDA #MSG/256 ; High byte of MSG0360 STA ICBAH,X ; into ICBAH}0370 LDA #0 ; Length of MSG0380 STA ICBLH,X ; high byte0390 LDA #$FF ; Length of MSG0400 STA ICBL}L,X ; See discussion0410 ; *********************************0420 ; Now put it to the screen0430 ; ************************}*********0440 JSR CIOV0450 RTS 0460 ; *********************************0470 ; The message itself0480 ; *********}************************0490 MSG .BYTE "A SUCCESSFUL WRITE!",$9B****************0470 ; The message itself0480 ; *********B2 BDEIH V`A SUCCESSFUL WRITE!TE!",$9B****************0470 ; The message itself0480 ; *********9d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX}2K CIOVV'X; *********************************"X; Now we load in required data"'X; **********************}***********,$>;; Since it's IOCB06Q> ;; For put bytes@PICCOM9;; Command byteJQ>MSG;; Low byte of MSGTPICBA}L9;; into ICBAL^ Q>MSG;; High byte of MSGhPICBAH9;; into ICBAHrQ>;; Length of MSG|PICBLH9;; high byteQ>};; Length of MSGPICBLL9;; low byte'X; *********************************X; Now put it to the screen'X; *********}************************ CIOV:'X; *********************************X; The message itself'X; *******************}**************!MSG AA SUCCESSFUL WRITE!A=*****************************X; The message itself'X; *******************/0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *}********************************0280 ; Now we load in required data0290 ; *********************************0300 LDX #0} ; Since it's IOCB00310 LDA #11 ; For put bytes0320 STA ICCOM,X ; Command byte0330 LDA #MSG&255 ; Low} byte of MSG0340 STA ICBAL,X ; into ICBAL0350 LDA #MSG/256 ; High byte of MSG0360 STA ICBAH,X ; into ICBAH0}370 LDA #0 ; Length of MSG0380 STA ICBLH,X ; high byte0390 LDA #20 ; Length of MSG0400 STA ICBLL},X ; low byte0410 ; *********************************0420 ; Now put it to the screen0430 ; ******************************}***0440 JSR CIOV0450 RTS 0460 ; *********************************0470 ; The message itself0480 ; ***************}******************0490 MSG .BYTE "A SUCCESSFUL WRITE!",$9B****************0470 ; The message itself0480 ; ***************<2 BDEIH V`A SUCCESSFUL WRITE!9B****************0470 ; The message itself0480 ; ***************9d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX}2K CIOVV'X; *********************************"X; Now we load in required data"#X; for special 1-characte}r case.,'X; *********************************6$>;; Since it's IOCB0@Q> ;; For put bytesJPICCOM9;; Command byteTQ}>;; Length of MSG^PICBLH9;; high bytehQ>;; Length of MSGrPICBLL9;; low byte|'X; ******************************}***X; Now put it to the screen'X; *********************************Q>>;; For > prompt CIOV:******************k0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *}********************************0280 ; Now we load in required data0290 ; for special 1-character case.0300 ; ************}*********************0310 LDX #0 ; Since it's IOCB00320 LDA #11 ; For put bytes0330 STA ICCOM,X ; Com}mand byte0340 LDA #0 ; Length of MSG0350 STA ICBLH,X ; high byte0360 LDA #0 ; Length of MSG0370 } STA ICBLL,X ; low byte0380 ; *********************************0390 ; Now put it to the screen0400 ; *******************}**************0410 LDA #62 ; For > prompt0420 JSR CIOV0430 RTS t to the screen0400 ; *******************S BIH> V`62 ; For > prompt0420 JSR CIOV0430 RTS t to the screen0400 ; *******************d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX}2K CIOVV'X; *********************************!X; First, close and open IOCB2"'X; ***********************}**********,$> ;; For IOCB26Q> ;; Close command@PICCOM9;; Into ICCOMJ CIOV;; Do the CLOSET$> ;; IOCB2 again^Q}>;; Open filehPICCOM9;; Is the commandrQ>;; Output|PICAX19;; Open for output!Q>NAM;; Low byte of device}PICBAL9;; Points to "P:"Q>NAM;; High byte PICBAH9Q>PICBLH9;; High byte lengthQ>PICBLL9;; Low by}te length CIOV;; Do the OPEN'X; *********************************!X; Now we'll print the message'X; ***************}******************$> ;; By using IOCB2Q> ;; Put recordPICCOM9;; CommandQ>MSG;; Address of MSG&PICBAL9;;} Low byte0Q>MSG;; Address of MSG:PICBAH9;; High byteDQ>;; Length of MSGNPICBLH9;; High byteXQ>;; Leng}th of MSGbPICBLL9;; Low bytel CIOV;; Put out the linev:;; End of routineNAM AP:A=!MSG AA SUCCESSFUL WRITE}!A= MSGbPICBLL9;; Low bytel CIOV;; Put out the linev:;; End of routineNAM AP:A=!MSG AA SUCCESSFUL WRITE0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *}********************************0280 ; First, close and open IOCB20290 ; *********************************0300 LDX #$2}0 ; For IOCB20310 LDA #12 ; Close command0320 STA ICCOM,X ; Into ICCOM0330 JSR CIOV ; Do the CLOSE0}340 LDX #$20 ; IOCB2 again0350 LDA #3 ; Open file0360 STA ICCOM,X ; Is the command0370 LDA #8 } ; Output0380 STA ICAX1,X ; Open for output0390 LDA #NAM&255 ; Low byte of device0400 STA ICBAL,X ; Points to} "P:"0410 LDA #NAM/256 ; High byte0420 STA ICBAH,X0430 LDA #00440 STA ICBLH,X ; High byte length0450 } LDA #$FF0460 STA ICBLL,X ; Low byte length0470 JSR CIOV ; Do the OPEN0480 ; *********************************}0490 ; Now we'll print the message0500 ; *********************************0510 LDX #$20 ; By using IOCB20520 LD}A #9 ; Put record0530 STA ICCOM,X ; Command0540 LDA #MSG&255 ; Address of MSG0550 STA ICBAL,X ; Low byte}0560 LDA #MSG/256 ; Address of MSG0570 STA ICBAH,X ; High byte0580 LDA #0 ; Length of MSG0590 STA I}CBLH,X ; High byte0600 LDA #$FF ; Length of MSG0610 STA ICBLL,X ; Low byte0620 JSR CIOV ; Put out the }line0630 RTS ; End of routine0640 NAM .BYTE "P:",$9B0650 MSG .BYTE "A SUCCESSFUL WRITE!",$9B ; Put out the lb B V BJLDEIH V BODEIH V`P:A SUCCESSFUL WRITE! "A SUCCESSFUL WRITEiWd'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA } ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX }2K CIOVV'X; *********************************#X; Open a file called OBJECT.COD"'X; ********************* }************,$> ;; Use IOCB26Q> ;; To close IOCB@PICCOM9;; Command byteJ CIOV;; Do the closeT'X; *************** }******************^$> ;; Use IOCB2 againhQ>;; Open commandrPICCOM9;; Command byte|Q>;; Open for readPICAX19};; Into ICAX1Q>;; 0 into ICAX2 is PICAX29;; Just for insurance Q>NAME;; Low byte of filePICBAL9;; Name add}ress!Q>NAME;; High byte - filePICBAH9;; Name address CIOV;; Open the file'X; ******************************}***$> ;; IOCB2Q>PICBAL9;; Low-byte addressQ>P;; High-byte addressPICBAH9;; Is then $5000Q>;; Make }buffer lengthPICBLL9;; Very long so the&PICBLH9;; Whole file loads0Q>;; Get record:PICCOM9;; Command byteD }CIOV;; Read the whole fileN'X; *********************************X$> ;; IOCB2bQ> ;; To close IOCBlPICCOM9;; Command} bytev CIOV;; Do the close:;; End of the routine'X; *********************************NAME AD1:OBJECT.CODA=mandy0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 }ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $03}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *}********************************0280 ; Open a file called OBJECT.COD0290 ; *********************************0300 LDX #}$20 ; Use IOCB20310 LDA #12 ; To close IOCB0320 STA ICCOM,X ; Command byte0330 JSR CIOV ; Do the clo}se0340 ; *********************************0350 LDX #$20 ; Use IOCB2 again0360 LDA #3 ; Open command0370 } STA ICCOM,X ; Command byte0380 LDA #4 ; Open for read0390 STA ICAX1,X ; Into ICAX10400 LDA #0 ; 0} into ICAX2 is0410 STA ICAX2,X ; Just for insurance0420 LDA #NAME&255 ; Low byte of file0430 STA ICBAL,X ; Na}me address0440 LDA #NAME/256 ; High byte - file0450 STA ICBAH,X ; Name address0460 JSR CIOV ; Open the fil}e0470 ; *********************************0480 LDX #$20 ; IOCB20490 LDA #00500 STA ICBAL,X ; Low-byte addre}ss0510 LDA #$50 ; High-byte address0520 STA ICBAH,X ; Is then $50000530 LDA #$FF ; Make buffer length0}540 STA ICBLL,X ; Very long so the0550 STA ICBLH,X ; Whole file loads0560 LDA #5 ; Get record0570 S }TA ICCOM,X ; Command byte0580 JSR CIOV ; Read the whole file0590 ; *********************************0600 LDX #$!}20 ; IOCB20610 LDA #12 ; To close IOCB0620 STA ICCOM,X ; Command byte0630 JSR CIOV ; Do the close06"}40 RTS ; End of the routine0650 ; *********************************0660 NAME .BYTE "D1:OBJECT.COD",$9Bclose06u\ B V BJKODE V DPEHIB V B V`D1:OBJECT.COD1:OBJECT.COD",$9Bclose06cod'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOA%} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAX&}2K CIOVV'X; *********************************#X; Open a file called OBJECT.COD"'X; *********************'}************,$> ;; Use IOCB26Q> ;; To close IOCB@PICCOM9;; Command byteJ CIOV;; Do the closeT'X; ***************(}******************^$> ;; Use IOCB2 againhQ>;; Open commandrPICCOM9;; Command byte|Q>;; Open for readPICAX19)};; Into ICAX1Q>;; 0 into ICAX2 is PICAX29;; Just for insurance Q>NAME;; Low byte of filePICBAL9;; Name add*}ress!Q>NAME;; High byte - filePICBAH9;; Name address CIOV;; Open the file'X; ******************************+}***$> ;; IOCB2Q>PICBLL9;; Low buffer lengthQ>;; To load one sectorPICBLH9;; At a timeQ>P;; High byt,}e ofPICBAH9;; Buffer address&Q>;; Get record0PICCOM9;; Command byte:LOOP$> ;; For when loopingDQ>;; Low by-}te of bufferNPICBAL9;; Address @ startX CIOV;; Read 1st sectorbGFIN;; If done, go to FINl$> ;; IOCB2vQ>;; Mov.}e up 128 bytesPICBAL9;; For buffer CIOV;; Read next sectorGFIN;; If done, go to FIN$> ;; IOCB2$#ICBAH9;; R/}aise the buffer again !LOOP;; Not done - read more'X; *********************************FIN$> ;; IOCB2Q> ;; To c0}lose IOCBPICCOM9;; Command byte CIOV;; Do the close:;; End of the routine'X; *********************************1}NAME AD1:OBJECT.CODA=mand byte CIOV;; Do the close:;; End of the routine'X; *********************************0100 ; *********************************0110 ; CIO equates0120 ; *********************************0130 ICHID = $03400140 3}ICDNO = $03410150 ICCOM = $03420160 ICSTA = $03430170 ICBAL = $03440180 ICBAH = $03450190 ICPTL = $03460200 ICPTH = $034}470210 ICBLL = $03480220 ICBLH = $03490230 ICAX1 = $034A0240 ICAX2 = $034B0250 CIOV = $E4560260 *= $06000270 ; *5}********************************0280 ; Open a file called OBJECT.COD0290 ; *********************************0300 LDX #6}$20 ; Use IOCB20310 LDA #12 ; To close IOCB0320 STA ICCOM,X ; Command byte0330 JSR CIOV ; Do the clo7}se0340 ; *********************************0350 LDX #$20 ; Use IOCB2 again0360 LDA #3 ; Open command0370 8} STA ICCOM,X ; Command byte0380 LDA #4 ; Open for read0390 STA ICAX1,X ; Into ICAX10400 LDA #0 ; 09} into ICAX2 is0410 STA ICAX2,X ; Just for insurance0420 LDA #NAME&255 ; Low byte of file0430 STA ICBAL,X ; Na:}me address0440 LDA #NAME/256 ; High byte - file0450 STA ICBAH,X ; Name address0460 JSR CIOV ; Open the fil;}e0470 ; *********************************0480 LDX #$20 ; IOCB20490 LDA #00500 STA ICBLL,X ; Low buffer len<}gth0510 LDA #$80 ; To load one sector0520 STA ICBLH,X ; At a time0530 LDA #$50 ; High byte of0540 S=}TA ICBAH,X ; Buffer address0550 LDA #5 ; Get record0560 STA ICCOM,X ; Command byte0570 LOOP LDX #$20 ; For >}when looping0580 LDA #0 ; Low byte of buffer0590 STA ICBAL,X ; Address @ start0600 JSR CIOV ; Read 1st?} sector0610 BMI FIN ; If done, go to FIN0620 LDX #$20 ; IOCB20630 LDA #$80 ; Move up 128 bytes0640 @} STA ICBAL,X ; For buffer0650 JSR CIOV ; Read next sector0660 BMI FIN ; If done, go to FIN0670 LDX #A}$20 ; IOCB20680 INC ICBAH,X ; Raise the buffer again0690 JMP LOOP ; Not done - read more0700 ; *************B}********************0710 FIN LDX #$20 ; IOCB20720 LDA #12 ; To close IOCB0730 STA ICCOM,X ; Command byte07C}40 JSR CIOV ; Do the close0750 RTS ; End of the routine0760 ; *********************************0770 NAMD}E .BYTE "D1:OBJECT.COD",$9Bclose0750 RTS ; End of the routine0760 ; *********************************0770 NAMv B V BJKiDE V HIPEB D V0 D V0 EL> B V`D1:OBJECT.COD}d'X; *********************************nX; SIO equatesx'X; ********************************* DDEVIC;; Serial buG}s I.D.DUNIT;; Device numberDCOMND;; Command byteDSTATS;; Status byte"DBUFLO;; Low buffer adresH}s$DBUFHI;; High buffer addressDTIMLO;; Disk timeoutDBYTLO;; Low byte count DBYTHI ;; High byte cI}ountDAUX1 ;; Auxiliary #1DAUX2 ;; Auxiliary #2 SIOVYDSKINVS'X; **************************J}*******"X; Assume file begins at sector"#X; $20 and extends to sector $60,'X; *********************************6Q>@K}PDAUX2;; High sector numberJPDBYTLO;; Low buffer lengthTQ>;; To load one sector^PDBYTHI;; At a timehQ>P;; HighL} byte ofrPDBUFHI;; Buffer address|Q>R;; Get sectorPDCOMND;; Command byteQ> ;; Low sector numberPDAUX1;; GM}oes here!LOOPQ>;; Low byte of bufferPDBUFLO;; Address @ start DSKINV;; Read 1st sectorQ>;; Move up 128 bytN}esPDBUFLO;; For buffer#DAUX1;; Next sectorQDAUX1;; Are we done?R>`EFIN;; Yes# DSKINV;; No - read nextO} sector#DBUFHI;; Raise buffer page#DAUX1;; Next sectorQDAUX1;; Are we done?&R>`0DLOOP;; No:FIN:;; All fiP}nishedr#DBUFHI;; Raise buffer page#DAUX1;; Next sectorQDAUX1;; Are we done?&R>`0DLOOP;; No:FIN:;; All fi0100 ; *********************************0110 ; SIO equates0120 ; *********************************0130 DDEVIC = $0300 ; SR}erial bus I.D.0140 DUNIT = $0301 ; Device number0150 DCOMND = $0302 ; Command byte0160 DSTATS = $0303 ; Status byte01S}70 DBUFLO = $0304 ; Low buffer adress0180 DBUFHI = $0305 ; High buffer address0190 DTIMLO = $0306 ; Disk timeout0200 DBT}YTLO = $0308 ; Low byte count0210 DBYTHI = $0309 ; High byte count0220 DAUX1 = $030A ; Auxiliary #10230 DAUX2 = $030B U} ; Auxiliary #20240 SIOV = $E4590250 DSKINV = $E4530260 *= $06000270 ; *********************************0280 ; AsV}sume file begins at sector0290 ; $20 and extends to sector $600300 ; *********************************0310 LDA #00320W} STA DAUX2 ; High sector number0330 STA DBYTLO ; Low buffer length0340 LDA #$80 ; To load one sector0350X} STA DBYTHI ; At a time0360 LDA #$50 ; High byte of0370 STA DBUFHI ; Buffer address0380 LDA #$52 Y} ; Get sector0390 STA DCOMND ; Command byte0400 LDA #$20 ; Low sector number0410 STA DAUX1 ; Goes hereZ}0420 LOOP LDA #0 ; Low byte of buffer0430 STA DBUFLO ; Address @ start0440 JSR DSKINV ; Read 1st sector0450[} LDA #$80 ; Move up 128 bytes0460 STA DBUFLO ; For buffer0470 INC DAUX1 ; Next sector0480 LDA DAUX1\} ; Are we done?0490 CMP #$600500 BCS FIN ; Yes0510 JSR DSKINV ; No - read next sector0520 INC DBUF]}HI ; Raise buffer page0530 INC DAUX1 ; Next sector0540 LDA DAUX1 ; Are we done?0550 CMP #$600560 BCC^} LOOP ; No0570 FIN RTS ; All finishedt sector0540 LDA DAUX1 ; Are we done?0550 CMP #$600560 BCC2C  PR  S䩀  ` S  ``UX1 ; Are we done?0550 CMP #$600560 BCCJ d'X; *********************************nX; CIO equatesx'X; ********************************* ICHID@ ICDNOAa} ICCOMB ICSTAC ICBALD ICBAHE ICPTLF ICPTHG ICBLLH ICBLHI ICAX1J ICAXb}2K CIOVV'X; *********************************X; Other equates needed'X; *********************************"c}COLOR0, COLCRSU6 ROWCRST@ATACHRJ STORE1T STOCOL^h'X; *********************************rd}X; The SETCOLOR routine|'X; *********************************"X; Before calling this routine,!X; the registers should bee} set#X; just like the BASIC SETCOLOR:"X; SETCOLOR color,hue,luminanceX; stored respectively in!X; X reg.,accumuf}lator,Y reg. SETCOLT?;; Need to multiplyT?;; hue by 16, andT?;; add it to luminance.T?;; Now hue is * 16PSg}TORE1;; temporarilyC;; So we can add,;; Before addingOSTORE1;; Now have sumPCOLOR09;; Actual SETCOLOR&:;; Allh} done0'X; *********************************:X; The COLOR commandD'X; *********************************N!X; For these roui}tines, we willX$X; simply store the current COLORbX; in STCOL, so the COLORl"X; command simply requires thatv$X; the accj}umulator hold the value X; "n" in the command COLOR n COLORPSTOCOL;; That's it!:;; All done'X; ****************k}*****************X; The GRAPHICS command'X; *********************************X; The "n" parameter of a X; GRAPHICS l}n command will be#X; passed to this routine in theX; accumulator GRAFIC5;; Store on stack$>`;; IOCB6 for screem}n Q> ;; CLOSE commandPICCOM9;; in command byte  CIOV;; Do the CLOSE*$>`;; The screen again4Q>;; OPEN commandn}>PICCOM9;; in command byteHQ>NAME;; Name is "S:"RPICBAL9;; Low byte\Q>NAME;; High bytef PICBAH9p7;; Geo}t GRAPHICS nzPICAX29;; Graphics modeM>;; Get high 4 bitsN>;; Flip high bitL> ;; Read or writePICAX19;; np}+16, n+32 etc. CIOV;; Setup GRAPHICS n:;; All done'X; *********************************X; The POSITION command'q}X; *********************************X; Identical to the BASICX; POSITION X,Y command.!X; Since X may be greater thanr}#X; 255 in GRAPHICS 8, we need to!X; use the accumulator for theX; high byte of X. POSITN$&COLCRS;; Low byte of Xs}.PCOLCRS;; High byte of X8'ROWCRS;; Y positionB:;; All doneL'X; *********************************VX; The PLOT ct}ommand`'X; *********************************j$X; We'll use the X, Y, and A justt#X; like in the POSITION command.~PLOTu} POSITN;; To stor info$>`;; For the screenQ> ;; Put recordPICCOM9;; Command byteQ>;; Special case ofPv}ICBLL9;; I/O using thePICBLH9;; accumulatorQSTOCOL;; Get COLOR to use CIOV;; Plot the point:;; All done'X; w}*********************************X; The DRAWTO command'X; ********************************* $X; We'll use the X, Y, andx} A just#X; like in the POSITION command. DRAWTO( POSITN;; To store info2QSTOCOL;; Get COLOR<PATACHR;; Keep CIO y}happyF$>`;; The screen againPQ>;; For DRAWTOZPICCOM9;; Command bytedQ> ;; As in XIOnPICAX19;; Auxiliary 1xQz}>;; ClearPICAX29;; Auxiliary 2 CIOV;; Draw the line:;; All done'X; *********************************X; The {}FILL command'X; *********************************$X; We'll use the X, Y, and A just#X; like in the POSITION command.|}X; This is similar to DRAWTOFILL POSITN;; To store infoQSTOCOL;; Get COLORPATACHR;; Keep CIO happy$>`;; T}}he screen againQ>;; For FILLPICCOM9;; Command byte"Q> ;; As in XIO,PICAX19;; Auxiliary 16Q>;; Clear@PIC~}AX29;; Auxiliary 2J CIOV;; FILL the areaT:;; All done^'X; *********************************hX; The LOCATE commandr'X}; *********************************|$X; We'll use the X, Y, and A just"X; like in the POSITION commandX; and the accumu}lator willX; contain the LOCATEd color LOCATE POSITN;; To store info$>`;; The screen againQ>;; Get record}PICCOM9;; Command byteQ>;; Special case ofPICBLL9;; data transferPICBLH9;; in accumulator CIOV;; Do the L}OCATE:;; All done'X; *********************************X; The screen's name'X; *********************************&}NAME AS:A=ll done'X; *********************************X; The screen's name'X; *********************************&