2019-06-02 22:44:46 +00:00
|
|
|
// Tests using integer conditions in && and || operator
|
|
|
|
// This should produce '01010101', '00110011', '00010001', '01110111' at the top of the screen
|
|
|
|
.pc = $801 "Basic"
|
|
|
|
:BasicUpstart(main)
|
|
|
|
.pc = $80d "Program"
|
|
|
|
.label SCREEN = $400
|
|
|
|
main: {
|
2019-09-29 21:13:37 +00:00
|
|
|
.label __6 = 2
|
|
|
|
.label __7 = 3
|
|
|
|
.label __11 = 4
|
|
|
|
.label __12 = 5
|
2019-06-02 22:44:46 +00:00
|
|
|
ldx #0
|
|
|
|
ldy #0
|
2019-09-29 21:13:37 +00:00
|
|
|
__b1:
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #1
|
|
|
|
cmp #0
|
2019-09-29 21:13:37 +00:00
|
|
|
beq __b2
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #'+'
|
|
|
|
sta SCREEN,x
|
2019-09-29 21:13:37 +00:00
|
|
|
__b2:
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #2
|
|
|
|
cmp #0
|
2019-09-29 21:13:37 +00:00
|
|
|
beq __b3
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #'+'
|
|
|
|
sta SCREEN+$28*1,x
|
2019-09-29 21:13:37 +00:00
|
|
|
__b3:
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #1
|
2019-09-29 21:13:37 +00:00
|
|
|
sta.z __6
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #2
|
2019-09-29 21:13:37 +00:00
|
|
|
sta.z __7
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #0
|
2019-09-29 21:13:37 +00:00
|
|
|
cmp.z __6
|
|
|
|
beq __b4
|
|
|
|
cmp.z __7
|
|
|
|
beq __b4
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #'+'
|
|
|
|
sta SCREEN+$28*2,x
|
2019-09-29 21:13:37 +00:00
|
|
|
__b4:
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #1
|
2019-09-29 21:13:37 +00:00
|
|
|
sta.z __11
|
2019-06-02 22:44:46 +00:00
|
|
|
tya
|
|
|
|
and #2
|
2019-09-29 21:13:37 +00:00
|
|
|
sta.z __12
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #0
|
2019-09-29 21:13:37 +00:00
|
|
|
cmp.z __11
|
|
|
|
bne __b9
|
|
|
|
cmp.z __12
|
|
|
|
beq __b5
|
|
|
|
__b9:
|
2019-06-02 22:44:46 +00:00
|
|
|
lda #'+'
|
|
|
|
sta SCREEN+$28*3,x
|
2019-09-29 21:13:37 +00:00
|
|
|
__b5:
|
2019-06-02 22:44:46 +00:00
|
|
|
inx
|
|
|
|
iny
|
|
|
|
cpy #8
|
2019-09-29 21:13:37 +00:00
|
|
|
bne __b1
|
2019-06-02 22:44:46 +00:00
|
|
|
rts
|
|
|
|
}
|