1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-11 13:50:13 +00:00
6502bench/SourceGen/SGTestData/Expected/2011-hinting_cc65.S
Andy McFadden 2065f4ef9e Attempt to generate segment names for cc65
This worked, sort of.  The problem is that SourceGen will revert to
hex output in certain situations, such as a broken symbolic
reference.  There happens to be one in the ZIPPY example, and it's
on a relative branch.

The goal with the segment stuff is to allow cc65 to treat the
source as relocatable code.  In that context, a relative branch to
an absolute address doesn't make any sense, so the assembler reports
a range error.

We don't currently have a mechanism that guarantees no references
are broken (and no affordance for finding them), so we can't make
this mode the default yet.

Instead, we continue to use the generic config, but generate the
correct set of lines as comments.

(issue #39)
2018-11-18 15:11:29 -08:00

37 lines
691 B
ArmAsm

.setcpu "6502"
; .segment "SEG000"
.org $1000
.byte $03
.byte $02
L1002: bit L1002
.byte $2c
lda #$11
nop
.byte $2c
L100A: ldx #$ff
nop
jsr L100A
nop
.byte $2c
L1012: ldx #$ff
nop
jsr L1012
jsr $2456
L101B: .dword $22a211a9
jsr L101B
jsr L1028
jsr $2456
L1028: .dword $44a233a9
jsr L1037
jsr L103A
nop
lda $2456
rts
L1037: jsr $2456
L103A: lda #$55
ldx #$66
rts