;;;----------------------------------------- ;;; 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__INT__=32 -D__INT_MAX__=2147483647 -Dmc6811 -DMC6811 -Dmc68hc11 string.c -quiet -dumpbase string.c -O -fomit-frame-pointer -o string-32-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 ldx *_.d2 pshx xgdy tsx ldx 6,x .L37: ldab 0,y stab *_.d2+1 subb 0,x stab *_.d1+1 inx ldab *_.d1+1 bne .L33 iny ldab *_.d2+1 bne .L37 .L33: ldx #0 clra ldab *_.d1+1 bpl .L38 deca dex .L38: puly sty *_.d2 puly sty *_.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: ldx #0 clra ldab *_.d1+1 bpl .L46 deca dex .L46: puly sty *_.d3 puly sty *_.d2 puly sty *_.d1 rts .Lfe6: .size strncmp,.Lfe6-strncmp .globl strchr .type strchr,@function strchr: ldx *_.d1 pshx ldx *_.d2 pshx xgdx tsy ldd 8,y std *_.d2 bra .L55 .L53: tst 0,x bne .L50 clra clrb bra .L47 .L50: inx .L55: ldab *_.d2+1 cmpb 0,x bne .L53 xgdx .L47: pulx stx *_.d2 pulx stx *_.d1 rts .Lfe7: .size strchr,.Lfe7-strchr ; extern strlen .globl strrchr .type strrchr,@function strrchr: ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.d3 pshx std *_.d1 tsx ldd 10,x std *_.d3 ldd *_.d1 bsr strlen ldx *_.d1 std *_.tmp xgdx addd *_.tmp xgdx .L57: ldab *_.d3+1 cmpb 0,x bne .L59 xgdx bra .L56 .L59: dex cpx *_.d1 bhs .L57 clra clrb .L56: pulx stx *_.d3 pulx stx *_.d2 pulx stx *_.d1 rts .Lfe8: .size strrchr,.Lfe8-strrchr .globl strlen .type strlen,@function strlen: xgdy sty *_.tmp ldx *_.tmp ldab 0,y beq .L68 .L65: inx tst 0,x bne .L65 .L68: sty *_.tmp xgdx subd *_.tmp ldx #0 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 .L71 tst 0,y beq .L71 .L72: inx addd #-1 cpd #-1 beq .L71 tst 0,x bne .L72 .L71: sty *_.tmp xgdx subd *_.tmp ldx #0 rts .Lfe10: .size strnlen,.Lfe10-strnlen .globl strspn .type strspn,@function strspn: ldx *_.d1 pshx clr *_.d1+1 clr *_.d1 std *_.z pshx ldx *_.z ldab 0,x pulx beq .L89 .L88: tsx ldy 4,x tst 0,y beq .L89 ldx *_.z ldab 0,x .L86: cmpb 0,y beq .L82 iny tst 0,y bne .L86 .L82: tst 0,y beq .L89 ldy *_.d1 iny sty *_.d1 stx *_.xy ldx *_.z inx stx *_.z ldx *_.xy pshx ldx *_.z tst 0,x pulx bne .L88 .L89: ldd *_.d1 ldx #0 puly sty *_.d1 rts .Lfe11: .size strspn,.Lfe11-strspn .globl strpbrk .type strpbrk,@function strpbrk: tsx ldy 2,x sty *_.z xgdy ldab 0,y beq .L104 .L103: ldx *_.z tst 0,x beq .L105 ldab 0,y .L102: cmpb 0,x bne .L99 xgdy rts .L99: inx tst 0,x bne .L102 .L105: iny tst 0,y bne .L103 .L104: clra clrb rts .Lfe12: .size strpbrk,.Lfe12-strpbrk .globl strtok .type strtok,@function strtok: ldx *_.d1 pshx std *_.d1 bne .L108 ldx ___strtok stx *_.d1 beq .L111 .L108: 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 .L109 clra clrb std ___strtok bra .L106 .L109: tsy ldy 4,y pshy ldd *_.d1 bsr strpbrk xgdx ins ins cpx #0 beq .L110 ldab 0,x beq .L110 clr 0,x inx .L110: stx ___strtok .L111: ldd *_.d1 .L106: 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 .L118 .L116: stab 0,y iny .L118: dex cpx #-1 bne .L116 ldd *_.d1 pulx stx *_.d1 rts .Lfe14: .size memset,.Lfe14-memset .globl bcopy .type bcopy,@function bcopy: ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.d3 pshx std *_.z tsx ldx 8,x stx *_.d3 tsy ldd 12,y ldx 10,y bra .L126 .L124: ldx *_.z ldab 0,x ldy *_.d3 stab 0,y inx iny sty *_.d3 ldd *_.d2 stx *_.z ldx *_.d1 .L126: subd #1 bcc .L127 dex .L127: std *_.d2 stx *_.d1 cpx #-1 bne .L124 cpd #-1 bne .L124 tsy ldd 8,y pulx stx *_.d3 pulx stx *_.d2 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 .L134 .L132: 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 .L134: dex cpx #-1 bne .L132 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 ldx *_.d3 pshx std *_.d3 tsx ldd 8,x ldx 10,x cpd *_.d3 blo .L136 stx *_.xy ldx *_.d3 xgdy stx *_.z ldx *_.xy dex cpx #-1 beq .L141 .L140: ldab 0,y stx *_.xy ldx *_.z stab 0,x iny inx stx *_.z ldx *_.xy dex cpx #-1 bne .L140 bra .L141 .L136: stx *_.d2 stx *_.xy ldx *_.d3 ldy *_.d2 sty *_.tmp xgdx addd *_.tmp xgdx std *_.tmp xgdy addd *_.tmp xgdy stx *_.z ldx *_.xy bra .L146 .L145: stx *_.xy ldx *_.z dex dey ldab 0,y stab 0,x stx *_.z ldx *_.xy .L146: dex cpx #-1 bne .L145 .L141: ldd *_.d3 pulx stx *_.d3 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 .L149 .L153: 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 .L149 iny sty *_.d2 ldd *_.z addd #1 tsy std 4,y dex cpx #0 bne .L153 .L149: ldx #0 clra ldab *_.d1+1 bpl .L154 deca dex .L154: puly sty *_.d2 puly sty *_.d1 puly rts .Lfe18: .size memcmp,.Lfe18-memcmp .globl memscan .type memscan,@function memscan: ldx *_.d1 pshx ldx *_.d2 pshx xgdy tsx ldd 8,x std *_.d2 ldd 6,x std *_.d1 sty *_.xy ldy 10,x sty *_.tmp ldd *_.tmp sty *_.z ldy *_.xy std *_.tmp beq .L162 .L161: ldx #0 clra ldab 0,y cpx *_.d1 bne .L159 cpd *_.d2 beq .L162 .L159: iny ldx *_.z dex stx *_.z bne .L161 .L162: xgdy pulx stx *_.d2 pulx stx *_.d1 rts .Lfe19: .size memscan,.Lfe19-memscan .globl strstr .type strstr,@function strstr: pshx ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.d3 pshx ldx *_.d4 pshx tsx std 8,x ldd 12,x bsr strlen std *_.d4 clr *_.d3+1 clr *_.d3 ldd *_.d3 bne .L164 ldx *_.d4 bne .L164 tsy ldd 8,y bra .L163 .L173: tsx ldd 8,x bra .L163 .L164: tsy ldd 8,y bsr strlen std *_.d2 clr *_.d1+1 clr *_.d1 bra .L174 .L172: ldd *_.d2 ldx *_.d1 subd #1 bcc .L175 dex .L175: std *_.d2 stx *_.d1 ldy *_.d4 pshy tsx ldx 14,x pshx tsy ldd 12,y bsr memcmp puly puly cpx #0 bne .L170 std *_.tmp beq .L173 .L170: tsx ldy 8,x iny sty 8,x .L174: ldx *_.d1 ldd *_.d3 std *_.tmp cpx *_.tmp bgt .L172 blt .L167 ldy *_.d2 ldx *_.d4 stx *_.tmp cpy *_.tmp bhs .L172 .L167: clra clrb .L163: pulx stx *_.d4 pulx stx *_.d3 pulx stx *_.d2 pulx stx *_.d1 pulx rts .Lfe20: .size strstr,.Lfe20-strstr .ident "GCC: (GNU) 3.0.4 m68hc1x-20020203"