home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / 2014.11.minnie.tuhs.org.tar / minnie.tuhs.org / UnixArchive / PDP-11 / Trees / V6 / usr / source / salloc / length.s < prev    next >
Text File  |  1975-05-14  |  329b  |  28 lines

  1. .globl    length
  2. .globl    position
  3. .globl    w, r, a, l
  4. /
  5. /
  6. /    routine to return the length of a string
  7. /
  8. /    mov    ...,r1
  9. /    jsr    pc,length
  10. /    mov    r0,...
  11. /
  12. length:
  13.     mov    w(r1),r0
  14.     sub    a(r1),r0
  15.     rts    pc
  16. /
  17. /
  18. /    routine to return the read pointer position
  19. /
  20. /    mov    ...,r1
  21. /    jsr    pc,position
  22. /    mov    r0,...
  23. /
  24. position:
  25.     mov    r(r1),r0
  26.     sub    a(r1),r0
  27.     rts    pc
  28.