后面的代码编译,只会在循环中的putString中生成我名字的第一个字母。它需要生成我姓名的所有字母,以便存储
jmp firstline
openMsg db "Program by John Piper", 13, 10
lenOpenMsg = $ - openMsg
myName db "John Piper"
myNameLen = $ - myName
myName1 db ?
myNameLen1 = $ - myName1
myName2 db ?
myNameLen2 = $ - myName2
firstline:
mov SI, offset openMsg
mov CX, lenOpenMsg
call putStrng
call crlf
mov si, offset myName
mov cx, myNameLen
call putStrng
call crlf
call crlf
mov si, 0
mov cx, myNameLen
LoopTop1:
mov dl, myName(si)
xor dl, 0AB
mov myName1(si), dl
inc si
loop LoopTop1
mov si, offset myName1
mov cx, myNameLen1
call putStrng
call crlf
call crlf
mov ah, 04c
int 021
include ioProcs.inc
答案 0 :(得分:0)
index
只为myName1 db ?
保留一个字节。因此,myName1
将为1,myNameLen1
将写入一个字节。此外,您将覆盖putStrng
后面的内存。保留myName1
和myName1
的地点与myName2
消耗的数量相同:
myName