Last push for tonight :)

This commit is contained in:
jede
2017-02-02 00:11:11 +01:00
parent 4b77072fed
commit 5abb40b229
3 changed files with 15 additions and 14 deletions

View File

@@ -1,6 +1,8 @@
.export _open
.import addysp,popax
.importzp sp,tmp2,tmp3,tmp1
.export _open
.import addysp,popax
.importzp sp,tmp2,tmp3,tmp1
.include "telestrat.inc"
@@ -15,17 +17,18 @@
dey ; ...checked (it generates a c compiler warning)
dey
dey
beq parmok ; Branch if parameter count ok
jsr addysp ; Fix stack, throw away unused parameters
beq parmok ; Branch if parameter count ok
jsr addysp ; Fix stack, throw away unused parameters
; Parameters ok. Pop the flags and save them into tmp3
parmok: jsr popax ; Get flagss
sta tmp3 ; save flags
parmok:
jsr popax ; Get flagss
sta tmp3 ; save flags
; Get the filename from stack and parse it. Bail out if is not ok
jsr popax ; Get name
ldy tmp3 ; Get flags again
BRK_TELEMON XOPEN ; launch primitive ROM
jsr popax ; Get name
ldy tmp3 ; Get flags again
BRK_TELEMON XOPEN ; launch primitive ROM
rts
.endproc