mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-01 03:41:29 +00:00
tidying
This commit is contained in:
parent
c42481637e
commit
f22b4dcd46
|
@ -28,31 +28,31 @@ public class CPMBasicFile extends TextFile
|
||||||
while (buffer[ptr] != 0)
|
while (buffer[ptr] != 0)
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
int offset = getShort (buffer, 1) - ptr;
|
int loadAddress = getShort (buffer, 1) - ptr - 1;
|
||||||
|
|
||||||
ptr = 1;
|
ptr = 1;
|
||||||
while (ptr < buffer.length)
|
while (ptr < buffer.length)
|
||||||
{
|
{
|
||||||
int val1 = getShort (buffer, ptr);
|
int nextAddress = getShort (buffer, ptr);
|
||||||
|
|
||||||
if (val1 == 0)
|
if (nextAddress == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
int val2 = getShort (buffer, ptr + 2);
|
int lineNumber = getShort (buffer, ptr + 2);
|
||||||
|
|
||||||
text.append (String.format ("%7d ", val2));
|
text.append (String.format ("%7d ", lineNumber));
|
||||||
ptr += 4;
|
ptr += 4;
|
||||||
|
|
||||||
while (buffer[ptr] != 0)
|
while (buffer[ptr] != 0)
|
||||||
{
|
{
|
||||||
int val = buffer[ptr++] & 0xFF;
|
int val = buffer[ptr++] & 0xFF;
|
||||||
if ((val & 0x80) == 0 && val >= 32)
|
if ((val & 0x80) == 0 && val >= 32)
|
||||||
text.append (String.format ("%s", (char) val));
|
text.append (String.format ("%s", (char) val)); // printable
|
||||||
else
|
else
|
||||||
text.append (String.format ("<%02X>", val));
|
text.append (String.format ("<%02X>", val)); // token?
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = val1 - offset + 1;
|
ptr = nextAddress - loadAddress;
|
||||||
text.append ("\n");
|
text.append ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user