10 'GR8NET OPL4 FM part test program 15 width80:restore1000:gosub1020:defusr=&h9000 20 'register i/o test 25 for k=0 to 1 26 fori=0to511:ifi>255then p=&hc6 else p=&hc4 27 out p,0:out p+1,0:nexti 30 fori=0to255 40 ifk=1then p=&hc6 else p=&hc4 50 out p,(i and 255):out p+1,i and 255 60 next i 70 a=usr(0) 80 fori=0to31:a=i:gosub1050:print":";:forj=0to15:a=peek(&ha000+i*16+j):gosub1050:nextj:a$=input$(1):print:nexti 90 next k 100 end 1000 data "F33E01210040CD24002100401100A00100027E1223130B78B120F73E00210040CD2400FBC9XX" 1020 p=&h9000 1025 reada$:a=len(a$):ifa=0or(aand1)=1thenprint"Error in hex":stop 1030 a=a/2-1:fori=0toa:b$=mid$(a$,i*2+1,2):ifb$="XX"thenreturn 1040 pokep,val("&H"+b$):p=p+1:nexti:goto1025 1050 a$=hex$(a):l=len(a$):print" ";:ifl=1thenprint"0"; 1060 printa$;:return