Skip to content

Instantly share code, notes, and snippets.

@abrarShariar
Created February 6, 2016 10:33
Show Gist options
  • Save abrarShariar/04b0e0f338fb7bbade1a to your computer and use it in GitHub Desktop.
Save abrarShariar/04b0e0f338fb7bbade1a to your computer and use it in GitHub Desktop.
Simple char swap between two registers
;swap between two register
.model small
.stack 100h
.data
.code
main proc
mov cl,'X'
mov ch,'Y'
xchg cl,ch ;swap
mov ah,02
mov dl,cl ;'X'
int 21h
mov dl,ch
int 21h ;'Y'
main endp
end main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment