3 .importzp sp,tmp2,tmp3,tmp1
5 ; int open (const char* name, int flags, ...); /* May take a mode argument */
6 .include "telemon30.inc"
11 ; Throw away any additional parameters passed through the ellipsis
13 dey ; Parm count < 4 shouldn't be needed to be...
14 dey ; ...checked (it generates a c compiler warning)
17 beq parmok ; Branch if parameter count ok
18 jsr addysp ; Fix stack, throw away unused parameters
20 ; Parameters ok. Pop the flags and save them into tmp3
22 parmok: jsr popax ; Get flagss
24 ; Get the filename from stack and parse it. Bail out if is not ok
27 ldy tmp3 ; Get flags again
28 BRK_TELEMON XOPEN ; launch primitive ROM