GBAGUY's tutorial: Day 10

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

I was just pointing out that some environments allow the programmer to define initial values for global variables in RAM, not sure if NESASM had it too.
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Post by Laserbeak43 »

i'm sure it does. not sure if i have any of the compiler docs though.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Laserbeak43 wrote:a byte as in 16 bits right?
No, a byte is 8 bits!
so 20 is really 16 in hex?
20 decimal is $14 in hex. But this is not important in this case, since that number goes nowhere, it's not used for anything.
i don't see anything in the code saying wether or not this 20 is hex. are all numbers hex by default?
Usually, numbers without any prefix character are decimal. A "$" before the number indicates it's hexadecimal, and a "%" indicates it's binary, in most assemblers.
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Post by Laserbeak43 »

tokumaru wrote:
Laserbeak43 wrote:a byte as in 16 bits right?
No, a byte is 8 bits!
so 20 is really 16 in hex?
20 decimal is $14 in hex. But this is not important in this case, since that number goes nowhere, it's not used for anything.
i don't see anything in the code saying wether or not this 20 is hex. are all numbers hex by default?
Usually, numbers without any prefix character are decimal. A "$" before the number indicates it's hexadecimal, and a "%" indicates it's binary, in most assemblers.
lol i knew that! i was just testing you!!!!!
man i truly am rusty. 20 in hex would be more like 32 or something.
thanks
Post Reply