Return multiple values: Difference between revisions
m
→{{header|Z80 Assembly}}
Not a robot (talk | contribs) (Add CLU) |
Puppydrum64 (talk | contribs) |
||
Line 2,969:
=={{header|Z80 Assembly}}==
A function can return multiple values by altering the contents of multiple registers. Code is <code>CALL</code>ed as a subroutine.
In this trivial example, the function returns 0xABCD and 0xFFFF.
<lang z80>foo:
ld hl,&ABCD
|