我正在编写一个程序,它将接受一个字符串并输出原始字符串,一个全部小写的字符串版本,以及一个全部大写的字符串版本。但是出于某种原因,输出看起来像这样:
Assembly is kinda fun
assembly is kinda fun-*
ASSEMBLY IS KINDA FUN
我无法弄清楚为什么' - *'出现在小写输出之后,特别是因为它几乎与大写输出相同。有人可以说明为什么会这样吗?这是我的代码:
TITLE MASM Template (main.asm)
; Description:
;
; Revision date: 4/12/16
INCLUDE Irvine32.inc
.data
myString BYTE "Assembly is kinda fun", 0dh, 0ah, 0
myOtherString BYTE 70 DUP(?), 0dh, 0ah, 0
.code
main PROC
call Clrscr
MOV EDX, OFFSET myString
Call WriteString
LEA ESI, myString
MOV ECX, 70
copyloop1:
MOV AL, [ESI]
OR AL, 00100000b
MOV myOtherString, AL
MOV EDX, OFFSET myOtherString
Call WriteChar
INC ESI
LOOP copyloop1
CALL Crlf
LEA ESI, myString
MOV ECX, 70
copyloop2:
MOV AL, [ESI]
AND AL, 11011111b
MOV myOtherString, AL
MOV EDX, OFFSET myOtherString
Call WriteChar
INC ESI
LOOP copyloop2
CALL Crlf
exit
main ENDP
END main