def sub2(comp: Computer): ptr = getat_pages(comp, True) data = comp.getat(ptr) comp.accum -= data comp.overflow = comp.accum < 0 comp.accum %= 256
def sba(comp: Computer): comp.accum -= comp.accum comp.overflow = comp.accum < 0 comp.accum %= 256
def sbi(comp: Computer): comp.pc += 1 data = comp.getat(comp.pc) comp.accum -= data comp.overflow = comp.accum < 0 comp.accum %= 256
def sby(comp: Computer): comp.accum -= comp.regy comp.overflow = comp.accum < 0 comp.accum %= 256
def add2(comp: Computer): ptr = getat_pages(comp, True) data = comp.getat(ptr) comp.accum += data comp.overflow = comp.accum > 255 comp.accum %= 256
def adi(comp: Computer): comp.pc += 1 data = comp.getat(comp.pc) comp.accum += data comp.overflow = comp.accum > 255 comp.accum %= 256
def ada(comp: Computer): comp.accum += comp.accum comp.overflow = comp.accum > 255 comp.accum %= 256
def ady(comp: Computer): comp.accum += comp.regy comp.overflow = comp.accum > 255 comp.accum %= 256