Class EmbeddedShapeTable
- java.lang.Object
-
- io.github.applecommander.bastools.api.Directive
-
- io.github.applecommander.bastools.api.directives.EmbeddedShapeTable
-
public class EmbeddedShapeTable extends Directive
Embed an Applesoft shape table into a BASIC program. See writeup in the README-TOKENIZER.md file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.github.applecommander.bastools.api.Directive
Directive.Expression, Directive.MapExpression, Directive.SimpleExpression, Directive.Variable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEstatic java.lang.StringPARAM_ADDRESSstatic java.lang.StringPARAM_ASSIGNstatic java.lang.StringPARAM_BINstatic java.lang.StringPARAM_INITstatic java.lang.StringPARAM_LABELstatic java.lang.StringPARAM_POKEstatic java.lang.StringPARAM_SRCstatic java.lang.StringVALUE_VARIABLE-
Fields inherited from class io.github.applecommander.bastools.api.Directive
config, ONLY_ONE, outputStream, ZERO, ZERO_OR_ONE
-
-
Constructor Summary
Constructors Constructor Description EmbeddedShapeTable(Configuration config, java.io.OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]mapShapeTableToBin(ShapeTable shapeTable)byte[]readBin(java.lang.String filename)ShapeTablereadSrc(java.lang.String filename)voidsetupLabels(java.lang.String labelOption, BasicBuilder basic, java.util.Optional<ShapeTable> shapeTableOptional)voidsetupVariables(Directive.MapExpression expr, BasicBuilder basic, java.util.Optional<ShapeTable> shapeTableOptional)voidwriteBytes(int startAddress, Line line)Parse the given parameters, generating code and embedding shape table as directed.-
Methods inherited from class io.github.applecommander.bastools.api.Directive
append, defaultBooleanExpression, optionalExpression, optionalIntegerExpression, optionalMapExpression, optionalStringExpression, requiredIntegerExpression, requiredStringExpression, resolve, validateSet
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PARAM_SRC
public static final java.lang.String PARAM_SRC
- See Also:
- Constant Field Values
-
PARAM_LABEL
public static final java.lang.String PARAM_LABEL
- See Also:
- Constant Field Values
-
VALUE_VARIABLE
public static final java.lang.String VALUE_VARIABLE
- See Also:
- Constant Field Values
-
PARAM_BIN
public static final java.lang.String PARAM_BIN
- See Also:
- Constant Field Values
-
PARAM_POKE
public static final java.lang.String PARAM_POKE
- See Also:
- Constant Field Values
-
PARAM_ASSIGN
public static final java.lang.String PARAM_ASSIGN
- See Also:
- Constant Field Values
-
PARAM_INIT
public static final java.lang.String PARAM_INIT
- See Also:
- Constant Field Values
-
PARAM_ADDRESS
public static final java.lang.String PARAM_ADDRESS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmbeddedShapeTable
public EmbeddedShapeTable(Configuration config, java.io.OutputStream outputStream)
-
-
Method Detail
-
writeBytes
public void writeBytes(int startAddress, Line line) throws java.io.IOExceptionParse the given parameters, generating code and embedding shape table as directed.- Specified by:
writeBytesin classDirective- Throws:
java.io.IOException
-
setupVariables
public void setupVariables(Directive.MapExpression expr, BasicBuilder basic, java.util.Optional<ShapeTable> shapeTableOptional)
-
setupLabels
public void setupLabels(java.lang.String labelOption, BasicBuilder basic, java.util.Optional<ShapeTable> shapeTableOptional)
-
readBin
public byte[] readBin(java.lang.String filename)
-
readSrc
public ShapeTable readSrc(java.lang.String filename)
-
mapShapeTableToBin
public byte[] mapShapeTableToBin(ShapeTable shapeTable)
-
-