Swap two number in 8085 Microprocessor without using temporary variable -


is there procedure swap 2 numbers in microprocessor 8085 out using temporary register ? know same problem in c programming can done following manner

a=a+b; b=a-b; a=a-b; 

here 1st , last lines executable 2nd line cannot implemented in 8085 mp result stored in accumulator. there other possibility so?

wikipedia says there xchg instruction:

the xchg operation exchanges values of hl , de.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -