The 2068 PEEK function gives access to the Home ROM and the RAM (0 to 65535), but not to the 8K Extension ROM.
The program PEEK EXROM permits examination of the Extension ROM by copying it into the RAM at locations 50000 to 58191. There it may be peeked normally.
The machine code in lines 80 and 100 provides entrance to and exit from Exrom per Fig. 3.2.2-2 of the 2068 Technical Manual. Line 90 holds the actual transfer of data, using:
LD HL, 0d
LD DE, 50000d
LD BC, 8192d
LDIR
After running the program, peek Exrom (0 to 8291) by using the desired Exrom number plus 50000. For example, to examine Exrom 1234 enter PRINT PEEK 51234;the response should be 17.
To see how quickly LDIR moves the 8192 bytes type RANDOMIZE USR 65000 again and ENTER. OK should appear in about 1/15 sec.
10 REM ************ PEEK EXROM
20 CLEAR 64999
30 LET N=65000
40 READ MC: IF MC=999 THEN GO TO 110
50 POKE N,MC
60 LET N=N+1
70 GO TO 40
80 DATA 219,255,203,255,211,255,219,244,50,195,92,62,1,211,244
90 DATA 33,0,0,17,80,195,1,0,32,237,176
100 DATA 58,195,92,211,244,219,255,203,191,211,255,201,999
110 RANDOMIZE USR 65000
120 REM ********* PEEK EXROM AT EXROM # (0 TO 8191) + 50000
H.E.Weppler
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.