我想在Assembly中创建一个程序,它将从键盘读取一个字符串,然后将每个字母转换为另一个表格,然后将其存储在[201]的表格中。在[200]我有一个字符串的char计数器。以下是我所做的:汇编程序
mov [0300h],88h ;thats the table that I want to convert to.(only 3 digits)
mov [0301h],83h
mov [0302h],0CEh
mov ah,01h ;insert string
int 81h
mov di,01h
start:
mov al,[di]
cmp al,00h ;not
sure about that. last char of string
should be /0.
je end
mov [0200h],di ;char counter.
inc di
mov bx,0300h
sub al,041h
;convert char
xlat
mov [di+01ffh],al
;store converted char to 201...
loop start
end:
**int 81h**
;reads chars until <cr> from keyboard.Starting address of input data buffer ES:DI+1
由于某些原因,在我的程序结束时DI值为0900。任何想法,为什么它不工作,或任何想法,我可以通过任何其他方式?非常感谢。
你可以举个例子PLZ? thnx – John 2010-11-10 22:21:44
你的代码假设你的输入缓冲区从ds开始:[1]。这是真的吗? – 2010-11-11 00:01:55
我的输入始于ES:di + 1 – John 2010-11-11 08:51:39