;;;----------------------------------------- ;;; 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 -o string-16-O.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: ldx *_.frame pshx sts *_.frame xgdx ldy *_.frame ldy 5,y stx *_.z .L2: ldab 0,y stab 0,x iny inx tstb bne .L2 ldd *_.z pulx stx *_.frame rts .Lfe1: .size strcpy,.Lfe1-strcpy .globl strncpy .type strncpy,@function strncpy: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx xgdx stx *_.d1 .L6: ldy *_.frame stx *_.xy ldx 7,y dex stx 7,y xgdx ldx *_.xy cpd #-1 beq .L7 ldy 5,y ldab 0,y stab 0,x iny ldx *_.frame sty 5,x ldx *_.xy inx tstb bne .L6 .L7: ldd *_.d1 pulx stx *_.d1 pulx stx *_.frame rts .Lfe2: .size strncpy,.Lfe2-strncpy .globl strcat .type strcat,@function strcat: ldx *_.frame pshx sts *_.frame xgdx ldy *_.frame ldy 5,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 pulx stx *_.frame rts .Lfe3: .size strcat,.Lfe3-strcat .globl strncat .type strncat,@function strncat: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx xgdx stx *_.d1 ldy *_.frame ldd 7,y beq .L19 ldab 0,x beq .L29 .L23: inx tst 0,x bne .L23 .L29: ldy *_.frame ldy 5,y ldab 0,y stab 0,x iny sty *_.z ldy *_.frame std *_.xy ldd *_.z std 5,y ldd *_.xy bra .L30 .L28: stx *_.xy ldx *_.frame ldy 7,x dey sty 7,x ldx *_.xy xgdy std *_.tmp bne .L24 stab 0,x bra .L19 .L24: ldy *_.frame ldy 5,y ldab 0,y stab 0,x iny stx *_.xy ldx *_.frame sty 5,x ldx *_.xy .L30: inx tstb bne .L28 .L19: ldd *_.d1 pulx stx *_.d1 pulx stx *_.frame rts .Lfe4: .size strncat,.Lfe4-strncat .globl strcmp .type strcmp,@function strcmp: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx xgdy ldx *_.frame ldx 5,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 pulx stx *_.frame rts .Lfe5: .size strcmp,.Lfe5-strcmp .globl strncmp .type strncmp,@function strncmp: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.d3 pshx std *_.d3 ldy *_.frame ldx 7,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 ldy *_.frame ldy 5,y subb 0,y stab *_.d1+1 iny ldx *_.frame sty 5,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 pulx stx *_.frame rts .Lfe6: .size strncmp,.Lfe6-strncmp .globl strchr .type strchr,@function strchr: ldx *_.frame pshx sts *_.frame xgdx ldy *_.frame ldd 5,y cmpb 0,x beq .L54 .L53: tst 0,x bne .L50 clra clrb bra .L47 .L50: inx cmpb 0,x bne .L53 .L54: xgdx .L47: pulx stx *_.frame rts .Lfe7: .size strchr,.Lfe7-strchr ; extern strlen .globl strrchr .type strrchr,@function strrchr: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx std *_.d1 bsr strlen ldx *_.d1 std *_.tmp xgdx addd *_.tmp xgdx .L56: ldab 0,x ldy *_.frame cmpb 6,y bne .L58 xgdx bra .L55 .L58: dex cpx *_.d1 bhs .L56 clra clrb .L55: pulx stx *_.d1 pulx stx *_.frame rts .Lfe8: .size strrchr,.Lfe8-strrchr .globl strlen .type strlen,@function strlen: ldx *_.frame pshx sts *_.frame xgdy sty *_.tmp ldx *_.tmp ldab 0,y beq .L67 .L64: inx tst 0,x bne .L64 .L67: xgdx sty *_.tmp subd *_.tmp pulx stx *_.frame rts .Lfe9: .size strlen,.Lfe9-strlen .globl strnlen .type strnlen,@function strnlen: ldx *_.frame pshx sts *_.frame xgdy sty *_.tmp ldx *_.tmp stx *_.xy ldx *_.frame ldd 5,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 pulx stx *_.frame rts .Lfe10: .size strnlen,.Lfe10-strnlen .globl strspn .type strspn,@function strspn: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx clr *_.d1+1 clr *_.d1 xgdy ldab 0,y beq .L88 .L87: ldx *_.frame ldx 5,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 pulx stx *_.frame rts .Lfe11: .size strspn,.Lfe11-strspn .globl strpbrk .type strpbrk,@function strpbrk: ldx *_.frame pshx sts *_.frame ldx *_.frame ldy 5,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 bra .L90 .L97: inx tst 0,x bne .L100 .L103: iny tst 0,y bne .L101 .L102: clra clrb .L90: pulx stx *_.frame rts .Lfe12: .size strpbrk,.Lfe12-strpbrk .globl strtok .type strtok,@function strtok: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx std *_.d1 bne .L106 ldx ___strtok stx *_.d1 beq .L109 .L106: ldy *_.frame ldy 5,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: ldy *_.frame ldy 5,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 pulx stx *_.frame rts .Lfe13: .size strtok,.Lfe13-strtok .globl memset .type memset,@function memset: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx std *_.d1 ldx *_.frame ldab 6,x ldy *_.d1 ldx 7,x bra .L116 .L114: stab 0,y iny .L116: dex cpx #-1 bne .L114 ldd *_.d1 pulx stx *_.d1 pulx stx *_.frame rts .Lfe14: .size memset,.Lfe14-memset .globl bcopy .type bcopy,@function bcopy: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx std *_.z ldx *_.frame ldx 5,x stx *_.d1 ldy *_.frame ldx 7,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 ldx *_.frame ldd 5,x pulx stx *_.d1 pulx stx *_.frame rts .Lfe15: .size bcopy,.Lfe15-bcopy .globl memcpy .type memcpy,@function memcpy: ldx *_.frame pshx pshx sts *_.frame ldx *_.d1 pshx ldx *_.d2 pshx std *_.d1 ldx *_.d1 stx *_.d2 ldy *_.frame ldd 7,y std 1,y ldx 9,y bra .L130 .L128: ldy *_.frame ldy 1,y ldab 0,y ldy *_.d2 stab 0,y stx *_.xy ldx *_.frame ldy 1,x iny sty 1,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 pulx stx *_.frame rts .Lfe16: .size memcpy,.Lfe16-memcpy .globl memmove .type memmove,@function memmove: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx ldx *_.d2 pshx std *_.d1 ldx *_.frame ldx 7,x stx *_.d2 std *_.xy ldd *_.frame std *_.z ldd *_.xy pshx ldx *_.z cpd 5,x pulx bhi .L132 ldy *_.d1 ldx *_.z ldx 5,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 ldy *_.frame xgdx addd 5,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 pulx stx *_.frame rts .Lfe17: .size memmove,.Lfe17-memmove .globl memcmp .type memcmp,@function memcmp: ldx *_.frame pshx pshx sts *_.frame ldx *_.d1 pshx ldx *_.d2 pshx ldy *_.frame ldx 9,y clr *_.d1+1 std *_.d2 ldd 7,y std 1,y cpx #0 beq .L145 .L149: ldy *_.d2 ldab 0,y stx *_.xy ldx *_.frame ldx 1,x subb 0,x stab *_.d1+1 stx *_.z ldx *_.xy ldab *_.d1+1 bne .L145 iny sty *_.d2 ldd *_.z addd #1 ldy *_.frame std 1,y dex cpx #0 bne .L149 .L145: clra ldab *_.d1+1 bpl .L150 deca .L150: pulx stx *_.d2 pulx stx *_.d1 pulx pulx stx *_.frame rts .Lfe18: .size memcmp,.Lfe18-memcmp .globl memscan .type memscan,@function memscan: ldx *_.frame pshx sts *_.frame ldx *_.d1 pshx ldx *_.frame ldx 5,x stx *_.d1 ldx *_.frame ldy 7,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 pulx stx *_.frame rts .Lfe19: .size memscan,.Lfe19-memscan .globl strstr .type strstr,@function strstr: ldx *_.frame pshx pshx sts *_.frame ldx *_.d1 pshx ldx *_.d2 pshx ldx *_.frame std 1,x ldd 7,x bsr strlen std *_.d2 bne .L159 ldy *_.frame ldd 1,y bra .L158 .L166: ldx *_.frame ldd 1,x bra .L158 .L159: ldy *_.frame ldd 1,y bsr strlen std *_.d1 ldx *_.d2 stx *_.tmp cpd *_.tmp blt .L165 .L164: ldy *_.d1 dey sty *_.d1 ldx *_.d2 pshx ldy *_.frame ldy 7,y pshy ldx *_.frame ldd 1,x bsr memcmp pulx pulx std *_.tmp beq .L166 ldx *_.frame ldy 1,x iny sty 1,x ldx *_.d1 ldd *_.d2 std *_.tmp cpx *_.tmp bge .L164 .L165: clra clrb .L158: pulx stx *_.d2 pulx stx *_.d1 pulx pulx stx *_.frame rts .Lfe20: .size strstr,.Lfe20-strstr .ident "GCC: (GNU) 3.0.4 m68hc1x-20020203"