" > MkSrc - Make a source file &A%=0:X%=1:os%=((&FFF4)&FF00)256 1ctrl% 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$ F0file(in$,5)<>1:"File '"in$"' not found": P9len%=X%!10:-P-2000"":out%=(out$) nA%=load%&FFFFFF00 x)A%=&FFF70000:load%=&0000:exec%=&0000 UA%=&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% AA$<>"":dat%=X%?312:wth%=(X%?33)*2+4:msk%=("&"+wth%,"F")) 0dat%=0:dat%=wth%+12dat%=12:dat%=21dat%=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%=01:addr%=load%:lbmax%=0 MB%:"Creating labels";7+wth%,".");"Scanning for labels";3+wth%,"."); 6:wth%,8);h0(addr%,wth%);:L$=line:A%=L$,"&") zA%: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$) Tout(""," ") ^Bout("","OS_CLI=&FFF7:OSBYTE=&FFF4:OSWORD=&FFF1:OSWRCH=&FFEE") hBout("","OSWRCR=&FFEC:OSNEWL=&FFE7:OSASCI=&FFE3:OSRDCH=&FFE0") rBout("","OSFILE=&FFDD:OSARGS=&FFDA:OSBGET=&FFD7:OSBPUT=&FFD4") |(out("","OSGBPB=&FFD1:OSFIND=&FFCE") out(""," ") out("","load%=&"+~load%) ,out("DIM",&DE+" mcode% &"+~(len%+20)) Atxt%: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%=0num%-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) 0Wout("PRINT",&F1+" ""*SAVE "";~mcode%;"" "";~O%;"" "";~exec%;"" "";~load%") :%out%:txt%:#out%,13:#out%,255 DAout%:#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%<0L%>43:=L$ vE((L%3-(L%>27))3-3*(L%=24)+(L%>24L%<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: Itxt%: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): 3Close_All:out%=out%:out%:A%=out%:out%=0:#A%  .ݤch(A%):A%=A%127:A%<32A%=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%=1A%=3:#?X%=X%!9 3:A%=1A%=2:#?X%,?X%!1A%=3A%=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 MA%=5:X%!14=(A$):X%!14:X%!10=#X%!14:#X%!14:X%!2=0:X%!6=0:X%!14=&33:=1  =0 *FݤDis_Code(c%,a%,d%):!X%=&200C:X%?2=c%:X%!4=a%:X%!8=!d%:X%!12=d%!4 4=A%=190:&FFF1:X%?3=0:$(X%+4)="EQUB &"+h0(X%?8,2):X%?3=1 > =X%?3 H9ݤDis_Name(c%):!X%=&2008:X%?2=c%:X%!4=0:A%=190:&FFF1 RX%!4:=$(X%+4)="" \+ݤDis_CPU::(7)"Microprocessor Menu"' f5:A%,A$::;A%;":";4+(20)*20);A$;20(<20)); p4A%,A$:A%=0::'"Enter CPU number: "cpu%:cpu% z@A%=Dis_Name(cpu%)="":A%:"No d"dd$"y routine for this CPU" A%::=cpu% E2,6502,8,8008,9,6809,11,PDP11,12,6512,18,80186,28,80286,30,OGGIN >32,32016,38,80386,44,ARM,48,80486,58,80586,65,65x2 Series 868,68x00 Series,80,Z80,85,8080/8085,86,80x86 Series *89,INS8900,94,9440 series,99,9900,0,*