home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pg200 / search.200 < prev    next >
Text File  |  2006-10-19  |  2KB  |  55 lines

  1. SEARCH.CO by Paul Globman
  2. Copyright (c) 1985,1989
  3.  
  4. To create SEARCH.CO just run the BASIC loader.
  5.  
  6. SEARCH.CO will find the locations of a defined byte sequence and display the 
  7. addresses where the sequence is found.
  8.  
  9. To use SEARCH.CO you must run a small basic program which defines the byte 
  10. sequence.  Such a program may be as simple as...
  11.  
  12. 1 LOADM"SEARCH"
  13. 2 INPUT"Find";X$
  14. 3 CALL 63900,,VARPTR(X$)
  15.  
  16. This is fine if the string you are searching for is an ASCII string that can be typed in at the keyboard.
  17.  
  18. Suppose you are looking for all occurrences of CALL 20353.  Then line 2
  19. would be...
  20.  
  21. 2 X$=CHR$(205)+CHR$(20353MOD256)+CHR$(20353\256):REM CHR$(205)=CALL(op code)
  22.  
  23.  
  24. Other variations of line 2 can be used to define the sequence of bytes you 
  25. want to search for.  For example GOSUB 4, where you would define a subroutine 
  26. to generate X$, using DATA statements or an input loop.
  27.  
  28. SEARCH.CO will examine all of memory, from address 0 to address 65535, and 
  29. will display locations of exact matches as:
  30.  
  31.  in xxxxx  in xxxxx  in xxxxx  in xxxxx
  32.  
  33. where xxxxx is the decimal address of the matched byte sequence.
  34.  
  35.  
  36. 1 '************************
  37. 2 '*  SEARCH.CO           *
  38. 3 '*    by Paul Globman   *
  39. 4 '*  Copyright (c) 1985  *
  40. 5 '************************
  41. 10 FOR I = 63900 TO 63944 
  42. 20 READ X:POKE I,X:SM=SM+X
  43. 30 NEXT
  44. 40 IF SM = 6705 THEN 60
  45. 50 PRINT"error in data":STOP
  46. 60 SAVEM"SEARCH.CO", 63900,63944
  47. 1000 DATA 78,35,235,237,235,33,0
  48. 1010 DATA 0,205,62,79,197,213,229
  49. 1020 DATA 205,17,110,225,209,193,204
  50. 1030 DATA 188,249,35,124,181,194,167
  51. 1040 DATA 249,195,62,79,197,213,229
  52. 1050 DATA 205,3,71,205,30,0,225
  53. 1060 DATA 209,193,201
  54. 1070 REM       END OF DATA
  55.