10 REM Read byte from TMS6100 20 *FX159,0,255 30 REM Reset speech processor 40 MODE7:PRINT"PHROM dumper":PRINT:INPUT"Enter PHROM# to dump (15=PHROMA):"P%:PRINT:PRINT"Data is:":PRINT 50 REM P%=phrom to dump now 60 H%=(P% AND 12)/4:REM high 2 bits 70 L%=(P% AND 3)*4:REM low 2 bits 80 O%=0:REM offset to start at 100 Y%=(O% AND &F)DIV&1:PROCwrite 110 Y%=(O% AND &F0)DIV&10:PROCwrite 120 Y%=(O% AND &F00)DIV&100:PROCwrite 130 Y%=L%+(O% AND &F000)DIV&1000:PROCwrite 140 Y%=H%:PROCwrite 141 FORO%=0 TO 16384 150 PROCread:PROCdisplay:NEXT 160 REM Address is sent xcccaaaa 170 REM where x=don't care 180 REM c=command (see below) 190 REM a=address 200 END 210 REM Five address calls are reqd: 220 REM Call 1: xccc A3 A2 A1 A0 230 REM Call 2: xccc A7 A6 A5 A4 240 REM Call 3: xccc AB AA A9 A8 250 REM Call 4: xccc C1 C0 AD AC 260 REM Call 5: xccc x x C3 C2 270 REM Hence A13 to A0 are sent 280 REM ie.14 bit addr = 16384 long 290 REM Chip select C0 to C3 too 300 END 310 REM Commands used here: 320 REM ccc=%100=64 (load address) 330 REM ccc=%001=16 (read byte) 340 END 350 REM Send address to TMS5220 360 DEFPROCwrite 370 A%=&9F:Y%=Y%+64:CALL&FFF4 380 ENDPROC 390 REM Do a read byte... 400 DEFPROCread 410 *FX159,0,16 420 A%=&9E:D%=((USR&FFF4)AND &FF0000)DIV&10000:REM Mask out Y which contains the answer 430 ENDPROC 440 REM Filter out control chr$ 450 DEFPROCdisplay 460 IFD%>31 AND D%<127 THENPRINTCHR$(D%); ELSEPRINT"."; 470 ENDPROC