Nascom Newsletter |
Volume 3 · Numbers 5 & 6 · June 1984 |
Page 7 of 69 |
---|
The following program converts ZEAP source files into files compatible with WordEase III, making it simple to fully document ZEAP files with all the extra facilities offered by WordEase. A comparison of ZEAP and WordEase file structure shows that conversion from one to the other is fairly easy.
The first two bytes of the ZEAP edit buffer is an offset which when added to the start address of the edit buffer (at £0F00 in ZEAP workspace) points to one more than the end of the file. £00 is used as the end of line marker, and ZEAP line numbers are stored as two bytes which follow immediately after the previous line marker, e.g. 92 01 = Line nunber 0192.
In WordEase the first two bytes of the file (at £1000) is the actual address of the end of file marker (£FF, and the ends of lines are marked by £A0. The ZEAP line numbers have to be converted into 4 byte ASCII strings, so that 92 01 converts to £30 £31 £39 £32 = ‘0192”,
The copious program notes should be sufficient to show how the program works. However, a few further notes are required regarding my system. I have two 64K RAM boards (paged as 0 and 1) and an EPROM board (in page 0). ZEAP runs on page 0, but WordEase is transfered into RAM on page 1 by means of a control program. This explains the OUT commands in the TRANS routine. If your system just has one page remove lines 190-220 and 240-250, and modify BUFP (£0F00) to a higher address after cold starting ZEAP, so that the WordEase file has room below the ZEAF file. Remember though that the WordEase file requires more memory than the ZEAP file, i.e. 4 bytes extra far each format code, and two more bytes per line number.
If you have just one RAM page put the program an any convenient location. If your system is similar to mine then run the program at 0C80, flip to page 1 with the command O FF 22, and then COLD START WordEase. A cold start is necessary because the program as it stands overlaps WordEase’s workspace. The WordEase file is unaffected by a cold start. Once in WordEase “Adjust” the text before doing anything else. To simplify the program a little, every time a “Comment” is encountered in the ZEAP file a £A0 marker is placed before it when transfered to the WordEase file. This was to prevent line overflow. If there are more than 47 characters between £A0 markers WordEase will lock up. Note that full line “Comments” should not exceed 42 characters in length.
Page 7 of 69 |
---|