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