graphsize 800,800
color white
rect 0,0,800,1600
color black
openb "im2.bin"
xpos = 0
ypos = 0
st0 = 0x73fb
st1 = 0x79de
st2 = (st1-st0)+st1
st10 = 0x5f07
st11 = 0x68c7
st10end = 0x66c0
st11end = st11 + (st10end - st10)
for j = 0 to 32767
b = readbyte
if j > 16384 then
call dofont(b,j, st0, st1, 0, 1, 2)
call dofont(b,j, st1, st2, 0, 2, 2)
call dofont(b,j, st10, st10end, 100, 1, 2)
call dofont(b,j, st11, st11end, 100, 2, 2)
call dofont(b,j, 0x52d0, 0x56b0, 200, 1, 1)
call dofont(b,j, 0x4b80, 0x5140, 300, 1, 1)
call dofont(b,j, 0x5925, 0x5f00, 400, 1, 1)
end if
if j % 512 = 0 then print j+" "+tohex(j)
next j
subroutine dofont(b, pos, st0, en0, vertoffset, intergroup, intergap)
#print string(b)+" "+string(pos)
if pos >= st0 and pos < en0 then
xpos = (pos - st0) % 512
ypos = (pos - st0) \ 512 * 25 + intergroup - 1 + vertoffset
call drawhead(xpos, ypos, b, intergap)
end if
end subroutine
subroutine drawhead(xpos,ypos,b,interleave)
if b & 128 then
for i = 0 to 6
if b & (2^i) then plot xpos+60 , ypos + (i+2) * interleave
next i
else
for i = 0 to 7
if b & (2^i) then plot xpos+60 , ypos + (i) * interleave
next i
end if
end subroutine