8 lines
252 B
Z80 Assembly
8 lines
252 B
Z80 Assembly
;8-bit swap using the stack.
|
|
|
|
ld a,(&C000)
|
|
push af
|
|
ld a,(&D000)
|
|
ld (&C000),a ;store the byte at &D000 into &C000
|
|
pop af ;now a = the byte at &C000
|
|
ld (&D000),a ;now the byte at &D000 equals the byte that was originally at &C000
|