1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-02 13:51:36 +00:00
6502bench/SourceGen/SGTestData/Expected/10030-flags-and-branches_merlin32.S
Andy McFadden 17dc908420 Refactor tests 1002x and 1003x
Tests 10022-embedded-instructions and 10032-flags-and-branches were
a mix of 6502 and 65816 code.  The 6502 code has been separated into
its own file, so that the tests can be run on 8-bit-only assemblers.
2020-10-18 20:30:42 -07:00

175 lines
2.4 KiB
ArmAsm

org $1000
clv
cld
cli
clc
lda #$80
lda #$01
sed
sei
sec
lda #$ff
adc #$00
lda #$00
pha
plp
clv
bvc L101A
dfb $70
dfb $02
dfb $00
dfb $00
L101A clc
bcc :L101F
dfb $00
dfb $00
:L101F sec
bcs :L1024
dfb $00
dfb $00
:L1024 lda #$01
bne :L102A
dfb $00
dfb $db
:L102A lda #$00
beq :L1030
dfb $00
dfb $db
:L1030 bpl :L1034
dfb $00
dfb $db
:L1034 lda #$80
bmi :L103A
dfb $00
dfb $db
:L103A lda #$ff
and #$00
beq :L1042
dfb $00
dfb $db
:L1042 lda #$00
ldx #$80
and #$ff
beq :L104C
bne :L104C
:L104C lda #$ff
ldx #$00
and #$7f
beq :L1056
bne :L1056
:L1056 bpl :L105A
dfb $00
dfb $db
:L105A lda #$ff
and #$80
bpl :L1064
bmi :L1064
dfb $00
dfb $db
:L1064 lda #$00
ldx #$80
bne :L106C
dfb $00
dfb $db
:L106C ora #$00
beq :L1072
bne :L1072
:L1072 ora #$01
bne :L1078
dfb $00
dfb $db
:L1078 lda #$00
ldx #$80
bmi :L1080
dfb $00
dfb $db
:L1080 ora #$7f
bpl :L1088
bmi :L1088
dfb $00
dfb $db
:L1088 ora #$80
bmi :L108E
dfb $00
dfb $db
:L108E lda :L108E
sec
ror A
bmi :L1097
dfb $00
dfb $dc
:L1097 clc
ror A
bpl :L109D
dfb $00
dfb $dc
:L109D lda #$00
sec
rol A
bne :L10A5
dfb $00
dfb $dc
:L10A5 lda #$ff
lsr A
bpl :L10AC
dfb $00
dfb $dd
:L10AC clc
php
sec
plp
bcc :L10B3
nop
:L10B3 sec
bcs :L10B7
:L10B6 clc
:L10B7 lda $33
beq :L10B6
bcs :L10BF
lda $44
:L10BF nop
rts