swapping 2 registers in 8086 assembly language(16 bits) -



swapping 2 registers in 8086 assembly language(16 bits) -

does know how swap values of 2 registers without using variable, register, stack, or other storage location? thanks!

like swapping ax, bx.

you can using mathematical operation. can give idea. hope helps!

i have followed c code:

int i=10; j=20 i=i+j; j=i-j; i=i-j; mov ax,10 mov bx,20 add together ax,bx //mov command re-create info accumulator ax, forgot statement, ax=30 sub bx,ax //accumulator vil b 10 //mov command re-create info accumulator bx, forgot statement sub ax,bx //accumulator vil b 20 //mov command re-create info accumulator ax, forgot statement

assembly cpu-registers 8086 16-bit

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -