RosettaCodeData/Task/Call-a-function/Z80-Assembly/call-a-function-1.z80

12 lines
167 B
Z80 Assembly
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
PackNibbles:
;input: B = top nibble, C = bottom nibble. Outputs to accumulator.
;usage: B = &0X, C = &0Y, => A = &XY
LD A,B
AND %00001111
RLCA
RLCA
RLCA
RLCA
OR C
RET