; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "4510" .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, "common/fseek.c", 1416, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stdio.h", 6999, 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/unistd.h", 4340, 1794640055 .dbg file, "common/_file.h", 786, 1794640055 .export _fseek .import ___seterrno .import _lseek ; --------------------------------------------------------------- ; int __near__ __fastcall__ fseek (register struct _FILE *f, long offset, int whence) ; --------------------------------------------------------------- .segment "CODE" .proc _fseek: near .dbg func, "fseek", "00", static, "_fseek" .dbg sym, "f", "00", register, "regbank", 4 .dbg sym, "offset", "00", auto, 2 .dbg sym, "whence", "00", auto, 0 .dbg sym, "res", "00", auto, -4 .segment "CODE" .dbg line, "common/fseek.c", 24 jsr pushax ldy #$06 ldx #$04 jsr regswap2 .dbg line, "common/fseek.c", 28 jsr decsp4 ldy #$01 lda (regbank+4),y and #$01 bne L000D .dbg line, "common/fseek.c", 29 lda #$07 jsr ___seterrno .dbg line, "common/fseek.c", 30 jmp L0011 .dbg line, "common/fseek.c", 36 L000D: lda (regbank+4),y and #$08 beq L0004 ldy #$04 lda (c_sp),y iny ora (c_sp),y bne L0004 .dbg line, "common/fseek.c", 37 sta sreg+1 sta sreg lda #$01 ldx #$00 iny jsr lsubeqysp .dbg line, "common/fseek.c", 41 L0004: ldx #$00 lda (regbank+4,x) jsr pusha0 ldy #$0B jsr ldeaxysp jsr pusheax ldy #$0B jsr ldaxysp jsr _lseek jsr steax0sp .dbg line, "common/fseek.c", 49 jsr ldeax0sp lda sreg+1 bmi L0009 .dbg line, "common/fseek.c", 50 ldy #$01 lda (regbank+4),y and #$F5 sta (regbank+4),y .dbg line, "common/fseek.c", 51 ldx #$00 jmp L0012 .dbg line, "common/fseek.c", 53 L0009: ldy #$01 lda (regbank+4),y ora #$04 sta (regbank+4),y .dbg line, "common/fseek.c", 54 L0011: ldx #$FF L0012: txa .dbg line, "common/fseek.c", 56 pha ldy #$0A lda (c_sp),y sta regbank+4 iny lda (c_sp),y sta regbank+5 pla iny jmp addysp .dbg line .endproc