My 65C02 can't jump to subroutines and I don't get why

Building your first 6502-based project? We'll help you get started here.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: My 65C02 can't jump to subroutines and I don't get why

Post by BigDumbDinosaur »

jgharston wrote:
Once you've got the faulty joint working, this:

Code: Select all

init_crtc:
  lda #0
  sta CRTC_ADDR_REG
  lda #63
  sta CRTC_DATA_REG
  lda #1
  sta CRTC_ADDR_REG
blah blah blah

should be:

Code: Select all

        LDX #0
loop    LDA inittable,X
        STX CRTC_ADDR
        STA CRTC_DATA
        INX
        CPX #max
        BNE loop
...
.inittable defb foo,foo,foo,foo,foo,etc.
Easier to read with monospacing.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply