Page 1 of 1

Simple hex question

Posted: Sun Aug 04, 2013 3:34 pm
by James_Parsons
I'm sorry, but what is four bytes in hex. for example I have memory

Code: Select all

$0500
and I need to jump 4 bytes ahead. what would I add. I know this seems trivial but I am having a hard time understanding

Re: Simple hex question

Posted: Sun Aug 04, 2013 8:28 pm
by GARTHWILSON
James_Parsons wrote:
I'm sorry, but what is four bytes in hex. for example I have memory

Code: Select all

$0500
and I need to jump 4 bytes ahead. what would I add. I know this seems trivial but I am having a hard time understanding
What is that? If it's ORA 00 (IOW, OR accumulator with the contents of address 00 in ZP), the next instruction might be a conditional branch around a four more bytes of instructions, for example a BNE which assembles to D0 04.

Many of the questions you're asking will be answered by reading any 6502 programming manual. There are many good ones available, and any of them will get you more satisfaction from the whole 6502 experience. If you don't read any of them, I expect you will probably continue asking super basic questions and not make much progress. I like to recommend WDC's "Programming the 65816 including the 6502, 65C02, and 65802," available free online. It's big, but relatively easy reading, and you don't have to read the whole thing, as you can quit when it gets into the 16-bit stuff and then much of the rest is reference, where you look stuff up after you've got the basics down.

Re: Simple hex question

Posted: Mon Aug 05, 2013 5:36 am
by BigDumbDinosaur
James_Parsons wrote:
I'm sorry, but what is four bytes in hex. for example I have memory

Code: Select all

$0500
and I need to jump 4 bytes ahead. what would I add. I know this seems trivial but I am having a hard time understanding

Questions like these don't belong in this section of the forum. You're scattering questions all over the 6502.org landscape and I, for one, am getting a bit weary of it. How about if you try to consolidate them into relevant areas and before posting, see if you can find the answer by use of that wonderful thing called an Internet search engine?

GARTHWILSON wrote:
Many of the questions you're asking will be answered by reading any 6502 programming manual.

An addendum to that is 6502.org is not a tutoring service. You need to spend time reading readily available materials, such as the programming manual at WDC's website that Garth mentions. The 6502 is probably the most documented microprocessor in history, and countless people (including me) have learned how to use it by reading, reading, and more reading. Bluntly stated, quit asking so many simple questions like the above, lest you start irritating people around here and cause them to ignore you.

Re: Simple hex question

Posted: Mon Aug 05, 2013 5:18 pm
by barrym95838
Yeah, for someone who has "written operating systems" for the x86, these scattered questions seem a little strange. Would it help to have a sticky "Newbie Corner" somewhere, to encourage discussion of basic theory without polluting all of the other threads?

Mike