Jump to content
  • 0
Massyn

VPOKE in assembly

Question

Hi everyone,  I am experimenting with VERA, and I'm not sure if my assembly equivalent of the VPOKE is entirely accurate.  The problem is the asm does not seem to run, but the VPOKE does what it is supposed to.

The snippit below is replicated 8 more times to change a character on the screen (using the example at https://www.8bitcoding.com/p/tiles.html)

; VPOKE $0,$F800,%00111100
stz $9F25
lda #$00
sta $9F20
lda #$F8
sta $9F21
lda #$0
sta $9F22
lda #$3C
sta $9F23

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

It seems correct. How do you run your code? Normally you need to add a rts instruction at the end to return to where you are calling from.

If you set $9f22 to $10 you don't have to run all of the code eight times. You just repeatedly write to $9f23, the destination address will be automatically be increased by one for each time. I am just mentioning it if you happen to not know about this.

 

Edited by Johan Kårlin

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Johan Kårlin said:

If you set $9f22 to $10, you don't have to run all of the code eight times. You just repeatedly write to $9f23, the destination address automatically will be increased by one for each time. I am just mentioning it if you happen to not know about this.

@Massyn, if you forgot to change the accumulator in

lda #$00
sta $9F20

eight times, then your code was poking into the same row in your tile!


 

Share this post


Link to post
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.


×
×
  • Create New...

Important Information

Please review our Terms of Use