; ; 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, "puts.c", 636, 1068141847 .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 .import _stdout .export _puts .import _strlen .import _write ; --------------------------------------------------------------- ; int __fastcall__ puts (const unsigned char*) ; --------------------------------------------------------------- .segment "CODE" .proc _puts .segment "DATA" L0004: .byte $0D .segment "CODE" ; ; { ; .dbg line, "puts.c", 23 jsr pushax ; ; if (write (stdout->f_fd, s, strlen (s)) < 0 || ; .dbg line, "puts.c", 27 jsr decsp4 lda _stdout ldx _stdout+1 ldy #$00 sta ptr1 stx ptr1+1 ldx #$00 lda (ptr1),y ldy #$02 sta (sp),y iny txa sta (sp),y ldy #$05 jsr ldaxysp ldy #$00 sta (sp),y iny txa sta (sp),y ldy #$05 jsr ldaxysp jsr _strlen jsr _write txa bmi L0007 ; ; write (stdout->f_fd, &nl, 1) < 0) { ; .dbg line, "puts.c", 28 jsr decsp4 lda _stdout ldx _stdout+1 ldy #$00 sta ptr1 stx ptr1+1 ldx #$00 lda (ptr1),y ldy #$02 sta (sp),y iny txa sta (sp),y lda #<(L0004) ldx #>(L0004) ldy #$00 sta (sp),y iny txa sta (sp),y ldx #$00 tya jsr _write txa bpl L0006 ; ; stdout->f_flags |= _FERROR; ; .dbg line, "puts.c", 29 L0007: lda _stdout ldx _stdout+1 sta ptr1 stx ptr1+1 ldy #$01 lda (ptr1),y ora #$04 sta (ptr1),y ; ; return -1; ; .dbg line, "puts.c", 30 ldx #$FF txa jmp incsp2 ; ; return 0; ; .dbg line, "puts.c", 34 L0006: ldx #$00 txa ; ; } ; .dbg line, "puts.c", 35 jmp incsp2 .dbg line .endproc