Solved

CPU and registers

Posted on 1998-11-20
2
259 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
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
HP Deskjet 2132 12 71
BIOS update failed, laptop dead. Any options to revive the system? 19 120
Cannot record Counter Strike with OBS 18.0.1 - too slow 1 50
VMware Fail Over 5 57
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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