Simple hex question

Let's talk about anything related to the 6502 microprocessor.
Post Reply
User avatar
James_Parsons
Posts: 67
Joined: 10 Jul 2013

Simple hex question

Post 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
JMP $FFD2
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Simple hex question

Post 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.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Simple hex question

Post 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.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Simple hex question

Post 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
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
Post Reply