Silicon Mountain Computers
C-12, Mtn. Stn. Group Box
Nelson, BC V1L 2J3
Canada
This article was inspired by a customer who had BIG (around 44K) Memotext files created with V1, and needed to upload them to a mainframe. I decided to write it up in an info-sheet form, in case anyone else had the same requirement.
On first look, it would appear that the best way to proceed would be to split the large textfile into several smaller ones, which could then be uploaded as described in the ZX-TERM*80 AND MEMOTEXT article. However, on closer examination one comes to the realization that there simply isn’t enough room to maneuver data around, when the data is 44K long and the whole system has only 64K available. Though it might be possible, using “dummy” files which are imported to using a binary tape-save program like Z-XLR8, the convolutions required would drive the most stable individual over the brink.
So if one computer can’t cut the mustard, how about using two? (I’ve yet to meet a devoted ZX/TS user who only owns one machine.) “Computer #1” would have 64K, and would house a slightly modified version of Memotext along with the “mega-textfile.” The modification to Memotext would be a custom “Printer driver” that simply shoots the data out through the modem, instead of to the printer. “Computer 2” would be running ZX-TERM*80, and would be used to capture the data transmitted by computer 1. Once captured, the data could be uploaded immediately, or saved to tape or disk, for later uploading to the remote system. This computer could be running as little as 16K, plus the 8K static RAM in 8-16K. About three pages of text could thus be “cross-loaded” at a time. With more memory (32-64K), up to about 5 pages could be absorbed in each “go.”
“Computer 2” could be virtually any other computer system. For instance, if you have a friend in the neighborhood with a modem and a reasonable terminal program (i.e. capable of up/downloading), you could recruit his help. However, having full and immediate control is preferred, so if at all possible arrange for “Computer 2” to be within your work space.
THE HARDWARE
I tested this scheme using two computers (a 64K TS1500 and a 32K TS1000 with SCRAM board). Both were connected to a Westridge modem. The two modems were directly connected together. In other words, just plug the cable from one modem (doesn’t matter which) into the jack on the other modem. Don’t connect the other cable to the phone line! You don’t even have to plug a phone into the empty jack!
That’s all the hardware that is required.
THE SOFTWARE
For software, you will need Memotext V1 (Computer 1) and ZX-TERM*80 (preferably) or Mini-Xmodem (at the very least) for Computer 2.
Memotext will require a modification to the printer driver. If you have V1C-2.03 or above (supporting a variety of interfaces), facility is provided for entering your custom driver code. If you have the older V1 specifically for the Memotech interfaces, you will have to patch in the new code into the “RS232” driver (how appropriate!). This article will assume V1C-2.05 (the most recent version), but will point out differences in the other versions.
The code that we will add consists of three routines. The first is just “send character in A to the modem,” and replaces the printer driver. The other two are used to initialize (turn on) and shut off the modem. The routines, and their run-time addresses, hexcode, and decimal values is given below:
ADDR HEXCODE NAME MNEMONIC DECIMAL REMARKS
------------------------------------------------------------
27C5 F5 DRVR PUSH AF 245 ;save character
DB77 IN A,77 219,119 ;ready to send?
CB47 BIT 0,A 203,71
28FA JR Z 27C6 40,250 ;no? then loop back.
F1 POP AF 241 ;retrieve character
D373 OUT (73),A 211,115 ;ship it out.
C9 RET 201 ;return to Memotext
27D0 21E127 INIT LD HL,INVL 33,225,39 ;start of table
0606 LD B,06 6,6 ;6 values
7E LD A,(HL) 126 ;get value to send
D377 OUT (77),A 211,119 ;send to ctrl port
23 INC HL 35 ;next entry
10FA DJNZ 27D5 16,250 ;loop until done
C9 RET 201 ;return to BASIC.
27DC 3E15 OFF* LD A,15 62,21 ;15 to control port
D377 OUT (77),A 211,119 ;turns off modem
C9 RET 201 ;return
27E1 00 INVL DEFB 0 ;3 0's followed by
00 DEFB 0
00 DEFB 0
40 DEFB 64 ;40h
4F DEFB 79 ;mode word for 8/N/1
37 DEFB 55 ;turn on modem
If you have V1C, answer “6” (“Other Centronics”) for your interface type. Then enter the decimal values shown above. If you have 2.04 or previous, you’ll get “CODE TOO LONG” with an error stop when entering the last number. Don’t worry about it; GOTO 610 gets you going again.
If you have the older V1M versions, or perhaps a customized version for the Byte-Back serial or whatever, arrange to poke these values in at address 18503 through 18536. Also POKE 18502 with 0. With V1M, answer “R” when asked “RS232/Centronics?” when subsequently running. With V1C you just have to press ENTER, since this prompt was removed.
USING THE SYSTEM
Now that you’ve got Memotext suitably modified so that it operates as a “ASCII uploader,” here’s how you would go about dividing up your massive files into manageable chunks.
Load your big text file into the modified Memotext as usual. Load ZX-TERM*80 or other terminal into computer 2, and relocate as appropriate to give you the maximum file space.
Initialize your DATA REM, but don’t open your capture buffer (save toggle) just yet. Turn on modem 2.
When the text file has loaded, QIT to BASIC, and enter:
RAND USR 10192 (turns on modem 1)
RAND USR 13787 (returns to Memotext).
Now PTF. Answer Start page No. and Justify Y/N as desired. Answer Single-sheet mode. Before pressing P to print the first page, open your capture buffer. The first page will now be transferred.
Repeat with as many pages as you have room for. If you get “Buffer full”, you’re best off to restart. It won’t take you long to discover how many pages you safely have room for.
When the last page in this “go” has been transferred, close your capture buffer (save toggle off). Quit ZX-TERM*80, answer SAVE YES, and save to tape. When done, re-enter ZX-TERM*80, turn modem 2 back on, re-initialize, and continue “printing.”
When all done, turn off modem 1 by quitting to BASIC, and entering RAND USR 10204.
Though this may be time-consuming, it’s pretty “mechanical” compared to some of the exotic tomfoolery with Hot-Z, Z-XLR8, etc. that would be required otherwise.