ARG

Function

ARG Is used for passing parameters to machine code subroutines.

Syntax

D=ARG(N)

Where D is a Dummy Variable
N is the number to be passed

Examples

P=ARG(10)

Passes 10

P=ARG(V)

Passes V

Remarks

ARG loads the Z80 E and C registers. They are loaded with the higher and lower byte portions of a 16 bit representation of the ARG argument.

For example if V in the example above was 4100 then;

E=16 C=4

Note

16x256+4 = 4100

This function is useful when making CP/M system calls to set the C register before a call to location 5. See Machine Code Calls.