有一个 printf 语句告诉编译器打印 outStr。outStr 最初设置为等于 emptybuf[1000] = "??? 尚未翻译 ???";。我应该将我的答案移到 outStr 中,它应该更新 print 语句中的 outStr。
由于某种原因,我的内联程序集不会从下面显示的代码中打印出任何内容。我无法理解我做错了什么。我正在尝试将小写字母转换为大写字母,并忽略任何特殊字符。非常感谢任何建议。
mov esi,inStr ;To start off initialize esi point to input string
mov edi,outStr ;edi point to the output string area
; using esi and edi with [esi] and [edi] as indirect operand
; suggestion to start mov each character to al like --> mov al,[esi]
; test, and manipulate character in al
jmp getNext
getNext: mov al,[esi]
cmp al,0
je exitProc
test al,01100000b ;test to see if its a lowercase letter
je toUpperCase
test al,01000000b
mov [edi],al
inc esi
toUpperCase: test al,01000000
AND al,11011111b
mov [edi],al
inc esi
jmp getNext
exitProc: mov outStr, edi