Solved

CPU and registers

Posted on 1998-11-20
2
256 Views
Last Modified: 2010-04-27
I am a student informatics and my teacher asked uw to look up the following thing:
A (8086) CPU has 7 registers ..
IR  PC  SP  R0  R1  R2  R3      
The question was why they start with R1 afther SP in stead of staring
with R1 and ending with R4   ... if you know the answer you would help me
alot by explaining it to me ;-)

Sk
0
Comment
Question by:wcmwcm
  • 2
2 Comments
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
That is *NOT* the internal model of the 8086 CPU!

AX, BX, CX, DX, SI, DI, IP, CS, DS, ES, SS, SP, flags

If you want to see the registers first hand get to DOS prompt and type:

DEBUG
R
Q

This will display registers for you.

-r
AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000  
DS=176E  ES=176E  SS=176E  CS=176E  IP=0100   NV UP EI PL NZ NA PO NC
176E:0100 7415          JZ      0117                              
-q


AX, BX General Purpose Registers
CX       Counter Register/General Purpose register
DX       I/O Pointer Register/General Purpose register
SI/DI    Source and Destination Index registers for string moves and data arrays
CS:IP   Code Segment/Instruction Pointer - what's executing
DS       Data Segment, implied segment for most data ops
ES       Extra Segment, Implied segment register for DI
SS:SP  Stack Segment - stack pointer is here
BP       Base Pointer, alternate stack
Flags   Condition Code register. Internal processor state flags, zero, neg, etc.

Have no clue what CPU that your register model is with. It's unfamiliar and certainly NOT 8086! Have written ASM in 8080A, Z80, 80x86, 6502, 6800, 68000, SEL 32/55, Z8000, & DEC 11-780 and none of *them* match what your teacher says the model is.

M


0
 
LVL 12

Accepted Solution

by:
mark2150 earned 100 total points
Comment Utility
Thinking more aboutyour question... If you want to know why the register numbers are zero based (R0-R3) instead of one based (R1-R4) is because all zeros is simplest bit pattern. Internally to CPU chip four registers are selected with two internal bit lines, Possible values are:

0 0 - 0
0 1 - 1
1 0 - 2
1 1 - 3

Register numbers therefore correspond to internal electrical states.

M

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now