初始化循环变量ecx->跳到条件判断处->如果条件满足则跳到入口(entry),否则继续向下执行(即退出循环)。
include vcIO.inc
.data
str_ byte "while-repeat",0ah, 0
.code
main proc
mov ecx,1
jmp testLab
entry:
;
pushad
invoke printf , offset str_
popad
;
inc ecx
testLab:
cmp ecx, 5
jbe entry
invoke _getch
ret
main endp
end main