; ; 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, "pet/cbm_load.c", 1759, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/cbm.h", 12033, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stddef.h", 3037, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/pet.h", 4647, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_pia.h", 3044, 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/_6545.h", 2832, 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/cbm_filetype.h", 4949, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/limits.h", 3735, 1794640055 .import _cbm_k_readst .export _cbm_load .import _cbm_open .import _cbm_close .import _cbm_read ; --------------------------------------------------------------- ; unsigned int __near__ __fastcall__ cbm_load (const char *name, unsigned char device, void *data) ; --------------------------------------------------------------- .segment "CODE" .proc _cbm_load: near .dbg func, "cbm_load", "00", static, "_cbm_load" .dbg sym, "name", "00", auto, 3 .dbg sym, "device", "00", auto, 2 .dbg sym, "data", "00", auto, 0 .dbg sym, "load", "00", auto, -2 .dbg sym, "length", "00", auto, -4 .dbg sym, "size", "00", auto, -6 .segment "CODE" .dbg line, "pet/cbm_load.c", 19 jsr pushax .dbg line, "pet/cbm_load.c", 22 jsr decsp4 jsr push0 .dbg line, "pet/cbm_load.c", 24 lda #$01 jsr pusha ldy #$09 lda (c_sp),y jsr pusha lda #$00 jsr pusha ldy #$0D jsr ldaxysp jsr _cbm_open cmp #$00 beq L0002 .dbg line, "pet/cbm_load.c", 26 ldx #$00 txa jmp L0001 .dbg line, "pet/cbm_load.c", 30 L0002: lda #$01 jsr pusha lda #$05 jsr leaa0sp jsr pushax ldx #$00 lda #$02 jsr _cbm_read cpx #$00 bne L0013 cmp #$02 beq L0003 .dbg line, "pet/cbm_load.c", 34 L0013: lda #$01 jsr _cbm_close .dbg line, "pet/cbm_load.c", 35 ldx #$00 txa jmp L0001 .dbg line, "pet/cbm_load.c", 39 L0003: ldy #$06 lda (c_sp),y iny ora (c_sp),y bne L0005 .dbg line, "pet/cbm_load.c", 40 ldy #$05 jsr ldaxysp ldy #$06 jsr staxysp .dbg line, "pet/cbm_load.c", 48 L0005: lda #$01 jsr pusha ldy #$0A jsr pushwysp ldx #$7F lda #$FF jsr _cbm_read ldy #$02 jsr staxysp jsr addeq0sp .dbg line, "pet/cbm_load.c", 49 ldy #$03 jsr ldaxysp clc ldy #$06 adc (c_sp),y pha txa iny adc (c_sp),y tax pla dey jsr staxysp .dbg line, "pet/cbm_load.c", 50 ldy #$03 lda (c_sp),y cmp #$7F bne L0012 dey lda (c_sp),y cmp #$FF bne L0012 jsr _cbm_k_readst cmp #$00 beq L0005 .dbg line, "pet/cbm_load.c", 51 L0012: lda #$01 jsr _cbm_close .dbg line, "pet/cbm_load.c", 54 ldy #$03 jsr ldaxysp cpx #$80 bcc L000E .dbg line, "pet/cbm_load.c", 55 ldx #$00 txa jsr stax0sp .dbg line, "pet/cbm_load.c", 58 L000E: jsr ldax0sp .dbg line, "pet/cbm_load.c", 59 L0001: ldy #$0B jmp addysp .dbg line .endproc