home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / emulate / sparc / t1.s < prev    next >
Text File  |  1992-01-28  |  395b  |  34 lines

  1. !
  2. ! A string copying program.  Nothing unusual here.
  3. !
  4.     .seg "text"
  5.     save %sp, -96, %sp
  6.     clr %o0
  7.     set str, %o0
  8.     set out, %o1
  9.     call _bcopy
  10.     mov 24, %o2
  11.     mov 17,%o0
  12.     mov    1, %g1
  13.     ta 0
  14.     nop
  15. L1:
  16.     inc %o0
  17.     stb %o4,[%o1]
  18.     inc %o1
  19. _bcopy:
  20.     deccc    %o2
  21.     bge,a    L1
  22.     ldub    [%o0], %o4
  23.     retl
  24.     nop
  25.  
  26.     .seg "data"
  27. str:
  28.     .asciz "this is a sample string"
  29.     .seg "bss"
  30. out:
  31.     .skip 30
  32.  
  33.  
  34.