5 lines
316 B
Z80 Assembly
5 lines
316 B
Z80 Assembly
;16-bit swap:
|
|
ld hl,(&C000) ;load the byte at &C000 into L and the byte at &C001 into H.
|
|
ld de,(&D000) ;load the byte at &D000 into E and the byte at &D001 into D.
|
|
ld (&D000),hl ;store the contents of L into &D000 and H into &D001.
|
|
ld (&C000),de ;store the contents of E into &C000 and D into &C001.
|