Massyn 0 Posted November 21, 2020 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 Quote Share this post Link to post Share on other sites
0 Johan Kårlin 79 Posted November 21, 2020 (edited) 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 November 21, 2020 by Johan Kårlin Quote Share this post Link to post Share on other sites
0 Greg King 51 Posted November 21, 2020 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! Quote Share this post Link to post Share on other sites
0 paulscottrobson 21 Posted November 21, 2020 Run it with -debug and put a .byte $DB at the start of your STZ, you should be able to track it (DB is debug break) Quote Share this post Link to post Share on other sites
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