;;;----------------------------------------- ;;; Start MC68HC11 gcc assembly output ;;; gcc compiler 3.0.4 m68hc1x-20020203 ;;; Command: /Work/r1.2/usr/lib/gcc-lib/m6811-elf/3.0.4/cc1 -lang-c -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -Dmc68hc1x -D__mc68hc1x__ -D__mc68hc1x -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D__HAVE_SHORT_INT__ -D__INT__=16 -D__INT_MAX__=32767 -Dmc6812 -DMC6812 -Dmc68hc12 string.c -quiet -dumpbase string.c -m68hc12 -mshort -mauto-incdec -O -fomit-frame-pointer -o string-16-Ofm-h12.s ;;; Compiled: Sat Mar 9 15:59:49 2002 ;;; (META)compiled by GNU C version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk). ;;;----------------------------------------- .file "string.c" .globl ___strtok .sect .data .type ___strtok,@object .size ___strtok,2 ___strtok: .word 0 .sect .text .globl strcpy .type strcpy,@function strcpy: pshx tfr d,x ldy 4,sp stx 0,sp .L2: movb 1,y+,0,x ldab 1,x+ bne .L2 ldd 0,sp pulx rts .Lfe1: .size strcpy,.Lfe1-strcpy .globl strncpy .type strncpy,@function strncpy: pshx tfr d,x stx 0,sp .L6: ldy 6,sp dey sty 6,sp tfr y,d cpd #-1 beq .L7 ldy 4,sp movb 1,y+,0,x sty 4,sp ldab 1,x+ bne .L6 .L7: ldd 0,sp pulx rts .Lfe2: .size strncpy,.Lfe2-strncpy .globl strcat .type strcat,@function strcat: pshx tfr d,x stx 0,sp ldab 0,x beq .L15 .L14: inx tst 0,x bne .L14 .L15: ldy 4,sp movb 1,y+,0,x sty 4,sp ldab 1,x+ bne .L15 ldd 0,sp pulx rts .Lfe3: .size strcat,.Lfe3-strcat .globl strncat .type strncat,@function strncat: pshx tfr d,x stx 0,sp ldd 6,sp beq .L19 ldab 0,x beq .L24 .L23: inx tst 0,x bne .L23 bra .L24 .L28: ldy 6,sp dey sty 6,sp bne .L24 movb 7,sp,0,x bra .L19 .L24: ldy 4,sp movb 1,y+,0,x sty 4,sp ldab 1,x+ bne .L28 .L19: ldd 0,sp pulx rts .Lfe4: .size strncat,.Lfe4-strncat .globl strcmp .type strcmp,@function strcmp: pshx tfr d,x ldy 4,sp .L36: movb 0,x,1,sp ldab 1,sp subb 1,y+ stab 0,sp bne .L32 inx ldab 1,sp bne .L36 .L32: ldab 0,sp sex b,d pulx rts .Lfe5: .size strcmp,.Lfe5-strcmp .globl strncmp .type strncmp,@function strncmp: pshx pshx std 1,sp ldx 8,sp clr 0,sp tbeq x,.L40 .L44: ldy 1,sp movb 0,y,3,sp ldy 6,sp ldab 3,sp subb 1,y+ stab 0,sp sty 6,sp tbne b,.L40 ldy 1,sp iny sty 1,sp ldab 3,sp beq .L40 dex tbne x,.L44 .L40: ldab 0,sp sex b,d pulx pulx rts .Lfe6: .size strncmp,.Lfe6-strncmp .globl strchr .type strchr,@function strchr: tfr d,x ldd 2,sp cmpb 0,x beq .L53 .L52: tst 0,x bne .L49 clra clrb rts .L49: inx cmpb 0,x bne .L52 .L53: tfr x,d rts .Lfe7: .size strchr,.Lfe7-strchr ; extern strlen .globl strrchr .type strrchr,@function strrchr: pshx std 0,sp bsr strlen ldx 0,sp leax d,x .L55: ldab 5,sp cmpb 0,x bne .L57 tfr x,d bra .L54 .L57: dex cpx 0,sp bhs .L55 clra clrb .L54: pulx rts .Lfe8: .size strrchr,.Lfe8-strrchr .globl strlen .type strlen,@function strlen: tfr d,y tfr y,x ldab 0,y beq .L66 .L63: inx tst 0,x bne .L63 .L66: tfr x,d sty _.tmp subd _.tmp rts .Lfe9: .size strlen,.Lfe9-strlen .globl strnlen .type strnlen,@function strnlen: tfr d,y ldd 2,sp tfr y,x addd #-1 cpd #-1 beq .L69 tst 0,y beq .L69 .L70: inx addd #-1 cpd #-1 beq .L69 tst 0,x bne .L70 .L69: tfr x,d sty _.tmp subd _.tmp rts .Lfe10: .size strnlen,.Lfe10-strnlen .globl strspn .type strspn,@function strspn: pshx clr 1,sp clr 0,sp tfr d,y ldab 0,y beq .L87 .L86: ldx 4,sp tst 0,x beq .L87 ldab 0,y .L84: cmpb 0,x beq .L80 inx tst 0,x bne .L84 .L80: tst 0,x beq .L87 ldx 0,sp inx stx 0,sp iny tst 0,y bne .L86 .L87: ldd 0,sp pulx rts .Lfe11: .size strspn,.Lfe11-strspn .globl strpbrk .type strpbrk,@function strpbrk: tfr d,y ldab 0,y beq .L101 .L100: ldx 2,sp tst 0,x beq .L102 ldab 0,y .L99: cmpb 0,x bne .L96 tfr y,d rts .L96: inx tst 0,x bne .L99 .L102: iny tst 0,y bne .L100 .L101: clra clrb rts .Lfe12: .size strpbrk,.Lfe12-strpbrk .globl strtok .type strtok,@function strtok: pshx std 0,sp tfr d,x tbne x,.L105 movw ___strtok,0,sp ldx 0,sp bne .L105 clra clrb bra .L103 .L105: movw 4,sp,2,-sp ldd 2,sp bsr strspn addd 2,sp std 2,sp leas 2,sp tfr d,x ldab 0,x bne .L106 clr ___strtok+1 clr ___strtok clra clrb bra .L103 .L106: movw 4,sp,2,-sp ldd 2,sp bsr strpbrk tfr d,x leas 2,sp tbeq x,.L107 ldab 0,x beq .L107 clr 1,x+ .L107: stx ___strtok ldd 0,sp .L103: pulx rts .Lfe13: .size strtok,.Lfe13-strtok .globl memset .type memset,@function memset: tfr d,y ldd 4,sp tfr y,x bra .L114 .L112: movb 3,sp,1,x+ .L114: addd #-1 cpd #-1 bne .L112 tfr y,d rts .Lfe14: .size memset,.Lfe14-memset .globl bcopy .type bcopy,@function bcopy: tfr d,y ldd 4,sp ldx 2,sp bra .L121 .L119: movb 1,y+,1,x+ .L121: addd #-1 cpd #-1 bne .L119 ldd 2,sp rts .Lfe15: .size bcopy,.Lfe15-bcopy .globl memcpy .type memcpy,@function memcpy: pshx std 0,sp ldd 6,sp ldy 0,sp ldx 4,sp bra .L128 .L126: movb 1,x+,1,y+ .L128: addd #-1 cpd #-1 bne .L126 ldd 0,sp pulx rts .Lfe16: .size memcpy,.Lfe16-memcpy .globl memmove .type memmove,@function memmove: pshx std 0,sp ldx 4,sp ldd 6,sp cpx 0,sp blo .L130 ldy 0,sp addd #-1 cpd #-1 beq .L135 .L134: movb 1,x+,1,y+ addd #-1 cpd #-1 bne .L134 bra .L135 .L130: ldy 0,sp leay d,y leax d,x bra .L140 .L139: movb 1,-x,1,-y .L140: addd #-1 cpd #-1 bne .L139 .L135: ldd 0,sp pulx rts .Lfe17: .size memmove,.Lfe17-memmove .globl memcmp .type memcmp,@function memcmp: leas -5,sp ldx 9,sp clr 2,sp std 0,sp movw 7,sp,3,sp tbeq x,.L143 .L147: ldy 0,sp ldab 0,y ldy 3,sp subb 0,y stab 2,sp bne .L143 ldy 0,sp iny sty 0,sp ldy 3,sp iny sty 3,sp dex tbne x,.L147 .L143: ldab 2,sp sex b,d leas 5,sp rts .Lfe18: .size memcmp,.Lfe18-memcmp .globl memscan .type memscan,@function memscan: ldy 4,sp tfr d,x beq .L155 .L154: clra ldab 0,x cpd 2,sp bne .L153 tfr x,d rts .L153: inx dey tbne y,.L154 .L155: tfr x,d rts .Lfe19: .size memscan,.Lfe19-memscan .globl strstr .type strstr,@function strstr: leas -6,sp std 0,sp ldd 8,sp bsr strlen std 4,sp bne .L157 .L165: ldd 0,sp bra .L156 .L157: ldd 0,sp bsr strlen std 2,sp cpd 4,sp blt .L163 .L162: ldx 2,sp dex stx 2,sp movw 4,sp,2,-sp movw 10,sp,2,-sp ldd 4,sp bsr memcmp leas 4,sp tbeq d,.L165 ldx 0,sp inx stx 0,sp ldd 2,sp cpd 4,sp bge .L162 .L163: clra clrb .L156: leas 6,sp rts .Lfe20: .size strstr,.Lfe20-strstr .ident "GCC: (GNU) 3.0.4 m68hc1x-20020203"