Hello User, We expect you are already getting lots of fun and use out of your Sinclair ZX81 Computer (or your ZX80!) We think this will grow with the addition of the MEMOPAK 64K, as you will now be dealing with much bigger programs and arrays. We've given you as much direct memory as the ZX81 can take, and you're now in a position to compete with some of the much more expensive home, office and workshop computers on the market. We hope, you also like the elegant design. Now let's try to answer some of your queries How do I set up the MEMOPAK 64K? Make sure your power supply is not connected to the ZX81 when you plug the pack into the back. You will find it plugs In firmly enough to be used safely: but to cut out all wobble, you can use the three Velcro tabs as well. Now you will have the ZX81 and the pack looking and acting like one unit. If you have the Sinclair printer this will plug neatly into the back of the memory. Make sure that switch 1 is OFF and at least one but no more than two of the other switches are ON. Now you can join up the power supply to your ZX81. Whatever power supply you use for your ZX81 and printer no extra supply is needed for the MEMOPAK. What should I do, to use the new, larger memory area? On powering up a small K will appear in the bottom left hand corner of the screen. This means that your system is ready to go, but the computer is expecting to use only a maximum of 16K. So you'll probably want to tell the computer that more memory is present. On the other hand you do not have to use all available memory. (See Chapter 26 of the ZX81 handbook). There are two memory locations which you change in order to tell the computer the upper limit of your memory (or RAMTOP If you' re into the jargon) These are 16389 and 16388. To set top of RAM at 64K type the following POKE 16388,255 (this is not usually needed) POKE 16389 255 (this is usually set at 128 for a 32K limit) NEW (the memory is now cleared to start afresh and will now be organised to the new limit) To check the current top of RAM type: PRINT PEEK 16389 and lhe value will appeari n the top left-hand cornerer of the screen. For a quick check that the memory is now at your finger tips you can now try the following little programs: 10 DIM A$(90, 500) or 10 DIM A(9000) or 10 POKE 65000,128 20 PRINT PEEK 65000 These programs reach the top end of memory. Remember numeric fields take up five bytes. (Tip - if you want to store more numbers and they are integers which don't axceed 255, thern why not use the ASC and CODE functions to store values as single byte characters?) How can I test that all my variable locations are good? First set top of RAM back to 32K (just reconnect the power supply or POKE 16389,128) Type in this programl which will test every bit in the 32-64K area. 10 FOR I = 32768 TO 65535 20 POKE I,255 30 LET A= PEEK I 40 POKE I,0 50 LET B = PEEK I 60 IF A <>255 OR B <>0 THEN GOSUB 110 70 SCROLL 80 PRINT I 90 NEXT I 100 STOP 110 PRINT "ERROR AT: ",I 120 STOP 130 RETURN As each Byte is tested it will be printet on the screen. If a bad location is found, the progamm will stop with an error message. Otherwise, reset top of RAM and start that big program. What is where? Confusing isn't it? But not really. First of all, our pack does contain a full 64K RAM (and this can be used by other Z80 processors, in principle). But the ZX81 can only address 64K locations altogether, and the first 8K are obviously dedicated to its own ROM. So although we've got 64K RAM and the ZX81 can address 64K locations this MEMOPAK can't add on more than 56K to the ZX81 ROM. This brings the ZX81 MEMOPAK configuration to 64K total. The original 1K of RAM of the ZX81 ( located at 1 K + ) is disabled and its functions will take place in the MEMOPAK 64K RAM. Still contused? There's a diagram on the inside back cover, to sort lt out. The main thing to remember is that the top 48K is automatically used by the ZX81 BASIC. It puts instructions into the 16-32K area and puts arrays and variables into 32-64K area. When this top area is all used up with arrays it moves down into the 16-32K area, thus giving you a maximum array of something under 48K. You won't quite reach 48K of array because the ZX81 also keeps its display file - the screen memory - and system variables in this area. What about the mysterious 8-16K area? This does not exist in the ZX81 when oor its own. We have supplied it and you con now reach it directly in your BASIC program, using PEEK and POKE. The sort of thing you can use it for will depend on how expert you are, but we can suggest: a) storing data and machine code subroutines b) passing then from one program to another c) memory mapping buffer areas for ad-ons If you want to use the 8-16K area you will have to make sure certain switches are set, as shown here. There are five modes of working. MODE SWITCH --------------------------------------------------------------- 1 2 3 4 --------------------------------------------------------------- A ON OFF OFF OFF This mode provides 64K of memory and is for future developments --------------------------------------------------------------- B OFF ON OFF OFF Memory is provided between 8K and 12K. --------------------------------------------------------------- C OFF OFF ON OFF Memory is provided between 12K and 16K --------------------------------------------------------------- D OFF OFF OFF ON No memory is available between 8K and 16K --------------------------------------------------------------- E OFF ON ON OFF Memory is awailable between 8K and 16K --------------------------------------------------------------- For ZX81 users, switching between modes B, C, D, and E is possible, as long as at least one and no more than two switches are ON at the same time. Never have more than two switches on at a time, as this can lead to overloading. How can I use the MEMOPAK 64K if I've got a white ZX80? The MEMOPAK 64K drives the ROM directly - but with the ZX80 it can't do this unless you first carry out the following simple hardware modifications. a) Break the connecting track between IC6-Pin 7 and IC2 Pin 20. b) Put a 680 ohm resistor between IC6-Pin 7 (74LS157N) and IC2 Pin 20 (ROM). c) Connect IC2-Pin 20 to the edge connector plug 23B (ROM C.S.) This is the finger furthest away from the keyway slot and on the underside of the board. We regret we cannot offer this service ourselves and we cannot accept responsibility for malfunction as a result of this modification such as screen glitches. Have you any tips for running a full ZX81 system? Yes. This is the word buzzing around the users. They may or may not help In your situation. When connected to MEMOPAK 64K and printer, make sure that LOADing takes place with cassette recorder volume set at maximum. If possible make sure that your cassette recorder and ZX81 are plugged into different mains sockets. Don't have the LOAD (EAR) and SAVE (MIKE) connectors plugged in at the same time. LOADing is more likely to be successful if you quote the filename, rather than null (""). Can I run programs written for a 16K pack on the MEMOPAK 64K? Yes, they should run straight away, but things are a little tricky if you want to enlarge your arrays to use the larger memory and you have been SAVEing your data. Basically, you have to re-enter all data after you have redimensioned, to be sure that the right data is going to be accessed. What you can do is: a) Load the original program b) Edit in a special routine which will list and label the contents of all v ariables on the printer. c) Run this routine. You now have a hard copy of your data. d) Re-set your dimensions. Also enter a routine to allow you to re-lnput all your old values plus any new ones. e) Run your program and enter the values. One more thing: to use the memory fully it is much better to use a multi- dimensional string array than a simple string, since the ZX81 limits single sizes to a maximum length of 16K. A couple of program examples BASIC strings are stored in the instruction area of RAM (16-32K) This means that when you set a literal, say LET A$ ="CAT" the word CAT is actually duplicated, once as a literal as part of the instruction and once in the variable area A$. It would be more economic if we could set up an initialisation routine which would store all literals once only in the variables area. This simple loop would let you input up to 10 strings of 20 characters each. 10 DIM A$(10,20) 20 INPUT I 30 IF I = 0 THEN GOTO 70 40 INPUT B$ 50 LET A$(I) =B$ 60 GOTO 20 ............................ 70 INPUT I 30 IF I=0 THEN GOTO 110 90 PRINT A$(I) 100 GOTO 70 ........................... 110 REM AUTOMATIC SELF SAVE 120 SAVE "SELF" 130 GOTO 20 140 STOP Breakdown: Lines 20-60 Store strings Lines 70-100 Display strings Lines 110-140 Save program with string arrays Now look carefully at the instructions from line 110. With increased array capacity in the memory you will probably want to store your data more permanently. The ZX81 system does not(at least yet) support freestanding files but it is possible to save your arrays (and their contents) along with your program. However, it's important that when you next load the program, it does not carry out a RUN but a GOTO instead, otherwise RUN will automatically clear the arrays. This program will SAVE itself automatically (line 120) When you next LOAD it will pick up straight away at line 130 - the line after the SAVE - and branch back to the line quoted there (in this case 20) In this way the RUN instruction is avoided and the variables are not cleared. But make sure you don't branch back to a point where you re-dimension the array you're trying to save! MEMOTECH are a so planning to bring out the following ZX81 add-ons in the near future. • a high resolution graphics pack • a digitiser • a 16K RAM pack which will be partexchangeable for the Memopak 64K • an RS232 interface • a Centronics printer interface We're sorry but we cannot accept any orders or enquiries at this stage. Please watch the magazine advertisements. Good Luck From all at MEMOTECH