Instruction Set ArchitectureIP2022 Users Manual
226
www.ubicom.com
Example:
test 0x099
;test 0x099
sb
STATUS,2
;skip if Z=1
inc w
;increment W
nop
This example tests the contents of data memory
location 0x01B. The test instruction sets or
clears the Z bit based on the contents of the data
memory location. The sb instruction tests the Z
bit and skips to the nop instruction if the Z bit is
set. The inc instruction is executed only if the
data memory location is nonzero.