; ; 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/seekdir.c", 1222, 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/errno.h", 5854, 1794640055 .dbg file, "cbm/dir.h", 1417, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/dirent.h", 4989, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/target.h", 3090, 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/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 file, "/data/emu/lynx-python/reference/src/cc65/include/cbm_filetype.h", 4949, 1794640055 .dbg sym, "__errno", "00", extern, "___errno" .import _open .import _close .import ___errno .export _seekdir .import __dirread ; --------------------------------------------------------------- ; void __near__ __fastcall__ seekdir (register struct DIR *dir, long offs) ; --------------------------------------------------------------- .segment "CODE" .proc _seekdir: near .dbg func, "seekdir", "00", static, "_seekdir" .dbg sym, "dir", "00", register, "regbank", 4 .dbg sym, "offs", "00", auto, 0 .dbg sym, "o", "00", auto, -2 .dbg sym, "count", "00", auto, -3 .dbg sym, "buf", "00", auto, -131 .segment "CODE" .dbg line, "cbm/seekdir.c", 14 jsr pusheax ldy #$04 ldx #$04 jsr regswap2 .dbg line, "cbm/seekdir.c", 22 ldy #$83 jsr subysp ldy #$86 jsr ldeaxysp cmp #$01 txa sbc #$10 lda sreg sbc #$00 lda sreg+1 sbc #$00 bcc L0002 .dbg line, "cbm/seekdir.c", 23 ldx #$00 lda #$07 sta ___errno stx ___errno+1 .dbg line, "cbm/seekdir.c", 24 jmp L0005 .dbg line, "cbm/seekdir.c", 28 L0002: ldy #$01 lda (regbank+4),y tax dey lda (regbank+4),y jsr _close .dbg line, "cbm/seekdir.c", 31 lda regbank+4 ldx regbank+4+1 jsr pushax lda regbank+4 ldx regbank+4+1 jsr incax4 jsr pushax lda #$01 jsr pusha0 ldy #$04 jsr _open ldy #$00 jsr staxspidx .dbg line, "cbm/seekdir.c", 32 iny lda (regbank+4),y tax cpx #$80 .dbg line, "cbm/seekdir.c", 34 bcs L0005 .dbg line, "cbm/seekdir.c", 38 lda regbank+4 ldx regbank+4+1 jsr pushax ldy #$86 jsr ldaxysp ldy #$02 jsr staxspidx ldy #$81 jsr staxysp .dbg line, "cbm/seekdir.c", 39 jmp L0009 .dbg line, "cbm/seekdir.c", 42 L0004: ldy #$82 jsr ldaxysp cmp #$81 txa sbc #$00 bcc L0007 .dbg line, "cbm/seekdir.c", 43 lda #$80 tay sta (c_sp),y .dbg line, "cbm/seekdir.c", 44 ldx #$00 iny jsr subeqysp .dbg line, "cbm/seekdir.c", 45 jmp L0008 .dbg line, "cbm/seekdir.c", 46 L0007: ldy #$81 lda (c_sp),y dey sta (c_sp),y .dbg line, "cbm/seekdir.c", 47 ldx #$00 txa iny jsr staxysp .dbg line, "cbm/seekdir.c", 51 L0008: lda regbank+4 ldx regbank+4+1 jsr pushax lda #$02 jsr leaa0sp jsr pushax ldy #$84 lda (c_sp),y jsr __dirread tax .dbg line, "cbm/seekdir.c", 52 beq L0005 .dbg line, "cbm/seekdir.c", 39 L0009: ldy #$82 lda (c_sp),y dey ora (c_sp),y bne L0004 .dbg line, "cbm/seekdir.c", 55 L0005: ldy #$87 lda (c_sp),y sta regbank+4 iny lda (c_sp),y sta regbank+5 iny jmp addysp .dbg line .endproc