)ô > MkSrc65 - Make a 6502 source file &A%=0:X%=1:os%=((º&FFF4)€&FF00)256 1Şctrl% 79,name% 127:X%=ctrl%:Y%=X%256:cpu%=0 (-eol$=½(10-3*(os%<6)):ços%€32:eol$=½13+½10 2î…ö:òClose_All:ñ:à <$è†"Input object file: "in$ F0ç¤file(in$,5)<>1:ñ"File '"in$"' not found":à P9len%=X%!10:ç“-¸P-2000"":out%=®(out$) nA%=load%€&FFFFFF00 x)çA%=&FFF70000:load%=&0000:exec%=&0000 ‚UçA%=&FFFBBC00:load%=&8000:exec%=&8000:çmem%!0=0:çmem%!4=0:load%=&C000:exec%=&C000 Œ)çA%=&FFFFF800:load%=&8000:exec%=&8000 –)çA%=&FFFFFA00:load%=&0000:exec%=&0000  )çA%=&FFFFFC00:load%=&0000:exec%=&0000 ªWñ"Disassembly address: (&";~load%;:è") &"A$:çA$<>"":load%= ("&"+A$):exec%=load% ´?õ:X%!0=0:A$=¤Dis_Name(cpu%):çA$="":è"CPU number:"‰11;""cpu% ¾AıA$<>"":dat%=X%?3€12:wth%=(X%?3€3)*2+4:msk%= ("&"+Äwth%,"F")) È0çdat%=0:dat%=wth%+12‹çdat%=12:dat%=21‹dat%=9 ÒGè"(B)asic or (T)ext output? "A$:txt%=(ÀA$,1)="T"„ÀA$,1)="t") ÜGè"Output byte dump in comments? "A$:cmt%=(ÀA$,1)="Y"„ÀA$,1)="y") æGè"Output byte dump in disassembly? "A$:dmp%=(ÀA$,1)="Y"„ÀA$,1)="y") ğcmt%=cmt%„dmp% ú ãB%=0¸1:addr%=load%:lbmax%=0 MçB%:ñ"Creating labels";Ä7+wth%,".");‹ñ"Scanning for labels";Ä3+wth%,"."); 6õ:ñÄwth%,½8);¤h0(addr%,wth%);:L$=¤line:A%=§L$,"&") zçA%:çÁL$,A%+1,1)>="0":L%= ÁL$,A%):çL%>&FF:çL%>=(load%€msk%)€L%<(load%€msk%)+len%:lbmax%=lbmax%+4:çB%:!lb%=L%:lb%=lb%+4 "Faddr%=addr%+num%:ıaddr%>load%+len%:çB%=0:Şlabel% lbmax%:lb%=label% , ñ:íB% 6.ñ"Outputting source.....";¤h0(load%,wth%); @òout("REM",½&F4+" > "+out$) J'òout("REM",½&F4+" Source for "+in$) Tòout(""," ") ^Bòout("","OS_CLI=&FFF7:OSBYTE=&FFF4:OSWORD=&FFF1:OSWRCH=&FFEE") hBòout("","OSWRCR=&FFEC:OSNEWL=&FFE7:OSASCI=&FFE3:OSRDCH=&FFE0") rBòout("","OSFILE=&FFDD:OSARGS=&FFDA:OSBGET=&FFD7:OSBPUT=&FFD4") |(òout("","OSGBPB=&FFD1:OSFIND=&FFCE") †òout(""," ") òout("","load%=&"+Ã~load%) š,òout("DIM",½&DE+" mcode% &"+Ã~(len%+20)) ¤Açtxt%:òout("","FOR P=0 TO 1")‹òout("",½&E3+" P=0 "+½&B8+" 1") ®!òout("","P%=load%:O%=mcode%") ¸òout("","[OPT P*3+4") ÂUaddr%=load%:õ:ñÄwth%,½8);¤h0(addr%,wth%);:L$=¤line:çaddr%=exec%:òout("",".exec%") Ìvlb%=label%-4:õlb%=lb%+4:ılb%>label%+lbmax%„!lb%=(addr%€msk%):ç!lb%=(addr%€msk%):òout("",".L"+¤h0(addr%€msk%,wth%)) ÖyA$="":A%=§L$,"&"):çA%:çÁL$,A%+1,1)>="0":L%= ÁL$,A%):çL%>=(load%€msk%)€L%<(load%€msk%)+len%:L$=ÀL$,A%-1)+"L"+ÁL$,A%+1) à–çcmt%:A$=¤h0(addr%,wth%):B$="":ãA%=0¸num%-1:B%=?(addr%-load%+mem%+A%):A$=A$+" "+¤h0(B%,2):B$=B$+¤ch(B%):í:A$=A$+Ä(dat%-©A$)€(©A$load%+len% &,çtxt%:òout("","]NEXT")‹òout("","]"+½&ED) 0Wòout("PRINT",½&F1+" ""*SAVE "";~mcode%;"" "";~O%;"" "";~exec%;"" "";~load%") :%çout%:ç¬txt%:Õ#out%,13:Õ#out%,255 DAçout%:Ù#out%:out%=0:X%!2=&FFFFFB00-1024*txt%:A%=¤file(out$,2) Nñ:à XAݤline:num%=¤Dis_Code(cpu%,addr%,addr%-load%+mem%):L$=$(X%+4) b/num%=X%?3:flg%=X%?2:A%=§L$,"&FF"):çA%=0:=L$ l)L%= (ÁL$,A%,5))-&FFCE:çL%<0„L%>43:=L$ vEç((L%ƒ3-(L%>27))ƒ3-3*(L%=24)+(L%>24€L%<28)-3*(L%=27)-(L%=28)):=L$ €g=ÀL$,A%-1)+"OS"+Á"FINDGBPBBPUTBGETARGSFILERDCHASCINEWLWRCRWRCHWORDBYTE_CLI",(L%3)*4+1,4)+ÁL$,A%+5) Šİòout(T$,A$):çout%=0:á ”Içtxt%:A$=T$+ÁA$,(T$="")+2)+eol$:$name%=A$:ògbpb(2,out%,name%,©A$,0):á ;line%=line%+1:?name%=13:name%?1=line%256:name%?2=line% ¨=name%?3=©A$+4:$(name%+4)=A$:ògbpb(2,out%,name%,©A$+4,0):á ²3İòClose_All:out%=out%:çout%:A%=out%:out%=0:Ù#A% ¼á Æ.ݤch(A%):A%=A%€127:çA%<32„A%=127:="."‹=½A% Ğ#ݤh0(A%,N%)=Â"0000000"+Ã~A%,N%) Ú#İògbpb(A%,chn%,addr%,num%,ptr%) ä@?X%=chn%:X%!1=addr%:X%!5=num%:X%!9=ptr%:ç(os%€32)=0:Ö&FFD1:á îçA%=1„A%=3:Ï#?X%=X%!9 ø3õ:çA%=1„A%=2:Õ#?X%,?X%!1‹çA%=3„A%=4:?X%!1=š#?X% 2X%!1=X%!1+1:X%!5=X%!5-1:ı(Å#?X%€A%>2)„X%!5<1:á  Nݤfile(A$,A%):ç(os%€32)=0:$name%=A$:?X%=name%:X%?1=name%256:=(º&FFDD)€&FF MçA%=5:X%!14=(A$):çX%!14:X%!10=¢#X%!14:Ù#X%!14:X%!2=0:X%!6=0:X%!14=&33:=1  =0 *$ݤDis_Name(cpu%):X%?3=0:="65x02" 46ݤDis_Code(cpu%,Ptr%,Data%):êop%,ins%,md%,b0%,num% >4)€1))+" A" è8ç(op%€&E7)=4:="T"+Á"SR",1+(md%4),1)+"B"+¤mde(md%€3) ò2ç(op%€&D3)=&C0:=¤bxy(ins%)+¤mde(((md%‚3)-1)€3) ü"ç(op%€&E7)=36:="BIT"+¤mde(md%) (ç(op%€&C7)=&84:=¤bxy(ins%)+¤mde(md%) 7ç(op%€&FD)=&A0:="LD"+Á"YX",1+((op%€2)2),1)+¤mde(2) Sç(op%€&CF)=76:çop%<>92:X%?2=64:="JMP "+À"(",op%>95)+Á¤mde(md%),3)+À")",op%>95) $/çop%=&80:num%=2:X%?2=64:="BRA"+¤jr(Data%?1) .!X%?2=128:="EQUB &"+¤h0(op%,2) 83ݤalu(A%)=Á"ORAANDEORADCSTALDACMPSBC",A%*3+1,3) B3ݤrot(A%)=Á"ASLROLLSRRORSTXLDXDECINC",A%*3+1,3) L3ݤbxy(A%)=Á"***BIT***STZSTYLDYCPYCPX",A%*3+1,3) V1ݤmde(A%):num%=2:çA%=2:=" #&"+¤h0(Data%?1,2) `@ç(A%€2):num%=3:=" &"+¤h0(Data%!1,4)+À",X",A%=7)+À",Y",A%=6) j-ç(A%€1):=" &"+¤h0(Data%?1,2)+À",X",A%=5) t6=" (&"+¤h0(Data%!1,2)+À",X",A%=0)+")"+À",Y",A%=4) ~1ݤjr(A%):=" &"+¤h0(Ptr%+A%+2+256*(A%>127),4) ÿ