; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "W65C02" .smart on .autoimport on .case on .debuginfo on .importzp c_sp, sreg, regsave, regbank .importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4 .macpack longbranch .dbg file, "rp6502/open.c", 379, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/rp6502.h", 11946, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6522.h", 3781, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/errno.h", 5854, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/string.h", 5678, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/fcntl.h", 3550, 1794640055 .dbg sym, "__errno", "00", extern, "___errno" .import _ria_set_ax .import _ria_call_int .import ___errno .import _strlen .export _open ; --------------------------------------------------------------- ; int __near__ open (const char *name, int flags, ...) ; --------------------------------------------------------------- .segment "CODE" .proc _open: near .dbg func, "open", "00", static, "_open" .dbg sym, "name", "00", auto, 3 .dbg sym, "flags", "00", auto, 1 .dbg sym, "__argsize__", "00", auto, 0 .dbg sym, "namelen", "00", auto, -2 .segment "CODE" .dbg line, "rp6502/open.c", 7 jsr enter .dbg line, "rp6502/open.c", 8 lda (c_sp) jsr leaa0sp jsr decax1 jsr ldaxi jsr _strlen jsr pushax .dbg line, "rp6502/open.c", 9 jsr ldax0sp cpx #$00 beq L0005 .dbg line, "rp6502/open.c", 10 lda #$07 sta ___errno stz ___errno+1 .dbg line, "rp6502/open.c", 11 ldx #$FF txa bra L0001 .dbg line, "rp6502/open.c", 14 L0003: ldy #$02 lda (c_sp),y jsr leaa0sp ina bne L0006 inx L0006: jsr ldaxi sta ptr1 stx ptr1+1 ldx #$00 lda #$01 jsr subeq0sp clc adc ptr1 sta ptr1 txa adc ptr1+1 sta ptr1+1 lda (ptr1) sta $FFEC .dbg line, "rp6502/open.c", 13 L0005: ldy #$01 lda (c_sp),y ora (c_sp) bne L0003 .dbg line, "rp6502/open.c", 16 iny lda (c_sp),y jsr leaa0sp jsr decax1 jsr ldaxi jsr _ria_set_ax .dbg line, "rp6502/open.c", 17 lda #$14 jsr _ria_call_int .dbg line, "rp6502/open.c", 18 L0001: ldy #$02 jmp leavey .dbg line .endproc