我试图在文本中找到符号的频率。每当我将ax
freq
数组移动到高于ff的值时,该值就无法正确输入。
ff之前的arr图片(当ax为ff时):
https://i.stack.imgur.com/0EpUB.png
ff之后的arr图片(在wgen ax的另一个循环之后是100):
https://i.stack.imgur.com/hmMEk.png
我的assmbler在dosbox eumlutor /
中很有趣proc ChkFreq
; get frequency list
;1. amount of characters in file
push bp
mov bp,sp
push ax
push cx
push dx
mov cx,[bp+4]
xor ax,ax
mov di,offset Freq
chk:
xor bx,bx
call FillBuffer
mov bl,[Buffer]
shl bx,1;not sure if this line is correct but it doesn't affect the problem
add bx,di
mov ax,[bx]
inc ax
mov [bx],ax
loop chk
pop dx
pop cx
pop ax
pop bp
ret
endp ChkFreq
先谢谢Doron