這是我的代碼: placeStart是CMP條件執行一次,而不是重複它的播放機的首位。爲什麼我的循環跳轉條件
proc Shoot
mov bx,[placeStart]
mov dx,offset Game
add bx,dx
;; Moving to bx the position of the character
mov cx,10
check_shoot:
cmp [byte ptr bx-NumCols],'+' ;;checking if the shoot will override the plus
je exit
sub bx,NumCols
mov [byte ptr bx],'*'
cmp [byte ptr bx+NumCols],'*'
je first_shoot
jmp finish_loop
first_shoot:
mov [byte ptr bx+NumCols],' '
finish_loop:
call PrintGame
loop check_shoot
「NumCols」究竟是什麼?用'equ'或變量('db' /'dw' /'dd')定義的直接常量?您應該發佈完整的,最小的代碼來重現您的問題。 – Michael