> MkSnap 1.20  (C) J.G.Harston # Make a SpecSnap snapshot file (2 from spectrum files with load/exec addresses 28 ctrl% 31,name% 80:X%=ctrl%:Y%=X%256: mem% &10100 <: F, "Enter output SpecSnap filename: "out$ P5 "Enter input filenames, terminated with RETURN" Z$ :CloseAll:" at line ";: d A%=0 255 4:mem%!A%=0: n: x  "File: "in$  in$<>"":Store in$="" 7mem%!&20=SpExtra%: Set to last file's exec address mem%?&8E=&FF : Sound ON %"Save "+out$+" "+~mem%+"+10100" "SetType "+out$+" 702"  : Store in$,1)="*":in$: 2A%=in$+" "," "):load$=in$,A%):in$=in$,A%-1) $load$=load$,2):load$,1)<>" " Ctype%=file(in$,5):load%=X%!2:exec%=X%!6:len%=X%!10:attr%=X%!14  SpName$=in$:A%=SpName$,".") 6A%:SpName$=SpName$,A%+1):A%=SpName$,"."):A%=0 "* type%<>1:"File '"in$"' not found": ,+ len%>&FFFF:"File '"in$"' too long": 6i(load%&FFFF0000)=&FFF20000:load%=&FFFF0000+(load%&FF00):exec%=load%:exec%>&FFFF5FFF:exec%=exec%+3 @9(load%&FFFFFF00)=&FFF70000:load%=&30000:exec%=load% J#SpType%=(load% &30000)&10000 T,SpType%<>3:"Can only deal with CODE": ^ASpStart%=(load% &FFFF):SpExtra%=(exec% &FFFF):SpLen%=len% h$load$<>"":SpStart%=("&"+load$) r5SpStart%+SpLen%>&10000:"Runs over memory end": |:11;(in$+6);13;~SpType%;" "SpName$;(11-SpName$); 7h0(SpStart%,4)" "h0(SpExtra%,4)" "h0(SpLen%,4); +"Load "+in$+" "+~(mem%+SpStart%+&100)   : CloseAll "in%=in%:in%:A%=in%:in%=0:#A% 'out%=out%:out%:A%=out%:out%=0:#A%  : #ݤh0(A%,N%)="0000000"+~A%,N%) Cݤfile(A$,A%):$name%=A$:X%?0=name%:X%?1=name%256:=(&FFDD)&FF