English
Language : 

Z8F0830HH020SG Datasheet, PDF (181/257 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore!® F0830 Series
Product Specification
163
Assembly Language Source Program Example
JP START
START:
LD R4, R7
LD 234H, #%01
; Everything after the semicolon is a comment.
; A label called “START”. The first instruction (JP START) in this
; example causes program execution to jump to the point within the
; program where the START label occurs.
; A Load (LD) instruction with two operands. The first operand,
; Working register R4, is the destination. The second operand,
; Working register R7, is the source. The contents of R7 is
; written into R4.
; Another Load (LD) instruction with two operands.
; The first operand, extended mode register Address 234H,
; identifies the destination. The second operand, immediate data
; value 01H, is the source. The value 01H is written into the
; register at address 234H.
Assembly Language Syntax
For proper instruction execution, eZ8 CPU assembly language syntax requires that the
operands be written as destination, source. After assembly, the object code usually reflects
the operands in the order source, destination, but ordering is op code-dependent.
The following examples illustrate the format of some basic assembly instructions and the
resulting object code produced by the assembler. This binary format must be followed by
users that prefer manual program coding or intend to implement their own assembler.
Example 1
If the contents of registers 43H and 08H are added and the result is stored in 43H, the
assembly syntax and resulting object code is:
Table 101. Assembly Language Syntax Example 1
Assembly Language Code
Object Code
ADD 43H, 08H (ADD dst, src)
04 08 43 (OPC src, dst)
PS025113-1212
Assembly Language Syntax