?
Solved

CPU and registers

Posted on 1998-11-20
2
Medium Priority
?
262 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 200 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

765 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