Instruction Set
4-147
LOOP
LOOP
Examples
This example converts a list of unpacked decimal digits in memory to their ASCII
equivalents.
Related Instructions
If you want to
See
Jump to another sequence of instructions if CX is 0
JCXZ
Jump unconditionally to another sequence of instructions
JMP
Jump to the top of a loop if CX is not 0 and two compared components are equal LOOPE
Jump to the top of a loop if CX is not 0 and two compared components are not equal LOOPNE
LIST
DB
01h,08h,06h
L_LENGTH
EQU
3
; convert a list of unpacked BCD digits to ASCII
MOV
SI,0
; point to first byte in list
MOV
CX,L_LENGTH
; set up counter
CONVERT:
; convert unpacked BCD digit to ASCII
OR
LIST[SI],30h
INC
SI
; point to next byte in list
LOOP
CONVERT
; while CX is not 0, jump to top of loop
Содержание 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...