Saturday, February 13, 2016

Strings strings strings


strings -t x roms/ap2k.ic3c | less

(the -t x gives you the hexadecimal offset in the file)

38b PS2414
403 Data Dump Mode
553 NLQ H /Adjust=
565 Draft H /Adjust=
578 NLQ L /Adjust=
58a Draft L /Adjust=

9d5 Character Pitch
9e5 12 CPI
9ec 10 CPI
9f9 Shape of Zero
a07 0 (Slashed)
a13 0 (Unslashed)
...
bbc Valid
bc2 Depend on I/F
bd6 Draft Print Speed
be8 Normal
bef High
e0e This is the first line.
e26 This is line


And so for a given string, let's see if we can find the offset in the disassembly:


38b PS2414

cat ap2k_disasm | grep '038B'
00000353: 34 8B 03 LXI HL,$038B

403 Data Dump Mode

cat ap2k_disasm | grep '0403'
00000398: 34 03 04 LXI HL,$0403
0000104E: 34 03 04 LXI HL,$0403

553 NLQ H /Adjust=
565 Draft H /Adjust=

cat ap2k_disasm | grep '0553'
000004F2: 34 53 05 LXI HL,$0553
cat ap2k_disasm | grep '0565'
000004EF: 34 65 05 LXI HL,$0565

e0e This is the first line.
e26 This is line

cat ap2k_disasm | grep '0E0E'
00000DC7: 34 0E 0E LXI HL,$0E0E
cat ap2k_disasm | grep '0E26'
00000DF0: 34 26 0E LXI HL,$0E26



No comments:

Post a Comment