;;;----------------------------------------- ;;; 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 -Dmc6811 -DMC6811 -Dmc68hc11 string.c -quiet -dumpbase string.c -mshort -O -fomit-frame-pointer -o string-16-Of.s ;;; Compiled: Sat Mar 9 15:59:46 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: xgdx tsy ldy 2,y stx *_.z .L2: ldab 0,y stab 0,x iny inx tstb bne .L2 ldd *_.z rts .Lfe1: .size strcpy,.Lfe1-strcpy .globl strncpy .type strncpy,@function strncpy: ldx *_.d1 pshx xgdx stx *_.d1 .L6: tsy stx *_.xy ldx 6,y dex stx 6,y xgdx ldx *_.xy cpd #-1 beq .L7 ldy 4,y ldab 0,y stab 0,x iny tsx sty 4,x ldx *_.xy inx tstb bne .L6 .L7: ldd *_.d1 pulx stx *_.d1 rts .Lfe2: .size strncpy,.Lfe2-strncpy .globl strcat .type strcat,@function strcat: xgdx tsy ldy 2,y stx *_.z pshx ldx *_.z ldab 0,x pulx beq .L15 .L14: inx tst 0,x bne .L14 .L15: ldab 0,y stab 0,x iny inx tstb bne .L15 ldd *_.z rts .Lfe3: .size strcat,.Lfe3-strcat .globl strncat .type strncat,@function strncat: ldx *_.d1 pshx xgdx stx *_.d1 tsy ldd 6,y beq .L19 ldab 0,x beq .L29 .L23: inx tst 0,x bne .L23 .L29: tsy ldy 4,y ldab 0,y stab 0,x iny sty *_.z tsy std *_.xy ldd *_.z std 4,y ldd *_.xy bra .L30 .L28: stx *_.xy tsx ldy 6,x dey sty 6,x ldx *_.xy xgdy std *_.tmp bne .L24 stab 0,x bra .L19 .L24: tsy ldy 4,y ldab 0,y stab 0,x iny stx *_.xy tsx sty 4,x ldx *_.xy .L30: inx tstb bne .L28 .L19: ldd *_.d1 pulx stx *_.d1 rts .Lfe4: .size strncat,.Lfe4-strncat .globl strcmp .type strcmp,@function strcmp: ldx *_.d1 pshx xgdy tsx ldx 4,x .L37: ldab 0,y stab *_.d1+1 subb 0,x stab *_.z+1 inx ldab *_.z+1 bne .L33 iny ldab *_.d1+1 bne .L37 .L33: ldd *_.z stab *_.d1+1 clra ldab *_.d1+1 bpl .L38 deca .L38: pulx stx *_.d1 rts .Lfe5: .size strcmp,.Lfe5-strcmp .globl strncmp .type strncmp,@function strncmp: ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.d3 pshx std *_.d3 tsy ldx 10,y clr *_.d1+1 cpx #0 beq .L41 .L45: stx *_.xy ldx *_.d3 pshb ldab 0,x stab *_.tmp+1 ldx *_.tmp pulb xgdx stab *_.d2+1 xgdx ldx *_.xy ldab *_.d2+1 tsy ldy 8,y subb 0,y stab *_.d1+1 iny tsx sty 8,x ldx *_.xy ldab *_.d1+1 bne .L41 ldy *_.d3 iny sty *_.d3 ldab *_.d2+1 beq .L41 dex cpx #0 bne .L45 .L41: clra ldab *_.d1+1 bpl .L46 deca .L46: pulx stx *_.d3 pulx stx *_.d2 pulx stx *_.d1 rts .Lfe6: .size strncmp,.Lfe6-strncmp .globl strchr .type strchr,@function strchr: xgdx tsy ldd 2,y cmpb 0,x beq .L54 .L53: tst 0,x bne .L50 clra clrb rts .L50: inx cmpb 0,x bne .L53 .L54: xgdx rts .Lfe7: .size strchr,.Lfe7-strchr ; extern strlen .globl strrchr .type strrchr,@function strrchr: ldx *_.d1 pshx std *_.d1 bsr strlen ldx *_.d1 std *_.tmp xgdx addd *_.tmp xgdx .L56: ldab 0,x tsy cmpb 5,y bne .L58 xgdx bra .L55 .L58: dex cpx *_.d1 bhs .L56 clra clrb .L55: pulx stx *_.d1 rts .Lfe8: .size strrchr,.Lfe8-strrchr .globl strlen .type strlen,@function strlen: xgdy sty *_.tmp ldx *_.tmp ldab 0,y beq .L67 .L64: inx tst 0,x bne .L64 .L67: xgdx sty *_.tmp subd *_.tmp rts .Lfe9: .size strlen,.Lfe9-strlen .globl strnlen .type strnlen,@function strnlen: xgdy sty *_.tmp ldx *_.tmp stx *_.xy tsx ldd 2,x ldx *_.xy addd #-1 cpd #-1 beq .L70 tst 0,y beq .L70 .L71: inx addd #-1 cpd #-1 beq .L70 tst 0,x bne .L71 .L70: xgdx sty *_.tmp subd *_.tmp rts .Lfe10: .size strnlen,.Lfe10-strnlen .globl strspn .type strspn,@function strspn: ldx *_.d1 pshx clr *_.d1+1 clr *_.d1 xgdy ldab 0,y beq .L88 .L87: tsx ldx 4,x tst 0,x beq .L88 ldab 0,y .L85: cmpb 0,x beq .L81 inx tst 0,x bne .L85 .L81: tst 0,x beq .L88 ldx *_.d1 inx stx *_.d1 iny tst 0,y bne .L87 .L88: ldd *_.d1 pulx stx *_.d1 rts .Lfe11: .size strspn,.Lfe11-strspn .globl strpbrk .type strpbrk,@function strpbrk: tsx ldy 2,x sty *_.z xgdy ldab 0,y beq .L102 .L101: ldx *_.z tst 0,x beq .L103 ldab 0,y .L100: cmpb 0,x bne .L97 xgdy rts .L97: inx tst 0,x bne .L100 .L103: iny tst 0,y bne .L101 .L102: clra clrb rts .Lfe12: .size strpbrk,.Lfe12-strpbrk .globl strtok .type strtok,@function strtok: ldx *_.d1 pshx std *_.d1 bne .L106 ldx ___strtok stx *_.d1 beq .L109 .L106: tsy ldy 4,y pshy ldd *_.d1 bsr strspn ldx *_.d1 std *_.tmp xgdx addd *_.tmp xgdx stx *_.d1 ins ins tst 0,x bne .L107 clra clrb std ___strtok bra .L104 .L107: tsy ldy 4,y pshy ldd *_.d1 bsr strpbrk xgdx ins ins cpx #0 beq .L108 ldab 0,x beq .L108 clr 0,x inx .L108: stx ___strtok .L109: ldd *_.d1 .L104: pulx stx *_.d1 rts .Lfe13: .size strtok,.Lfe13-strtok .globl memset .type memset,@function memset: ldx *_.d1 pshx std *_.d1 tsx ldab 5,x ldy *_.d1 ldx 6,x bra .L116 .L114: stab 0,y iny .L116: dex cpx #-1 bne .L114 ldd *_.d1 pulx stx *_.d1 rts .Lfe14: .size memset,.Lfe14-memset .globl bcopy .type bcopy,@function bcopy: ldx *_.d1 pshx std *_.z tsx ldx 4,x stx *_.d1 tsy ldx 6,y bra .L123 .L121: stx *_.xy ldx *_.z ldab 0,x ldy *_.d1 stab 0,y inx iny sty *_.d1 stx *_.z ldx *_.xy .L123: dex cpx #-1 bne .L121 tsx ldd 4,x pulx stx *_.d1 rts .Lfe15: .size bcopy,.Lfe15-bcopy .globl memcpy .type memcpy,@function memcpy: pshx ldx *_.d1 pshx ldx *_.d2 pshx std *_.d1 ldx *_.d1 stx *_.d2 tsy ldd 8,y std 4,y ldx 10,y bra .L130 .L128: tsy ldy 4,y ldab 0,y ldy *_.d2 stab 0,y stx *_.xy tsx ldy 4,x iny sty 4,x ldx *_.xy ldx *_.d2 inx stx *_.d2 ldx *_.xy .L130: dex cpx #-1 bne .L128 ldd *_.d1 pulx stx *_.d2 pulx stx *_.d1 pulx rts .Lfe16: .size memcpy,.Lfe16-memcpy .globl memmove .type memmove,@function memmove: ldx *_.d1 pshx ldx *_.d2 pshx std *_.d1 tsx ldx 8,x stx *_.d2 std *_.xy xgdx tsx xgdx std *_.z ldd *_.xy pshx ldx *_.z cpd 6,x pulx bhi .L132 ldy *_.d1 ldx *_.z ldx 6,x stx *_.xy ldx *_.d2 dex stx *_.d2 ldx *_.xy ldd *_.d2 cpd #-1 beq .L137 .L136: ldab 0,x stab 0,y inx iny stx *_.xy ldx *_.d2 dex stx *_.d2 ldx *_.xy ldd *_.d2 cpd #-1 bne .L136 bra .L137 .L132: ldy *_.d1 ldx *_.d2 stx *_.tmp xgdy addd *_.tmp xgdy sty *_.xy tsy xgdx addd 6,y xgdx ldy *_.xy bra .L142 .L141: dey dex ldab 0,x stab 0,y .L142: stx *_.xy ldx *_.d2 dex stx *_.d2 ldx *_.xy ldd *_.d2 cpd #-1 bne .L141 .L137: ldd *_.d1 pulx stx *_.d2 pulx stx *_.d1 rts .Lfe17: .size memmove,.Lfe17-memmove .globl memcmp .type memcmp,@function memcmp: pshx ldx *_.d1 pshx ldx *_.d2 pshx tsy ldx 10,y clr *_.d1+1 std *_.d2 ldd 8,y std 4,y cpx #0 beq .L145 .L149: ldy *_.d2 ldab 0,y stx *_.xy tsx ldx 4,x subb 0,x stab *_.d1+1 stx *_.z ldx *_.xy ldab *_.d1+1 bne .L145 iny sty *_.d2 ldd *_.z addd #1 tsy std 4,y dex cpx #0 bne .L149 .L145: clra ldab *_.d1+1 bpl .L150 deca .L150: pulx stx *_.d2 pulx stx *_.d1 pulx rts .Lfe18: .size memcmp,.Lfe18-memcmp .globl memscan .type memscan,@function memscan: ldx *_.d1 pshx tsx ldx 4,x stx *_.d1 tsx ldy 6,x xgdx cpy #0 beq .L157 .L156: clra ldab 0,x cpd *_.d1 beq .L157 inx dey cpy #0 bne .L156 .L157: xgdx pulx stx *_.d1 rts .Lfe19: .size memscan,.Lfe19-memscan .globl strstr .type strstr,@function strstr: pshx ldx *_.d1 pshx ldx *_.d2 pshx tsx std 4,x ldd 8,x bsr strlen std *_.d2 bne .L159 tsy ldd 4,y bra .L158 .L166: tsx ldd 4,x bra .L158 .L159: tsy ldd 4,y bsr strlen std *_.d1 ldx *_.d2 stx *_.tmp cpd *_.tmp blt .L165 .L164: ldy *_.d1 dey sty *_.d1 ldx *_.d2 pshx tsy ldy 10,y pshy tsx ldd 8,x bsr memcmp pulx pulx std *_.tmp beq .L166 tsx ldy 4,x iny sty 4,x ldx *_.d1 ldd *_.d2 std *_.tmp cpx *_.tmp bge .L164 .L165: clra clrb .L158: pulx stx *_.d2 pulx stx *_.d1 pulx rts .Lfe20: .size strstr,.Lfe20-strstr .ident "GCC: (GNU) 3.0.4 m68hc1x-20020203"