Improvements and bug fixes made


Hi all, I've added some bug fixes and optimizations to Pas6502.  If a conditional statement only has one logic part, like "if a = 3 then" it will produce a new fragment with "_l1" at the end of the file name.  The "_l1" part represents the false label to jump to in the fragment code.

The compiler will expect a branch to a true part and a jmp to the false label {l1} in the fragment, and won't require leaving $ff or $00 in the accumulator as a true/false result anymore.

For example the fragment example below would change from:

lda {m1} + 1
cmp #>{c1}
bcc !isTrue+ // msb <
lda {m1} + 0
cmp #{c1}
beq !isTrue+
bcc !isTrue+
lda #$00
jmp !+
!isTrue:
lda #$ff
!:

to
lda {m1} + 1
cmp #>{c1}
bcc !isTrue+ // msb <
lda {m1} + 0
cmp #{c1}
beq !isTrue+
bcc !isTrue+
jmp {l1}
!isTrue:

Files

examples.zip 77 kB
Jun 16, 2024
fragments.zip 135 kB
Jun 16, 2024
include.zip 114 kB
Jun 16, 2024
pas6502.zip 3.5 MB
Jun 16, 2024

Get Pas 6502

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.