...random thoughts...


Inline ASM:

The directives #asm / #endasm surround code that is sent directly to
the assember output file, without any processing.

Note that an easy way to get the values of variables into #asm is to depend
on the register convention that says that HL contains the resulting value of
every statement.

Also note that C identifiers do not exactly match those used in CP/M ASM.
In general, underscore (C) is translated to '?' (ASM) and (of course) upper/lower
case are equivalent. But, consult your ASM guide.



Calling conventions:

The stack, on entry to a function, is as follows:

e.g. function(arg1, ... argN-1, argN);

+-------------+
| return addr |
+-------------+
| arg N       |
+-------------+
| arg N-1     |
+-------------+
| arg ...     |
+-------------+
| arg 1       |
+-------------+
| unknown     |
+-------------+




Register conventions:

HL is the "return value" of functions, and statements. This means the statement:

	x;

would leave the value of 'x' in the HL register. So, an #asm block immediately
following such a statement could use the value in HL as the value of 'x'.
