
Instruction Set
4-83
JB
JB
Examples
This example checks the selection of 10 numbered items.
Tips
If you need to jump to an instruction at
farlabel that is more than 128 bytes away, use the
following sequence of statements:
JNB nearlabel
; This does the equivalent of a long jump
JMP farlabel
; based on the JB condition.
nearlabel:
Related Instructions
If you want to
See
Compare two components using subtraction and set the flags accordingly
CMP
Jump if the result of a previous
unsigned
comparison was
above or equal
JAE
Jump if the result of a previous
integer
comparison was
less
JL
Jump unconditionally
JMP
Set the flags according to whether particular bits of a component are set to 1
TEST
; check selection of 0-n+ item
Num_items=10
; 10 total items numbered (0-9)
START_SEL:
mGetSelection
; value in AL
CMP
AL,Num_items
; compare to max# of items
JNAE
SEL_GOOD
; okay, selection in 0-(n-1)
mPrintError
JMP
START_SEL
SEL_GOOD:
...
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...