(bhd) 番号付けシステム間の数値コンバーターを作成しています。プログラムは 16 ビットの 2 進数または 4 桁の 16 進数を受け入れます。または 5 小数。
私が書いた読み取り手順は、16ビットレジスタを扱っており、より大きな値を含めることができないため、10進数値が65535(FFFFh)を超えると問題があるようです
助けていただければ幸いです。
ここに私の読み取り手順があります:
Proc R
mov ah,01;read first digit
int 21h
mov saveal,al
cmp al,0dh; if it is a new line break then dont read
jz toret
mov al,radex ; the radex value already entered by user
mov ah,0
mul dx
mov dx,ax; multiplies the radex by the number entered so far to shift it 1 dig.
mov al,saveal
cmp al,65
jge big2
sub al,30h; taking decimal value of the character
cont2:
call checkerror
mov ah,0
add dx,ax; adding the digit to the number read so far
loop R
toret:
ret
endp
ありがとうナタリー