@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED736 FREE SECTORS COPYING---D1:DIRECK.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 138ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u$%>f nSLjg ԅ&բee` &եՅ&֥օ&ץׅeԥeեe֥e`ԅՅօׅؤT}- ILu$0:8`0 :H 1$h80eԅԐ ڄEؕ `¢:0:U} L!%0:H $h80e `8`:02:02 i&&L%: %*&$&V}&&: %ۊL%L!%0!:AG ag 8 878`808``:ɛ&:ɛ':ɛ'芨L%W}L!%s';3t's'%s't'`t's's'%t'`$BfCf@f?f膲 5)Bf CfI ' 'H '?fh`:OL 򥠦X}`L'򥋦` vf:*'L%_L(?:$'@L-%=0:-A [a{LI-` U% ` (%`L_ $Y}`:IL)iL)0:01:0:80 hBHiBh`L_ f 2ˆ̥˅̅i杠˪)) Z}$`)$˪$`fBgB` ' ' ' ' ' '` vf ) vfL, J Ls)L,` ) )[} u' u' u'L;) ) ) u'E u'E u'L;) vf ) vf:&L, JL,` ) ) u'% u'% u'L) vfL, J\}L,L* ) 'I 'IH ' u'h u' u'` * vfL, J L,`H *h8 )5*H4*H``**x*T*l*?* ) *L* * *L* )]} * *L* ) * *L* ) * *L* ) * *L* ) * * *L*8 *L*88``8` u'i u' u'` u'iI u^}' u'` ^+ vf:+-L%+` ^+ )Bgʊ%%-AfL- u'e u'e u'L* ^+ )BgAf L-E u'8 _}u' u'L* vf:- +L+L^+ ^+ 'I 'I ' u' u' u'` M, vf:*%/>L, JL,L,L1,L,``} M, ) ? u' u' u'L+ M, ) ? u' u' u'L+ M, )&L, M, ) FfL!,L+ M, ) ? u' u' u'L+a} vf:-L,+L,L, JA=L,L- M, ' ' '-Af u' u' u'`Bf u' u' u'` M, ' ' '-Af b} u' u' u'`Cf u' u' u'`LM, M, 'I 'I ' u' u' u'` vf:[L5- 5) vf:]` vf 'H u'h u' c}u'`m-L`W-L`missing right bracketmissing const+symbola{8 ` _$`Ll -`$ _Ll:0'8d}#:0 880&&&L!%`L%  m-,0Ppe}XʈML N Hh(.n@`8xADCANDASLBCCBCSBEQBITBMIBNEBPLBRKBVCBVSCLCCLDCLICLVCMPCPXCf}PYDBDECDEXDEYDSDWENDEOREQUINCINXINYJMPJSRLDALDXLDYLOCLSRNOPORAORGPHAPHPPLAPLPROLRORRTIRTSSBg}CSECSEDSEISTASTXSTYTAXTAYTSXTXATXSTYA?eJ p.+:a8 p. .Lv/#Lv/н:h}A {[ a``'mm`/fH'm˹m̥˅ͥ̅ 1Hȱ˅hL/椥h/f`m?n?'m˹i}m̥˅ͥ̅ a0Hȱ˅hL70椥`L0) )L0 Ef) > >) >j} >L0 >ͤ8 >) )   > >m?ȭn?m?n?`1mY1` Z1:?Ϣ )uk})g 1 1ϱ  1ϥLc1 1ϥ 1)@m 1a 1c 1r 1o 1L1)e 1x 1t 1r 1n l}1L1$ 1)?f [H 1h 1 [H 1h 1Af) 1r 1e 1l 1HHmY +:hh`222>g'm}m˹m'm˥mL2n9n+˅ͥ̅ΠHȱ˅hХˠȥ̑L22) ˦8`2  2n}ˑ˭2 ˥ȑ˥˦`%nF222ȑˠnȘei 32 2ˠȥ˥˦`8o}Ɓ`Ɓ L_=4:<3<3KASM65>reading: <3ɛ  `V42f4f;33f Y4<3-L5i<i3Ǎ?p}4<@4DžfL4D -fL4? l`L#oLDO}V!MlB"R'CZPmU"L_3fL4;3L4AfL42fr}<3-L4 L4L4ɛ0L)62fL44fL4w< d Y4<3 0+Lq5<3- ɛLq5s}L5L4,fL4<3-Lq5<3- ɛLq5'4Eh=4DPHJK V;L\`<3=3,f# d7oGB;JwD4 :`>[@|=;g}=4̱˝}= ~}}=|=i|=;g4`oG B>D>E8>H>IH 7>>>}>U4`U4Bg,foGH BHIh 7k?l?U4`BgV4L6`Bg PoGL6H _73hL9g?ig?h? ;oG} BeD?E HI 7oGL6eԥe`8ԥ`օע& eօ֥eׅ&L?օԦ׆`օע}&&&8֥װe֥eL? Хօׅ`)4@IԥIե)M4@4@II` ? ?4}@IԥI` ? ?L;@\BBBad_Para\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B\BCG΢CCBhB}BBBBC`CCL_CBȥBȥBȥBȢhBBC` Z%n0 vf f%nEn %n&}nBg) 2ˆ̭Bg˥̠ A)ȥȥ;gE}eBL>E vf м:гei 3 ZLhD 3EEEEEELlL_fBgBE 'EEE}ELhDL_JLlC C FBBJ f %n%n 2ˆ̠)LF˅ȱ˅愩BiBi}BiBiB vf:ɛ;!LFB BB:+ɛ',#;8\BL_І8\}BL_B vf:ɛ;,L6FL_BhBƄ ZLi `˩ L_`L_GQMHR DEEHHNXTQGJ})K_KoKONNN|GKSQMNNNMONN^P^PNOO)SKTTvQGQQEEvQHQincluding: Bg > ZnGmGcGmG vf }7 }g=Ll ZLlGJ 5fGG)G`G轨GH)5fhJ` vf:G-ΧG: -I GG;fLHL G}G 2f:fLHM GG5fLHG" GGn9f;f5f8f-f2f:fLHR GG8fLHS GG9fLHD GG-fLHF} GG6fLH* GLH vf:,LlLGLlfLl _LlANOXONOԽEGh c[}`Bg6f Z`LL"LLLLLL!LLLLLL* H Ph >LΩL PJ mL`@H PhL}JmL桥HH8ͥΠ L >LM L > > Phh`LAf/?fBfLNLCfLbLLvLHH}JhMh PM P`JL>LMBg,f H >M >h c[M c[` 'Bg8  _Hh M vf}:;ɛ, _LlLMLlLM K-Asm 2.41 (C)1994 Ken Siders-Shareware } Read Documentation for more information \˩M NMLl:˩N N}9NLl vf:" 'NN:͊N ɛ` \LlGLS _Ll _Ll? 'O  _撅͆Υ}˥̠)o O ȥ͑ȥΑLlL_ vf…: ؐ _Ll P P P P P P vf:,LlLMO 'O vf}O:, 'O80f=fOOO [OLO \Ll: LJLJɛLJ;LJLlLL FMJ 8ơ` >} > > >!m >"m >` L L"m!mL"mLL P` vf…: i$# _Ll P P P P vf:,LlL^P}Af!CQ) >CQ#Q >CQ`J 桌DQAf Bg2 c[CQ#QCQ !DQ`HƟƞhHơƠh LD}Q` PLQCQWEQ,BgLlUR G7IREQFRGQ.EQFRGQIRGQIREQFR IREQ vf:' :}' 'LJR" 'Bge _GQHAf?fʊ [h [LRHh IRFR S K vf:;ɛ, _LlLQGQ G7LlG}QLRLRGR:GReɛLRHR:: GR GR IREQ)FQ) `8  @ FQGQ I7LRFR} S LHRLMR:GR&HR:ɛ GR:GR GR IRLRGRLRLRAf L_ vf f 2ˆ̠  vf:,LlLRLl }'播Af LHƥƤhL;SLl PHƥƤhLVS QSS`S0̀S``8ASLS}T 'S  _撅͆έBf Cf-AfL-Bg˥̠) S ȥ͑ȥΑLlL_AfL)SBgpop }'撤L_HeoeoheeLTAf[Bgpop '撤L_ooBgp}ooo,f NopLl!L_Af '撤L_Ll;UOUWWV1VUUUVVVUWW=g- TUTULAg #;l }Ag 0=g0. L#m$m MLlAg0.=g0. LLlAg  L_#m$mH#m$m#mhH#m$m#mhBg58#m堍#m$m 5} P PőLl L_#m0߮=g0.#m?f KLl#m0Ag0LTVAg L?V$ L_?f-Af=g0.i L#m$m MLl$}mLV=g0.i#m KLlAg0LTV ?f-AfLlVLV L_=g0.8 L#m$m KLl=g0.8 L#m LLl=g0. L#m$m MLl}Ag0LTV L?V L_Ag0LTV(3?f-Af)=g0.i L#m$m MLlAg L?V$LVAg L?V( L_LVAg@LU=g0.}8 LLlAg Af-?f=g0.8#m KLlAg'LWɣLW0LW LV(LU=g0.i L#m$m MLl=g0.8 L#m$}m KLl=g0.8 L?f-AfLV#m LLl=g0.iLWAg0LVLWAg0LVL1VXXY&m/f XX`/f mYlY}`Bg:fmG;f饄5fX/fF X Z+tY8XXXmAf [AfI%^zYX [ [L}Z=mYȌX [ [LZXBXXW [XX)X.fXmY +: ZXXXLZXXEn mY}X.lYXJ -rY6f. mXiX:ɛmY/f:lYmYmY +:XXX`Bg:fmG;f餄5fX}WX` [H I7hLI7)HJJJJ[h[`H [XnYmYhXX [nYmYX`0123456789ABCDEF YXLM: YX }M:X M: YM8/fMJMXM/fʊi誩iX1f 6X M: Y9N8/f9NJ:NX9NX M: YX M:X M}:`=f Y=f0f X M:L\1f=f`;\;H G7] :h 6 G7\CnGoG!V44Z] :'<8] :=4>4 I] }:w< :" I7 G7 G7>fL#oassembly aborted - i-o error #on source file "on output file "on list file "]]]]]]]]}] ^]^S^(^1^A^^^l^r^~^^^^^^^^^^___-_=_M_X_b_p_bad opsyntaxbad indexdup symilleg adr mdundf symnot cons}trangerange>255bad instr. or macbranch rangebad paranest mac call>8nest mac/echo defout of mempara overflowphasemi}ssng endmendm w/o echo/macroelse w/o ifendif w/o ifuntermd ifif nest >32missng labeltoo many proc'sno free iocbsfail}ed assertuser forcedunsupportedbad realbad expr(r-mode)illeg in ABS mdilleg in REL mdbad "long"bad octalline overflo}winternal#00 - ,ln:line:,,, _ L L LLl'\ _L#o _LlH>fh"Ll`\& "BgLk`HU}R G7h i]Hj]HL` j]i]HHUR G7/|_ :hh :_ :;g4 : G7欩_ :¢: : G7} G7` BD`EhHILVK-ASM 2.41 - CopyRight 1994 Ken SidersK-ASM is shareware, see documentationfor permission}s.庛KASM [options] sourcefile-B (blank) -R (relmode) -D (def macs)-W (wait) -? (this) -L (screen list)-ODn}:outname.ext (overide D:O.OUT)-O0 (obj off) -LDn:name.ext (lst dev)-U (error for undf syms in rel mode)-M (sym lst) -PD8:p}ath> (def. path) beq *+5 jmp %1 bne *+5 jmp %1 bcs *+5 jmp %1 bcc *+5 jmp %1 bmi *+5 jmp %1 bpl *+5 jmp %1} bvs *+5 jmp %1 bvc *+5 jmp %1 if '%c(0,0)1'='#' lda #low [%c(1,80)1] ldx #high [%c(1,80)1] else lda %1 l}dx %1+1 endif beq *+7 bcc *+5 jmp %1 beq *+4 bcs *+5 jmp %1LBEQLBNELDAXLBCCLBCSLBPLLBMI}LBVCLBVSBGTBLTBGEBLEbabb'b9bKb]bobbb'bc`cccc>gc˭c̠۱}%nm>g8>g %n&n 2ˆ̠ @ˠcc˽cȑciccicccLcS L L L} i?H ihLedg?g>g?g::C:}?,@(_$. % 0?:A7{3[a++f - Hm>g8>gh%nТf  %n證f%n%n`}KASM65 2.41(C)1994 Ken Siders* Pass:/\\@>>>$>8>>>>>>>>>}>Ef+fmGBgnGAf-f2f%m!m"me&mDd:d G7 G7Cg : G7Og : G7 G7w<>f /d > > > > >i?ʎj? > >} > >k?l? !0k?g?l?h?k?l?Ldi > >;g g=LinG 6汥Ű I7RULhQTM}KSTXTenoJ _,f.!m "mAf PRUT I7 I7 G7 ?Af /?*f \ / \ G7 6o :22 6o }:8H偰h [ [Ln [h [o : G7L#o ERRORs, SYMBOLs, $ FREE/ b6 `efo >o >o >`pp$EE/ b6 `ef Just enter what would normally be entered after the command name. Default extens }ions for source files are .ASM in absolute mode and .M65 in relative mode. D: is assumed if no drive spe }cification is given. Options: -D enables default macros (used in RA65). Includes LDAX#, lon }g branch commands, and also some other double word commands. -L produce listing to screen }-Ldev:filespec produce listing on device. eg. -lP: or -LD:PROGRAM.LST. Do not put a space between the L and the } filename. -Odev:filespec overide object output. The default object } -2- KASM65 v2.41 8-bit Assembler file is the same as the input file with } a ".OBJ" extenter in relative mode or a ".COM" extenter otherwise. -O allows you to specify an alternat }e output. -O0 suppresses object output. -R sets assembler to "relative" mode. The objec }t file generated in this mode must be linked with KLINK65 or RA65. -M displays symbol table map, an un }sorted symbol listing with addresses. A full reference map is not supported. Listing must be turned on. } To print out map without listing use: -LP: -M -L0 on the command line. I was planning to } write an external sort routine to process a map file sent to a file. -W reprompts with KASM> when ass }embly is completed. This is automatically done with a menu driven DOS. This allows SpartaDos/DOSXL user }s to assemble multiple files without reloading the assembler. -C case sensitive. This affects Macros }and Labels. This has not been fully tested to be sure it works in all cases. -PDn:optnpath> Sets the } default path prefix for filenames without ANY drive specification. The default path is the current dire }ctory D:. Example -PD8: will make a filename such as FOO be converted to D8:FOO. The path works with all } files specified on the command line without prefixes EXCEPT for the list file. It also works with INCLUDE and SY }STXT. -U Only has meaning in relative mode (-R). Causes symbols that are referenced but that are not }defined or specified in a GLOBL command to generate an undefined symbol error. Without -U they will be as }summed to be defined elsewhere. Do NOT use this with CC65 generated files. -? display options. optio }ns and usage is also displayed if you use a bad option. Source Line Format } The source line format is virtually identical to all other atari assemblers excepting one that use line numb }ers. Each source line can be defined into up to 4 regions. Starting in column 1 is the optional labe }l field. A line consisting only of a label will set the label equal to the current address. This field }is where symbols are defined. The second field is the operation field, this is where 6502 intructions and } psuedo-ops (Assembler Directives) are placed. It follows the label field with a space or tab seperating the } two fields. If there is no label field, it may begin at column 2 or higher. The third field is the expression } field. This field varies depending on the intruction. The last field can be used for comments (prefixed } by a semi-colon). -3- KASM65 v2.41 8-bit Assembler } Comments may also follow a label field or be at the start of a line (always prefixed by a semi-colon. } Comments starting in column 1 may be prefixed by an "*". Numbers } Numbers without a prefix are treated as standard base ten decimal numbers. The range is generally -32768 to 65 }535, although some instructions limit you from -128 to 255. Using a number out of range may chop the num }ber off to the appropriate number of bits or give an error depending on the instruction. P }refixes can be used specify other bases or formats: $nnnn hexadecimal (base 16, 1-4 digits) %n..n binar }y (base 2, 1-16 digits) &x..x Octal (base 8 , seldom used) 'cc' Character (1 or 2 characters) } The trailing quote is not required in most cases especially if only a byte value is needed. The trailing } quotes should be used on a single character constant if it does NOT occur at the end of line. } LDA 'A ;comment will load from location 65+256*32 instead of location A. Although this instructions is } meaningless there may be situations where it could cause a problem. Also be careful in DB statements, o }r other psuedo-ops that use strings. DB 'A ;comment will not generate the character 'A' but the str }ing 'A ;comment'. Note: to specify the apostrophe character use ''' or 39, not ''''. Char }acters must be delimited by ' and not ". Symbols Labels may consist of t }he characters A-Z, a-z (equiv to A-Z unless case-sensitive is turned on),0-9 (except as the first charact }er), ".", "@", and "_". Also, '?' and ':' may be used as the first character. Note '@' and '?' in the f }irst position have a special meaning. Unlike AMAC, a "_" is significant and not simply discarded. Symbol }s defined within Macros should be prefixed with an '@' symbol to generate a unique symbol each time the Macros is } envoked (%K from AMAC is also supported). Local symbols are to be prefixed with a ":" which generates an }unique symbol for each "PROC" area. If the first character is ':', '?', or '@' it will be excluded from }the symbol map. Label have 12 characters significant, Macro names have 11 characters significant, local s }ymbols have 9 characters significant, "@" prefixed symbols have 7 characters significant. } Expressions Expressions are evaluated according to precedence. First, all stateme }nts inside brackets [], with intermost bracketed -4- } KASM65 v2.41 8-bit Assembler expressions evaluated first. The operators all are evaluated left to ri }ght according to the following precedence table: (equivalent to Atari Macro Assembler) highest } [] unary ops: HIGH LOW DEF REF REV LSTR < > * / MOD SHL SHR unary + - (ie. positi }ve, negative) binary + - (ie. add, subtract) = <> < > <= >= EQ NE LT GT LE GE NOT !} AND & OR XOR lowest notes: * upper or lower case may be used "} * for Mac/65 compatability the "less than"/"greater than" symbols can also be used as binary operators indicatin #}g high and low bytes. "<" is equivalent to "LOW" ">" is equivalent to "HIGH" $} * DEF and REF should be followed by a symbol name, returns 1 if defined or referenced, repsectively. %} * LSTR returns length of following string. Mainly for use in Macros. * REV reverses high and low byt &}es. PSEUDO-OPS Pseudo-Operations may be in upper or lower case and may '} optionally begin with a . (note: ".=" is different from "=". "=" is equivalent to "EQU" but ".=" is equivale (}nt to "SET") ASSERT if is equal to 0, this command will return a user forced )} error. example: ASSERT *<$C000 BLKB Reserves an area of RAM that will be init *}ialized to zero. Note: unlike DS, these bytes will consume disk space for each byte. For large areas, i +}t is better to use DS and manually initialize the area within the program. Note: In relative mode DS is ,} equivalent to BLKB. DB [,,...] or BYTE [,,...] is any legal -}expression or a strng. -5- KASM65 v2.41 8-bit Assemb .}ler generate data bytes. Unlike AMAC any character may be used within the string. Also, values gre /}ater than 255 will generate their low byte and not cause an error. (this was done to allow signed byte n 0}umbers.) (note: future versions may restrict the expression to -128 to 255). Strings may be delimited e 1}ither by single or double quotes (but not one of each), If a single quote is used, double quotes may be used 2} within the string and vica-versa. If single quotes are used, you may represent a single quote in a string by 3}two successive single quotes. The same applies for double quotes. Sounds complicated? It was, but it a 4}llows compatability with different assemblers. Also, you may omit the final quote if it would be the las 5}t character in the line. Whew! Unlike AMAC, all characters are legal, non-ascii characters are not conv 6}erted to a space. DC [,,...] is as in DB Same as DB but the most signifi 7}cant bit of the last byte of an is set. Mainly used to deliminate strings. DS 8}Reserves a block of memory of bytes. The area will be uninitialized. In Relative mode DS is equivalent to B 9}LKB and will be initialized to zero as well as consume space. DW [,,...] or WORD [,,...] is any legal expression or two byte string. Stores word values in low byte, ;}high byte for each . See DB for rules on strings. DLW [,...] or LONG [,...] should be a number in range of -2^(31) to (2^32)-1. Will generate a 4 byte in =}teger with least significant byte first, most significant byte last. Numbers should consist of an option >} negative sign followed by numeric digits only. ECHO ... ENDM or REPEAT ...ENDM or ?} REPT ...ENDM Code between the ECHO and ENDM statement will be repeated times. may result in any value from 0 to 65535 (unlike AMAC which limits you to 255). ECHO statements may n A}ot be nested and may not be used in a MACRO definition. It is not necessary to prefix ENDM with a TAB character an B}d ENDM does not need to be uppercase as is necessary in AMAC. Note the repeated lines are physically sto C}red in memory and do consume space. %i used within the lines will generate a value from 0 to -1. T D}his is great for large display lists and tables. -6- E} KASM65 v2.41 8-bit Assembler Example table of addresses of each line on a graphics 8 type F}screen (great for hi speed plots): org $2000 screen equ $A000 STabL echo G} 192 db low [screen+40*%i] endm STabH echo 192 db high H}[screen+40*%i] endm ;this makes a plot simple as it requires no multiplication. ;xcord is I}in A/X (A is low), ycord is in the Y register. ;203-205 are used temporarily stx 205 ;save xcord J} hi byte ldx STabL,y ;find line address stx 203 ldx STabH,y stx 204 K} tax ;save xcord lo byte lsr 205 ;divide xcord by 8 ror a L} lsr a ;its only 8 bits now lsr a tay ;byte offset into ln txa M} ;put xcord lo in a and #7 ;find "OR" mask tax lda (203),y N} ora OrMask,x ;for plotting ; eor OrMask,x ;for xor plotting ; and AndMask,x ;for unplotting O} sta (203),y rts OrTab db 128,64,32,16,8,4,2,1 AndTab db 128 xor 255,64 xor 255,32 P}xor 255,16 xor 255,247,251,253,254 EJECT or PAGE Forces a page eject in the listing. Q} END Terminates the assembly process. END should be the last statement assembled since any fo R}llowing statements will be ignored. When not in relative mode, sets the run address. In relative S}mode, is ignored. An improvement over AMAC, if no run address is specified a run address of 0 will T} not be output which can cause lockup when loading AMAC generated files under certain DOS's if no run address was U} specified. Note: you can always use: -7- K V}ASM65 v2.41 8-bit Assembler *=736 dw runaddr as is required with other assemblers. W} EQU or = defines the label at left to equal the expression on the right. Attempting t X}o refine a symbol will generate a Duplicate symbol error at each line where the label exists in the label Y} field. must be defined (all symbols in the expression must be defined previously). Labels defined to a Z} zero page location (0 to 255) must be defined before they are used, or a phase error may be generated. If a [} label exists without "EQU" or "=" with or without any other instruction in the line will set the label e \}qual to the *L location counter. In "relative" mode the symbol may also be considered a relative or absol ]}ute depending on the expression on the right. (absolute expressions usually refer to constants or symbol ^}s refering to absolute locations not with the program). See section on Relative Mode for more information. _} ERR [text] Generates a user forced error. Useful in an if statement such as testing if program will `} fit withing given boundries or in MACROs for error trapping. eg. IF *>$C000 ERR a} ENDIF note: unlike AMAC you can follow the ERR statement with text that will be displayed if an b}error occurs. FSET , Primarily used in development testing, but can be used to c} set a few parameters. This is not equivalent to POKE although FSETing any register other than specified can have d} serious consequences. For all flags 1=on, 0=off. "c.l." indicates default depends on command line a e}rgument and will be set to 1 if the option was specified, 0 otherwise. "cli dos flag" will be set to 1 if f} program was loaded from SpartaDOS or DOS XL, and 0 otherwise. If it is 0, the program will give a KASM> g} prompt when done. With a cli dos, the program will exit (so you can use batch files, without having to q}MB%DOS SYSB*)DUP SYSBSKASM COMB3KASM241 DOCB READ ME B8KLINK COMB0SKLINK65 DOChit to exit. The -W option will make the KASM reprompt anyways to override this feature. Ex r}amples: FSET 6,80 with a screen listing will keep lines from being chopped off at 37 characters. s} FSET 6,132 could be used when listing to a wide carriage printer or when using condensed print. FSET 7, t}xxx sets the lines per page, so you could list on longer sheets of paper.FSET 2,0 will suppress writing to u} object file and can be used to save time when checking for errors. v} -8- KASM65 v2.41 8-bit Assembler Registers 12-18 are registers used by the LIST psue w}do-op. reg function default --------------------------------------- 1 ca x}se sensitive 0 (off) 2 object output 1 (on) (unless -O0) 5 list more than y}5 bytes 0 (off) 6 line length 37 screen list 80 pri z}nter file 7 page length 66 8 current page number 1 9 master list {} c.l. -L 10 verbose flag c.l. -V 11 dump symbol table c.l. -M |} 12 list macro expansion 0 (off) 13 list code skipped by if 0 (off) 14 list format }} controls 0 (off) (unimplimented) 16 systext list flag 0 (off) (unimplemented) 17 list ~}ing currently on 1 (on) (valid only if -L is in effect) 18 list lines in include file 0 (off }) 19 cli dos flag dos dependant 20 current list line 1 21 wait for } return on exit c.l. -W (non cli dos's will always reprompt) IF ... ENDIF IF ... ELSE ... ENDIF Allows for conditional assembly. See "Conditional Assembly" for more informati }on. INCLUDE [#] or INCL [#] Starts reading from file . When } the end of file is reached, assembly continues with the previous file. Each level of INCLUDE nesting req }uires an additional file buffer - This may require increasing the number of file buffers, especially when } listing to a file. "#" is optional and is supported for MAC/65 compatability. GLOBL [,] Valid only in Relative Mode. Allows a symbol defined in this module to be referenced outside thi }s module. If a symbol is not defined in this module it is assumed to be defined in another module (GLOBL } is not necessary in this case although using it will cause no problem) INTERNAL ,... } SBYTE Same syntax to "DB" but characters within strings are converted to internal s }tring code. KBYTE ,.... Same syntax as DB but characters are converted to the } -9- KASM65 v2.41 8-bit Assembler internal keyboa }rd code for the character. Lowercase characters will give the unshifted keycode value; Uppercase charact }ers will give the code with shift pressed. Invalid codes will give 255. There is no direct way to specify } characters that do not generate an ascii code such as control-4, Help, or Inverse Video. You must manually inse }rt these with DB. LINK or CHAIN Unimplemented - SORRY. Use INCLUDE at e }nd of file. LIST [,,...] where is letter to turn on or prefixed by a minus to } turn off. Similiar to AMAC although some may vary slightly since the AMAC manual is vague on some o }f there functions. Only has effect if listing is "switched" on. possible 's are: "C" lis }t list controls: EJECT, PAGE, SPACE, TITLE, SUBTTL (default is off) - UNIMPLEMENTED "D" list detailed cod }e: ie. every byte generated by DB, DC, DW, REAL6, REAL8. (default is off) "F" list code skipped by IF o }r ELSE. A minus sign will be in the listing for skipped lines. (default is on) "G" list all generated c }ode. @@@@ "I" list code in include file(s) (default is off) "L"used to turn listing on and off (default }on) "M" list all lines generated in macro expansion (default is on) "R" display symbol map. Fu }ll cross-referece is not currently supported. (default is off) "S" list code referenced in a systext fil }e (default is off) - UNIMPLEMENTED - never listed. "*" pops list stack. restores state of list flags bef }ore last LIST was executed. I hope this works. LOC Generates an error in relative m }ode. Sets the value of the location counter. Code will be positioned in memory according to ORG but wil }l be assembled to run at the value set with LOC. Note 1: * is same as *L. Note 2: if the LOC statement }is never used *, *L, and *O can all be used interchangibly in an expression. Labels defined without EQU, } =, .=, or SET will be set to *L which will be the same as *, and also the same as *O if LOC isn't used. You can u }se ORG *O to return to normal. The following will generate code that will load at $2000 but ne }eds to be moved to $C000 to run org $2000 loc $C000 } -10- KASM65 v2.41 8-bit Assembler source equ *O dest equ *L ;equ *L is }optional lda #0 sta 710 sta 53279 jmp start size equ *-dest+1 ; }* is same as *L ORG *O ;returns location counter to equal *O counter. MACRO ... EN }DM Used to define macros. See "Macro Feature". MSG ,... Outputs a strin }g/expression or multiple string/expressions to the screen reguardless if listing is on or to another devi }ce. Expressions are printed as 4 byte hex strings. AMAC has a similiar command undocumented in its manu }al. example: org $2000 ; any amount of code here flag db 0 msg 'Add }ress of flag=$',flag ;other code OPTION [,...] UNIMPLEMENTED!!!! Mac65 st }yle options (all default to on): NO LIST listing off LIST listing on (only has effect if -L wa }s specified on command line) NO OBJECT turns off writing to object file OBJECT turns on }writing to object file NO EJECT turns off final page eject EJECT turns on page ejects } ORG or *= Sets the origin and location counters (*L and *O) equal to the value of < }exp16>. Used to specify start address of a block of code. Can be used to reserve a block of memory such } as: ORG *+16 will reserve 16 bytes. Generates and error in relative mode. (To reserve memory in absolute and rel }ative mode use "BLKB") PROC ... EPROC or LOCAL Sets a new local area for symbols. Symbol }s beginning with : are local symbols. A PROC is terminated by EPROC or the next PROC or LOCAL statement. } REAL4 [,,...] Would be used to store single precision floating point } -11- KASM65 v2.41 8-bit Assembler numbers. Currently uni }mplemented. REAL6 [,,...] Used to store standard 6 byte floating point numbers as } implemented in the floating point package in ROM. is the a f.p. number either in standard or exponental }format as in Atari Basic. You may specify multiple numbers seperated by commas. REAL8 [ },,...] Would be used to store double precision floating point numbers. Currently unimplemented }. SET or .= Like equ but an error will not be generated if the symbol is re }defined. Mainly used for special situations. All symbols actually default to 0, so it is possible to use } this to find out which pass is executing. Note that symbols are not initialized to 0. PASS equ 0 ;only } executes on pass 1 PASS set PASS+1 ;executes both passes ; will set PASS to one on "pass 1" and } two on "PASS 2". SPACE [,] or SKIP [,] UNIMPLEMENTED - I Think. } SUBTTL Used to specify secondary title information. Use SUBTTL "" to erase subtitle. str }ings may be delimited by ' or " as in DB. SYSTXT Similiar to INCLUDE but file }is only read on pass one. No code should be generated in the file - it should only consist of symbol and }macro definitions. Placing code/data in a SYSTXT file will more than likely give a PHASE ERROR or genera }te a corrupt file. TITLE TITLE is used to set the title that appears at the top }of a page. TITLE forces a page eject if the listing is not currently at the top of a page. Title defaults to a KA }SM65 symbol; Use TITLE "" to clear it out. USE Reserved word that is unimplemented in the } current version. VFD Reserved word that is unimplemented in the current versio }n. -12- KASM65 v2.41 8-bit Assembler } Macro Feature Macros allow the user to extend the instructions available at }your disposal. The -D switch will enable some predefined macros (see Default Macros). Macro calls may be } nested up to 8 levels deep. Macro definitions may not be nested and Macro definitions may not contain the ECHO } pseudo-op, although ECHO blocks may contain macro calls. Note for AMAC users: The label field is signific }ant in a macro call where it is ignored in AMAC. There are two formats for the macro pseudo-op. } macname MACRO or MACRO macname The f }irst corresponds to AMAC's format, the second to Mac/65. After the macro statement comes the macro body, followed b }y an ENDM statement. (note: ENDM does not need to be preceded by a TAB character and be all the same cas }e as is required by AMAC). To call the macro, use: macname [,,...] } The first parameter correponds to %1, the second to %2, etc. Note: A parameter can be virtually anythi }ng and does not need to be an expression. It is recommended you bracket the %1-%9 within [], since the e }xpression passed is not evaluted first, but is substitued into a line and then evaluted. This may not b }e necessary if you never pass expressions to the Macro. Using: lda #high %1 and if %1 was equivalent }to 255+1, then lda #high 255+1 would be generated instead of lda #high 256. which woul }d be the same as lda #0 instead of lda #1. Future versions may use numeric substitution for %1-%9 and ac }tual substitution for %S1 to %S9. In the body: %1...%9 are parameters 1-9 %S1...%S }9 same as %1...%9 %0 is the parameter count %K is hex number of macro call } %L is label field of macro call %M is name of macro %% % symbol } @ similiar to %K(use at start of label) %C[x1,x2]n a KASM exclusive - SUBPARAMETERS. R }ead on. Prefix all labels defined in Macros with a "@" if you - }13- KASM65 v2.41 8-bit Assembler want an unique symbol generated each time the Macro }is envoked. You can also use %K within the Macro which generated a unique hex number for each macro call }. I think with MAC/65 this was unnecessary, so some Mac/65 Macros may need modification. }Note:512 bytes are allocated for "active" macro parameters. When a macro terminates the memory is released. } Having more than 512 bytes of active parameters will generate an error. This should only occur if you are seve }ral levels deep in Macros that have lots of big (long strings) parameters. In %C[x1,x2]n s }ubparmaters n is the parameter number 1 to 9. x1 is the starting character position, x2 is the ending pa }rameter position. ZERO is the FIRST character position. To indicate the ending character position, use a } large number such as 80. for example in this macro call: LDAX # 23 %C[0,0]1 will give "# }" %C[1,80]1 will give " 23" Example "load a and x" macro that will allow immediate and absolut }e addressing LDAX macro if "%C[0,0]" = "#" lda #low %C[1,80] ldx #high %C[1 },80] else lda %1 ldx %1+1 endif endm note: to use b }inary numbers in a macro body you must place a space between the % and the number: % 111 for 7. %111 would } generate parameter 1 followed by two one's. AMAC's manual doesn't really clarify this situation and I do not r }ecall my findings. The Macro body is stored in memory so it is possible to run out of memory w }ith lots of macro definitions. To save memory eliminate all comments that do not start at the beginning of } the line. KASM65 automatically removes comment lines and most "unnecessary" spaces and the start of a line. } %K is used to generate unique labels for each macro call. @ is similiar, and is used since I believe MAC/6 }5 automatically generates unique names -- many programmers use @ as the first character in their macros t }o distinguish them as "LOCAL to Macro" symbols. example: -1 }4- KASM65 v2.41 8-bit Assembler INW macro value inc %1 bne ? }SK%K inc %1+1 ?SK%K endm or the much more readable INW macro value } inc %1 bne @SK inc %1+1 @SK endm note the ? will precl }ude the symbol from appearing in the symbol map. @ also will preclude it from appearing in the symbol ta }ble, and generate an unique name for each macro call. ;better yet try this, although it appears confusin }g it will save RAM and symbol table space required for storing the symbols in the macro. INW m }acro value inc %1 if %1+1>255 bne *+5 else bne *+4 } endif inc %1+1 endm Advanced Example: ;How about allowing a print macro } ;use PRINT "string" for screen or ;PRINT dev,"string" for device ; dev is 0 to 7 or memory location } >7 ;first, a macro used by PRINT PRINTD macro dev,str jmp @SKP @STR DB %2,0 } @SKP if %1>7 lda %1 asl a asl a asl a }asl a -15- KASM65 v2.41 8-bit Assembler } tax else ldx [%1]*16 endif lda #low @STR ldy #high @STR } jsr PRINT endm ;and now the "Print String" macro PRINT macro if %0=1 } PRINTD 0,%1 else PRINTD %1,%2 endif endm ; }note: PRINT subroutine is not shown. Conditional Assembly IF ..ELSE...ENDIF st }atements allow for conditional assembly. IF statements may be nested 32 levels deep. should be de }fined for both passes and evaluate the same. is considered true for any non-zero value of . Al }lows for code to be assembled for different versions, or checking for errors (particularly in Macros). V}ERS=1 ;1=rev a 2=rev b examples: IF VERS=1 OUTCHAR equ $E002 ELSE } OUTCHAR equ $C120 ENDIF print3 macro a,b,c IF %0<>3 ERR "bad # of para}meters" ELSE MSG "3 numbers:",%1,%2,%3 ENDIF endm } Relative Mode When -R is used on the command line it switches the assembler to relat}ive mode. In this mode the output is not an executable file, but a relocatable object file that must be }processed with a linker. Files generated in this mode are compatable with LINK65 (linker with CC65). If the -R an}d -D -16- KASM65 v2.41 8-bit Assembler }options enabled, KASM is able to replace the slow RA65 assembler. The only differences are that KASM does not } recognize the low/high operaters (which aren't generated by CC65 anyways), and expressions are evaluated acco }rding to precedence and not strictly left to right. There is also a program KLINK65 which replaces LINK6 }5 and is a lot faster. Why relative mode? You can assemble packages of routines seperately, the w }hole program does not be assembled each time. Just change one of the modules and reprocess it with the l }inker. Since relative object files (though larger than binary load files) are much smaller than source code  } files, linking is faster than re-assembling the whole file. Certain psuedo-ops are not supported in relati}ve mode such as ORG, LOC, and DS. (DS not being supported is really a limitation of the object file form}at that I did not create). The location the program loads in memory can be set in the linker. The linke}r may also allow, verbatim files such as character sets, screens, if I get around to upgrading it. } Notes: I get around to upgrading it. N;;READ.ME;KASM v2.41 distribution.all files: (C) Copyright 1993,1994 Ken SidersThis package is shareware, see KASMmanu}al for permissions.READ.ME - this fileKASM.COM - assembler programKASM241.DOC - manual for assemblerKASM is cap}able of generatingstandard DOS loadable filesjust like almost any other assembler.KASM can also produce relocatableobject} files that can be linked withKLINK (my linker) or LINK65 (linkerfor CC65)KASM----general command line format is:(wi}th menu driven dos you will beprompted for [options] filename]KASM [options] filenamesee manual for options or use:KASM }-?for a brief descriptions.Default extenders: (when ommitted)input file: .ASM (.M65 in rel mode)output file: .COM (.O}BJ in rel mode)list file: noneDefault drive prefixes (when ommitted)input/output file: D: (unless -P used)list file: } noneFor description of relative objectfiles see the CC65 documentation.NOTE:ALL DOC FILES ARE IN ATASCIIFORMAT. } FORMATTED 80 COLS, 66 LINESPER PAGE. objectfiles see the CC65 documentation.NOTE:ALL DOC FILES ARE IN ATASCIIFORMAT. ($ $iDL^4$&<```<`˹`̥˅ͥ̅ $Hȱ˅hLU$扥`ͅͅԥթ } ,2ԅՅiiD0`4$5$) 4$ȱ5$m4$ȱm5$ 0 0 ))JJJ3% ) ) )L % } ) Hȱh ;* )`RA<`˹`<`˥`L%$7$+˅ͥ̅ΠHȱ˅hҥˠȥ̑}L%˦8` $F5%6%ȑˠ$Șei %˦`8Ɓ`ƁLU48H偨h`}'G'&&KLINK65>reading: .LNK'd*&ɛ  ` +'&fD+ '&@ }L1ɛ *⦔ K)`-L(ii&''̢7 Q7ei@''LU4&80)cDL'dD!}L'& :aW iDL'? 4L `LL1O,VBCMSLU4fDL'&L'L1 '&-0'٠&-  ɛ"}+L(+L'eDL' K) K)0 K)@ K)P K)` K)pLK) K) 0`@ B V`ԄեH ؠ) )(h#}`'L)'H BHIh )'`@i0L)LU4`H'H )'HH )JBh'Eh'DPH$}K Vf+L3`&&D&EBHI )`ІѠɛ )`ІѠ ɛ )`f++ g+eD"%} )Bg+JD+E(H )`++`D:O.OUT/8RU)' P*RU' P*'' P*` B &D &E8 &H &}&IH ) & & & &'`'eDH BHIh )'`LK) 0H )hL) 0H )hL))HJJJJ0h0`0123'}456789ABCDEF&B )L0M0N0`%B0L0M0NL) ' !1 < 'ii&H'''H'C' Q7H' ) *L' LU4LU4eԥe`8ԥ`օע*}& eօ֥eׅ&L42օԦ׆`օע&&&8֥װe֥eL2 Хօׅ`)2IԥI+}ե)M22II` 2 ,22IԥI` 2 Z2L2f+f+H )#3 P*h c) )iD )L `assembly a,}borted - i-o error #^3s333333334&444too many input filestoo many object modulesundefied symbol:sym already d-}efined:missing __start symout of rambad command linebad object/library fileinternal error #01"__freemem" defd in modb.}ad start adrnested indirect "@":error-,ln:2 a4 )L `HiDh C3B3HH )"/H4 P*hh 4 )`φР /} )`H $ P*h`L4 BܝD4EHI V`K-LINK 1.00A (C)1993 Ken Sidersthis program is shareware and may be0}distributed as long as unaltered docsaccompanies the programusage: klink [options] file1 [file2 ...]options: @Dn:file[.1}ext]*indirect from file -ODn:file.ext *specify output file -O0 *no output filenote:output will default to D:O.OU2}T -W *prompt when done -Shexadr *set orig (def $2000) -Mn *map output 1=mod tab 2=sym tab 3=bo3}th -? *this listfile1,file2, etc are relative object files or library filesS L L L 4}i?H ihL)7hD`hDɛ Ȣ&ɛ`7ȱ:ȱ:Dȩ:i挠.'ɛ 5}7ei ɛ77`.OBJ.OLB.OUT@Y3@@`8 P*ԥե ٢۠7 (6}7 ݢ7 ( 8 ٥HHԤ )Ԥ c)hh ٢7 ݢ7 ` ٩m ): )Ԥ 0 )Ԥ c)s ) 7})`time: )8?ՔLReading: (Lib)(Obj) module: fDHH8 P*hh P* )`Q9?HI8}BL)GS99T9OS99T9Q9R9BS9DT9EQ9HR9IL) 6$D+ 8 K) ) 5<9} g9G9!#LU4i@朥' g<` :L9 A;L9 ȑfD Ǣ8 P* )/ i w9G9H9ТОO9 P9L/; U:}98iHS98T9h 98e $8 $888888)v 7%88ȑ8ȥ;}(fD? ) ) ) ) $ P*U8 08 0 )8 0 )HO9P9O9hLL:i `fD 8 <}P* )K9 L9V % ȑS9T9 9 ȩ8eii HK9L9K9hLZ; 5< g9f+ɈofD͢8=} P* Hȱh P* ) /: %8M9剅N9S9T9M9N9 9L1}0ȭ0ȭ0`__FREEMEM]<e $ $ 7%ȑ ȑ( a4`<?}<DD<<L=L>< U98iHS98T9h 98e $8 $8< 7%ȱ(  a4fD? ) )B} ) ) $ P*U< 0< 0 )< 0 )ԥթ ,2ԅՅiiD<)IHO9P9O9hL=C} i 8嘅L<<<L<<<<ȭ? )cD) CcD) E$' K) ) c)_ P* ) c)Q}_ P*5%6% c)_ P*8H 0h 0` P* )L ` MODULES ERRORs, SYMBOLs, $ FREE"/ @) 7hDL^iDR}hDL^l :a:a`$ 0h 0` P* )L ` MODULES ERRORs, SYMBOLs, $ FREE"/ @) 7hDL^iD Page - KLINK65 v1.00 Preliminary Docs Rev AKLINK65 v1.00(C)1993, 1994 Ken Sidersthis manual (C)1994 Ken ST}IdersThis program is shareware and is supposed to be included with the KASM65 assembler. See KASM65 manual for permU}issions.What is KLINK65? KLINK is designed to link together relocatable files generated by KASM65 when the -R optV}ion is used. It also is able to link files generated by RA65 (included with CC65) since the files are compatable. KLINK alsW}o supports library files. These are files consisting of multiple modules. Each individual module will be included in the ouX}tput only if it is actually required. To generate libraries, you must aquire the CC65 distribution, and use the LIBR65 progrY}am to build them. LIBR65 allows you to build new libraries, add new modules, delete modules, and display the modules.LimiZ}tsKASM65 limits you to 16 object/library files. You are limited to 512 total modules (total object files + total modules i[}n all libraries).Use with CC65 To use KLINK65 in place of link65, just follow the new command line formats, and be \}sure RUNTIME.OBJ is the first file specified for input. If you wish to use KASM65 in place of RA65, be sure to use both the ]}-R and -D options. -R enables relocatable mode, and the -D enables default macros that are automatically supported by RA65 w^}hich includes LDAX# and long branch commands.The Command Line When using Sparta Dos or DOS XL (assuming you are in t_}he correct directory) you should use the following syntax:KLINK [options] file1 [file2 ...]If you are using a menu driven`} DOS, just load KLINK.COM and it will prompt you with:KLINK65>Just type in the options and files that would normally be ea}ntered after the command.Filenames have a .OBJ extension and a D: prefix automatically added if omitted. The first file isb} the primary file. It will be the first module in the output file. Execution will begin with the first byte of this file. c}It is used to determine what other modules need to be included. The linker checks every module that the first file referenced}s, and includes them, it then checks what file those module reference, until finally no more modules not already included aree} referenced.Options are:-O Dn:filename.ext - overide output filename, default is "D:O.OUT"-S hhhh - specify memory starf}t address. hhhh is address in hexadecimal. default is $2000 (8192). Do NOT type a dollar sign before the number.-V - pring}ts Reading Dn:filename.ext messages as files are being read. A second -V displays module names and there start addresses durh}ing pass 2.-Mn - If n is one, displays a module table with their start addresses. If n is two, displays a symbol table whici}h lists each symbol, address, and the module in which it is defied. If n=3 it does both.-L Dn:filename.ext - Redirects mapj} listings to device. Note: -M must be used to turn the appropriate list on or off, otherwise you will generate an empty filek}.-B - Blanks screen during execution.-W - Reprompts with KLINK65> when using a CLI DOS.-? - Gives this list of optionsl}@Dn:filename.ext - The "@" command indirectly reads options and paramters from a file. The options/files may be placm}ed on one line, or individually on seperate lines. A .LNK extender is the default if ommitted. if you would need to type:n}KLINK -B -S3000 -OD8:FILE.COM MAIN FILE2 FILE3 FILE4 FILE5 FILE6you can instead make a file D:L.LNK that consists of:-B-So}3000-OD8:FILE.COMMAINFILE2FILE3FILE4FILE5FILE6You need then only typeKLINK @L.LNK or KLINK @L It is not nep}cessary to put the options or even all of the files in the .LNK file, you can put the options or some of the files on the comq}mand line as long as @ is used last. It also is not necessary to put them on seperate lines in the file. Note: A D: prefix r}is always assumed when ommitted. Maybe I should add a -Ppathname option to set the pathname in the linker (and assembler fors} that matter). With a CLI driven DOS, KLINK will return control to DOS unless any error occurs, in that case it will pt}rompt KLINK65> when done. Press return at the KLINK65> prompt to return to DOS.Examples (Assembling and Linking a programu}):Lets assume you have two modules TEST.M65 and IO.M65 where TEST.M65 contains the main program, and IO.M65 has a couple ofv} routines. Sorry Mac/65 users, the commonly used extension for Mac/65 files - ".M65" wasn't my idea, and since CC65 generatew}s files with this extender, I kept it. To assemble them (Be sure to have the path set for the disk/ramdisk the file is on - x}or specify it for each file) use:ASSEMBLY:With a CLI DOS:KASM -R D8:TESTAnd then, assuming no errorsKASM -R D8:IOy}Or optionally:KASM -R -W D8:TESTAssuming no errors, at the "KASM65>" prompt, enter:-R D8:IOThis saves from haveing toz} reload KASM which may take some time from a floppy disk.with Menu driven DOS:load in KASM.COMenter:-R D8:TEST at th{}e "KASM65>" promptAssuming no errors, then enter:-R D8:IO at the promptAssuming no errors, you would press RETURN fo|}r DOSLINKING: If the assembly process went OK you would have two files TEST.OBJ and LINK.OBJ on the save drive/path t}}hat the source file was on.With a CLI driven DOS, use:KLINK -ODn:TEST.COM D8:TEST D8:IOWith a menu driven DOS:load in ~}KLINK, enter:-ODn:TEST.COM D8:TEST D8:IO Substitute the desired output name for "TEST.COM". You can omit the -ODn:TE}ST.COM parameter if you wish and the file will be written to O.OUT on D:. If no errors were generated, you would be ret}urned to DOS on a CLI DOS, or need only press return on a menu driven DOS. With a CLI DOS, load the file by typing the n}ame sans extender. With a menu driven dos, use the Load option, and be sure to included the extender.Additional Informat}ion KLINK defines __FREEMEM to be the first byte after the end of your program.d the extender.Additional InformatW