; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "45GS02" .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/ftell.c", 961, 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 _ftell .import ___seterrno .import _lseek ; --------------------------------------------------------------- ; long __near__ __fastcall__ ftell (register struct _FILE *f) ; --------------------------------------------------------------- .segment "CODE" .proc _ftell: near .dbg func, "ftell", "00", static, "_ftell" .dbg sym, "f", "00", register, "regbank", 4 .dbg sym, "pos", "00", auto, -4 .segment "CODE" .dbg line, "common/ftell.c", 24 jsr pushax ldy #$00 ldx #$04 jsr regswap2 .dbg line, "common/ftell.c", 28 jsr decsp4 ldy #$01 lda (regbank+4),y and #$01 bne L0002 .dbg line, "common/ftell.c", 29 lda #$07 jsr ___seterrno .dbg line, "common/ftell.c", 30 lda #$FF sta sreg+1 sta sreg tax jmp L0001 .dbg line, "common/ftell.c", 34 L0002: ldx #$00 lda (regbank+4,x) jsr pusha0 jsr pushl0 jsr _lseek jsr steax0sp .dbg line, "common/ftell.c", 39 jsr ldeax0sp jsr pusheax lda #$00 sta sreg+1 sta sreg lda #$01 ldx #$00 jsr tosgeeax beq L0004 ldy #$01 lda (regbank+4),y and #$08 beq L0004 .dbg line, "common/ftell.c", 40 tya ldx #$00 jsr lsubeq0sp .dbg line, "common/ftell.c", 44 L0004: jsr ldeax0sp .dbg line, "common/ftell.c", 45 L0001: pha ldy #$04 lda (c_sp),y sta regbank+4 iny lda (c_sp),y sta regbank+5 pla jmp incsp6 .dbg line .endproc