10IF PAGE=&800 THEN PRINT"Sorry - not on second processors":END 20ON ERROR GOTO 800 30MODE 7 40S%=64:ERROR 50REM 60FOR ROMnumber = 15 TO 0 STEP -1 70 PRINT ROMnumber;". ";FNgetname(ROMnumber) 80NEXT 90PRINT 100ON ERROR GOTO 840 110PRINTTAB(13,0);" Selected " 120PRINT TAB(0,20); 130Size = S% * &4000 DIV 128 140DIM Ram Size 150REPEAT 160 INPUT LINE "ROM Title or Number: " ROMtitle$ 170UNTIL ROMtitle$ <> "" 180 190Clean$=ROMtitle$ 200IF ASC("0") <= ASC(ROMtitle$) AND ASC(ROMtitle$) <= ASC("9") THEN ROMnumber = EVAL(ROMtitle$):Clean$=FNgetname(ROMnumber)ELSE ROMnumber = FNgetnumber(ROMtitle$) 210IF ROMnumber < 0 THEN PRINT "Cannot find ROM """;ROMtitle$;"""":END 220INPUT LINE "File name: " File$ 230IF Clean$="Empty slot" THEN Clean$="ROM" 240IF File$ = "" THEN File$ = Clean$ 250CLS 260F$="ROM #"+STR$ROMnumber 270IF Clean$<>"ROM" THEN F$=F$+" ("+Clean$+")" 280PROCprint(F$) 290PROCprint("will be saved as file"+CHR$(130)+File$) 300PROCload2(ROMnumber,Ram,Size) 310 320ON ERROR GOTO 350 330OSCLI("SAVE R."+File$+" "+STR$~Ram+" +"+STR$~Size+" 8000 8000") 340GOTO 370 350File$="ROM" 360VDU 7:GOTO 250 370ON ERROR GOTO 840 380PRINT' 390*EX R 400PRINT' 410ERROR END 420DEFFNreadbyte(Rom, Address) 430 Y%=Rom 440 ?&F6 = Address MOD 256 450 ?&F7 = Address DIV 256 460= USR(&FFB9) MOD 256 470 480DEFFNgetname(TrialROM) 490LOCAL ROMtitle 500LOCAL Found 510DIM ROMtitle 31 520Found=FALSE 530Offset = 8 540REPEAT 550 Offset = Offset + 1 560 Char% = FNreadbyte(TrialROM,&8000+Offset) 570 IF Char%<32 OR Char%>=&7F THEN Char%=13:Found=TRUE 580 ROMtitle?(Offset-9) = Char% 590UNTIL (Offset = 9+32) OR Found 600IF NOT Found THEN ="Empty slot" 610=$ROMtitle 620 630DEFFNgetnumber(ROMname$) 640LOCAL ROMnumber 650LOCAL Found 660ROMnumber = 16 670Found = FALSE 680REPEAT 690 ROMnumber = ROMnumber - 1 700 IF FNgetname(ROMnumber) = ROMname$ THEN Found=TRUE 710UNTIL (ROMnumber=0) OR Found 720IF Found THEN =ROMnumber ELSE =-1 730 740DEFPROCloadram(ROMnumber,max) 750LOCAL offset 760 FOR offset = &0000 TO max 770 Ram?offset = FNreadbyte(ROMnumber,&8000+offset) 780 NEXT 790ENDPROC 800REM ERROR entry 810IF S%=128 THEN S%=16 ELSE S%=S%*2 820PRINT TAB(0,0)"27";S%;" EPROMs (ESCAPE to change) "' 830GOTO 50 840REM ERROR exit 850PRINT 860CLEAR 870END 880 890DEFPROCload2(ROMno,Ram,Bytes) 900DIM Code 511 910FOR Pass = 0 TO 2 STEP 2 920Dest=&80 930P% = Code 940[OPT Pass 950 Lda #&8000 MOD 256 960 Sta Count 970 Lda #&8000 DIV 256 980 Sta Count+1 990 Lda #(Ram MOD 256):Sta Dest 1000 Lda #Ram DIV 256: Sta Dest+1 1010.Next 1020PHP:SEI 1030 Lda Count 1040 Sta &F6 1050 Clc:Adc #1 1060 Sta Count 1070 Lda Count+1 1080 Sta &F7 1090 Adc #0 1100 Sta Count+1 1110 Ldy #ROMno 1120 Jsr &FFB9 1130PLP 1140 Ldy #0 1150 Sta (Dest),Y 1160 Inc Dest 1170 Bne zz1 1180 Inc Dest+1 1190.zz1 1200 Lda Count+1 1210 Cmp #(&8000+Bytes) DIV 256 1220 Bne Next 1230 Rts 1240.Count NOP:NOP 1250] 1260NEXT 1270CALL Code 1280ENDPROC 1290DEFPROCprint(S$) 1300PRINT TAB((40-LEN(S$))DIV2-4);CHR$(131);CHR$(141);S$ 1310PRINT TAB((40-LEN(S$))DIV2-4);CHR$(131);CHR$(141);S$ 1320PRINT' 1330ENDPROC