;;;----------------------------------------- ;;; 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 -O -o string-16-O-h12.s ;;; Compiled: Sat Mar 9 15:59:48 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: movw _.frame,2,-sp sts _.frame tfr d,x ldy _.frame ldy 4,y stx _.z .L2: movb 0,y,0,x ldab 0,x iny inx tbne b,.L2 ldd _.z movw 2,sp+,_.frame rts .Lfe1: .size strcpy,.Lfe1-strcpy .globl strncpy .type strncpy,@function strncpy: movw _.frame,2,-sp pshx sts _.frame tfr d,x ldy _.frame stx 0,y .L6: stx _.xy ldx _.frame ldy 8,x dey sty 8,x tfr y,d stx _.z ldx _.xy cpd #-1 beq .L7 ldx _.z ldy 6,x ldx _.xy movb 0,y,0,x ldab 0,x iny ldx _.z sty 6,x ldx _.xy inx tbne b,.L6 .L7: ldx _.frame ldd 0,x pulx movw 2,sp+,_.frame rts .Lfe2: .size strncpy,.Lfe2-strncpy .globl strcat .type strcat,@function strcat: movw _.frame,2,-sp sts _.frame tfr d,x ldy _.frame ldy 4,y stx _.z pshx ldx _.z ldab 0,x pulx beq .L15 .L14: inx tst 0,x bne .L14 .L15: movb 0,y,0,x ldab 0,x iny inx tbne b,.L15 ldd _.z movw 2,sp+,_.frame rts .Lfe3: .size strcat,.Lfe3-strcat .globl strncat .type strncat,@function strncat: movw _.frame,2,-sp pshx sts _.frame tfr d,x ldy _.frame stx 0,y ldd 8,y beq .L19 tfr x,y ldab 0,y beq .L29 .L23: inx tst 0,x bne .L23 .L29: ldy _.frame ldy 6,y movb 0,y,0,x ldab 0,x stx _.xy ldx _.frame ldy 6,x iny stx _.z ldx _.xy bra .L30 .L28: stx _.xy ldx _.frame ldy 8,x dey sty 8,x stx _.z ldx _.xy tbne y,.L24 ldy _.z movb 9,y,0,x bra .L19 .L24: ldy _.frame ldy 6,y movb 0,y,0,x ldab 0,x iny stx _.xy ldx _.frame stx _.z ldx _.xy .L30: stx _.xy ldx _.z sty 6,x ldx _.xy inx tbne b,.L28 .L19: ldx _.frame ldd 0,x pulx movw 2,sp+,_.frame rts .Lfe4: .size strncat,.Lfe4-strncat .globl strcmp .type strcmp,@function strcmp: movw _.frame,2,-sp pshx sts _.frame tfr d,y ldx _.frame ldx 6,x .L37: stx _.xy ldx _.frame movb 0,y,1,x ldab 1,x stx _.z ldx _.xy subb 0,x sty _.xy ldy _.z stab 0,y inx ldy _.xy tbne b,.L33 iny stx _.xy ldx _.z ldab 1,x ldx _.xy tbne b,.L37 .L33: ldx _.frame ldab 0,x sex b,d pulx movw 2,sp+,_.frame rts .Lfe5: .size strcmp,.Lfe5-strcmp .globl strncmp .type strncmp,@function strncmp: movw _.frame,2,-sp pshx pshx sts _.frame ldx _.frame std 2,x ldx 10,x ldy _.frame clr 0,y tbeq x,.L41 .L45: stx _.xy ldx _.frame ldy 2,x movb 0,y,1,x ldab 1,x ldy 8,x subb 0,y stab 0,x iny sty 8,x stx _.z ldx _.xy tbne b,.L41 ldx _.z ldy 2,x iny sty 2,x ldab 1,x ldx _.xy tbeq b,.L41 dex tbne x,.L45 .L41: ldy _.frame ldab 0,y sex b,d pulx pulx movw 2,sp+,_.frame rts .Lfe6: .size strncmp,.Lfe6-strncmp .globl strchr .type strchr,@function strchr: movw _.frame,2,-sp sts _.frame tfr d,x ldy _.frame ldd 4,y cmpb 0,x beq .L54 .L53: tst 0,x bne .L50 clra clrb bra .L47 .L50: inx cmpb 0,x bne .L53 .L54: tfr x,d .L47: movw 2,sp+,_.frame rts .Lfe7: .size strchr,.Lfe7-strchr ; extern strlen .globl strrchr .type strrchr,@function strrchr: movw _.frame,2,-sp pshx sts _.frame ldx _.frame std 0,x bsr strlen ldy _.frame ldx 0,y leax d,x .L56: ldab 0,x ldy _.frame cmpb 7,y bne .L58 tfr x,d bra .L55 .L58: dex ldy _.frame cpx 0,y bhs .L56 clra clrb .L55: pulx movw 2,sp+,_.frame rts .Lfe8: .size strrchr,.Lfe8-strrchr .globl strlen .type strlen,@function strlen: movw _.frame,2,-sp sts _.frame tfr d,y tfr y,x ldab 0,y beq .L67 .L64: inx tst 0,x bne .L64 .L67: tfr x,d sty _.tmp subd _.tmp movw 2,sp+,_.frame rts .Lfe9: .size strlen,.Lfe9-strlen .globl strnlen .type strnlen,@function strnlen: movw _.frame,2,-sp sts _.frame tfr d,y ldx _.frame ldd 4,x tfr y,x 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: tfr x,d sty _.tmp subd _.tmp movw 2,sp+,_.frame rts .Lfe10: .size strnlen,.Lfe10-strnlen .globl strspn .type strspn,@function strspn: movw _.frame,2,-sp pshx sts _.frame ldx _.frame clr 1,x clr 0,x tfr d,y ldab 0,y beq .L88 .L87: ldx _.frame ldx 6,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 sty _.xy ldy _.frame ldx 0,y inx stx 0,y ldy _.xy iny tst 0,y bne .L87 .L88: ldx _.frame ldd 0,x pulx movw 2,sp+,_.frame rts .Lfe11: .size strspn,.Lfe11-strspn .globl strpbrk .type strpbrk,@function strpbrk: movw _.frame,2,-sp sts _.frame ldx _.frame ldy 4,x sty _.z tfr d,y ldab 0,y beq .L102 .L101: ldx _.z tst 0,x beq .L103 ldab 0,y .L100: cmpb 0,x bne .L97 tfr y,d bra .L90 .L97: inx tst 0,x bne .L100 .L103: iny tst 0,y bne .L101 .L102: clra clrb .L90: movw 2,sp+,_.frame rts .Lfe12: .size strpbrk,.Lfe12-strpbrk .globl strtok .type strtok,@function strtok: movw _.frame,2,-sp pshx sts _.frame ldx _.frame std 0,x bne .L106 movw ___strtok,0,x ldd 0,x beq .L104 .L106: ldx _.frame movw 6,x,2,-sp ldd 0,x bsr strspn ldx _.frame addd 0,x std 0,x leas 2,sp tfr d,x ldab 0,x bne .L107 clr ___strtok+1 clr ___strtok clra clrb bra .L104 .L107: ldx _.frame movw 6,x,2,-sp ldd 0,x bsr strpbrk tfr d,x leas 2,sp tbeq x,.L108 ldab 0,x beq .L108 clr 0,x inx .L108: stx ___strtok ldx _.frame ldd 0,x .L104: pulx movw 2,sp+,_.frame rts .Lfe13: .size strtok,.Lfe13-strtok .globl memset .type memset,@function memset: movw _.frame,2,-sp sts _.frame tfr d,y ldx _.frame ldd 6,x tfr y,x bra .L115 .L113: sty _.xy ldy _.frame movb 5,y,0,x ldy _.xy inx .L115: addd #-1 cpd #-1 bne .L113 tfr y,d movw 2,sp+,_.frame rts .Lfe14: .size memset,.Lfe14-memset .globl bcopy .type bcopy,@function bcopy: movw _.frame,2,-sp sts _.frame tfr d,y ldx _.frame sty _.xy ldy 4,x ldd 6,x tfr y,x sty _.z ldy _.xy bra .L122 .L120: movb 0,y,0,x iny inx .L122: addd #-1 cpd #-1 bne .L120 ldd _.z movw 2,sp+,_.frame rts .Lfe15: .size bcopy,.Lfe15-bcopy .globl memcpy .type memcpy,@function memcpy: movw _.frame,2,-sp pshx sts _.frame ldx _.frame std 0,x ldd 8,x ldy 0,x ldx 6,x bra .L129 .L127: movb 0,x,0,y inx iny .L129: addd #-1 cpd #-1 bne .L127 ldx _.frame ldd 0,x pulx movw 2,sp+,_.frame rts .Lfe16: .size memcpy,.Lfe16-memcpy .globl memmove .type memmove,@function memmove: movw _.frame,2,-sp sts _.frame std _.z ldy _.frame ldx 4,y ldd 6,y ldy _.z stx _.tmp cpy _.tmp bhi .L131 addd #-1 cpd #-1 beq .L136 .L135: movb 0,x,0,y inx iny addd #-1 cpd #-1 bne .L135 bra .L136 .L131: stx _.xy ldx _.z leay d,x ldx _.xy leax d,x bra .L141 .L140: dey dex movb 0,x,0,y .L141: addd #-1 cpd #-1 bne .L140 .L136: ldd _.z movw 2,sp+,_.frame rts .Lfe17: .size memmove,.Lfe17-memmove .globl memcmp .type memcmp,@function memcmp: movw _.frame,2,-sp leas -5,sp sts _.frame ldy _.frame ldx 11,y clr 0,y std 3,y movw 9,y,1,y tbeq x,.L144 .L148: stx _.xy ldx _.frame ldx 3,x ldab 0,x ldx _.xy ldy _.frame ldy 1,y subb 0,y ldy _.frame stab 0,y bne .L144 ldx _.frame ldy 3,x iny sty 3,x ldy 1,x iny sty 1,x ldx _.xy dex tbne x,.L148 .L144: stx _.xy ldx _.frame ldab 0,x sex b,d ldx _.xy leas 5,sp movw 2,sp+,_.frame rts .Lfe18: .size memcmp,.Lfe18-memcmp .globl memscan .type memscan,@function memscan: movw _.frame,2,-sp sts _.frame ldx _.frame ldy 6,x tfr d,x tbeq y,.L156 .L155: clra ldab 0,x stx _.xy ldx _.frame stx _.z ldx _.xy pshx ldx _.z cpd 4,x pulx beq .L156 inx dey tbne y,.L155 .L156: tfr x,d movw 2,sp+,_.frame rts .Lfe19: .size memscan,.Lfe19-memscan .globl strstr .type strstr,@function strstr: movw _.frame,2,-sp leas -6,sp sts _.frame ldx _.frame std 0,x ldd 10,x bsr strlen ldy _.frame std 4,y bne .L158 ldd 0,y bra .L157 .L165: ldx _.frame ldd 0,x bra .L157 .L158: ldy _.frame ldd 0,y bsr strlen ldx _.frame std 2,x cpd 4,x blt .L164 .L163: ldx _.frame ldy 2,x dey sty 2,x movw 4,x,2,-sp movw 10,x,2,-sp ldd 0,x bsr memcmp leas 4,sp tbeq d,.L165 ldx _.frame ldy 0,x iny sty 0,x ldd 2,x cpd 4,x bge .L163 .L164: clra clrb .L157: leas 6,sp movw 2,sp+,_.frame rts .Lfe20: .size strstr,.Lfe20-strstr .ident "GCC: (GNU) 3.0.4 m68hc1x-20020203"