; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "W65C02" .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, "rp6502/read.c", 507, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/rp6502.h", 11946, 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/unistd.h", 4340, 1794640055 .import _read_xstack .export _read ; --------------------------------------------------------------- ; int __near__ __fastcall__ read (int fildes, void *buf, unsigned int count) ; --------------------------------------------------------------- .segment "CODE" .proc _read: near .dbg func, "read", "00", static, "_read" .dbg sym, "fildes", "00", auto, 4 .dbg sym, "buf", "00", auto, 2 .dbg sym, "count", "00", auto, 0 .dbg sym, "total", "00", auto, -2 .segment "CODE" .dbg line, "rp6502/read.c", 5 jsr pushax .dbg line, "rp6502/read.c", 6 jsr push0 .dbg line, "rp6502/read.c", 7 bra L0004 .dbg line, "rp6502/read.c", 8 L0002: ldy #$03 jsr ldaxysp cmp #$01 txa sbc #$02 bcc L0005 ldx #$02 lda #$00 bra L0006 L0005: ldy #$03 jsr ldaxysp L0006: jsr pushax .dbg line, "rp6502/read.c", 9 ldy #$03 jsr ldaxysp clc ldy #$06 adc (c_sp),y pha txa iny adc (c_sp),y tax pla jsr pushax ldy #$05 jsr pushwysp ldy #$0D jsr ldaxysp jsr _read_xstack jsr pushax .dbg line, "rp6502/read.c", 10 jsr ldax0sp cpx #$80 bcc L0007 .dbg line, "rp6502/read.c", 11 jsr ldax0sp ldy #$0C jmp addysp .dbg line, "rp6502/read.c", 13 L0007: jsr ldax0sp ldy #$04 jsr addeqysp .dbg line, "rp6502/read.c", 14 jsr ldax0sp ldy #$06 jsr subeqysp .dbg line, "rp6502/read.c", 15 jsr ldax0sp ldy #$02 cmp (c_sp),y txa iny sbc (c_sp),y bcs L0008 .dbg line, "rp6502/read.c", 16 jsr incsp4 bra L0003 .dbg line, "rp6502/read.c", 18 L0008: jsr incsp4 .dbg line, "rp6502/read.c", 7 L0004: ldy #$03 lda (c_sp),y dey ora (c_sp),y bne L0002 .dbg line, "rp6502/read.c", 19 L0003: jsr ldax0sp .dbg line, "rp6502/read.c", 20 jmp incsp8 .dbg line .endproc