Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- mov ah,09h
- mov dx,String
- int 21h
- mov ah,09h
- mov dx,NewLine
- int 21h
- push String Cypher
- call CypherString
- mov ah,09h
- mov dx,String
- int 21h
- mov ah,08h
- int 21h
- ret
- CypherString:
- push bp
- mov bp,sp
- push di bx
- mov di,[bp+6]
- mov bx,[bp+4]
- xor ax,ax
- .Cycle:
- cmp byte[di],36
- je @F
- mov al,byte[di]
- sub al,'A'; меняем это значение если надо изменить порядок шифрования ( в данном случае символ смещается на 3 вправо)
- xlatb
- mov byte[di],al
- inc di
- jmp .Cycle
- @@:
- pop bx di bp
- ret 4
- String db 'ABCDEFGHI',36
- NewLine db 10,13,36
- Cypher db 'DEFGHIJKLMNOPQRSTUVWXYZABC'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement