100 REM ROMGET (v1.2) 110 REM 17.1.1993 120 REM 130 MODE 1: CLEAR: DEFINT a-z 140 PRINT"ROMGET v1.2":PRINT"Run on CPC to save the ROMs in a file.": PRINT 150 PRINT"Insert disk with >= 50K free space": PRINT"and press a key ..." 160 CALL &BB18 170 adr=&A000: sh=adr+2: dh=adr+5: k=adr+15 180 h!=HIMEM: MEMORY &1FFF 190 FOR i=adr TO adr+&12: READ a$: POKE i,VAL("&"+a$): NEXT 200 POKE sh,0: POKE dh,&20: POKE k,&FC: CALL adr 210 POKE sh,&C0: POKE dh,&60: CALL adr 220 PRINT"Saving lower&upper-ROM (Z80CPC.ROM) ..." 230 SAVE"!Z80CPC.ROM",b,&2000,&8000 240 POKE k,7: CALL adr 250 IF PEEK(&6000)<>1 THEN PRINT"No AMSDOS-ROM found.": GOTO 280 260 PRINT"Saving AMSDOS-ROM (Z80DISK.ROM) ..." 270 SAVE"!Z80DISK.ROM",b,&6000,&4000 280 PRINT"bye." 290 MEMORY h!: END 300 DATA 21,00,C0,11,00,20,01,00,40,DF,0D,A0,C9,10,A0,00,ED,B0,C9 310 ' 320 '**** end of program *** 330 ' 340 'ROMGET - written to copy the CPC-ROM to a file, which can be used 350 'by CPCEMU (transfer Z80CPC.ROM, Z80DISK.ROM to a PC). 360 ' 370 'If you input this program, you can leave all REM- and PRINT - lines. 380 'Some annotations: 390 ' line 200 : copy low-rom &0000-&3fff to ram &2000-&5fff 400 ' line 210 : copy high-rom &c000-&ffff to ram &6000-&9fff 410 ' line 240 : copy amsdos-rom &c000-&ffff to ram &6000-&9fff 420 ' 430 'The assembler-module in data-line 300 : 440 ' 450 ';ROMGET2 (v1.2) 460 ';17.1.1993 (26.,27.6.1989) 470 '; 480 ';Program to copy the CPC-ROMs to RAM, so you can save them in a file. 490 ';Run this on a CPC 500 '; 510 ';usage: 520 '; adr = &a000 530 '; poke adr+&02 , source-address (hi-byte) 540 '; poke adr+&05 , destionation-address (hi-byte) 550 '; poke adr+&0F , rom/ram-configuration 560 '; call adr 'to copy &4000-byte-bank 570 '; 580 '; (rom/ram-config - 0..251 = ROM-number, 252=lower,upper rom enabled, ...) 590 'ORG #A000 600 'LD HL,#C000 ;source-address (ROM or RAM) 610 'LD DE,#2000 ;destination-address (RAM) 620 'LD BC,#4000 ;length of bank 630 'RST #18 640 'DEFW RSTTAB 650 'RET 660 ' 670 'RSTTAB DEFW BLOCK ;jump to prg 680 'DEFB 0 ;rom/ram-configuration 690 ' 700 'BLOCK LDIR ;copy the bank 710 'RET 720 ' 730 'END 740 ';