Solved

CPU and registers

Posted on 1998-11-20
2
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1129423
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
ID: 1129424
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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

this article is a guided solution for most of the common server issues in server hardware tasks we are facing in our routine job works. the topics in the following article covered are, 1) dell hardware raidlevel (Perc) 2) adding HDD 3) how t…
Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 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