SUPERZAP MOD 3.5 DOCUMENTATION from John T. Coburn 15 Sept 1986 V3.5 is a bug fix for the SuperZap program. The bugs only appeared when an ANSI style cursor addressing was used. The cursor positioning routines have been fixed to work properly. All enclosed documentation is still valid. The default (in source) is now set to be an ANSI terminal and the wordprocessing end of line features are disabled by having 0dH in locations SOFT1, SOFT2, HARD1 and HARD2. They can be changed by Z8E using the .LST file (ZAP35.LST). I have also reset the cursor control keys to the default case (WordStar) and removed some confusing comments that indicated what the last person would prefer but not what was coded. The source file is ZAP35.Z80 and the symbol table file is ZAP35.LST. Beware- Several of the routines in this program do not save registers properly even though the program uses some structured programming techniques. ========================================================================== SUPERZAP MOD 3.4 DOCUMENTATION from Peter G. Martin 24 July 1986 (UPDATED 24 July 1986 -- 3.4b version) This version adapts version 3.3 as updated by John Hastwell-Batten, SYSOP for Tesseract RCPM, and adds some additional functions on John's 'wish-list' as well as some I had on my own wish-list. In particular, it adds the ability in Edit mode to search for either a given ASCII string or a sequence of hex entered on screen. The search can be continued repeatedly until end of file is found, abandoned after any given find, and after any search, there is an option to either stay positioned over the relevant sector or to return to the top of the file. Ascii searches are exact, accepting upper or lower case patterns (ie, there are no upper case matches found for lower-case characters and vice-versa). A second additional option permits 80 column 'typing' of files (at least on my machine), but also adds options to go to any given Sector, Page or Line of text files. As this implies, the program has been coded to keep a check on lines, given that some assumptions are made (see below) about what a line end actually is. I wanted this option because generally I can look quickly at the beginning of text files thru various other commands or programs (eg 'TYPE'), but I really wanted to be able to go straight to the area I wanted, and to browse backwards and forwards through files. In particular, if I wanted to do some smartish editing, I preferred to be able to 'view' a file, detect the sector number of the relevant data that way, and then be able to slip back into Edit mode, go directly to the sector concerned, and use the Change option where possible. The (excessive ?) options added permit this with the choice of selecting a (screen) page number, a line number or a file sector number. The price paid for the flexibility is that when the Type option is selected for a file, the program spends some time reading completely thru the file to queue data it then can use to locate any desired position in the file. An alternative way to organise this bit was to load this data only when one of the GOTO options (sector,page,line no.) was selected. It remains an alternative if someone wants to do it that way, and change the code around for that purpose. The code has grown considerably in volume. Unquestionably, it could be trimmed. I did a bit of minor trimming and some re-labelling when in one or two places when I got sick of unpicking the trail of various relative jumps and non-sequentially numbered labels. The original is in a strictly-structured mode which I personally find excessive at times. I have TRIED (oh God how I tried!) to keep within the spirit of this style of coding. I suspect I didn't always maintain the faith... but then, I'm not a zealous believer... (neither, it appears, is the old JHB, who can be found to have used some 'ret z's in a few places, (HORROR,HORROR!) The word-processor 'soft newline' code assumes that so-called 'document mode' files will SOMETIMES use a SINGLE byte in place of a CR/LF pair, and SOMETIMES TWO BYTES, other than the ASCII standard CR/LF, 0dh,0ah. I re-checked recently to find that the left-handers control-key delight, Wordstar, uses 8Dh,0AH in 'document' files, as well as the single 0DH, sometimes.... or something... Four bytes, imaginately called HARD1,HARD2,SOFT2 and SOFT3 are set aside to deal with variations of this kind in the word processor of your choice. THESE BYTES CAN SAFELY ALL BE SET TO A 'NEUTRAL' 0DH if you files generally just have conventional 0D/0A combinations. They are set DIFFERENTLY in the files at present, to allow for alternatives for 'hard' and 'soft' key combinations.... by which is meant that IF your files, like Wordstar, for example, use a 2-byte combination ending in 0ah, setting EITHER HARD1 or HARD2 to the value of the 'different' lead-in (CR) byte -- in this case, 8DH, will permit proper 'typing' of your files, using the 'hard' variations. (leaving both at 0dh still gives you something readable). SIMILARLY, if, as is the case, for example, with SPELLBINDER, my word-processor of choice, your 'document' files use a single byte (other than 0DH) in place of the CR/LF combo, you can set one or both of the SOFT bytes to those values ...ie, in SPELLBINDER's case, to 0EH (most common soft line end) and 0CH (line end after a hyphen). This is what I mean here by 'soft' -- a line end cue which consists of ONE byte only.... while the 'hard' cases use two bytes.... ending in 0ah, we hope! All four bytes - 2 hard, 2 soft, may be patched along with the various screen- control codes (see ZAP.33) and accessed at 018EH,018FH,0190H and 0191H for SOFT1,SOFT2, HARD1 and HARD2 respectively. If in doubt, SET ALL 4 TO 0DH and see how you go. (You can even use SUPERZAP to patch itself quickly to try various effects... just try to remember to change it back if you create strife..) Incidentally, 0DH is already allowed for, 'hard - wired ' into the code, as a line end marker used by Wordstar and Spellbinder alike, and processed before these bytes are checked, so that the DEFAULT settings, set to 0dh, have no real effect. Other settings may have funny effects, particularly with non-ASCII files, so it's probably better to play safe. There are one or two minor unpleasantnesses about some of the new code, perhaps, and probably still the odd bug or two. But it seems to work for me for the present. (.. he said, having had to fix about 4 more bugs since that line was written....) I have included a SYM file which is compatible with the good old z8e debugger (de best!). The .C0M file included has screen options for Apple ][ cp/m (much the same,I gather, as the Osborne) and some reconfiguration of command keys and menus away from the Wordstar-based original to something more suitable for right- handed people... ????? .... yes, well... ahem... As the SYM file is set up for this version, you may care to look for $LEFT,$RIGHT,$UP,$DOWN and $END (currently set to ^H,^L,^K,^J and ^Z resp- ectively) if you want to go back to the Wordstar-ish originals. The revised .MAC file is now supplied as modified, and with update notes. As at 24 July 1986, I think I have fixed two -- make that 4 -- bugs from the 11 July 1986 version, one of which was MOST unpleasant on some occasions, involving getting lost in the TPA when a single byte was 'found' as the only byte searched for, as the last byte in the buffer. A second bug involved an occasionally invalid assumption about whether the first 128 bytes of a file would contain enough line-ends to fill a screen 'page'. We now assume it may, although I must say that the search routine is crudely sequential, and that a binary search through the ordered queue would probably be a better solution, if and when I or more likely, someone else, wants to get around to it... One or two further problems arose from clobbering of registers in some of the commonly-accessed routines such as RDFS. Frankly, I think the code could do with a bit more revision if more extensions are to be developed to ensure that registers are saved more consistently, particularly before CPM calls. ... but that's for another day... P.G.M. .... updated now to 24 JULY 1986