RosettaCodeData/Task/Metaprogramming/Z80-Assembly/metaprogramming-1.z80

8 lines
126 B
Z80 Assembly

macro xchg,regpair1,regpair2
;swaps the contents of two registers.
push regpair1
push regpair2
pop regpair1
pop regpair2
endm