SWAT (Strategic Weapon Against Typos)
SWAT (Strategic Weapon Against Typos) by Jon Voskuil and Alan J Zett is a type-in program checker for Apple II, Atari and TRS-80 used by SoftSide magazine.
It generates a table with three columns: a range of line numbers, a two-letter 'SWAT Code', and the length (in bytes) of the specified program lines.
This narrows the area of a bug to no more than twelve lines or no more than about 500-700 bytes of code.
The 'resolution' of SWAT can be increased for particularly error-prone code. For instance, change "NU=12: B=500" to "NU=5: B=200" to provide a checksum for every 5 lines or 200 bytes of code.
The SWAT Code is generated by adding up the value of every byte in a chunk and then converting to a base-26 number. Just the two rightmost 'digits' (letters) are used. This approach leaves it vulnerable to transposition errors.
Sample Output
Links
- SWAT code listing and article (from SoftSide Issue 30 pg 46)
- Updated Atari version (Best of SoftSide Atari Edition pg 139)
- Dissecting Three Classic Automatic Proofreaders