[net.micro.cbm] C64DXL.BAS

GMW@psuvm.BITNET (06/05/85)

50 dim hx$(16)
51 hx$(0)="0":hx$(1)="1":hx$(2)="2":hx$(3)="3":hx$(4)="4":hx$(5)="5":hx$(6)="6"
52 hx$(7)="7":hx$(8)="8":hx$(9)="9":hx$(10)="a":hx$(11)="b":hx$(12)="c"
53 hx$(13)="d":hx$(14)="e":hx$(15)="f"
200 input"file name";fl$:open1,8,2,"0:"+fl$+",s,r"
202 get#1,c$:ifc$<>";"then202
203 bf$=""
204 bf$=bf$+c$:get#1,c$:ifasc(c$)<>13then204
212 printbf$
215 ifmid$(bf$,1,1)<>";"thenprint"tape error":goto210
220 h2$=mid$(bf$,2,2):gosub500:cn=by%:ifby%=0thenclose1:stop
230 ad$=mid$(bf$,4,4):gosub700:sa=ad:pt%=8
240 forl=1tocn:h2$=mid$(bf$,pt%,2):gosub500:pokead,by%:ad=ad+1:pt%=pt%+2:nextl
250 goto 202
500 by%=0
501 fork=1to2
510 fori=0to15:ifmid$(h2$,k,1)=hx$(i)then530
515 nexti
520 print h2$;"hex error":stop
530 by%=by%*16+i:nextk
540 return
700 h2$=mid$(ad$,1,2):gosub500
710 ad=by%:h2$=mid$(ad$,3,2):gosub500:ad=ad*256+by%
720 return