Class AsmBuilder


  • public class AsmBuilder
    extends java.lang.Object
    AsmBuilder allows 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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CodeBuilder end()  
      AsmBuilder jmp​(int address)
      Generate a "JMP address" in the output stream.
      AsmBuilder lda​(int value)
      Generate a "LDA #value" in the output stream.
      AsmBuilder ldy​(int value)
      Generate a "LDY #value" in the output stream.
      AsmBuilder setAddress​(int value, int address)
      Generate an address setup in the output stream of the format:
      AsmBuilder setAddress​(CodeMark mark, int address)
      Generate an address setup for a mark in the output stream of the format:
      AsmBuilder sta​(int address)
      Generate a "STA address" in the output stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsmBuilder

        public AsmBuilder​(CodeBuilder builder)
    • Method Detail

      • 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