A Search and Replace program. It scans through multiple files for a string and replaces it with a new string. Originally constructed to replace variable names or structure names in multiple file projects. Built to be the smallest and quickest available. Currently 201 bytes long and as fast as the file system.

Included Files

"sr.asm" Full source code
"" Assembled program, ready to run.

How To Use

Format: sr filename searchstring replacestring

filename: A file name specified with wildcards for search and replace.
searchstring: The string to search for. (must be at least two charaters.)
The string to replace with. (must be at least one character.)

eg. "sr *.h include INCLUDE"


Current limitations:

  • filename must not have path information.
  • maximum file size of 63K, if file is larger it is skipped.
  • searchstring must consist of at least two charaters.
  • replacestring must consist of at least one charater.
  • This program has only barely been tested and has VERY LIMITED error checking.

GNU General Public License

Copyright 1995-1997 Paul Andreassen All Rights Reserved

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Any suggestions or improvements can be sent to paul @ andreassen com au with "SR" as the subject.
If you encounter bugs in this software, please give a good description and a fix if available.
All the registered trademarks used herein are registered to whoever it is that owns them.


Your name
Your email address
Send me email about updates


This information is for internal use only.

Contacting the Author

Paul Andreassen
Email: paul @ andreassen com au
Web: or

Copyright 2012 Paul Andreassen