-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STA instruction is troubemaker #35
Comments
OK, maybe there is other problem, The original code is
There is instruction "STY $0605" in the list, it modifies the code at address $0605, 'STA $01' is replaced with 'STA $0a'; that explains the mystery. Not good example, it is confusing... |
This is better example; it doesn't modify code, but it writes data to display memory, so it is visible.
I miss in the tutorial explanation of memory mapping of this "computer". It should be at the beginning of the tutorial, something like this.
Other important information is that this asembler is case senstive, so LOOP1 and loop1 are two different labels; when label is not defined, it is not an error but default value $ffff is used.
|
Thanks for the feedback. That use of self-modifying code in the tutorial for indexed indirect is somewhat unexpected and not ideal. I agree that we should update the example and commentary - I'd suggest we don't index from $00 either, as that is not helping explain the effect:
This mode is rarely used: the meaning is that there is an array of pointers in zero page, and we need to select our pointer using X and then use it. The commentary should say this. You're right that case-sensitive labels could be noted somewhere. Perhaps in the messages window, when it writes 'Indexing labels ...' it could say 'Indexing labels (case-sensitive) ...' (I'm reluctant to change it to be insensitive in case anyone already has made use of it as-is.) There is the Notes button, to the right of Disassemble, which puts up some notes. Perhaps those notes could be placed in the messages window by default, and could include some extra info:
Maybe it would be worth listing undefined labels too, at the end of assembly |
I tried the tutorial and I noted a bug with STA instruction. This is an example from tutorial (##Indexed indirect: ($c0,X)###):
First run, value $05 was written to address $0001. It is a bug:
RESET:
Second run, note that value $05 is written to memory $000a: That is OK:
The text was updated successfully, but these errors were encountered: