仍然關於我的項目,即時嘗試打印一個數組並沒有任何反應......沒有錯誤或任何事情,唯一發生的事情是用戶可以輸入9個字符,並且它,程序完成 程序需要0和9分之間獲得了9個號碼組 A,b和CAsm program does not give output
MODEL small
STACK 100h
DATASEG
Welcome db "Welcome, please enter 9 numbers between 0 and 9: $"
MainArr db 9 dup(0)
Aarr db 9 dup(0)
Barr db 9 dup(0)
Carr db 9 dup(0)
AarrLength db ?
BarrLength db ?
CarrLength db ?
CODESEG
start:
mov ax, @data
mov ds, ax
mov dx, offset Welcome
mov ah, 9
int 21h
xor di, di
xor bx, bx
mov si, 0
mov cx, 0
jmp gettingInput
gettingInput:
inc cx
cmp cx, 10
je continue
mov ah, 1h
int 21h
mov [MainArr+si], al
inc si
cmp al, 8
jge zoneA
cmp al, 6
jb zoneC
jmp zoneB
zoneA:
mov [Aarr+bx],al
inc bx
jmp gettingInput
zoneB:
mov [Barr+si],al
inc si
jmp gettingInput
zoneC:
mov [Carr+di],al
inc di
jmp gettingInput
continue:
mov cx, 9
xor ax, ax
mov si, offset Aarr
findLengthA:
cmp [si], 0
je foundLength
inc ax
loop findLengthA
foundLengthA:
mov [AarrLength], al
mov cx, 9
xor ax, ax
mov si, offset Barr
findLengthB:
cmp [si], 0
je foundLength
inc ax
loop findLengthB
foundLengthB:
mov [BarrLength], al
mov cx, 9
xor ax, ax
mov si, offset Carr
findLengthC:
cmp [si], 0
je foundLength
inc ax
loop findLengthC
foundLength:
mov [CarrLength], al
mov bl, AarrLength
mov bh, 0
inc bx
inc bx
mov [offset Aarr + bx], '$'
mov si, offset Aarr
printA:
mov ah, 9h
mov dx, offset Aarr
int 21
exit:
mov ax, 4c00h
int 21h
END start
評論你的代碼,特別是如果你想讓別人幫忙。另外,學習使用調試器。 – Jester