Download this file
45 lines (39 with data), 557 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 | ' format byte
func hbyte(c)
if c<16
hbyte="0"+hex(c)
else
hbyte=hex(c)
fi
end
' format address
func haddr(c)
if c<&H1000
if c<&h100
if c<&h10
haddr = "000"+hex(c)
else
haddr = "00"+hex(c)
fi
else
haddr = "0"+hex(c)
fi
else
haddr=hex(c)
fi
end
open "s2.pdoc" for input as #1
open "test.b" for output as #2
count=0
? haddr(count); ": ";
while !eof(1)
c=bgetc(1)
? "0x";hbyte(c);
bputc #2; c
count ++
if (count mod 16) = 0 then ?:? haddr(count);": "; else ? " ";
wend
close #2
close #1
? run("diff s2.pdoc test.b")
kill "test.b"
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.