Class CodeMark


  • public class CodeMark
    extends java.lang.Object
    A CodeMark marks a dynamic address within the output stream. When referenced, it will report the most recent address is knows, forcing the generation to run multiple times until it "settles".

    Multiple passes occur for the following reasons:

    • an assembly address can be calculated on the second pass (1st is to actually calculate address and 2nd pass is to use that address).
    • Applesoft BASIC encodes the address as text; that means first pass, the address is "0" but 2nd pass the address is likely to be 4 digits "8123" (for example) which, in turn moves anything after that point, requiring a 3rd pass to push everything out (and likely making that number become "8126" since going from 1 digit to 4 digits adds 3 bytes to the preceding bytes
    • Constructor Summary

      Constructors 
      Constructor Description
      CodeMark()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAddress()  
      boolean update​(GeneratorState state)
      Update the current address based on the GeneratorState.
      • Methods inherited from class java.lang.Object

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

      • CodeMark

        public CodeMark()
    • Method Detail

      • getAddress

        public int getAddress()
      • update

        public boolean update​(GeneratorState state)
        Update the current address based on the GeneratorState.
        Returns:
        boolean indicating if the address changed