; ; File generated by cc65 v 2.11.0 ; .fopt compiler,"cc65 v 2.11.0" .setcpu "6502" .smart on .autoimport on .case on .debuginfo on .importzp sp, sreg, regsave, regbank, tmp1, ptr1, ptr2 .macpack longbranch .dbg file, "fputs.c", 468, 1055441303 .dbg file, "../../include/stdio.h", 5945, 1113916546 .dbg file, "../../include/stddef.h", 2974, 1061022172 .dbg file, "../../include/stdarg.h", 2817, 1102777145 .dbg file, "../../include/string.h", 4676, 1116364269 .dbg file, "../../include/unistd.h", 3912, 1061022172 .dbg file, "./_file.h", 742, 1084367783 .export _fputs .import _strlen .import _write ; --------------------------------------------------------------- ; int __fastcall__ fputs (const unsigned char*, struct _FILE*) ; --------------------------------------------------------------- .segment "CODE" .proc _fputs .segment "CODE" ; ; { ; .dbg line, "fputs.c", 17 jsr pushax ; ; if ((f->f_flags & _FOPEN) == 0 || (f->f_flags & (_FERROR | _FEOF)) != 0) { ; .dbg line, "fputs.c", 19 ldy #$01 jsr ldaxysp ldy #$01 sta ptr1 stx ptr1+1 lda (ptr1),y and #$01 beq L0005 jsr ldaxysp ldy #$01 sta ptr1 stx ptr1+1 lda (ptr1),y and #$06 beq L0004 ; ; return EOF; ; .dbg line, "fputs.c", 20 L0005: ldx #$FF txa jmp incsp4 ; ; return write (f->f_fd, s, strlen (s)); ; .dbg line, "fputs.c", 24 L0004: jsr decsp4 ldy #$05 jsr ldaxysp ldy #$00 sta ptr1 stx ptr1+1 ldx #$00 lda (ptr1),y ldy #$02 sta (sp),y iny txa sta (sp),y ldy #$07 jsr ldaxysp ldy #$00 sta (sp),y iny txa sta (sp),y ldy #$07 jsr ldaxysp jsr _strlen jsr _write ; ; } ; .dbg line, "fputs.c", 25 jmp incsp4 .dbg line .endproc