汇编语言编写程序将字符串的明文转换为密文存放并显示密文,密文形成 方法是输入的字母用后4个字母替换
发布网友
发布时间:2022-04-29 17:27
我来回答
共1个回答
热心网友
时间:2023-10-23 15:54
code segment
assume cs:code
org 100h
start: jmp begin
buf db 30
db ?
buf1 db 30 p(?)
buf2 db 30 p(?)
begin: push cs
pop ds
push cs
pop es
lea dx,buf
mov ah,10
int 21h
lea si,buf1
lea di,buf2
mov cl,[buf+1]
mov ch,0
cld
@1:
lodsb
add al,4
stosb
loop @1
mov ah,2
mov dl,13
int 21h
mov dl,10
int 21h
lea si,buf2
mov cl,[buf+1]
mov ch,0
@2:
lodsb
mov dl,al
mov ah,2
int 21h
loop @2
mov ah,4ch
int 21h
code ends
end start
热心网友
时间:2023-10-23 15:54
code segment
assume cs:code
org 100h
start: jmp begin
buf db 30
db ?
buf1 db 30 p(?)
buf2 db 30 p(?)
begin: push cs
pop ds
push cs
pop es
lea dx,buf
mov ah,10
int 21h
lea si,buf1
lea di,buf2
mov cl,[buf+1]
mov ch,0
cld
@1:
lodsb
add al,4
stosb
loop @1
mov ah,2
mov dl,13
int 21h
mov dl,10
int 21h
lea si,buf2
mov cl,[buf+1]
mov ch,0
@2:
lodsb
mov dl,al
mov ah,2
int 21h
loop @2
mov ah,4ch
int 21h
code ends
end start
热心网友
时间:2023-10-23 15:54
code segment
assume cs:code
org 100h
start: jmp begin
buf db 30
db ?
buf1 db 30 p(?)
buf2 db 30 p(?)
begin: push cs
pop ds
push cs
pop es
lea dx,buf
mov ah,10
int 21h
lea si,buf1
lea di,buf2
mov cl,[buf+1]
mov ch,0
cld
@1:
lodsb
add al,4
stosb
loop @1
mov ah,2
mov dl,13
int 21h
mov dl,10
int 21h
lea si,buf2
mov cl,[buf+1]
mov ch,0
@2:
lodsb
mov dl,al
mov ah,2
int 21h
loop @2
mov ah,4ch
int 21h
code ends
end start