Class AsmBuilder
- java.lang.Object
-
- io.github.applecommander.bastools.api.code.AsmBuilder
-
public class AsmBuilder extends java.lang.ObjectAsmBuilderallows generation of assembly code to embed into the output stream.By no means is this complete, but is being built out as the need arises.
-
-
Constructor Summary
Constructors Constructor Description AsmBuilder(CodeBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeBuilderend()AsmBuilderjmp(int address)Generate a "JMP address" in the output stream.AsmBuilderlda(int value)Generate a "LDA #value" in the output stream.AsmBuilderldy(int value)Generate a "LDY #value" in the output stream.AsmBuildersetAddress(int value, int address)Generate an address setup in the output stream of the format:AsmBuildersetAddress(CodeMark mark, int address)Generate an address setup for a mark in the output stream of the format:AsmBuildersta(int address)Generate a "STA address" in the output stream.
-
-
-
Constructor Detail
-
AsmBuilder
public AsmBuilder(CodeBuilder builder)
-
-
Method Detail
-
end
public CodeBuilder end()
-
ldy
public AsmBuilder ldy(int value)
Generate a "LDY #value" in the output stream.
-
jmp
public AsmBuilder jmp(int address)
Generate a "JMP address" in the output stream.
-
lda
public AsmBuilder lda(int value) throws java.io.IOException
Generate a "LDA #value" in the output stream.- Throws:
java.io.IOException
-
sta
public AsmBuilder sta(int address) throws java.io.IOException
Generate a "STA address" in the output stream.- Throws:
java.io.IOException
-
setAddress
public AsmBuilder setAddress(int value, int address)
Generate an address setup in the output stream of the format:LDA #low(value) STA address LDA #high(value) STA address+1
-
setAddress
public AsmBuilder setAddress(CodeMark mark, int address)
Generate an address setup for a mark in the output stream of the format:LDA #low(mark) STA address LDA #high(mark) STA address+1
-
-