6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 5:33 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Apr 14, 2024 7:46 pm 
Offline

Joined: Sun Apr 14, 2024 7:31 pm
Posts: 2
Hi,
I've been going though trying to understand how the old 8-bit micros (Z80/6502) that I learnt on years ago actually work at a digital level. Looking here on Visual6502.org and stepping through the first couple of instructions I saw this

Attachment:
File comment: screenshot
v6502.png
v6502.png [ 55.83 KiB | Viewed 235 times ]


During the JSR routine the docs (MCS6500) just says ADL is "stored" - from visual 6502 it looks like it does this in the S register? then just decrements ADL and then swaps them back for the last bit when it reads ADH and completes the jump. I've not been able to find confirmation of this (or the right thing to search for) - but does anyone know if this is indeed what happens?


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 14, 2024 7:57 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
That simulation is all the confirmation we have, AFAIK, but it makes excellent sense and saves a temporary register which would have cost silicon area.

As the simulation is driven by switch-level simulation of the transistor netlist as extracted from photographs of the chip, I think it's evidence enough.

The value of S is at the time travelling through the ALU to be decremented, so the S register is briefly not required. It's an ingenious manoeuvre.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 15, 2024 8:07 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Oh, and welcome!


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 15, 2024 3:11 pm 
Offline

Joined: Sun Apr 14, 2024 7:31 pm
Posts: 2
BigEd wrote:
Oh, and welcome!

Thank you :D


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 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: