View Single Post
Old 02-13-2007, 03:24 AM   #4
Insomnia DMX
Senior Member
Insomnia DMX's Avatar
Join Date: Apr 2005
Location: Cleveland, Ohio, USA
Posts: 264
Default Re: Need help with ASM

> Ok, I got hex values with Lunar adress, all other programs
> I couldn't run with windows (I have to try with Dosbox
> tomorrow).

You shouldn't need dosbox for anything, the purpose for Jathys's frontend for TRASM is to avoid all the complications of command line stuff (, and let you pick and choose different files to compile at once or whatever).

Also, you MUST get your terms right so people will understand you. Hex, or hexadecimal is just a number system, specifically a base 16 number system. ASM, or assembly is machine code, this is the, "LDA $09A2" (This is what you'd see in a dissassembler) or, "ADA209 (this is what you'd see in a hex editor)."

The first byte there is your opcode, the "AD," that means LDA (let's disregard addressing modes for a moment) the next two are your address, "09A2." Notice that I flipped the last two bytes in the hex editor version, that's because SNES uses (I may have mixed them up) endian byte order.</a>

> But could you explain me the result from Lunar Adress
> please?
> For example if I insert
> $C5FDA I get the PC result $22FDA
> or if I insert
> CE:BBC1 I'll get $27:3BC1

All it does is change your SNES address to a PC one, ignore the "$'s" and ":'s" in what the program outputs. Put the PC address in a hex editor's "goto" box and you'll find your cursor right where you want it.

A number with a "$" before it is an address; a number with a "#$" is a value, you must distinguish between the two when you talk about them.

Let's pick apart this SNES Address:

The "$" means it's an address.
The first byte, "C5" is the bank for this address.
The ":" seperates the bank number from the address.
The next two bytes (the 16-bit word) "DFDA" is your address or pointer.

You should tell us exactly what you're working on, I'm curious.

> PS: nice site, not crappy (reminds on the first computer games

Thanks. That's 'kinda' what I was going for with the layout. I should get around to updating my signature, to accomidate my ego... ^_^ You should read the tutorial thing</a> I have on my site. "DON'T" use it as your only resource though, I probably screwed something up, most probably on terminology; I might've even screwed up on the content, I'm not 100% sure about everything. The purpose of the thing was to write a such tutorial in layman's english, from my experience, and more importantly, kill time in my "Macwomedia Dweamweaver" class...
<P ID="signature"> crappy little site.</a></P>
Insomnia DMX is offline   Reply With Quote