Download presentation
Presentation is loading. Please wait.
1
Lecture 11 Z80 Instruction Hong DGU
2
C vs Z80 Program Body C Program #include <stdio.h> Main ( ) { . } Z80 Program ORG 0000H . END
3
Two Types of Instruction
Pseudo-instruction Assembler (or Compiler) Directive : ORG, END, … Similar to #include in C. Instruction Normal instructions : LD, OUT, JP,… Similar to printf in C.
4
Compiler and Assembler
A tool that converts human-friendly language based code to a binary code Assembler A tool that converts assembly code to a binary code
5
compile assemble Z = A + Y; High-level Language Assembly Language Machine Language
6
ORG Format : ORG ADRS Example : ORG 8000H
7
END Format : END
8
Addressing Mode Immediate operand Direct address Indirect address
Operand is data itself (like a constant) Direct address Operand is address (or register name) for the real data Indirect address Operand is the address of the address for the real data
9
LD (Load) Format : LD target source Ex) LD A, 00000001B
immediate operand Ex) LD (8000H), A ( ) for an operand means direct addressing.
10
OUT Format : OUT target source Example : OUT ( B), A
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.