Jump to content
  • 0

lda #(^VRAM_addr + 2) ?


Dacobi
 Share

Question

Hi 

I'm trying to port some code to C and I've got most of it working.

But I don't understand the (^ADDRESS + 2) syntax. What does it do? and what would it be in C?

The code where it's used is for the address and bank.

If I just use  cbm_k_load(2, address);  it doesn't work.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 12/27/2021 at 3:29 PM, JimmyDansbo said:

I would think that it should be cbm_k_load((address+2)>>16, address)

No, the addition must be done last.  It's used to move past numbers that Commodore already used to control Kernal's LOAD behavior:

  • 0 -> normal load
  • 1 -> normal verify
  • 2 -> VRAM address high bit (0)
  • 3 -> VRAM address high bit (1)
  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use