PC Assembler. Ing. E.E. Mak MSc. Cluster1. Introduction Microprocessors Numbers, Binary, Hexadecimal, ASCII Adding and subtracting Instructions and Flags Deeds Z80 simulator. Computer Layout. MEM data+instructions. I/O. External. CPU. Model CPU. PC. R1. R2. M A R. A. B. IR.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Ing. E.E. Mak MSc
Alternative registers.
Accumulator Registers
Interupt register
Alternative Registers
Memory Refresh
Adress Registers
Z80 Processor Register LayoutI
A’
A
F
F’
R
W
Z
W’
Z’
B
C
B’
C’
D
E
D’
E’
Flags 8 bit
H
L
H’
L’
S
Sign
Z
Zero
I
X


H
HalfCarry
I
Y


S
P
P/V
Parity/overfl.
P
C
N
Negate
C
Carry
Using the 8th bit as a SIGN bit
53 =
0
0
1
1
0
1
0
1
53 =
1
0
1
1
0
1
0
1
Inverting the bits
53 =
0
0
1
1
0
1
0
1
53 =
1
1
0
0
1
0
1
0
1. Write a program to store 100 into DE and 385 into BC
ADD thereafter DE and BC into HL
2. Investigate substraction using negative numbers for
all numberconfigurations demonstrated in previous
sheets
3. Investigate how to multiply using binary numbers
4. Investigate using shift operators could facilitate
the multiplication process.
5. What are floating point decimals ,
how are they implemented?
0E
0
0
0
0
1
1
1
0
1A
0
0
0
1
1
0
1
0
+
28
0
0
1
0
1
0
0
0
The use of half bytes let us express two adjacent hexadecimal numbers. As a consequence, we may use this twodigit hexadecimal byte presentation to perform calculations as well, whereas the carrymechanism while adding work accordingly
In hexadecimal coding, each digit of one halfbyte represents a hexadecimal number
07
0
0
0
0
0
1
1
1
17
0
0
0
1
0
1
1
1
+
24
0
0
1
0
0
1
0
0
The use of half bytes for numbers 0..9 only, forces while adding special corrections to facilitate adding of these decimal numbers.
(What would the result have been without this corrections?)
Could you develop an algorithm to make this corrections?