Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in General Emulation. |
Acmlm's Board - I2 Archive - General Emulation - 6502 ASM Confusion (w/ bbitmaster's FCEUD) | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Reshaper256 Bee Level: 19 Posts: 102/143 EXP: 34776 For next: 1001 Since: 09-14-04 From: United States Since last post: 5 days Last activity: 9 hours |
| ||
I'm sure many (or most) of you would recognize the above pic as the Trace Logger from bbitmaster's incredible new release of FCE Ultra Debug. Being new to ASM, but having some references to go by (http://www.obelisk.demon.co.uk/6502 and its links, mostly), I'm beginning to understand more, but I've hit a roadblock that I've spent the last few afternoons trying to figure out. Hopefully someone with more ASM knowledge could help me out with this. The highlighted portion of the pic above contains the instruction: $F27D : 84 00 - - - - - STY $00 = #$FE - - - - - - - - - - - - A:FE X:0D Y:03 P:nvUBdIzc From my understanding, 84 00 instructs the value held in the Y-register (from what I see it's $03) to be stored at $00 on the zero page (at $0000). Why then is the value stored to $0000 #$FE and not #$03? Isn't the Y-register holding the value $03 before, during, and after this instruction? After looking at other instances where I thought a number should be stored to memory from one of the registers, I discovered that most of them were storing values that I would not expect them to. Obviously I've missed something, or am reading something incorrectly. Any help would be appreciated. (edited by Reshaper256 on 04-03-05 06:04 PM) (edited by Reshaper256 on 04-13-05 06:04 AM) |
|||
DahrkDaiz Red Super Koopa Acmlm's Mosts 2005 Best ROM Hacker Level: 45 Posts: 447/885 EXP: 643520 For next: 16644 Since: 03-15-04 From: K-Town Since last post: 4 hours Last activity: 4 hours |
| ||
When you see a "=" after an address on a given line of assembly, that means that the address is equal to the value before the instruction is executed. If you did a breakpoint on F27D for execute, then it'll show STY $00 = #$FE, then Step Into to go to the next instruction, an scroll up in the debugger and you'll see that $00 is now #$03. Hope this clears things up | |||
Reshaper256 Bee Level: 19 Posts: 103/143 EXP: 34776 For next: 1001 Since: 09-14-04 From: United States Since last post: 5 days Last activity: 9 hours |
| ||
Wow, surprisingly simple... I assumed the = meant that the receiving address or register was having the value after the = written to it. Now I see that I just need to scroll the Logger up until I find what actually changed $0000 to #$FE. Thanks a lot! I don't know how long it would have taken me to catch such a fundamental misunderstanding. I'm stupid with simple, important stuff. You don't want to know how many times I've lost my wallet and car keys... |
|||
bbitmaster Koopa Level: 18 Posts: 59/103 EXP: 25264 For next: 4633 Since: 03-28-04 From: Knoxville, tTN Since last post: 12 days Last activity: 7 days |
| ||
I just wanted to say, don't feel bad. I am the same way with even the simplest things. You'd be amazed how stupid I feel sometimes, and yet people may look up to me for working on FCEUXD, and many other things. What counts is that you're diving into this stuff. Just by taking that first step, you've gone farther than many others. So feel free to ask any more questions. You'll get better if you keep trying. And yes, I have lost my wallet several times, and I am terrible to leave my headlights on. |
|||
Parasyte Bullet Bill Level: 35 Posts: 178/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
Aye, the disassembler syntax may take some getting-used-to. Whenever you see an @ symbol, that's telling you the address which the instruction will work on. (Meaning the address which will be read or written, etc.) The = symbol is also rather non-standard. It's purpose is telling you what data is currently at that working address. Not the value to be written. It comes in handy when you're interested in what data will be loaded from the working address. But it doesn't necessarily have a purpose when storing. | |||
dan Snap Dragon Level: 43 Posts: 335/782 EXP: 534516 For next: 30530 Since: 03-15-04 Since last post: 20 hours Last activity: 14 hours |
| ||
Yep, that confused me too when I first started using FCEUd. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - General Emulation - 6502 ASM Confusion (w/ bbitmaster's FCEUD) | | | |