![]() |
| Register | Login | |||||
|
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
|
| | |||
| 0 users currently in Programming. |
| Acmlm's Board - I3 Archive - Programming - 65816 ASM question |
New poll | | ![]() |
| Add to favorites | Next newer thread | Next older thread |
| User | Post | ||
|
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 5908 days Last view: 5907 days |
| ||
| In 65816, ther is a command that goes somewhat like LDA [&xx]. Am I right in assuming that from what I understand of the command, that the processor would load A with the value in RAM that $xx points to, e.x. if $xx is $02, and at $02 there is the value #$04, then A would be loaded with #$04 after LDA [$xx]?
If so, how many bytes large is the address pointer that would be stored in $xx? 1, 2, or 3 bytes large? |
|||
MathOnNapkins![]() ![]() ![]() 1100 ![]() In SPC700 HELL Since: 11-18-05 Last post: 5907 days Last view: 5907 days |
| ||
| The brackets indicated a long pointer, i.e. 24 bit and hence 3 bytes. The address inside the brackets is a direct page address.
So for example if you do LDA [$00] and at $7E:0000 there are the values 00 80 7F, the value loaded into A will be the value at $7F:8000. How many bytes are stored of course depends on the M register. You can also use the Y register as an index, and do LDA [$00], Y. That will load the value at $7F 8000 + Y). I've heard that even works across bank boundaries but don't quote me on that. Read it in one of Nach's documents.
LDA ($00) by contrast, does something similar but uses the Databank register's current value and hence only needs to fetch 2 bytes to form an address. |
|||
|
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 5908 days Last view: 5907 days |
| ||
| THANK YOU VERY MUCH.
That will help me very much both in programming and in making up a better file with definitions of the different styles of addressing and that for 65816. |
| Add to favorites | Next newer thread | Next older thread |
| Acmlm's Board - I3 Archive - Programming - 65816 ASM question |
| ![]() |