; ; 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, "cx16/exec.c", 4718, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/fcntl.h", 3550, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/unistd.h", 4340, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stdlib.h", 6948, 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/errno.h", 5854, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/device.h", 3212, 1794640055 .dbg sym, "vartab", "00", extern, "_vartab" .dbg sym, "memsize", "00", extern, "_memsize" .dbg sym, "txtptr", "00", extern, "_txtptr" .dbg sym, "basbuf", "00", extern, "_basbuf" .dbg sym, "basbuf_len", "00", extern, "_basbuf_len" .export _exec .import _exit .import _utoa .import _strncat .import ___mappederrno .import _getcurrentdevice .import _vartab .import _memsize .importzp _txtptr .import _basbuf .importzp _basbuf_len .segment "DATA" .segment "LOWCODE" _basic: .byte $00 .addr _basic+37 .word $0000 .byte $9C .byte $3A .byte $93 .byte $22,$22 .byte $AA .byte $22 .byte $22,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 .byte $20,$20,$20,$20,$20 .byte $2C .byte $30,$31,$00 .segment "DATA" ; --------------------------------------------------------------- ; int __near__ __fastcall__ exec (const char *progname, const char *cmdline) ; --------------------------------------------------------------- .segment "CODE" .proc _exec: near .dbg func, "exec", "00", static, "_exec" .dbg sym, "progname", "00", auto, 2 .dbg sym, "cmdline", "00", auto, 0 .segment "CODE" .dbg line, "cx16/exec.c", 73 jsr pushax .dbg line, "cx16/exec.c", 81 jsr _getcurrentdevice sta M0001 .dbg line, "cx16/exec.c", 82 cmp #$08 bcc L000E cmp #$1F bcs L000E bra L000F .dbg line, "cx16/exec.c", 83 L000E: lda #$09 jsr ___mappederrno jmp incsp4 .dbg line, "cx16/exec.c", 85 L000F: lda M0001 jsr pusha0 lda #<(_basic+34) ldx #>(_basic+34) jsr pushax ldx #$00 lda #$0A jsr _utoa .dbg line, "cx16/exec.c", 97 stz M0002 .dbg line, "cx16/exec.c", 99 L0005: lda #<(_basic+12) ldx #>(_basic+12) clc adc M0002 bcc L0009 inx L0009: sta sreg stx sreg+1 ldy #$03 jsr ldaxysp ldy M0002 sta ptr1 stx ptr1+1 lda (ptr1),y sta (sreg) cmp #$00 .dbg line, "cx16/exec.c", 100 beq L0006 .dbg line, "cx16/exec.c", 102 inc M0002 lda M0002 cmp #$14 bcc L0005 .dbg line, "cx16/exec.c", 103 L0006: ldy M0002 lda #$22 sta _basic+12,y .dbg line, "cx16/exec.c", 111 lda _memsize sec sta _vartab lda _memsize+1 sbc #$01 sta _vartab+1 .dbg line, "cx16/exec.c", 114 lda #$8F sta _basbuf .dbg line, "cx16/exec.c", 115 stz _basbuf+1 .dbg line, "cx16/exec.c", 116 lda (c_sp) ldy #$01 ora (c_sp),y beq L000B .dbg line, "cx16/exec.c", 117 lda #<(_basbuf) ldx #>(_basbuf) jsr pushax ldy #$05 jsr pushwysp lda #<(_basbuf_len+65534) ldx #>(_basbuf_len+65534) jsr _strncat .dbg line, "cx16/exec.c", 121 L000B: lda #<(_basic) ldx #>(_basic) sta _txtptr stx _txtptr+1 .dbg line, "cx16/exec.c", 126 jsr _exit .dbg line, "cx16/exec.c", 127 jmp incsp4 .dbg line .segment "BSS" M0001: .res 1,$00 M0002: .res 1,$00 .endproc