home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / string / normal / x.s < prev   
Encoding:
Text File  |  1993-12-12  |  372 b   |  81 lines

  1. # 1 "x.c"
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. # 1 "DEFS.h" 1
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. # 36 "DEFS.h"
  56.  
  57.  
  58.  
  59.  
  60. # 28 "x.c" 2
  61.  
  62.  
  63. .globl _strncpy; .even; _strncpy:
  64.     movl    sp@(4),d0    
  65.     movl    sp@(12),d1    
  66.     jeq    scdone        
  67.     movl    sp@(8),a0    
  68.     movl    d0,a1        
  69. scloop:
  70.     movb    a0@+,a1@+    
  71.     jeq    scploop        
  72.     subql    #1,d1        
  73.     jne    scloop        
  74. scdone:
  75.     rts
  76. scploop:
  77.     subql    #1,d1        
  78.     jeq    scdone        
  79.     clrb    a1@+        
  80.     jra    scploop        
  81.