mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-12 15:29:28 +00:00
keep parameters out of call target
This commit is contained in:
parent
6a1f7043cb
commit
506742bbac
|
@ -331,7 +331,7 @@ public class SubLine implements ApplesoftConstants
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOKEN_CALL:
|
case TOKEN_CALL:
|
||||||
callTarget = getExpression ();
|
callTarget = getCallTarget ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOKEN_DEF:
|
case TOKEN_DEF:
|
||||||
|
@ -398,7 +398,7 @@ public class SubLine implements ApplesoftConstants
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
private String getExpression ()
|
private String getCallTarget ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
StringBuilder text = new StringBuilder ();
|
StringBuilder text = new StringBuilder ();
|
||||||
|
@ -410,6 +410,8 @@ public class SubLine implements ApplesoftConstants
|
||||||
byte b = buffer[ptr++];
|
byte b = buffer[ptr++];
|
||||||
if (isToken (b))
|
if (isToken (b))
|
||||||
text.append (tokens[b & 0x7F]);
|
text.append (tokens[b & 0x7F]);
|
||||||
|
else if (b == Utility.ASCII_COMMA) // end of call target
|
||||||
|
break;
|
||||||
else
|
else
|
||||||
text.append ((char) b);
|
text.append ((char) b);
|
||||||
}
|
}
|
||||||
|
@ -576,7 +578,7 @@ public class SubLine implements ApplesoftConstants
|
||||||
if (isFirst ())
|
if (isFirst ())
|
||||||
{
|
{
|
||||||
text.setLength (0);
|
text.setLength (0);
|
||||||
text.append (String.format (" %d REM ", parent.lineNumber));
|
text.append (String.format (" %d REM ", parent.lineNumber)); // mimic apple
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
text.append ("REM ");
|
text.append ("REM ");
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class Utility
|
||||||
public static final byte ASCII_PERCENT = 0x25;
|
public static final byte ASCII_PERCENT = 0x25;
|
||||||
public static final byte ASCII_LEFT_BRACKET = 0x28;
|
public static final byte ASCII_LEFT_BRACKET = 0x28;
|
||||||
public static final byte ASCII_RIGHT_BRACKET = 0x29;
|
public static final byte ASCII_RIGHT_BRACKET = 0x29;
|
||||||
|
public static final byte ASCII_COMMA = 0x2C;
|
||||||
public static final byte ASCII_MINUS = 0x2D;
|
public static final byte ASCII_MINUS = 0x2D;
|
||||||
public static final byte ASCII_DOT = 0x2E;
|
public static final byte ASCII_DOT = 0x2E;
|
||||||
public static final byte ASCII_COLON = 0x3A;
|
public static final byte ASCII_COLON = 0x3A;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user