問題があります。 8086アセンブリで配列を文字列で埋めるプログラムを作ってから、 "a、A、e、E、I、I、o、O、u、U"という文字だけを出力しなければなりません。
私は、アレイ内のすべての文字をプリントアウトすることに成功しましたが、私は追加の条件を開始し、ジャンプしたときに、私のプログラムは、単に無限ループ:(文字列の母音のみを認識して印刷する
Here'sコード全体に入った:
org 100h
jmp main
;messsages to be shown:
msg1 db 'this is an example program.', 10, 13, 'made to show only the vocal letters of a string', 10, 13, 'write some words', 10, 10, 13, '$'
msg2 db 10, 10, 13, 'your phrase:', 10, 10, 13, '$'
;variables
aux db 0
vct dw 0
;program start
main:
lea dx, msg1
mov ah, 09h
int 21h
mov cx, 20
ingresarNumero:
mov ah, 08h
int 21h
cmp al, 08h
je borrar
cmp al, 0Dh
je enter
cmp al, 20h
je enter
mov ah, 0Eh
int 10h
mov ah, 0
mov vct[si], ax
inc si
loop ingresarNumero
ultimaPosicion:
mov ah, 08h
int 21h
cmp al, 08h
je borrar
cmp al, 0Dh
je finIngreso
jmp ultimaPosicion
borrar:
cmp cx, 20
je ingresarNumero
mov ah, 0Eh
int 10h
mov al, 0
int 10h
mov al, 8
int 10h
pop ax
inc cx
dec si
jmp ingresarNumero
enter:
cmp cx, 20
je ingresarNumero
jmp finIngreso
finIngreso:
lea dx, msg2
mov ah, 09h
int 21h
push cx
mov cx, si
mov si, 0
superloop:
mov ax, vct[si]
mov ah, 0Eh
int 10h
inc si
loop superloop
ret
デバッガでステップアップしてみましたか? –