3 .importzp sp,tmp2,tmp3,tmp1
6 .include "telestrat.inc"
10 ; int open (const char* name, int flags, ...); /* May take a mode argument */
12 ; Throw away any additional parameters passed through the ellipsis
14 dey ; Parm count < 4 shouldn't be needed to be...
15 dey ; ...checked (it generates a c compiler warning)
18 beq parmok ; Branch if parameter count ok
19 jsr addysp ; Fix stack, throw away unused parameters
21 ; Parameters ok. Pop the flags and save them into tmp3
23 parmok: jsr popax ; Get flagss
25 ; 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