include Irvine32.inc
bufmax = 1128
.data
key byte “stupid12”,0
sPrompt byte “Enter the plain text:”,0
sEncrypt byte "Cipher textequ: ",0
sDecrypt byte "Decrypted: ",0
buffer byte bufmax + 1 dup(0)
bufsize dword ?
.code
main proc
call InputTheString
call TranslateBuffer
mov edx,offset sEncrypt
call DisplayMessage
call TranslateBuffer
mov edx,offset sDecrypt
call DisplayMessage
exit
main endp
InputTheString proc
pushad
mov edx,offset sPrompt
call WriteString
mov ecx,bufmax
mov edx,offset buffer
call ReadString
mov bufsize,eax
call Crlf
popad
ret
InputTheString endp
DisplayMessage proc
pushad
call WriteString
mov edx,offset buffer
call WriteString
call Crlf
call Crlf
popad
ret
DisplayMessage endp
TranslateBuffer pr
汇编语言编写多字符秘钥加密程序,基于《汇编语言基于x86处理器》单字符加密实例
最新推荐文章于 2022-03-31 23:05:38 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)