|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectsinclair.basic.ZX81Basic
This class provides utilities to dump basic programs.
| Field Summary | |
|---|---|
static boolean |
DEBUG
Debug flag. |
| Constructor Summary | |
|---|---|
ZX81Basic()
|
|
| Method Summary | |
|---|---|
static int |
comparePrograms(byte[] prog1,
byte[] prog2,
boolean compVars,
int allowable)
Compare the two programs line-by-line. |
static int |
comparePrograms(java.util.Map lines1,
java.util.Map vars1,
java.util.Map lines2,
java.util.Map vars2,
boolean compVars,
int allowable)
Compare the two programs line-by-line. |
static void |
dumpDisplay(byte[] memory,
int start,
int end,
java.lang.StringBuffer buff)
Dump the display file. |
static void |
dumpLine(byte[] memory,
int number,
boolean dumpNumberValues,
boolean translate,
boolean wrap,
java.lang.StringBuffer buff)
Dump a basic program line. |
static void |
dumpLine(byte[] memory,
int number,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
Dump a basic program line. |
static void |
dumpProgram(byte[] memory,
int start,
int display,
int vars,
int varsEnd,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
Dump a basic program, possibly including variables and display area. |
static void |
dumpProgramLines(byte[] memory,
int start,
int end,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
Dump a basic program. |
static void |
dumpVariables(byte[] memory,
int start,
int end,
java.lang.StringBuffer buff)
Dump variables. |
static void |
getArray(byte[] content,
int start,
int len,
java.lang.StringBuffer buff,
boolean number,
boolean wrap)
List an array. |
static void |
getArray(byte[] content,
int pos,
java.lang.StringBuffer buff,
int[] dims,
int dim,
boolean number)
List an array. |
static int |
getNumber(byte[] content,
int pos,
java.lang.StringBuffer buff)
Get a number. |
static java.util.Map |
getProgramLines(byte[] memory)
Get the program lines from the memory. |
static java.util.Map |
getProgramLines(byte[] memory,
int start,
int end)
Return a map of the program lines, sorted by line number. |
static java.util.Map |
getVariableMemory(byte[] memory)
Get all variables from the variables area. |
static java.util.Map |
getVariableMemory(byte[] memory,
int start,
int end)
Get all variables from the variables area. |
static java.util.Map |
getVariables(byte[] memory)
Get all variables from the variables area. |
static java.util.Map |
getVariables(byte[] memory,
int start,
int end,
boolean wrap)
Get all variables from the variables area. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean DEBUG
| Constructor Detail |
public ZX81Basic()
| Method Detail |
public static void dumpProgram(byte[] memory,
int start,
int display,
int vars,
int varsEnd,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
memory - The memory containing the program.start - The start index in memory to dump (assumed address 16519).display - The address of the display file.vars - The address of the variables.varsEnd - The address of the bottom of the stack (end of variables).dumpNumberValues - Indicates whether to dump number values.buff - The buffer to contain the result.
public static void dumpProgramLines(byte[] memory,
int start,
int end,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
memory - The memory containing the program.start - The start index in memory to dump (assumed address 16519).end - The end of the program.dumpNumberValues - Indicates whether to dump number values.buff - The buffer to contain the result.
public static void dumpLine(byte[] memory,
int number,
boolean dumpNumberValues,
java.lang.StringBuffer buff)
memory - The memory containing the program line.number - The line number.dumpNumberValues - Indicates whether to dump number values.buff - The buffer to contain the result.
public static void dumpLine(byte[] memory,
int number,
boolean dumpNumberValues,
boolean translate,
boolean wrap,
java.lang.StringBuffer buff)
memory - The memory containing the program line.number - The line number.dumpNumberValues - Indicates whether to dump number values.translate - Indicates whether to translate text.wrap - Indicates whether to wrap lines.buff - The buffer to contain the result.
public static void dumpDisplay(byte[] memory,
int start,
int end,
java.lang.StringBuffer buff)
memory - The memory containing the display.start - The start index in memory to dump.end - The end of the display.buff - The buffer to contain the result.
public static void dumpVariables(byte[] memory,
int start,
int end,
java.lang.StringBuffer buff)
memory - The memory containing the variables.start - The start index in memory to dump.end - The end of the variables.buff - The buffer to contain the result.
public static int getNumber(byte[] content,
int pos,
java.lang.StringBuffer buff)
content - The content of the file.pos - The position of the start of the number.buff - The buffer containing the listing.
public static void getArray(byte[] content,
int start,
int len,
java.lang.StringBuffer buff,
boolean number,
boolean wrap)
content - The content of the file.start - The position of the start of the array.len - The length of the array.buff - The buffer containing the listing.number - Indicates whether it is a number array.wrap - Indicates whether to wrap the variable value.
public static void getArray(byte[] content,
int pos,
java.lang.StringBuffer buff,
int[] dims,
int dim,
boolean number)
content - The content of the file.pos - The position of the start of the array.buff - The buffer containing the listing.dims - The array dimensions.dim - The current dimension being listed.number - Indicates whether it is a number array.
public static int comparePrograms(byte[] prog1,
byte[] prog2,
boolean compVars,
int allowable)
The comparison optionally includes variables.
prog1 - prog2 - compVars - allowable -
public static int comparePrograms(java.util.Map lines1,
java.util.Map vars1,
java.util.Map lines2,
java.util.Map vars2,
boolean compVars,
int allowable)
The comparison optionally includes variables.
lines1 - vars1 - lines2 - vars2 - compVars - allowable -
public static java.util.Map getProgramLines(byte[] memory)
It is assumed the memory is a standard saved program, i.e. byte 0 in the array represents the contents of memory at ZX81SysVars.SAVE_START.
memory -
public static java.util.Map getProgramLines(byte[] memory,
int start,
int end)
memory - The program memory.start - The start of BASIC.end - The end of BASIC.
public static java.util.Map getVariables(byte[] memory)
It is assumed the memory is a standard saved program, i.e. byte 0 in the array represents the contents of memory at ZX81SysVars.SAVE_START.
memory - The program memory.
public static java.util.Map getVariables(byte[] memory,
int start,
int end,
boolean wrap)
memory - The program memory.start - The start of BASIC.end - The end of BASIC.wrap - Indicates whether to wrap the variable value.
public static java.util.Map getVariableMemory(byte[] memory)
It is assumed the memory is a standard saved program, i.e. byte 0 in the array represents the contents of memory at ZX81SysVars.SAVE_START.
memory - The program memory.
public static java.util.Map getVariableMemory(byte[] memory,
int start,
int end)
memory - The program memory.start - The start of BASIC.end - The end of BASIC.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||