Skip to main content

Full text of "Syntax Magazine"

See other formats


SYNTAX 


Serving Timex-Sinclair 
Personal Computers 


A PUBLICATION OF THE HARVARD GROUP 

VOL.5 NO.2 ISSN 0273*2696 FEB., 1984 


IN THIS ISSUE 


MONEY TALKS; TIMEX LISTENS 


8K Programs 

Keyboard Scanning.5 

Multiple Keys.8 


Pause Without Flash....9 


Timex withdrew from retail sales of home 
computers and will employ their resources in 
other product lines. 

SINCLAIR TO CONCENTRATE ON QL IN US 


TS2068 Programs 

Syntactic Sum.7 

Advanced Video Modes...4 

Classified Ads.10 

Hardware Review 
MD-2 Modem.4 

Machine Code.4,5,7,9 

New Products and 
Services.3 

News 

Timex Withdraws.1 

Future ZX/TS support...1 
Syntax Will Continue..10 

Program Improvements 
Firstloader.2 

Syntax Errors.2 

Users' Groups.2 

Utilities.....4,5,7,9 

Vendor Report.1,2 


Index of Advertisers 
Byte Back Co.7 


Nigel Searle announced that Sinclair 
does not plan to re-enter the US market with 
ZX81s or Spectrums. Talks with distributors 
(to follow QL mail order) are proceeding. 

KEY SUPPORT OPERATIONS WILL STAY 

SoftSync announced its intent to keep on 
selling its existing line of TS programs. 
SoftSync, 14 E. 34th St., NY, NY 10016 

Byte-Back announced changes to the MD2 
modem to make it compatible with all machines 
and provide both originate and answer tones. 
See review, this issue, for more details. 

Microsync Services will keep offering 
service agreements for ZX/TS machines at 
$10/yr. Write them at 162R Marlboro St., 
Keene, NH 03431 for details. 

Profile 2068 is available now with brief 
operating instructions. You will get all the 
detailed, 100-page documentation later at no 
extra cost. $29.95 ppd. Thomas B. Woods, 

POB 64, Jefferson, NH 03583 

Tom Woods asserted whole-hearted support 
and will start "new, interesting products." 

Timex Vice President of Marketing and 
Sales, C. Michael Jacobi, announced that 
"Consumer warranties will be honored and out- 
of-warranty service will continue." 

Banta Software intends to continue sales 
of their Timex-related programs. 

Robert Schiller of Kopak says their new 
version of Hi-Res Word Processor allows 80 
column printing. He also announces a sale on 
Timex and Softsync software for the ZX/TS (4 
cassettes for $20) with a large selection. 

SYNTAX will continue (see story p.10). 


1 


















SYNTAX ERRORS: Ohm's ZXLaw, 

Dec.83, line 390, should read: 

390 PRINT "POWER (P)=";(V** 

2)/R;" W" 

PROGRAM IMPROVEMENTS 

You can stop Firstloader before it 
translates by POKEing 45013,201. 
This stub leaves the ZX/TS bytes in 
high memory, starting at 49277. To 
restore the translator, you simply 
POKE 45013,205 and then enter the 
command RAND USR 45 013. This trick 
lets you examine the original data. 

VENDOR REPORT 

Address complaints about Frog 
Software or Sinclair Computing to 
Regional Chief Inspector, Northeast 
Region, 1633 Broadway, New York NY 
10097 Attn: Mail Fraud Division, 
212/974-8501. 

Mindware advertised a Monitor 
program to use with ZX/TS machines 
in SYNTAX Dec.83. They inform us 
the program doesn't work and isn't 
available anywhere. 

Pegasus Microsystems will fill 
all outstanding orders but stopped 
accepting any after January. They 
will shift their business to other 
machines and stop selling retail. 

Memotech continues to support 
the TS1000 although they are 
getting out of the Timex business. 

SYNTAX received a complaint 
about Roger Valentine's book. The 
Timex-Sinclair 2068 . published by 
John Wiley. Wiley told us that an 
independent reviewer, using a 2068, 
checked the complaint by choosing 5 
programs at random and they ran 
without change. Ignore references 
to a 16K Timex 2 000, the programs 
work on 48K 2068s. Watch out for 
graphics, they differ. Wiley used 
advance versions of Timex manuals 
to check the book and some problems 
exist because of late changes in 
the machine. If you note problems 
in this book, write to Wiley Press, 
John Wiley & Sons, 605 Third Ave., 
NY, NY 10158. They will reply to 
your inquiry and use your input to 


correct the next printing. If you 
consider buying this book, satisfy 
yourself that you will be able to 
repair minor problems. 

C-20 Magazine stopped publish¬ 
ing and has issued refunds for its 
undelivered issues. 

Starburst Software ceased pub¬ 
lication of ZX/TS software and gone 
out of business on Feb. 1, 1984. 

We received another complaint 
of non-delivery by Kopak Creations, 
dated Feb.12 '84, amounting to $40. 

We've heard that Timex Town 
Software, Omnitronics (Z-dubber), 
and Jameco (keyboard conversion 
kits) plan to drop Timex-related 
lines. We also hear that Z-West 
newsletter stopped printing. 

ZX/TS USERS' GROUPS 


To check for a local group that's 
not listed, or to announce a new 
group, call 617/456-3661 or write 
SYNTAX, RD 2 Box 457, Bolton Rd., 
Harvard, MA 01451. Send SASE for 
name of group in your area. 

Clinton, CT: Southeastern 
Connecticut TS User's Group meets 
at Hull Library. Contact Gary 
Cummings, 203/669-2342. 

New Haven, CT: Sinclair Study 
Group, c/o Chris Baldwin, 16 Lewis 
St., New Haven, CT 06513. 

Collinsville, CT: New group 
forming, contact David Dubay, 28 
Claire Hill Rd., POB 78, Collins¬ 
ville, CT 06022, 203/673-7069. 

Stamford, CT: New group, contact 
Barbara Karp, 139 Downes Ave., 
Stamford, CT 06902, 203/359-2124. 

Memphis, TN: Memphis User Group, 
Correction: Andy Boles, 2059 
Pennel Cove, Memphis, TN 38116, 
901/346-0890. 

Butler, WI: New address for 
Sinclair Milwaukee Users Group Ltd. 
(SMUG), Box 101, Butler, WI 53007. 


2 


NEW PRODUCTS AND SERVICES 


TS-INTERCOM, a special interest 
group on CompuServe, allows ZX/TS 
users with ZCOMM software and a 
modem to exchange programs and 
information. Contact TS-INTERCOM, 
1908-715 Don Mills Rd., Don Mills, 
Ontario, Canada M3C 1S4, 416/424- 
1895, CIS ID 70261,166. 

Pheonix Enterprises (1780 N. DuPont 
Hwy., No. 17, Dover, DE 19901 , 
302/734-0179) announces T/S COUNT, 
an accounting package ($29.95), and 
OPERATION PHEONIX, a strategy game 
using music and hi-res color 
graphics ($19.95). Both written 
originally for the 2068 but avail¬ 
able for the ZX/TS at $20 and 
$14.95, respectively. 

D. Lipinski Software (2737 
Susquehanna Rd., Roslyn, PA 19001) 
offers CHECK-B, a comprehensive 
check book program for the TS2068. 
$20 price includes cassette and a 
free update when Timex releases a 
new mass storage device for 2068s. 

Textwriter 2000 TS2068 word- 
processor prints standard or full 
width pages on TS2040 (two column 
output). Includes full editing, 
reformatting, word wrap, tab stops, 
and block moves. $18.95 cassette 
from Robert Fingerle, 39639 
Embarcadero, Fremont, CA 94538. 

A&J Micro Drive, a reworked Entrepo 
(formerly Exetron) stringy floppy 
works with CAI Instrument's wafers, 
but incorporates an improved oper¬ 
ating system including program 
chaining and MC SAVE/LOAD. For 
ZX/TS, $149.50 from A&J Micro 
Drive, 1050 "I" East Duane Ave., 
Sunnyvale, CA 94086, 408/732-9292. 

Maples Enterprises (688 Moore St., 
Lakewood, CO 80215) introduces 
Harmonium, a 4 voice ZX/TS sound 
board kit utilizing normal com¬ 
ponents + $9 sound chip. Sche¬ 
matic, doc. and suppliers list, $5. 


ACZ General Ledger 2.000 comes with 
a comprehensive instruction manual, 
binder, and cassette for TS2068 at 
$39.95 + $1.50 P&H. Designed to 
meet the accounting needs of a 
small business, the program pro¬ 
duces printed reports on the TS2040 
including journal, ledger, monthly 
and YTD income statements, balance 
sheets, trial balances, and a chart 
of accounts. Interfaces to CARDCO 
numeric keypad ($44.95 + $1.5 0 P&H). 
From Cottage Technology, 5720 W. 
Little York, Suite 178, Houston, TX 
77091, 713/448-7058. 

JK Audio is back in business (POB 
3295, Escondido CA 92025-0580, 
619/741-5132) and offering the JK- 
500 series of interfaces for the 
ZX/TS. Features include 2 16-bit 
I/O ports, real time clock, ADC, 
and 8K nonvolatile RAM, in many 
different combinations, from 
$125.95 to $174.95 (bare board 
$49.95), + 3% P&H (US), 8% (for). 

HS-1 High Speed Interface connects 
two ZX/TS machines together, using 
one for computing and one for dis¬ 
play. Results in steady display 
while running 5.5 times faster than 
SLOW mode. $98 assemb., $78 kit, 
from Interface Design, POB 151, 
Rexford, NY 12148. 

Timex/Sinclair Ideabook demon¬ 
strates how to solve problems with 
50 ready-to-run programs for the 
ZX/TS. By David Ahl, softcover, 
150pp., $8.95 from Creative 

Computing Press, 39 E. Hartover Dr., 
Morris Plains, NJ 07950. 

Adropos Technology (1071-A Avenida 
Acaso, Camarillo, CA 93010, 805/ 
482-3605) announces SIN-16, a 16K 
RAM ($25.95 + $4 P&H), Dr. Floyd, an 
Eliza like program, Graphics Pak 1, 
five programs for drawing and 
saving graphics, and Wordplay, five 
game programs for teaching liter¬ 
ature and grammar ($12.95 ea or $25 
for all 3, plus $2 P&H), all for 
ZX/TS machines. 


3 



HARDWARE REVIEW 

Product: MD-2 Modem 

Machines: ZX/TS 2K or 16K 
From: Byte-Back Co. 

Rt 3 Box 147, Brodie Rd. 
Leesville SC 29070 
803/532-5812 

Price: $149.95 Assem. 

$119.95 Kit 

Byte-Back continues their 
tradition of fine products for the 
ZX/TS with the MD-2, an originate 
only direct connect modem with 
software for ASCII translation, 
program and text upload/download, 
and printing (RS2 32 or TS2 04 0). 

Since the introduction of the 
MD-2B, Byte-Back no longer sells 
the MD-2. The MD-2B can originate 
or answer via a hardware switch, 
but in all other respects is an MD- 
2. None of the modems answer the 
phone or dial. Byte-Back has 
upgrade kits from MD-2 to MD-2B. 

They also sell a TS2068 Modem with 
identical features, same price, 
under the name MD-68. You can get 
a kit allowing you to switch your 
MD-2 or 2B to a MD-68 at will. 

ZCOMM, the software provided 
with Byte-Back modems, comes on 
cassette with a 2K RAM version on 
one side, and a 16/64K version on 
the other. Both versions are 
recorded twice with different 
recorders to ensure the tape will 
load. It seems a sturdy program. 

Several times during testing 
the modem I thought I had uncovered 
a bug in ZCOMM, but it turned out 
to be a feature: when storing text 
from the phone line into program 
memory, ZCOMM's stores the bytes in 
memory. When memory fills, the 
system appears to crash. Actually, 
it munches the text for a while 
(over a minute) and turns it into 
REM statements. This way, you can 
store an entire conversation in 
memory, then SAVE or LLIST it. 

For a sturdy product with 
better support than you'll get from 
Timex, get the MD-2B. 

a 


RECIPES FOR 2068 ADVANCED VIDEO 

Your TS2068 can display lines 
of 64 characters, more detailed 
color, or a completely separate 
display file. We show you how to 
activate these functions and plot 
hi-res (512x192) points. 

First, use program 1 to move 
system variables out of the area 
used by DFILE 2, change video mode, 
and clear DFILE 2. Timex supplied 
this machine code. LOAD & RUN it; 
use p.248 of your 2068 manual to 
choose video mode. (Mode 62 gives 
the best 64 col. display.) 

Now use program 2 to accept 
Y,X-pairs and plot on the 64-column 
screen. Prior plots aren't erased. 

Hints: G=file number (0-1) 

K=high digits, character line (0-2) 
I=scan line in character line (0-7) 
J=low digits, character line (0-7) 
H=character position in line (0-31) 
S=dot position in character (7-0) 
POKE 01GK Kill JJJH HHHH,SSS 
Binary: High byte Low byte,Data 









KEYBOARD SCANNING 


Your 2068 uses ports to scan 
its keyboard, as do all Sinclairs. 
Each uses the same addresses, but 
the data differs. 

As you know, Sinclair uses the 
CPU to scan its matrix keyboard. 
Forty keys, arranged as 8 half-rows 
of 5 keys each, provide all the 
functions. Additional keys simply 
connect parallel to a primary key. 

From the ZX/TS schematic, we 
know that the 5 lines KBD0-KBD4 
connect vertical columns of keys—0 
connecting SHIFT, A, Q, 1, 0, P, 
ENTER, and SPACE; 4 connecting V, 

G, T, 5, 6, Y, H, and B. You'll 
find this pattern from Z to SYMBOL 
SHIFT, X to M, and C to N. 

Each half-row connects to one 
ADDRESS line of the CPU. As you 
see in Figure 1, the half-row 
connects to A8-A15 (via a diode). 

When Z80 processors execute a 
port command—IN or OUT—the lines 
A8-A15 contain a number from one of 
the registers. The instruction IN 
r,(C) reads the port number held in 
C, places the data read in r, and 
puts register B on address lines 
A8-A15 during the read (see p. 254 
of the Zilog programming manual). 

If r stands for register A, this 
assembles to ED, 78 (237, 120 
dec.) — just what you find in the 
Spectrum at 0296H (662 dec.). C 
contains the port address FE (254). 
By using LD BC,portadd followed by 
IN A,(C) we can specify portadd as 
the 16 bit number to place on the 
address bus during a port read. 
Effectively, we get 16 bit port 
addresses. Now let's arrange the 
data from the Spectrum manual. 

BC Register Scanned BC Register 
Hex Dec n Keys Keys n Dec Hex 

F7FE 63486 3 1-5 0-6 4 61438 EFFE 

FBFE 64510 2 Q-T P-Y 5 57342 DFFE 

FDFE 65022 1 A-G NR-H 6 49150 BFFE 

FEFE 65278 0 CS-V SP-B 7 32766 7FFE 

Note that register C always 
holds FE, port 254, to read the 
keyboard. Register B sequences 



5 














































down if you use n as your guide in 
reading the numbers in order. Add 
8 to n and you'll find the address 
line that connects to the half-row 
scanned by that address. Another 
table may help. 

Line A8 A9 A10 All A12 A13 A14 A15 
n 01234567 
2**n 1 2 4 8 16 32 64 128 

B 254 253 251 247 239 223 191 127 

Bhex FE FD FB F7 EF DF BF 7F 


Now let's look at bit patterns 
on address lines for each B value. 


B Rea 
FE 254 
FD 253 
FB 251 
F7 247 
EF 239 
DF 223 
BF 191 
7F 127 


ADDRESS LINE 


08 09 
0 1 
1 0 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 


10 11 
1 1 
1 1 
0 1 
1 0 
1 1 
1 1 
1 1 
1 1 


12 13 
1 1 
1 1 
1 1 
1 1 
0 1 
1 0 
1 1 
1 1 


14 15 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
0 1 
1 0 


As you see, when B=254, only a 
key connected to A8 could make a 0 
on any of the KBD lines because all 
other address lines equal 1. Since 
the keyboard simply connects a KBD 
line to an address line, you can 
get a zero on KBD0 by pushing the 
key that corresponds to both B=FE & 
KBD0 (caps shift). You can make 
zero on KBD4 by pushing V. If you 
push both V & caps shift, both KBD0 
& KBD4 go to zero, while all the 
other KBD lines stay at 1. Push 
more keys, get more zeros, up to 5. 

Once I thought that KBDn stood 
for KeyBoarD n; now I know it means 
KeyBoard Data n. Those Data lines 
take inputs and combine them into 
number form using binary weights. 
(D5 is unused; D6 is cassette in. 
See Mather White's article (in this 
issue) on multiple keys and you'll 
see that D4 shifts to D5 in 16422.) 
If we take all the combinations of 
5 bits and arrange them in a table, 
we can see the possible numbers. In 
the table, # stands for a key with 
no letter—a SHIFT, SPACE or ENTER. 


Number D0 
31 1 

30 0 

29 1 

27 1 

23 1 

15 1 


Binary Val 1 


Dl D2 D3 D4 
1111 
1111 
0 111 
10 11 
110 1 
1110 
2 4 8 16 


Keypress 

NO KEY 

#AQ10P## 

ZSW290L# 

XDE38IKM 

CFR47UJN 

VGT56YHB 


See that if you press no key, 
all the data bits equal one and the 
machine sees 31. Pressing one key 
makes the corresponding bit equal 
zero and subtracts the binary value 
from 31 to generate the number in 
the left column. If you read down 
any column under the keypress 
heading, you will recognize a half¬ 
row of your computers keyboard. On 
the right side of the computer, the 
keys read from right to left, just 
what you expect when you look at a 
ZX/TS schematic for the key matrix. 

Well, what if you push more 
than one key? Stay in one half-row 
and you will generate the remaining 
numbers. If you push keys in other 
rows, the keyscan routine will sort 
them as B takes different values. 

Every combination of keys in a 
half-row generates a unique value. 
Pressing combinations subtracts the 
key-values from the no-key value. 

Although Sinclair machines do 
not use this keyboard property, you 
can see it with a simple program on 
your 2068. If you enter: 

100 PRINT AT 0,0;IN 65022:GO TO 100 
you can press ASDFG half-row keys 
in combination and see what values 
result. Change the argument of IN 
to 57342 and you move to the POIUY 
half-row. Try each address shown 
in the first table of this article. 
Notice that the value depends only 
on position in the half-row; half¬ 
row selection varies with address. 

Now try this. With no key 
pressed, and the preceding one-line 
program entered, put a tape in your 
recorder and play it into the 
machine. Notice that the number on 
your screen changes. As bits come 
in from the EAR jack, D6 goes to 1, 
and the number jumps to 95 (31 


6 


because no key is pressed plus 64 
from the D6 line). 

Spectrum computers differ 
slightly in the values returned for 
keypresses. But the differences 
are regular and understandable. 

Machine No-Key DDDDDDDD 
Name Value 11 23 45 H 
TS1000 63 11111100 

TS2 068 31 11111000 

SPECTRUM 255 11111111 

SPECTRUM3 191 11111101 

As Robert La Jeunesse pointed 
out in SYNTAX (Oct.83, p22), you 
need only use LD BC,portadd plus an 
IN A, (C) to achieve register 
indirect addressing on your ZX/TS 
computer. For convenience, we will 
also use RAND to convert decimal to 
hex and store the result in the 
system variable SEED (16434,5). (A 
trick we learned from the June 1983 
issue of the Sinclair-Timex User 
Group Newsletter published by The 
Boston Computer Society.) To get 
the widest possible application of 
this, let's set RAMTOP below IK and 
use a routine that can run on a 
ZX81, but make the machine code run 
independent of location. This code 
simulates IN for your ZX/TS. 

POKE 16388,236;Set RAMTOP To 17388 

POKE 16389,67 

NEW 

POKE 17388,237;ED LD BC,(nn) 

POKE 17389,75 ;4B nn=SEED 
POKE 17390,50 ;32 Address of SEED 
POKE 17391,64 ;40 sys var (16434) 
POKE 17392,237;ED IN r,(C) r=A 
POKE 17393,120;78 
POKE 17394,6 ;06 LD B,0 

POKE 17395,0 ;00 

POKE 17396,79 ;4F LD C,A 
POKE 17397,2 01;C9 RETURN TO BASIC 
Now use this BASIC loop: 

10 INPUT N (n is a number from our 
20 RAND N first table.) 

30 LET X=USR 17388 
40 PRINT AT 0,0;N,X 
50 GOTO 30 


Stock! MD2B Smart MODEM $119.95 kit 
Assembled and tested $149.95 
(MD68 TS2068 Version and upgrade avail) 
•Originate and Answer 
•Send text from memory 
•Send/Receive programs 
’Save text in memory 

PRINT, Review, SAVE 
*2040 or RS232 Printer 
•RS232 Printer Port 
’No extra memory req'd 
*2 hrs free CompuServe 

COMPUSERVE PACKAGE WITH 5 FREE HOURS ONLY $39.95 

64-K MEMORY $109? 5 k,t 

the “ULTIMATE MEMORY" $119. 95 ASSEMBLED 

FEATURES: 

• Battery Backup • PROM/ROM socket 

• Reset Switch . BYTE-BACK EXCLUSIVE FULL 64-K 

WHY PA Y MORE FOR LESS FEA TURES? 

GET_ THE_ "ULTIMATE MEMORY" BYTE-SACK’S LWL64 

KEYBOARD.$59. 98 

GORILLA/BANANA PRINTER.$239. 95 

NEW ZX PRO/FILE including shipping 
Clearly the Best File Management Program Available. 

RS-232 PRINTER INTERFACE Only $59.” KIT$69. 95 ASSEMBLED 

CONTROL MODULE 8 Relays,8 Inputs, $59. 95 KIT $69. 95 ASSEMBLED 

16K MEMORY UM16 $59." KIT $69." ASSEMBLED & TESTED 

Battery Backup, reset switch, PROM/ROM socket PLUS . . . 

1 year, 100% Trade-in c redit towards the UM-64. _ 

BYTE BACK CO. |f amerkan | 

Rt. 3, Box 147, Brodie Road I ex a ss ‘ j hh 

Leesville, S.C. 29070 I "** H 500 * I v3l r~- 

ORDER PHONE 803-532-5812 ■ u "- 1 ■■■■ m,,^ 

Add $4.95 shipping and handling 

90 Day Warranty On All Modules. 10—Day Return Priviledge 

SYNTACTIC SUM—TS2068 


This program calculates Syn¬ 
tactic Sums for TS2068 programs. 

The number returned by USR 65500 
should match the one printed after 
our program listings. The program 
runs anywhere in RAM. 

Syntax, Inc. hereby grants 
everyone the right to use the this 
program, to generate Syntactic Sums 
and to publish them with programs. 
Replication is strictly prohibited 
without our written consent. 

Michael S. Shaw, Enfield CT 



Special thanks to Andy Boles & his 
users' group, 2059 Pennel Cove, 
Memphis, TN 38116, 901/346-0890 


7 



























DETECTING MULTIPLE KEYS 

INKEY$ returns the character 
of the key currently being pressed, 
returning the empty string for no 
key and for multiple keys. But you 
can use the system variables and a 
few bytes of machine code to detect 
multiple keys of your choosing. 

Memory locations 16421 & 16422 
store a keyboard matrix code for 
the keys currently held down. Your 
ZX/TS system calls these system 
variables LAST_K; they have no 
direct counterpart in Spectrum and 
2068 machines. 


Contents 

KEY 

of 16421 
Bit=0 


16422 

Bit=0 

ZXCV 

0 

SHIFT 

0 

ASDFG 

1 

AQ10P## 

1 

QWERT 

2 

ZSW290L. 

2 

12345 

3 

XDE38IKM 

3 

09876 

4 

CFR47UJN 

4 

POIUY 

5 

VGT56YHB 

5 

#LKJH 

6 

(# means shift, 

#.MNB 

7 

enter, or break) 


Both locations are all ones 
(255 dec.) when no key is pressed. 
When you push a key, one or more 
bits in each system variable become 
zero. For example, depressing B 
makes bit 7 of 16421 and bit 5 of 
16422 go to zero. All other bits 
remain set to 1. So the contents 
of these locations for B equal: 

(16421)=01111111=127 
(16422)=11011111=223 

Only the SHIFT key works with 
a different pattern—bit 0 of 16422 
becomes 0 while all bits of 16421 
remain 1. In typing, you use SHIFT 
with another key, and the exception 
permits the ZX/TS to allow one two- 
key pair while rejecting other 
combinations. 

Thus, SHIFT B returns: 

(16421)=01111111=127 
(16422)=11011110=222 

Use the following program to 


see these patterns on your screen. 
Compare the results to the charts 
preceding. 



When you run this program, hold the 
key down until the first decimal 
value prints. 

Now we can construct a machine 
code routine to detect multiple-key 
presses. But first we will need to 
choose a specific set of keys to 
test for. Use the preceding charts 
to see which bits should equal 0. 
(Convert them to decimal if you 
wish.) Now change all the ones to 
zeros and all the zeros to ones. 
(Subtract from 255 if you are using 
decimal.) POKE these new values in 
locations 16519 and 16523. 


8 















































































































For example to test for S f G & 
A, you must decide which bits to 
zero. From the preceding tables we 
see these required zeros: 


16421 16422 

Letter Bit=0 Bit=0 

S 1 2 

G 1 5 

All 


So we need the following: 

(16421)=11111101=253 
(16422)=11011001=217 
To get the values needed for 
our program, we must reverse all Is 
and 0s, bit by bit (complement the 
number). You can do this using the 
decimal values by subtracting them 
from 255. Thus: 

11011001=217 
+ 00100110= 38 
11111111=255 

So we will use 2 and 38 as values 
to put into our sample MC program. 

Now use the following machine 
code routine to test for a specific 
combination of depressed keys. 



Now enter: 

2 PRINT USR 16514 

3 SCROLL 

4 GOTO 2 
RUN 

When you press the selected 
keys, you'll see a zero on-screen, 
otherwise you get 16514. So if you 
use IF NOT USR 16514 THEN...instead 
of IF INKEY$ = ...THEN..., you can 
test for more than one key. This 
extends your ability to write two- 
player games or to make combination 
locks for your programs. 

Mather White, Rome PA 

[Values stored in 16421 & 16422 are 
related to the numbers we generated 
in KEYBOARD SCANNING. Except for 
the SHIFT key, the content of 16421 
equals the B-register value that 
scans a half-row. Bits 1 through 5 
of 16422 equal the data line inputs 


D0-D4. For the SHIFT key, 16421 
holds 255, and 16422 holds 254. 

Cassette input values do not 
show up in these variables, despite 
their appearance in keyscans.—KO] 

PAUSE WITHOUT FLASH 

PAUSE n makes your ZX/TS 
display a screen for n/60 seconds 
or until a key is pressed. If n 
exceeds 32767, your computer waits 
until you press a key. If that key 
was down when the PAUSE began, the 
computer ignores it—you must press 
another. In SLOW mode, the screen 
flashes at the end of the PAUSE. 

You can avoid these problems 
with the following MC routines. If 
flash bothers you, use the first of 
these in a 1 REM to control PAUSE 
without flash, and without ignoring 
keys already down when it starts. 



Set this up with: 

LET A=length of pause-1 
POKE 16515,A-256*INT(A/256) 

POKE 16516,INT(A/256) 

AND start it with LET L=USR 16514. 

If you simply want to wait for 
a keypress, you can substitute this 
code for PAUSE 4E4: 



Mather Whits, Rome PA 

You can use this MC REM loader to 
get the numbers listed in Mather 
White's articles into the REM 
statements. Be sure to start with 
line 1 containing as many X's as 
bytes in the MC, then enter the 
numbers one at a time. Stop with 
STOP followed by ENTER. 



9 






















SYNTAX IS NOT DONNE, NOR BROWNING 


CLASSIFIED ADS 


SYNTAX will keep on publishing 
and actively seek to to identify or 
provide support for Sinclair/ Timex 
computers. We'll use our existing 
resources—such as drop-shipping 
capability—to help other suppliers 
continue to support users. 

If you must stop supplying the 
products you developed, but want to 
continue supporting your customers, 
SYNTAX will accept documentation, 
program listings, tapes, annotated 
ROM listings—anything that would 
help your customers—notes, partial 
manuscripts, designs, PC layouts, 
or even special parts. 

Want to donate your mailing 
list to suppliers who are going to 
continue? SYNTAX will accept list 
donations and make them available 
to all suppliers existing as of the 
donation date at the least cost we 
can manage for distribution. 

To conserve cash, SYNTAX will 
print smaller issues until our ad 
base rebuilds. You control this— 
if you tell advertisers you saw 
their ad in SYNTAX when you buy, we 
get more ads. We use that money to 
bring you more applications as well 
as utilities, tutorials, hardware 
projects, and machine code. 

Those of you who save money by 
reading a friend's copy (or illegal 
copies) of SYNTAX, make advertisers 
believe it costs more to reach you 
in SYNTAX than in our competitors. 
Suppliers count warm bodies per ad 
dollar and compute bucks spent on 
an ad per resulting sale. You sell 
the ads. Products are advertised 
where you tell vendors—by purchase 
and referral—to contact you. 

Within weeks, your free ride 
stops. You'll see why brand x is 
in XXXX. Ask not for whom the bell 
tolls, it tolls for thee, ad buyers 
and readers who believe big outfits 
stay in small markets. ECC & Timex 
quit on you. Whither XXXX? 

SYNTAX was made for thee! The 
best is yet to be, The last of this 
for which the first was made. 


Reach thousands of ZX/TS users—for 
just $9/line! Send your typed copy 
(35 characters per line) with check 
or MO to read us by the 15th to be 
published in the next issue exactly 
as typed. No fractions or cent 
symbols. Include your phone No. 
SYNTAX Classified, 

RD 2, Box 457, Harvard, MA 01451 

GET THE WORKS NOW AND SAVE 
Get The Works II and take, 
absolutely FREE, your choice of 
three valuable products for your 
ZX/TS. See our ad on back cover. 

SOLVE LOAD PROBLEMS! WINKY BOARD 2 
cassette-computer interface also 
helps programs for loading TS1000 
tapes into TS2068 +MORE $20.95 assm 
15.95 kitPPD Free catalog G.RUSSELL 
ELEC. RDl-539 Centre Hall PA 16828 

CRYSTAL COAST SOFTWARE: Educational 
Entertaining and Practical Programs 
Send for FREE catalog: 

PO BOX 233, MOREHEAD CITY, NC 28557 

PRO/FILE UPDATES : the newsletter 
for ZX Pro/File owners. Get mods, 
enhancements, and explanations as 
they occur for $9.95/yr. 

Get the PRO/FILE program for $16.95 
VISA/MC welcome-Call (603) 586-7734 
Tom Woods Box 64 Jefferson,NH 03583 

*** THE DEFINITIVE TAX 1983 *** 

Fr 16K ZX81/TS1000. EASY DATA ENTRY 
AUTO-TAX COMPUTATION FOR EACH CHNGE 
INCLS INCOME AVERAGING. For APR 84 
List:5.95 Cassette:15.95 ** LQP 
2365 Newcastle,Cardiff,Ca,92007 ** 

HOT Z-II FOR THE 2068 
The best of the TS1000 machine 
utilities has migrated to the 
2068. Assemble, disassemble, 
label, relocate, single step, 
print/save listings with this 
multi-purpose utility. HOT Z-II 
is the way to learn Z80 code and 
discover how the computer works. 
Just $24.95 + $2 ph from Sinware 


lO 


FOR ADULTS ONLY ;Software Package,8 
games,8-14K ea..Send $2 4.95 :R.Todd 
206 Sheridan St. N.Easton,Ma.02356 


SYNTAX is published monthly by a wholly- 

owned subsidiary of The Harvard Group. 

Syntax ZX80, Inc. 

RD 2, Box 457, Harvard, MA 01451. 

Telephone 617/456-3661. 

12 issues, $29. Single issue, $4. 

Publisher: Kirtland H. Olson 
Editor: Eric K. Olson 
Consulting Editor: Ann L. Zevnik 
Technical Consultant: Kirtland H. Olson 
© Syntax ZX80, Inc., 1984. All rights reserved. 
Photocopying prohibited. ISSN 0273-2696 


OUR POLICY ON CONTRIBUTED MATERIAL 

SYNTAX invites you to express opinions related to any Sinclair or Timex com¬ 
puter or peripheral, or the newsletter. We will print, as space allows, letters discuss¬ 
ing items of general interest. Of course we reserve the right to edit letters to a 
suitable length and to refuse publication of any material. 

We welcome program listings for all levels of expertise, written in either Sinclair 
BASIC or Z80 machine code. Programs can be for any fun or useful purpose. We 
will test run each one before publishing it, but we will not debug programs; please 
send only workable listings. Programs submitted on cassette can be tested more 
quickly and with less chance of error. 

In return for your listing, we will pay you a token fee of $2.00 per program we 
use. This payment gives us the nonexclusive right to use that program in any form, 
world-wide. This means you can still use it, sell it, or give it away, and so can we. 

We will consider submissions of news and hardware or software reviews. Please 
keep articles short (350-400 words). Again, we reserve the right to edit accepted 
articles to suitable length. We will pay 7 cents per 6 characters, including spaces and 
punctuation, for accepted articles. 

When you send in articles for possible publication in SYNTAX, please include 
the following information: 

• How to operate the program, including what to input if it does not contain 
prompts. 

• Whether you can run the program over again and how. 

• How to exit the program. 

• The Syntactic Sum (program published in June 81; 
send SASE for a free copy). 

• What RAM size program requires. 

• What ROM program uses (8K, 2068, Spectrum). 

• For MC programs, what addresses must change to relocate the code and what 
ROM calls are used. 

We pay for this explanatory text at the same rate as we pay for articles in addi¬ 
tion to payment for the program itself. 

If you want us to return your original program listing or article, please include 
a self-addressed, stamped envelope. Otherwise, we cannot return submitted material. 


Fill out the coupon below and mail to: SYNTAX, RD 2, Box 457, 

□ My check is enclosed. □ Please charge my □ VISA 

Make checks Payable to: □ Diner’s Club □ Mastercard 

SYNTAX ZX80, Inc. □ American Express □ Access 

□ Carte Blanche □ Barclaycard 

Account number _ 

Exp. date _ Bank number (MC only) _ 

Signature _ 

Name _ 

Address _ 


*** TEXTWRITER 2000 *** 

TS2068 WORD PROCESSOR. DOUBLE WIDE 
PRINTOUT FROM TS2040. FULL EDITING. 
WRITE FOR INFO. $18.95 CASSETTE. 
BOB FINGERLE, 39639 EMBARCADERO 
FREMONT, CA 94538 

MARINE & TROP. FISH PROGRAMS,Set up 
feeding, maint.,all you must know. 

2 cass. $13 ea.:KIDSMATH, add, sub, 
mult, div. 1 to 3 digits:$9:HANGMAN 
500 words,10 categ:$10:LITTLE BLACK 
BK. mail & phone list:$7: ZX/TS 16k 
all on cass. lists $3:CAJUN SOFTWAR 
PO BOX 624, Chal., La., 70044 

CASINO KENO - for TS1000 or TS2068. 
A game for one or a room full. Mark 
your tickets then watch the numbers 
come up on the display - just like 
the Casinos at Las Vegas. T/S 2040 
Printer recommended or use printed 
tickets supplied. SASE for printout 
fact sheet or order CC44 for TS1000 
or CC144 for TS2068. $17.95 + $2.00 
P&H. Calif residents add sales tax. 
MACSHAK SOFTWARE 73-312 IRONWOOD ST 
PALM DESERT CA 92260. 

GOLF HANDICAPPER computes USGA han. 
for 46 players. 16K. $20 ppd. Per¬ 
sonal Computer Products 11200 Lock- 
wood Dr. #307 Silver Spri. MD 20901 


Harvard, MA 01451 0/0 , 

s2/84 

YES! Please send me: 

□ The Combination II (13 issues of SYNTAX and SQ 

Winter 82-Summer 83) . . S39 

□ The Catch-up II (SYNTAX Jan. 82-Jan. 84, SQ Winter 

82-Summer 83, plus binder) . $77 

□ THE WORKS II (SYNTAX Nov. 80-Dec. 83, SQ Winter 

82-Summer 83, plus 2 binders) . $97 

Q 12 issues of SYNTAX . $29 

□ 3 issues of Syntax Quarterly (Winter 82-Summer 83) . . $25 

□ 1 issue Syntax Quarterly □ Winter 82 ( □ Spring 83 

□ Summer 83 . $9 

□ 1 Binder . $9 □ 1 issue of Syntax. $4 

Telephone orders call 
617-456-3661 


These offers expire 4/15/84 — SUBSCRIBE NOW. 


City _ State _ Zip 

Phone: Day (_) _ Evening (_) 

□ My subscription number is: _ 

□ This is a new subscription 










SYNTAX 


THEIR LOSS IS TOUR GAIN 

A major software retailer went belly up, 
so we can bring you these great values! 
Get THE WORKS now and take, absolutely 
FREE, any three of these valuable 
products for your ZX/TS computer. 

Includes: 

• THE WORKS II, our complete 
collection of SYNTAX and SQ 
through December 1983—three 
years of our experience and 
expertise for your ZX81/TS1000. 

Plus your choice of any three: 

• TS1016 16K RAMpak— upgade your 
system or get a spare now! These 
are becoming difficult to find. 

• The ZX81/TS1000 Home Computer 
Book —one of the finest books 
about the ZX/TS, including 
beginning and advanced BASIC, 
machine code, memory maps, ROM 
calls, code charts, and more! 

• Vu-Calc, Frogger, or any of the 
other Timex software packages 
listed on our order form — 
thousands of these sold at #10 to 
#20 each! 

Due to limited supply, we ask you to list 
five preferential choices on the order 
form. We will do our best to deliver your 
> top three choices. Products may be 
ordered seperately at the prices listed on 
the order form. We pay all shipping for 
THE WORKS and your 3 free products. 
Shipping for additional products #1/item. 

This offer expires 4/15/84, so order now! 


Quan Code Item _ Price Amt 

WRK The Works II plus any #97 
three items below (only 
one free RAM per order, 
please). My preferences 
for 3 FREE products are: 

r i i i—r 

_1st 2nd 3rd 4th 5 th _ 


I also want to purchase these products: 



HCB The ZX81/TS1000 Home $9 

Computer Book 



RAM TS1016 16K RAMpak ITT 



VUC Vu-Calc i6 






0RG The Organizer #6 1 






AMT Loan/Mortgage Amortizer #6 



CHK The Checkbook Manager #6 



CPN The Coupon Manager #6 



CAR The Car Pooler #6 



STP The Stamp Collector #6 



STK Stock Option Analvzer #6 



MAT Super Math #6 



STC States and Capitals #6 



CCC Chess and Chess Clock #6 



BGM Backgammon and Dice #6 



GAM The Gambler #6 



CUB The Cube Game #6 



GFT Grimm's Fairv Trails #6 


We p£ 
WRK £ 






SYNTAX, RD 2 Box 457, Harvard, MA 01451 

[] Check (payable to SYNTAX ZX80) enclosed 
[] MC [] VISA [] AMEX [] Diners Club 

Account Number __ 

Exp. Date _ Bank Number (MC) _ 

Signature ___ 

Name ___ 

Address __ 

City __ State _ Zip _ 

Phone Day (_)_ Night (_)_ 

[] I am already a subscriber to SYNTAX 
TELEPHONE ORDERS CALL (617) 456-3661 


THE 

H\RV\RD 

GI^OLP 

Bolton Road, Harvard, Mass. 01451 


First Class 


U.S. Postage 

PAID 

Harvard, MA 
Permit No. 8 
01451 


MR WILLIAM TOMLINSON 
3635 RIVEREDGE DR. 
JACKSONVILLE FL 32211