6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 4:28 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 21, 2004 8:46 pm 
Offline

Joined: Fri May 21, 2004 5:23 pm
Posts: 17
Location: Burlington, ON
This may sound like a really stupid question to diehard hardware buffs: is the Data Bus in the 6502 signed? or unsigned?

Initially, I thought it was unsigned (please... don't ask why), but now I'm pretty sure it's signed because of something I noticed with the Relative addressing mode and how can it be both right?

:oops:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri May 21, 2004 8:58 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Whether it's signed or not is mostly a matter of how the data are interpreted.

Relative addressing is indeed signed so that you can branch half a page in either direction, regardless of where you are relative to an actual page boundary.

In the case of indexing, the only time it goes backwards is if there's a wraparound at the end of zero page or at the end of memory. Otherwise indexing always goes forward only-- no negative numbers there.

In arithmetic, it can be signed or unsigned. The processor doesn't have to know which way you intend it, because it's all a matter of how you interpret the results.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: