; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "65SC02" .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/strftime.c", 8063, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/string.h", 5678, 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/time.h", 5354, 1794640055 .dbg sym, "_tz", "00", extern, "__tz" .import _strlen .import _memcpy .import _sprintf .export _strftime .import __tz .segment "RODATA" S0023: .byte $25,$2E,$33,$73,$20,$25,$2E,$33,$73,$25,$33,$64,$20,$25,$30,$32 .byte $64,$3A,$25,$30,$32,$64,$3A,$25,$30,$32,$64,$20,$25,$64,$00 S0016: .byte $25,$30,$34,$64,$2D,$25,$30,$32,$64,$2D,$25,$30,$32,$64,$00 S002A := S0016+0 S0015: .byte $25,$30,$32,$64,$2F,$25,$30,$32,$64,$2F,$25,$30,$32,$64,$00 S001F: .byte $25,$30,$32,$64,$3A,$25,$30,$32,$64,$3A,$25,$30,$32,$64,$00 S0005: .byte $57,$65,$64,$6E,$65,$73,$64,$61,$79,$00 S0011: .byte $53,$65,$70,$74,$65,$6D,$62,$65,$72,$00 S000A: .byte $46,$65,$62,$72,$75,$61,$72,$79,$00 S0008: .byte $53,$61,$74,$75,$72,$64,$61,$79,$00 S0013: .byte $4E,$6F,$76,$65,$6D,$62,$65,$72,$00 S0006: .byte $54,$68,$75,$72,$73,$64,$61,$79,$00 S0014: .byte $44,$65,$63,$65,$6D,$62,$65,$72,$00 S0009: .byte $4A,$61,$6E,$75,$61,$72,$79,$00 S0012: .byte $4F,$63,$74,$6F,$62,$65,$72,$00 S0004: .byte $54,$75,$65,$73,$64,$61,$79,$00 S0010: .byte $41,$75,$67,$75,$73,$74,$00 S0007: .byte $46,$72,$69,$64,$61,$79,$00 S0002: .byte $53,$75,$6E,$64,$61,$79,$00 S0003: .byte $4D,$6F,$6E,$64,$61,$79,$00 S000B: .byte $4D,$61,$72,$63,$68,$00 S000C: .byte $41,$70,$72,$69,$6C,$00 S0018 := S0016+10 S0019 := S0016+10 S002B := S0016+10 S000E: .byte $4A,$75,$6E,$65,$00 S001C := S0016+10 S001D := S0016+10 S001E := S0016+10 S0026 := S0016+10 S0025: .byte $25,$30,$33,$64,$00 S0021: .byte $25,$2E,$33,$73,$00 S0022 := S0021+0 S0017 := S0016+10 S0024 := S0016+10 S000F: .byte $4A,$75,$6C,$79,$00 S000D: .byte $4D,$61,$79,$00 S0020: .byte $25,$34,$64,$00 S0028: .byte $41,$4D,$00 S0029 := S0023+28 S001B: .byte $61,$6D,$00 S001A: .byte $70,$6D,$00 S0027: .byte $50,$4D,$00 ; --------------------------------------------------------------- ; unsigned int __near__ __fastcall__ strftime (char *buf, unsigned int bufsize, const char *format, const struct tm *tm) ; --------------------------------------------------------------- .segment "CODE" .proc _strftime: near .dbg func, "strftime", "00", static, "_strftime" .dbg sym, "buf", "00", auto, 6 .dbg sym, "bufsize", "00", auto, 4 .dbg sym, "format", "00", auto, 2 .dbg sym, "tm", "00", auto, 0 .segment "CODE" .dbg line, "common/strftime.c", 55 jsr pushax .dbg line, "common/strftime.c", 72 stz M0003 stz M0003+1 .dbg line, "common/strftime.c", 74 L0002: lda M0003 ldy #$04 cmp (c_sp),y lda M0003+1 iny sbc (c_sp),y bcc L0005 .dbg line, "common/strftime.c", 76 ldx #$00 txa jmp incsp8 .dbg line, "common/strftime.c", 78 L0005: ldy #$03 jsr ldptr1ysp lda (ptr1) sta M0005 cmp #$00 jsr booleq php ldy #$02 lda #$01 jsr addeqysp plp beq L0006 .dbg line, "common/strftime.c", 80 ldy #$07 jsr ldptr1ysp lda #$00 sta (ptr1) .dbg line, "common/strftime.c", 81 lda M0003 ldx M0003+1 jmp incsp8 .dbg line, "common/strftime.c", 83 L0006: lda M0005 cmp #$25 jne L0007 .dbg line, "common/strftime.c", 85 lda #>(M0006) sta M0007+1 lda #<(M0006) sta M0007 .dbg line, "common/strftime.c", 86 ldy #$03 jsr ldptr1ysp lda (ptr1) pha ldy #$02 ldx #$00 lda #$01 jsr addeqysp pla .dbg line, "common/strftime.c", 203 cmp #$25 jeq L000A cmp #$41 jeq L000B cmp #$42 jeq L000C cmp #$44 jeq L000D cmp #$46 jeq L000F cmp #$48 jeq L0011 cmp #$49 jeq L0012 cmp #$4D jeq L0014 cmp #$50 jeq L0015 cmp #$53 jeq L0019 cmp #$55 jeq L001A cmp #$57 jeq L001B cmp #$58 jeq L001E cmp #$59 jeq L001F cmp #$5A jeq L0020 cmp #$61 jeq L0023 cmp #$62 jeq L0024 cmp #$63 jeq L0025 cmp #$64 jeq L0026 cmp #$6A jeq L0027 cmp #$6D jeq L0029 cmp #$70 jeq L002B cmp #$77 jeq L002F cmp #$78 jeq L0030 cmp #$79 jeq L0032 jmp L0033 .dbg line, "common/strftime.c", 89 L000A: sta M0006 .dbg line, "common/strftime.c", 90 stz M0006+1 .dbg line, "common/strftime.c", 91 jmp L0009 .dbg line, "common/strftime.c", 94 L000B: jsr ldax0sp ldy #$0D jsr ldaxidx jsr aslax1 clc adc #<(M0001) tay txa adc #>(M0001) tax tya jsr ldaxi sta M0007 stx M0007+1 .dbg line, "common/strftime.c", 95 jmp L0009 .dbg line, "common/strftime.c", 98 L000C: jsr ldax0sp ldy #$09 jsr ldaxidx jsr aslax1 clc adc #<(M0002) tay txa adc #>(M0002) tax tya jsr ldaxi sta M0007 stx M0007+1 .dbg line, "common/strftime.c", 99 jmp L0009 .dbg line, "common/strftime.c", 102 L000D: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0015) ldx #>(S0015) jsr pushax ldy #$05 jsr ldaxysp ldy #$09 jsr ldaxidx ina bne L000E inx L000E: jsr pushax .dbg line, "common/strftime.c", 103 ldy #$07 jsr ldaxysp ldy #$07 jsr pushwidx ldy #$09 jsr ldaxysp ldy #$0B jsr pushwidx ldx #$00 lda #$64 jsr tosmoda0 jsr pushax ldy #$0A jsr _sprintf .dbg line, "common/strftime.c", 104 jmp L0009 .dbg line, "common/strftime.c", 108 L000F: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0016) ldx #>(S0016) jsr pushax ldy #$05 jsr ldaxysp ldy #$0B jsr ldaxidx sta ptr1 stx ptr1+1 lda #$6C clc adc ptr1 pha lda #$07 adc ptr1+1 tax pla jsr pushax .dbg line, "common/strftime.c", 109 ldy #$07 jsr ldaxysp ldy #$09 jsr ldaxidx ina bne L0010 inx L0010: jsr pushax ldy #$09 jsr ldaxysp ldy #$07 jsr pushwidx ldy #$0A jsr _sprintf .dbg line, "common/strftime.c", 110 jmp L0009 .dbg line, "common/strftime.c", 113 L0011: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0017) ldx #>(S0017) jsr pushax ldy #$05 jsr ldaxysp ldy #$05 jsr pushwidx ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 114 jmp L0009 .dbg line, "common/strftime.c", 117 L0012: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0018) ldx #>(S0018) jsr pushax ldy #$05 jsr ldaxysp ldy #$05 jsr ldaxidx ldy #$0B jsr incaxy jsr pushax ldx #$00 lda #$0C jsr tosmoda0 ina bne L0013 inx L0013: jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 118 jmp L0009 .dbg line, "common/strftime.c", 121 L0014: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0019) ldx #>(S0019) jsr pushax ldy #$05 jsr ldaxysp ldy #$03 jsr pushwidx ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 122 jmp L0009 .dbg line, "common/strftime.c", 126 L0015: jsr ldax0sp ldy #$05 jsr ldaxidx cmp #$0C txa sbc #$00 bvs L0016 eor #$80 L0016: bpl L0017 lda #<(S001A) ldx #>(S001A) bra L0018 L0017: lda #<(S001B) ldx #>(S001B) L0018: sta M0007 stx M0007+1 .dbg line, "common/strftime.c", 127 jmp L0009 .dbg line, "common/strftime.c", 130 L0019: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S001C) ldx #>(S001C) jsr pushax ldy #$05 jsr ldaxysp jsr pushw ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 131 jmp L0009 .dbg line, "common/strftime.c", 134 L001A: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S001D) ldx #>(S001D) jsr pushax ldy #$05 jsr ldaxysp ldy #$0F jsr ldaxidx jsr incax7 jsr pushax ldy #$07 jsr ldaxysp ldy #$0D jsr ldaxidx jsr tossubax jsr pushax lda #$07 jsr tosdiva0 jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 135 jmp L0009 .dbg line, "common/strftime.c", 138 L001B: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S001E) ldx #>(S001E) jsr pushax .dbg line, "common/strftime.c", 139 ldy #$05 jsr ldaxysp ldy #$0F jsr ldaxidx jsr incax7 jsr pushax ldy #$07 jsr ldaxysp ldy #$0C sta ptr1 stx ptr1+1 lda (ptr1),y iny ora (ptr1),y beq L001C ldy #$07 jsr ldaxysp ldy #$0D jsr ldaxidx jsr decax1 bra L001D L001C: tax lda #$06 L001D: jsr tossubax jsr pushax lda #$07 jsr tosdiva0 jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 140 jmp L0009 .dbg line, "common/strftime.c", 143 L001E: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S001F) ldx #>(S001F) jsr pushax ldy #$05 jsr ldaxysp ldy #$05 jsr pushwidx .dbg line, "common/strftime.c", 144 ldy #$07 jsr ldaxysp ldy #$03 jsr pushwidx ldy #$09 jsr ldaxysp jsr pushw ldy #$0A jsr _sprintf .dbg line, "common/strftime.c", 145 jmp L0009 .dbg line, "common/strftime.c", 148 L001F: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0020) ldx #>(S0020) jsr pushax ldy #$05 jsr ldaxysp ldy #$0B jsr ldaxidx sta ptr1 stx ptr1+1 lda #$6C clc adc ptr1 pha lda #$07 adc ptr1+1 tax pla jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 149 jmp L0009 .dbg line, "common/strftime.c", 152 L0020: jsr ldax0sp ldy #$10 sta ptr1 stx ptr1+1 lda (ptr1),y iny ora (ptr1),y beq L0021 lda #<(__tz+10) ldx #>(__tz+10) bra L0022 L0021: lda #<(__tz+5) ldx #>(__tz+5) L0022: sta M0007 stx M0007+1 .dbg line, "common/strftime.c", 153 jmp L0009 .dbg line, "common/strftime.c", 156 L0023: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0021) ldx #>(S0021) jsr pushax ldy #$05 jsr ldaxysp ldy #$0D jsr ldaxidx jsr aslax1 clc adc #<(M0001) tay txa adc #>(M0001) tax tya jsr pushw ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 157 jmp L0009 .dbg line, "common/strftime.c", 160 L0024: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0022) ldx #>(S0022) jsr pushax ldy #$05 jsr ldaxysp ldy #$09 jsr ldaxidx jsr aslax1 clc adc #<(M0002) tay txa adc #>(M0002) tax tya jsr pushw ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 161 jmp L0009 .dbg line, "common/strftime.c", 164 L0025: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0023) ldx #>(S0023) jsr pushax .dbg line, "common/strftime.c", 165 ldy #$05 jsr ldaxysp ldy #$0D jsr ldaxidx jsr aslax1 clc adc #<(M0001) tay txa adc #>(M0001) tax tya jsr pushw ldy #$07 jsr ldaxysp ldy #$09 jsr ldaxidx jsr aslax1 clc adc #<(M0002) tay txa adc #>(M0002) tax tya jsr pushw .dbg line, "common/strftime.c", 166 ldy #$09 jsr ldaxysp ldy #$07 jsr pushwidx ldy #$0B jsr ldaxysp ldy #$05 jsr pushwidx ldy #$0D jsr ldaxysp ldy #$03 jsr pushwidx .dbg line, "common/strftime.c", 167 ldy #$0F jsr ldaxysp jsr pushw ldy #$11 jsr ldaxysp ldy #$0B jsr ldaxidx sta ptr1 stx ptr1+1 lda #$6C clc adc ptr1 pha lda #$07 adc ptr1+1 tax pla jsr pushax ldy #$12 jsr _sprintf .dbg line, "common/strftime.c", 168 jmp L0009 .dbg line, "common/strftime.c", 171 L0026: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0024) ldx #>(S0024) jsr pushax ldy #$05 jsr ldaxysp ldy #$07 jsr pushwidx ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 172 jmp L0009 .dbg line, "common/strftime.c", 175 L0027: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0025) ldx #>(S0025) jsr pushax ldy #$05 jsr ldaxysp ldy #$0F jsr ldaxidx ina bne L0028 inx L0028: jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 176 jmp L0009 .dbg line, "common/strftime.c", 179 L0029: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0026) ldx #>(S0026) jsr pushax ldy #$05 jsr ldaxysp ldy #$09 jsr ldaxidx ina bne L002A inx L002A: jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 180 jmp L0009 .dbg line, "common/strftime.c", 183 L002B: jsr ldax0sp ldy #$05 jsr ldaxidx cmp #$0C txa sbc #$00 bvs L002C eor #$80 L002C: bpl L002D lda #<(S0027) ldx #>(S0027) bra L002E L002D: lda #<(S0028) ldx #>(S0028) L002E: sta M0007 stx M0007+1 .dbg line, "common/strftime.c", 184 jmp L0009 .dbg line, "common/strftime.c", 187 L002F: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S0029) ldx #>(S0029) jsr pushax ldy #$05 jsr ldaxysp ldy #$0D jsr pushwidx ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 188 bra L0009 .dbg line, "common/strftime.c", 191 L0030: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S002A) ldx #>(S002A) jsr pushax ldy #$05 jsr ldaxysp ldy #$0B jsr ldaxidx sta ptr1 stx ptr1+1 lda #$6C clc adc ptr1 pha lda #$07 adc ptr1+1 tax pla jsr pushax .dbg line, "common/strftime.c", 192 ldy #$07 jsr ldaxysp ldy #$09 jsr ldaxidx ina bne L0031 inx L0031: jsr pushax ldy #$09 jsr ldaxysp ldy #$07 jsr pushwidx ldy #$0A jsr _sprintf .dbg line, "common/strftime.c", 193 bra L0009 .dbg line, "common/strftime.c", 196 L0032: lda #<(M0006) ldx #>(M0006) jsr pushax lda #<(S002B) ldx #>(S002B) jsr pushax ldy #$05 jsr ldaxysp ldy #$0B jsr pushwidx ldx #$00 lda #$64 jsr tosmoda0 jsr pushax ldy #$06 jsr _sprintf .dbg line, "common/strftime.c", 197 bra L0009 .dbg line, "common/strftime.c", 201 L0033: stz M0006 .dbg line, "common/strftime.c", 206 L0009: lda M0007 ldx M0007+1 jsr _strlen sta M0004 stx M0004+1 .dbg line, "common/strftime.c", 207 clc adc M0003 sta M0003 txa adc M0003+1 sta M0003+1 .dbg line, "common/strftime.c", 208 lda M0003 ldy #$04 cmp (c_sp),y lda M0003+1 iny sbc (c_sp),y jcs L0002 .dbg line, "common/strftime.c", 209 ldy #$09 jsr pushwysp lda M0007 ldx M0007+1 jsr pushax lda M0004 ldx M0004+1 jsr _memcpy .dbg line, "common/strftime.c", 210 lda M0004 ldx M0004+1 ldy #$06 jsr addeqysp .dbg line, "common/strftime.c", 213 jmp L0002 .dbg line, "common/strftime.c", 216 L0007: ldy #$07 jsr ldptr1ysp lda M0005 sta (ptr1) ldy #$06 ldx #$00 lda #$01 jsr addeqysp .dbg line, "common/strftime.c", 217 inc M0003 jne L0002 inc M0003+1 .dbg line, "common/strftime.c", 73 jmp L0002 .dbg line .segment "RODATA" M0001: .addr S0002 .addr S0003 .addr S0004 .addr S0005 .addr S0006 .addr S0007 .addr S0008 M0002: .addr S0009 .addr S000A .addr S000B .addr S000C .addr S000D .addr S000E .addr S000F .addr S0010 .addr S0011 .addr S0012 .addr S0013 .addr S0014 .segment "BSS" M0003: .res 2,$00 M0004: .res 2,$00 M0005: .res 1,$00 M0006: .res 40,$00 M0007: .res 2,$00 .endproc