; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "6502" .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, "cbm/exec.c", 5170, 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 file, "/data/emu/lynx-python/reference/src/cc65/include/cbm510.h", 6594, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_vic2.h", 10835, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_sid.h", 3626, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6526.h", 3962, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6551.h", 2957, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6525.h", 3410, 1794640055 .dbg sym, "txtptr", "00", extern, "_txtptr" .dbg sym, "basbuf", "00", extern, "_basbuf" .dbg sym, "basbuf_len", "00", extern, "_basbuf_len" .import _open .import _close .export _exec .import _exit .import _utoa .import _strncat .import ___mappederrno .import _getcurrentdevice .import _pokewsys .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, "cbm/exec.c", 80 jsr pushax .dbg line, "cbm/exec.c", 86 jsr _getcurrentdevice sta M0002 .dbg line, "cbm/exec.c", 87 cmp #$08 bcs L0003 cmp #$01 bne L0012 L0003: cmp #$1F lda #$00 sbc #$00 bcs L0012 jmp L0013 .dbg line, "cbm/exec.c", 88 L0012: lda #$09 jsr ___mappederrno jmp incsp4 .dbg line, "cbm/exec.c", 90 L0013: lda M0002 jsr pusha0 lda #<(_basic+34) ldx #>(_basic+34) jsr pushax ldx #$00 lda #$0A jsr _utoa .dbg line, "cbm/exec.c", 93 lda M0002 cmp #$01 beq L0014 .dbg line, "cbm/exec.c", 95 ldy #$05 jsr pushwysp lda #$01 jsr pusha0 ldy #$04 jsr _open sta M0001 stx M0001+1 .dbg line, "cbm/exec.c", 96 cpx #$80 bcc L0008 .dbg line, "cbm/exec.c", 97 ldx #$FF txa jmp incsp4 .dbg line, "cbm/exec.c", 99 L0008: lda M0001 ldx M0001+1 jsr _close .dbg line, "cbm/exec.c", 102 L0014: lda #$00 sta M0003 .dbg line, "cbm/exec.c", 104 L0009: lda #<(_basic+12) ldx #>(_basic+12) clc adc M0003 bcc L000D inx L000D: sta sreg stx sreg+1 ldy #$03 jsr ldaxysp ldy M0003 sta ptr1 stx ptr1+1 lda (ptr1),y ldy #$00 sta (sreg),y cmp #$00 .dbg line, "cbm/exec.c", 105 beq L000A .dbg line, "cbm/exec.c", 107 inc M0003 lda M0003 cmp #$14 bcc L0009 .dbg line, "cbm/exec.c", 108 L000A: ldy M0003 lda #$22 sta _basic+12,y .dbg line, "cbm/exec.c", 124 lda #$8F sta _basbuf .dbg line, "cbm/exec.c", 125 lda #$00 sta _basbuf+1 .dbg line, "cbm/exec.c", 126 tay lda (c_sp),y iny ora (c_sp),y beq L000F .dbg line, "cbm/exec.c", 127 lda #<(_basbuf) ldx #>(_basbuf) jsr pushax ldy #$05 jsr pushwysp lda #<(_basbuf_len+65534) ldx #>(_basbuf_len+65534) jsr _strncat .dbg line, "cbm/exec.c", 132 L000F: lda #<(_txtptr) ldx #>(_txtptr) jsr pushax lda #<(_basic) ldx #>(_basic) jsr _pokewsys .dbg line, "cbm/exec.c", 140 jsr _exit .dbg line, "cbm/exec.c", 141 jmp incsp4 .dbg line .segment "BSS" M0001: .res 2,$00 M0002: .res 1,$00 M0003: .res 1,$00 .endproc