Making a start on putting together a tool to analyse the #KWIC source code, whic...

@philcowans@universeodon.com

Making a start on putting together a tool to analyse the #KWIC source code, which is written in the #SAP assembly language (the precursor to FAP, the Fortran Assembly Processor) for the #IBM 704. Not sure what you call this sort or thing - I guess it's not a disassembler, as I have the assembly source.

I've implemented basic syntax highlighting. Next up is to identify subroutines. The machine doesn't have a stack, but there's a strong convention of using index register 4 to hold the calling address (the machine has a 'TSX' instruction for this purpose) and arguments as data immediately after the calling point. This means it's relatively easy to identify entry and exit jumps, although the assembler does support limited symbolic expressions, and there are very basic namespaces. Of course, for hand written assembly not much else can be assumed - including that the entry point is the first word of the subroutine.

Unfortunately this code doesn't have many comments, and symbols in SAP are a maximum of 6 characters (a 36 bit word at 6 bits per BCD character) at best, and 5 if you're using namespaces.

#retrocomputing #vintagecomputing #computerhistory