2019-06-03 20:26:21 +00:00
|
|
|
// Tests statement sequence locality of if(cond) { stmt1; } else { stmt2; }
|
|
|
|
.pc = $801 "Basic"
|
|
|
|
:BasicUpstart(main)
|
|
|
|
.pc = $80d "Program"
|
|
|
|
main: {
|
|
|
|
.label screen = $400
|
2019-08-07 11:22:05 +00:00
|
|
|
ldy #0
|
2019-08-25 20:21:56 +00:00
|
|
|
ldx #0
|
|
|
|
b1:
|
|
|
|
cpx #5+1
|
|
|
|
bcs b2
|
|
|
|
txa
|
2019-06-03 20:26:21 +00:00
|
|
|
sec
|
|
|
|
sbc #5
|
2019-08-25 20:21:56 +00:00
|
|
|
sta screen,y
|
2019-08-07 11:22:05 +00:00
|
|
|
iny
|
2019-08-25 20:21:56 +00:00
|
|
|
b3:
|
|
|
|
inx
|
|
|
|
cpx #$b
|
2019-06-03 20:26:21 +00:00
|
|
|
bne b1
|
|
|
|
rts
|
|
|
|
b2:
|
2019-08-25 20:21:56 +00:00
|
|
|
txa
|
|
|
|
sta screen,y
|
|
|
|
iny
|
2019-06-03 20:26:21 +00:00
|
|
|
jmp b3
|
|
|
|
}
|