git @ Cat's Eye Technologies SixtyPical / ebe53f5
Fix bug when zero page address was $00. Chris Pressey 3 years ago
4 changed file(s) with 11 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2525 byte luminosity @ $81
2626 byte joystick_delay @ $82
2727
28 byte table[8] image_data : "ZZZZUUUU" // [126, 129, 153, 165, 129, 165, 129, 126]
28 byte table[8] image_data : 126, 129, 153, 165, 129, 165, 129, 126
2929 // %01111110
3030 // %10000001
3131 // %10011001
55 dcc6502 -o 0xf000 -m 200 atari-2600-example.bin > atari-2600-example.bin.disasm.txt
66 dcc6502 -o 0xf000 -m 200 atari-2600-example-60p.bin > atari-2600-example-60p.bin.disasm.txt
77 paste atari-2600-example.bin.disasm.txt atari-2600-example-60p.bin.disasm.txt | pr -t -e24
8 #diff -ru atari-2600-example.bin.disasm.txt atari-2600-example-60p.bin.disasm.txt
89 fi
6767 return self.labels[name]
6868
6969 def absolute_or_zero_page(self, label):
70 if label.addr and label.addr < 256:
70 if label.addr is not None and label.addr < 256:
7171 return ZeroPage(label)
7272 else:
7373 return Absolute(label)
113113
114114 Accesses to memory locations in zero-page with `ld` and `st` use zero-page addressing.
115115
116 | byte zp @ $00
116117 | byte screen @ 100
117118 |
118119 | routine main
119 | inputs screen
120 | outputs screen
120 | inputs screen, zp
121 | outputs screen, zp
121122 | trashes a, z, n
122123 | {
123124 | ld a, screen
124125 | st a, screen
126 | ld a, zp
127 | st a, zp
125128 | }
126129 = $080D LDA $64
127130 = $080F STA $64
128 = $0811 RTS
131 = $0811 LDA $00
132 = $0813 STA $00
133 = $0815 RTS
129134
130135 Memory location with initial value.
131136