1 ; NASM macro set to make interfacing to 16-bit programs easier -*- nasm -*-
\r
3 %imacro proc 1 ; begin a procedure definition
\r
8 %ifdef FARCODE PASCAL ; arguments may start at bp+4 or bp+6
\r
10 %define %$firstarg 6
\r
13 %define %$firstarg 4
\r
15 %define %$procname %1
\r
18 %imacro arg 0-1 2 ; used with the argument name as a label
\r
20 ; we could possibly be adding some
\r
21 ; debug information at this point...?
\r
22 %assign %$arg %1+%$arg
\r
27 %error Mismatched `endproc'/`proc'
\r
32 retf %$arg - %$firstarg
\r
38 __end_%$procname: ; useful for calculating function size
\r