English
Language : 

GMS30C2116 Datasheet, PDF (97/322 Pages) Hynix Semiconductor – USERS MANUAL
INSTRUCTION SET
3-33
3.26 Delayed Branch Instructions (continued)
Format is PCrel
Notation or alternative Operation
Comment
DBLE rel
if N = 1 or Z = 1 then DBR;
-- Less or Equal signed
DBGT rel
if N = 0 and Z = 0 then DBR;
-- Greater Than signed
DBLT rel DBN rel if N = 1 then DBR;
-- Less Than signed
DBGE rel DBNN rel if N = 0 then DBR;
-- Greater or Equal signed
DBSE rel
if C = 1 or Z = 1 then DBR;
-- Smaller or Equal unsigned
DBHT rel
if C = 0 and Z = 0 then DBR;
-- Higher Than unsigned
DBST rel DBC rel if C = 1 then DBR;
-- Smaller Than unsigned
DBHE rel DBNC rel if C = 0 then DBR;
-- Higher or Equal unsigned
DBE rel DBZ rel if Z = 1 then DBR;
-- Equal
DBNE rel DBNZ rel if Z = 0 then DBR;
-- Not Equal
DBV rel
if V = 1 then DBR;
-- oVerflow
DBNV rel
if V = 0 then DBR;
-- Not oVerflow
DBR rel
PC := PC + rel;
Note: rel is signed to allow forward or backward branches.
Attention: Since the PC seen by the delay instruction depends on the delayed branch
taken or not taken, a delay instruction after a conditional Delayed Branch instruction
must not reference the PC.
Instruction
Loop1:
MOVI
DBLE
ADDI
DBNE
ADDI
L0, $1234
Loop1
L0, $10
Loop1
L0, $10
; if N=1 or Z=1 then delay branch
; => if N=1 or Z=1
; then L0 = L0 + $10, branch to Loop1
; if Z=0 then delay branch
; => if N=1 or Z=1
; then L0 = L0 + $10, branch to Loop1