home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / WINER.ZIP / CHAP2-1.BAS < prev    next >
BASIC Source File  |  1992-05-13  |  433b  |  17 lines

  1. '********** CHAP2-1.BAS - shows how to find a near string from its descriptor
  2.  
  3. 'Copyright (c) 1992 Ethan Winer
  4.  
  5. DEFINT A-Z
  6. Test$ = "BASIC Power Tools"
  7. Descr = VARPTR(Test$)
  8. Length = PEEK(Descr) + 256 * PEEK(Descr + 1)
  9. Addr = PEEK(Descr + 2) + 256 * PEEK(Descr + 3)
  10.  
  11. PRINT "The length is"; Length
  12. PRINT "The address is"; Addr
  13. PRINT "The string contains ";
  14. FOR X = Addr TO Addr + Length - 1
  15.   PRINT CHR$(PEEK(X));
  16. NEXT
  17.