8080.pdf 데이터시트 (총 30 페이지) - 파일 다운로드 8080 데이타시트 다운로드

No Preview Available !

J.
© Intel Corp., 1975
\
Rev. B

No Preview Available !

This manual describes the assembly language format, and how to write assembly language
programs for the Intel 8080 microprocessor. Detailed information on the operation of
specific assemblers is available in the Operator's Manual and I nstallation Guide for each
specific assembler.
Rev. B

No Preview Available !

TERMS
Address
Bit
Byte
Instruction
Object Program
Program
Source Program
System Program
User Program
Word
nnnnB
nnnnD
nnnnO
nnnnQ
nnnnH
DESCRIPTION
A 16-bit number assigned to a memory location corresponding to its sequen-
tial position.
The smallest unit of information which can be represented. (A bit may be in
one of two states, represented by the binary digits 0 or 1).
A group of 8 contiguous bits occupying a single memory location.
The smallest single operation that the computer can be directed to execute.
A program which can be loaded directly into the computer's memory and
which requires no alteration before execution. An object program is usually
on paper tape. and is produced by assembling (or compiling) a source pro-
gram. Instructions are represented by binary machine code in an object
program.
A sequence of instructions which, taken as a group. allow the computer to
accomplish a desired task.
A program which is readable by a programmer but which must be transformed
into object program format before it can be loaded into the computer and
executed. Instructions in an assembly language source program are represented
by their assembly language mnemonic.
A program written to help in the process of creating user programs.
A program written by the user to make the computer perform any desired task.
A group of 16 contiguous bits occupying two successive memory locations.
nnnn represents a number in binary format.
nnnn represents a number in decimal format.
nnnn repres<;lnts a number in octal format.
nnnn represents a number in octal format.
nnnn represents a number in hexadecimal format.
A representation of a byte in memory. Bits which are fixed as 0 or 1 are in-
dicated by 0 or 1; bits which may be either 0 or 1 in different circumstances
are represented by letters; thus rp represents a three-bit field which contains
one of the eight possible combinations of zeroes and ones.
ii

No Preview Available !

INTRODUCTION
'----
CHAPTER 1
COMPUTER ORGANIZATION
WORKING REGISTERS
MEMORY
PROGRAM COUNTER
STACK POINTER
INPUT/OUTPUT
COMPUTER PROGRAM REPRESENTATION
IN MEMORY
MEMORY ADDRESSING
Direct Addressing
Register Pair Addressing
Stack Pointer Addressing
Immediate Addressing
Subroutines and Use of the Stack
for Addressing
CONDITION BITS
Carry Bit
Auxiliary Carry Bit
Sign Bit
Zero Bit
Parity Bit
CHAPTER 2
THE 8080 INSTRUCTION SET
~ ASSEMBLY LANGUAGE
How Assembly Language is Used
Statement Syntax
Label Field
Code Field
Operand Field
Comment Field
DATA STATEMENTS
Two's Complement Representation
DB Define Byte(s) of Data
~
DW Define Word (Two Bytes) of Data
DS Define Storage (Bytes)
CARRY BIT INSTRUCTIONS
STC Set Carry
V
1
1
2
2
2
2
2
3
3
3
3
4
4
5
5
6
6
6
6
7
7
7
8
8
9
9
12
12
12
13
14
14
14
14
CMC Complement Carry
SINGLE REGISTER INSTRUCTIONS
INR Increment Register or Memory
DCR Decrement Register or Memory
CMA Complement Accumulator
DAA Decimal Adjust Accumulator
NOP INSTRUCTION
DATA TRANSFER INSTRUCTIONS
MOV Instruction
STAX Store Accumulator
LDAX Load Accumulator
REGISTER OR MEMORY TO ACCUMULATOR
INSTRUCTIONS
ADD Add Register or Memory to Accumulator
ADC Add Register or Memory to Accumulator
With Carry
SUB Subtract Register or Memory
From Accumulator
SBB Subtract Register or Memory From
Accumulator With Borrow
ANA Logical and Register or Memory
With Accumulator
XRA Logical Exclusive-Or Register or Memory
With Accumulator (Zero Accumulator)
ORA Logical or Register or Memory With
Accumulator
CMP Compare Register or Memory With
Accumulator
ROTATE ACCUMULATOR INSTRUCTIONS
RLC Rotate Accumulator Left
RRC Rotate Accumulator Right
RAL Rotate Accumulator Left Through Carry
RAR Rotate Accumulator Right Through Carry
REGISTER PAIR INSTRUCTIONS
PUSH Push Data Onto Stack
POP Pop Data Off Stack
DAD Double Add
INX Increment Register Pair
DCX Decrement Register Pair
14
14
15
15
15
15
16
16
16
17
17
17
17
18
18
19
19
19
20
20
21
21
21
22
22
22
22
23
24
24
24
iii

No Preview Available !

XCHG Exchange Registers
XTH L Exchange Stack
SPH L Load SP From Hand L
IMMEDIATE INSTRUCTIONS
LXI Load Register Pair Immediate
MVI Move Immediate Data
AD I Add Immediate to Accumulator
ACI Add Immediate to Accumulator With Carry
SUI Subtract Immediate From Accumulator
SBI Subtract Immediate From Accumulator
With Borrow
ANI And Immediate With Accumulator
XRI Exclusive-Or Immediate With Accumulator
ORI Or Immediate With Accumulator
CPI Compare Immediate With Accumulator
DIRECT ADDRESSING INSTRUCTIONS
STA Store Accumulator Direct
LOA Load Accumulator Direct
SHLD Store Hand L Direct
LHLD Load Hand L Direct
JUMP INSTRUCTIONS
PCH L Load Program Counter
JMP Jump
JC Jump If Carry
JNC Jump If No Carry
JZ Jump If Zero
JNZ Jump If Not Zero
JM Jump If Minus
JP Jump If Positive
JPE Jump If Parity Even
JPO Jump If Parity Odd
CALL SUBROUTINE INSTRUCTIONS
CALL Call
CC Call If Carry
CNC Call If No Carry
CZ Call If Zero
CNZ Call If Not Zero
CM Call If Minus
CP Call If Plus
CPE Call If Parity Even
CPO Call If Parity Odd
RETURN FROM SUBROUTINE INSTRUCTIONS
RET Return
RN Return If Carry
RNC Return If No Carry
RZ Return If Zero
RNZ Return If Not Zero
RM Return If Minus
RP Return If Plus
RPE Return If Parity Even
RPO Return If Parity Odd
RST INSTRUCTION
INTERRUPT FLIP-FLOP INSTRUCTIONS
EI Enable Interrupts
01 Disable Interrupts
INPUT/OUTPUT INSTRUCTIONS
IN Input
OUT Output
24
25
25
25
26
26
27
27
27
28
28
29
29
29
30
30
30
30
31
31
31
32
32
32
32
33
33
33
33
33
34
34
34
34
35
35
35
35
35
35
35
36
36
36
36
36
37
37
37
37
37
38
38
38
38
38
39
HLT HALT INSTRUCTION
PSEUDO-INSTRUCTIONS
ORG Origin
EQU Equate
SET
END End of Assembly
I F AND ENOl F Conditional Assembly
MACRO AND ENDM Macro Definition
CHAPTER 3
PROGRAMMING WITH MACROS
WHAT ARE MACROS?
MACRO TERMS AND USE
Macro Definition
Macro Reference or Call
Macro Expansion
Scope of Labels and Names Within Macros
Macro Parameter Substitution
REASONS FOR USI NG MACROS
USEFUL MACROS
Load I ndirect Macro
Other Indirect Addressing Macros
Create Indexed Address Macro
CHAPTER 4
PROGRAMMING TECHNIQUES
BRANCH TABLES PSEUDO-SUBROUTINE
SUBROUTINES
Transferring Data to Subroutines
SOFTWARE MULTIPLY AND DIVIDE
MULTIBYTE ADDITION AND SUBTRACTION
DECIMAL ADDITION
DECIMAL SUBTRACTION
ALTERI NG MACRO EXPANSIONS
CHAPTER 5
INTERRUPTS
WRITING INTERRUPT SUBROUTINES
APPENDIX A
INSTRUCTION SUMMARY
APPENDIX B
INSTRUCTION EXECUTION TIMES AND
BIT PATTERNS
APPENDIX C
ASCII TABLE
APPENDIX 0
BINARY-DECIMAL-HEXADECIMAL
CONVERSION TABLES
39
39
39
40
40
41
41
41
43
43
44
44
45
45
46
46
47
47
47
48
48
49
49
50
51
53
55 ~
56
57
58
59
60
VI
XVI
XX
XXII
LIST OF FIGURES
Automatic Advance of the Program
Cou nter as Instructions are Executed
Assembler Program Converts Assembly
Language Source Program to Hexadecimal
Object Program
"2
.--/
8
iv