Support branching and looping on the `n` flag.
Chris Pressey
4 years ago
8 | 8 |
* Added `nop` opcode, which compiles to `NOP` (mainly for timing.)
|
9 | 9 |
* Accessing zero-page with `ld` and `st` generates zero-page opcodes.
|
10 | 10 |
* A `byte` or `word` table can be initialized with a list of constants.
|
|
11 |
* Branching and repeating on the `n` flag is now supported.
|
11 | 12 |
* Specifying multiple SixtyPical source files will produce a single
|
12 | 13 |
compiled result from their combination.
|
13 | 14 |
* Rudimentary support for Atari 2600 prelude in a 4K cartridge image,
|
14 | |
and start of an example program in `eg/atari2600` directory.
|
|
15 |
and an example program in `eg/atari2600` directory.
|
15 | 16 |
|
16 | 17 |
0.14
|
17 | 18 |
----
|
80 | 80 |
repeat {
|
81 | 81 |
st a, WSYNC
|
82 | 82 |
dec x
|
83 | |
} until z // FIXME orig loop used "bpl _wsync_loop"
|
|
83 |
} until n
|
84 | 84 |
st a, WSYNC
|
85 | 85 |
|
86 | 86 |
//;
|
14 | 14 |
CLC, SEC, ADC, SBC, ROL, ROR,
|
15 | 15 |
INC, INX, INY, DEC, DEX, DEY,
|
16 | 16 |
CMP, CPX, CPY, AND, ORA, EOR,
|
17 | |
BCC, BCS, BNE, BEQ,
|
|
17 |
BCC, BCS, BNE, BEQ, BPL, BMI,
|
18 | 18 |
JMP, JSR, RTS,
|
19 | 19 |
SEI, CLI,
|
20 | 20 |
NOP,
|
|
517 | 517 |
False: {
|
518 | 518 |
'c': BCC,
|
519 | 519 |
'z': BNE,
|
|
520 |
'n': BPL,
|
520 | 521 |
},
|
521 | 522 |
True: {
|
522 | 523 |
'c': BCS,
|
523 | 524 |
'z': BEQ,
|
|
525 |
'n': BMI,
|
524 | 526 |
},
|
525 | 527 |
}[instr.inverted].get(instr.src.name)
|
526 | 528 |
if cls is None:
|
|
547 | 549 |
False: {
|
548 | 550 |
'c': BCC,
|
549 | 551 |
'z': BNE,
|
|
552 |
'n': BPL,
|
550 | 553 |
},
|
551 | 554 |
True: {
|
552 | 555 |
'c': BCS,
|
553 | 556 |
'z': BEQ,
|
|
557 |
'n': BMI,
|
554 | 558 |
},
|
555 | 559 |
}[instr.inverted].get(instr.src.name)
|
556 | 560 |
if cls is None:
|