Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- mov ah, 9h
- mov dx, name_prog
- int 21h
- mov ah,9h
- mov dx, str2
- int 21h
- mov ah,0Ah
- mov dx, my_str
- int 21h
- mov ah,9h
- mov dx, new_line
- int 21h
- mov bp, my_str+2
- mov cl,[bp+4]
- mov ch, [bp+6]
- xchg ch,cl
- mov [bp+6],ch
- mov [bp+4],cl
- mov cl, [bp + 8]
- mov ch,[bp + 7]
- sub cl,ch
- mov [temp],cl
- mov cl,[bp + 3]
- add cl,[temp]
- mov [bp+1],cl
- mov ah,9h
- mov dx, bp
- int 21h
- mov ah, 8h
- int 21h
- ret
- name_prog db "This programm swaps S5 and S7, S2 and (S4 + (S9 - S8))$"
- str2 db "Input string (max. 10 elements)", $0d, $0a, "$"
- my_str db 11,0,11 dup('$')
- new_line db $0d, $0A, "$"
- temp db 0h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement