Skip to main content

Full text of "Apple Contact v2 HQ (color)"

See other formats


concqcc 

the user group neuusletter for june 1978 Mcipplc computer inc. 







INTRODUCING 



contact 2/ the user group newsletter for june 1978 



f^appie computer inc. 



until July 31, 1978, to show our appreciation to 




the existing owners who helped us get started. 



The Disk II Floppy Disk Sub- 
system consists of an intelligent 
interface card, a powerful Disk 
Operating System (DOS), and one 
or two mini-floppy drives. (The 
computer will handle up to seven 
interface cards and fourteen drives, 
for control of nearly 1 .6 megabytes 
of data). The combination of ROM- 
based bootstrap loader and an 
operating system in RAM provides 
complete disk handling capability. 

FEATURES 

• Powerful Disk Operating 
Software: 

- LOAD and STORE files by 
name (Up to 35 Char/Name) 

- BASIC Program Chaining 

- Random or Sequential File 

Access 

• Fast Access Time — 600 msec 
(Max.) Across 35 Tracks 

• Individual File Write-Protection 

• Full Disk Capability in Systems 
with as Little as 1 6K RAM 

• Data Transfer Rates of 1 56K 
Bits/sec 

• Storage Capacity of 1 16 Kilo- 
bytes/Diskette 

• High-Efficiency Subsystem 
Powered Directly from the 
APPLE II (Up to 14 Drives) 

• Completely Assembled and 
Tested - Not a Kit 

• Packaged in Heavy-Duty, Color- 
Coordinated Steel Cabinet 



SPECIFICATIONS: 



Commands: 

OPEN, CLOSE, READ, WRITE, 
LOAD, SAVE, EXEC, RUN, 
APPEND, LOCK, CHAIN, 
UNLOCK, DELETE, MONITOR, 
NOMONITOR, MAXFILES, IN#, 
PR#, INIT, BLOAD, BSAVE 

Access Method: 

Random or Sequential — arbitrary 
record length 

Bootstrap Loader Method: 

By means of Loader routine in two 
256 x 8 PROMs, on-card. 

Disk Drive: 

Shugart 5 l A" floppy disk. 

Track Access Time: 
Varies with number of tracks 
crossed. 200 msec (avg.), 600 msec 
(max. across 35 tracks) 

Disk Speed and Latency: 

300 rpm, 100 msec avg. latency 

Disk Capacity: 

1 16K bytes (formatted), soft- 
sectored 

Data Transfer Rate: 

156 bits per second 

Physical Dimensions: 

Card - 4.5" x 2.75" (not including 
connector finger): fits inside the 
APPLE II. Drive - 6.1 " x 8/75" 
x3.8" (WDH) 

Controller Capacity : 

Up to two drives per controller. 
Multiple controllers can be used. 



lOCfll USCft 
GROUPS 

tipple's still 
springing up 



New local APPLE II user groups 
continue to form. Again, we remind 
you that we can list your group 
only if we know of its existence. If 
there is no APPLE group in your 
area and you wish to start one, talk 
to your APPLE dealer — he'll be 
able to help. 



Here are the new groups we *ve 
learned about since Contact #1 : 

Alabama — 

APPLK CORPS 
Computer Center, Inc. 
433 Valley Avenue Plaza 
Birmingham, AL 35209 
Terry Woodward 
(205) 942-8567 

California — 

Video Games & Computers 
301 Balboa 

San Francisco, CA 941 18 
(415) 221-8500 

SILICON APPLE PROGRAMMING 

SOCIETY 
2485 Rossotto Drive 
San Jose, CA 95130 
Jim Hoyt 
(408) 374-3680 

Connecticut — 

APPLE USER GROUP 
ComputerLand of Fairfield 
2475 Blackbrook Turnpike 
Fairfield, CT 06430 
Glen Brennan 
(208) 374-2227 



concoct 2/ the user group newsletter for june 1978 



fgcippkz computer inc. 



Maryland — 

MARYLAND APPLE CORPS 

Computers Etc. 

13A Allegheny Avenue 

Towson, MC 21264 

Kevin Parks 

(301) 296-0520 

New Jersey - 

Computer Lab of New Jersey 

141 Route 46 

Budd Lake, NJ 07828 

Dan Fischler 

(201)691-1984 

Pennsylvania — 

APPLE USERS GROUP 
Philadelphia Area Computer Society 
29 S. New Ardmore Avenue 
Broomall, PA 19008 
Neil Lipson 

(215) 825-3800, x278 (work) 
(215) 356-6183 (home) 

Texas — 

APPLE CORPS 
ComputerLand of Austin 
3300 Anderson Land 
Austin, TX 78757 
(412)452-5701 

THE APPLE CORPS 
Greenhill School 
Fulton Building 
14255 Midway Road 
Dallas, TX 75240 
Bobbie Ferrell 
(214) 661-1211 (work) 
(214) 243-6347 (home) 

And here are two people who'd like 
to form groups: 

Earl Keyser 
22 Clover Lane 
Mason City, IA 50428 

R. V. Collins 
12502 Bexley 
Houston, TX 77099 




LOOKING 
MKHD 

. . . to how your 
Apple will grow 

DISK II - If you've read this far, 
you know the news. Get 'em while 
they're hot! 

APPLESOFT II - The new APPLE- 
SOFT has arrived. It's an expanded 
version of Microsoft's floating-point 
BASIC, with 9-digit arithmetic and 
a large function library that makes 
it ideal for business and scientific 
programs. Easy to use and powerful, 
APPLESOFT IPs capabilities 
include high-resolution graphics 
routines; DATA STORE/RECALL 
statements that allow saving vari- 
ables to tape; IN# and PR# state- 
ments to simplify peripheral use; 
and an ONERRGOTO command to 
allow user-specified error-handling 
routines. 

The tape version (P/N A2T0004) 
costs $20, and is available now at 
your APPLE dealer. A ROM card 
version (P/N A2B0009), which 
plugs into slot 0, has hardware and 
software switching to select either 
Integer or APPLESOFT BASIC. It 
frees up 10K of RAM space for 
your programs. Available in July, 
the APPLESOFT ROM card's 
regular price is $200; but through 
July 31 only, it will be introductory- 
priced at $100 — a genuine bargain. 

MACRO ASSEMBLER/EDITOR - 

Just a note to let you know that we 
are working on a powerful, multi- 
pass Macro Assembler and Editor. 
This new APPLE II package will 
run with either tape or disk storage. 
We plan to release it in September, 
so look for more details in the 
August issue of CONTACT. 



PERIPHERALS - As a convenience 
to APPLE users, starting in July we 
will offer a cassette recorder, a 
9-inch B/W video monitor, and two 
matrix printers - the Centronics 
779 and the MICROPRINTER-PL 
We'd also like to remind you that 
we already stock the Heuristics 
Speechlab™ voice recognition unit 
(P/N A2M0015, $189), and Moun- 
tain Hardware's Introl™ a.c. 
master control unit (P/N A2M00 1 2), 
and a.c. remote controller (P/N 
A2M0013, $329). 

NEW SOFTWARE - A host of new 
software is now available from the 
Apple Software Bank. Watch for 
description information in 
CONTACT No. 3. 

APPLE COMPUTER PRODUCTS 

These programs are now available 
from your Apple dealer: 

REQ'D 
MEMORY 



16K 


Checkbook Cassette 




A2T0001/$20.00 


16K 


Start re k / S t a rvva i s Casse t te 




A2T0002/S 15.00 


4K 


Color Demo/Breakout 




Cassette 




A2T0003/S7.50 


16K 


Applesoft II/F.P. Demo 




(w/Manual) Cassette 




A2T0004/S20.00 


16K 


Hi Res Graphics/Hi Res 




Shapes Cassette 




A2T0005/S7.50 


4K 


RAM Test Cassette 




A2T0006/$7.50 


4K 


Color Math Demo/Hangman 




A2T0007/S7.50 


8K 


Blackjack/Slot Machine 




Cassette 




A2T0008/S7.50 


4K 


Biorhythm/Mastermind 




Cassette 




A2T0009/S7.50 


48K 


Apple II Capabiliti ~ 




Cassette 




A2T001 


16K 


Finance I - 2 Cass 




Package 




A2T001 


8K 


Datamover/Telepor.. 




Cassette 



A2T0012/S7.. 



3 



concacE 1/ the user group newsletter for June 1978 



£jcippkz computer inc. 



1 6K Wari/Othello/Dragon Maze 
A2T0013/S7.50 

24K Chess 

A2T0014/S 15.00 



APPLE-USER CONTRIBUTED 
PROGRAMS 

These programs are the start of 
an extensive list to be released over 
the remainder of the year. We have 
received nearly 300 programs, most 
without documentation of any sort. 
As we evaluate and document 
them, you'll read about them here. 
We should be ready to supply 
programs from the Bank by 
September. 

GAMES 

Life (Hi-Res Version) 
4K Bagels - A Number Guessing 
Game 

16K Applevision - An Audio/ 
Visual Hi-Res Demo 

4K Johann S. Apple - Makes 
Apple a Musical Instrument 

4K Catch - A Ball-and-Paddle 
Game 

4K 23 Bricks - A NIM-like 
Game of Strategy 

EDUCATION 

1 6K Nations and Capitals - 

Multiple-Choice Quiz 
16K Differential Equation Solver 
8K Classifier - For Building 
Decision Trees 

UTILITIES 

24K Tax - A Guide to 1977 

Forms 1040 and A 
16K Base Conversion - For 

Hex/Decimal Conversions 

MISCELLANEOUS 

24K Rotation - A 3D Cube 
Rotates With True 
Perspective 

NEW SERVICES - Be sure to 
watch CONTACT No. 3 for 
announcemefit of an industry first - 
an exciting new service that allows 
Apple users to get current stock 
quotes, financial news, and other 
information over the phone, 
through the new Communications 
Interface Card. 



CDiTomm 

by Phil Roybol, Marketing Mgr. 

find now 
it's your turn 

Writing this second issue of 
CONTACT, I'm reminded of my 
favorite way to start a lecture - 
with an analogy. You see, a news- 
letter (and a lecture) is like a well in 
the center of a village, a well from 
which all the villagers draw their 
water. All who pass the well have 
an equal chance for the water. And 
for that chance, all pay the same 
fee — the journey to the well. But 
while the fee is the same for all, 
each leaves the well with a different 
amount of water. Some get nothing 
for their trouble, and some merely 
a cupful. But some leave with a 
full bucket. 

At the well of information, the 
buckets are questions. And this 
brings me to the point of this 
editorial. CONTACT is your news- 
letter. Its purpose is to expand your 
enjoyment and use of your com- 
puter, and to that end CONTACT 
will feature applications and intro- 
duce products of interest to you. 

Now, we've done the first two 
issues of CONTACT by the seat of 
our pants because the time's been 
too short to get your feedback. But 
from now on it's up to you. For 
CONTACT to grow into a healthy 
and useful tool it needs your feed- 
back: questions . . . suggestions . . . 
criticism. With such guidance, 
CONTACT cannot help but succeed. 

On the other hand, if your trip 
to the well leaves you still thirsty, 
perhaps it's because you bring only 
a cup, not a bucket. The moral? If 
you don't see what you want here 
- ask for it! (But please, please, 
when you write us, put your full 
address on your letter, not just the 
envelope; and if you call, give us 
your area code. That way, we'll 
make contact.) 



• * ♦ # Y\\ 



MTCHCS AND 
PftOGRCSS 

. • . wherein program 
bugs ore stomped upon 

Had some printer card problems? 
Here's why, and the fix. 

The original printer-card firm- 
ware uses the screen window width 
as the controlling parameter to set 
the margin for BASIC listings and 
TAB functions. This means that 
when your printer's line length is 
set at 1 32 columns, for example, 
the system display is set at 132 
characters/line. We didn't think 
that this would cause a problem, 
because printer margins greater 
than 40 characters and screen 
displays are not allowed to co-exist. 

But there's a catch when any 
screen clear functions are executed. 
The system uses window width to 
bound the clearing operations, 
which is a direct command not 
detectable by the printer card. But 
the keyboard input routine executes 
a "clear to end of line" when it gets 
a carriage return. Since the window 
width can be at well beyond the 
40 columns, memory from the 
current cursor position to well past 
the normal boundary will be set to 
"space" (SAO). If the cursor is at 
the bottom of the screen, this can 
cause addresses from $800-up to be 
set to SAO. Simply setting the 
printer width on the keyboard with 
I c 132 N (CR), with the cursor at 
the bottom of the screen will cause 
these locations to be bombed 
because the window width gets set 
before the (CR) is executed. Since 
APPLESOFT starts at $800 and 
Integer BASIC variables start at 
$800, bad things will happen for sure. 



4 



concoct 2 the user group newsletter for june 1978 



^appto computer inc. 



So ... to reduce the possibility 
of problems with APPLE'S Parallel 
Printer card, do these things: 

1 - Home the cursor (ESC @, 
or CALL -936, in BASIC) 
prior to typing printer 
control sequences that set 
the column width past 40 
columns. 

2— Do not use any screen or 
line clear operations when 
using the printer with the 
column width set past 40 
columns. Then be sure to 
return the line length to 
40 columns before turning 
off the printer card with 
PR#0. 

If you're using the revised 
printer card with PROM PI -02, add 
this: 

3— To perform the vertical tab 
in Integer or APPLESOFT 
BASIC on the printer, the 
command 

POKE 36, (Tab distance) 
should be used in place of 
the TAB or VTAB command. 




BITS AND 
l»l€C€S 

. . . things about Apple, 
handy to know 

The good earth 

APPLE II must be grounded — 
either via its three-wire power cord 
inserted into a properly grounded 
three-wire outlet, or by a wire 
inserted between APPLE'S metal 
base plate and one of the plate's 
mounting screws. In the latter case, 
you must run the ground wire to a 
(preferably very close) ground ~ a 
long, long metal rod driven into the 



earth, and connected to APPLE via 
a heavy wire, or a wire connection 
to the cold-water system (but make 
sure you have metal piping). 
Grounding eliminates any possibility 
of the existence of a floating poten- 
tial, which can be detrimental to 
you, to APPLE, and to proper tape 
cassette operation. 

Get your head straight 

Cassette tape recorders — 
whether expensive or inexpensive — 
often suffer a misalignment of their 
playback head during shipping and 
other handling. Such misalignment 
causes azimuth error, which is 
death to the high-frequency re- 
sponse (particularly on units with- 
out a tone control) so necessary to 
accurately transfer data. But any 
audio shop technician can readjust 
the azimuth alignment; a skilled ear 
alone is often sufficient to do the 
job. Your original APPLE pre- 
recorded tapes are excellent align- 
ment references, because they 
are recorded with professional 
equipment maintained to the 
highest professional standards. 




OUT OF 

TH€ MIST.... 

. . . clearing up things 
thought already clear 

Errata for the errata 

Okay, okay - so we've got the 
correct our corrections. The errors 
we're taling about show up in our 
memo of April 17, 1978, "APPLE- 
SOFT II", on pages 5 and 8. 

Page 5 of the memo discusses 
commands for APPLE IPs HIRES 
graphics video mode. The items to 
be corrected concern themselves 
with the commands HGR and 
HGR2, and their descriptions. 



The HGR command must be 
used only with ROM. Why? You'll 
find out when we finish the sen- 
tence we left unfinished in HGR 's 
descriptive paragraph. The third 
sentence should read, "DO NOT 
use this command with cassette 
tape (RAM) version of APPLE- 
SOFT as it will wipe out APPLE- 
SOFT itself, which resides in page 
1 of HIRES graphics between 8K 
and 16K. Besides finishing the 
third sentence, make it the last one 
in the HGR paragraph by delet- 
ing, "Example 20 sets . . . bottom 
of screen, " 

As for the HGR2 command - 
it is for use with the RAM version. 
Our error? To the beginning of the 
last sentence of HGR2 's descriptive 
paragraph we cleverly added two 
simple words that reversed our 
meaning - "DO NOT . . Please 
delete these words; the last sen- 
tence should read, "Use this com- 
mand with cassette tape (RAM) 
version. " 

Finally, on the last page (page 8) 
of the memo, the opening sentence 
of Section IV reads, ". . . depress 
'RETURN' key - or you have 
accidentally depressed the 
'RETURN' key, then type:" Well, 
if you do what that sentence tells 
you to do, nothing will happen, 
"RESET" is the word intended; 
simply delete both "RETURNs", 
replace each with "RESET", and 
the corrections to the memo are 
finished. 

P.S. If you haven 't got a copy 
of the memo in question — please 
write and we'll send you one ( with 
corrections, of course). 



5 



concoct 2 the user group neuusletter for june 1978 



f|cippkz computer inc. 




HOW TO 

...things your 
manual never 
told you 



LISTINGS - A LITTLE AT A TIME 

There is a way to stop APPLE 
IPs LIST operation. You must go 
into the MONITOR and enter the 
following bytes of hex : 

3DA:A9 E3 85 36 A9 03 85 37 

60 RETURN 
^48 AD 01 CO 10 08 AD 1 1 CO 

AD RETURN 
V 801 CO 10 AD 1 1 CO 68 4C 

F0 RETURN 
\FD 4C DA 03 RETURN 

After loading th^lfex code, press 
CONTROL Y to activate this 
StopList routine. 

Now we try listing memory by 
entering 0.FFF RETURN. Let 
some lines go by, then press any 
key. If you've done everything cor- 
rectly, the scrolling will halt. Now 
press any other key and the lines 
will again scroll. This routine will 
still work when you go back into 
BASIC. But if for any reason you 
press RESET, you must reactivate 
the routine by going back into 
the MONITOR and pressing 
CONTROL Y. 

How does it work? Well, to 
print a character on the screen, 
APPLE II uses a routine located in 
MONITOR. APPLE goes to the 
routine by finding its address in 
locations 54 and 55 (36 and 37 in 
hex). But entering a CONTROL Y 
replaces this address with the 
address of the Stop List routine. 
You catch APPLE because it always 
checks for a Stop List command 
before printing any character. Soft- 
ware engineers call such a feature a 
hook, and use it to make program- 
ming just a bit more handy. 

Tony Hughes 
THE APPLE CORE 
San Francisco, Calif. 



AN APPLESOFT CONVERT 
PROGRAM 

Programs written in APPLE- 
SOFT BASIC and saved on tape 
cannot be LOADed and RUN with 
APPLESOFT II. But there is a way 
to use them without retyping - by 
means of our CONVERT program, 
which we list below. 

The CONVERT program runs 
in Integer BASIC, accepts a tape in 
APPLESOFT BASIC, and produces 
a new tape in APPLESOFT II 
BASIC. To use CONVERT, LOAD 
the CONVERT tape. It will ask you 
if the old program (written in 
APPLESOFT BASIC) used 
OPTION 1 or OPTION 2. 



- OPTION 1 was GRAPHICS 
COMMANDS WITHOUT 
LET OR REM STATE- 
MENTS 

- OPTION 2 was LET OR 
STATEMENTS, BUT NO 
GRAPHICS 

After you answer you will be 
prompted to play the old program 
tape. After CONVERT has finished 
reading and processing the old tape, 
it will ask you to record a second 
tape. This second tape will be your 
original program converted into 
APPLESOFT II. If any errors are 
discovered during the conversion 
process, you will be given self- 
explanatory messages. 



CONVERT 



TEXT : CALL -936. VTAB 3: PRINT " APPLESOFT CONVERSION PROGRAM: " 

2 PRINT " 

CONVERTS OLD APPLESOFT PROGRAMS TO": PRINT "APPLESOFT 1 I FORMAT" 

3 PRINT " 

COPYRIGHT 197B APPLE COMPUTER, INC. 

4 PRINT " 
" POKE 34, 10 

5 PRINT " WAS PROGRAM WRITTEN IN OPTION 1 OR": PRINT "OPTION 2? 
": PRINT "OPTION 1: GRAPHICS COMM 

ANDS WITHOUT" 

6 PRINT " LET OR REM STATEMENTS" : PRINT " 
OPTION 2: LET AND REM STATEMENTS BUT NO 

GRAPHICS. " 

7 INPUT "OPTION #",0: IF OOl AND DO 2 THEN 7 

10 CALL -936: PRINT "PUT APPLESOFT PROGRAM TAPE IN RECORDER,": POKE 60, Z POKE 61, Z: POKE 62 

,2: POKE 63, Z: F=1536 B=4096 
20 INPUT "PRESS THE PLAY BUTTON, THEN HIT RETURN", A*: CALL -259 
25 IF PEEK (1X128 THEN 30: PRINT " 

TAPE READ ERROR!": PRINT " TRY RE-ADJUSTING VOLUME CONTROLS ON 
• TAPEPLAYER, THEN RE-RUN THIS PROGRAM" 
30 POKE 60, Z: POKE 61 . 16: E= PEEK CZ)+ PEEK ( 1 )*256-6657 POKE 62, E MOD 256: POKE 63, E/256: CALL 
-259 

35 CALL -936: PRINT " 
CONVERTING. . . " 

40 IF B>»E THEN 1000. A= PEEK <B)+F MOD 256: POKE B, A MOD 256: POKE B + l , PEEK (8+1 > +F/256+ ( A> 
255) 

50 FOR B=B+4 TO B + 999: T= PEEK (B): IF T< 1 33 THEN 250: IF TO 135 AND TO 142 OR 0=2 THEN 200: 
C=B 

55 IF TO 142 THEN 60: T=137: GOTO 250 

60 C=C+1:U= PEEK (C); IF U=32 THEN 60 IF U=67 OR U=71 OR U=72 OR U=BO OR U=B6 THEN GOTO U: 

PRINT "BAD STATEMENT IN PROGRAM" : GOTO 250 
67 T=160: GOTO 90 

71 T=136: GOTO 90 

72 T=142: GOTO 87 
80 T=141: GOTO 90 

86 T=143 

87 CC=Z: D=B 

88 D=D+1: IF PEEK (D)044 AND PEEK (D)<>58 AND PEEK (D> THEN B8: IF PEEK (D)=44 THEN 89: PRINT 
"BAD STATEMENT IN PROGRAM!". GOTO 250 

89 CC=CC + 1: IF CC=1 THEN 88: POKE D, 197 

90 POKE C. 32: GOTO 250 

199 REM : MAP OLD TOKENS TO NEW 

200 IF T> 1 95 THEN 250: T=T+ 1 + ( T>1 34 > *34+ ( T> I 39 ) + ( T> 160 ) + ( T> 1 77 ) *2 

250 POKE B,T: IF B/50O*5GO=B THEN PRINT "STILL CONVERTING!" 

251 IF TOO THEN NEXT B:B=B + 1: GOTO 40 
878 CC=Z: D=C 

1000 CALL -936: POKE 60, Z: POKE 61, Z: POKE 62,2: POKE 63, Z: PRINT "DONE! 
". INPUT "START RECORDING, 

THEN HIT 'RETURN'", A* 

1001 POKE E-2, Z: POKE E-1,Z: POKE E, Z 

1005 D=E-4096: POKE Z, D MOD 256: POKE l.D/256: POKE 2,Z: CALL -307 
1010 POKE 60, Z: POKE 61,16: POKE 62, E MOD 256: POKE 63, E/256: CALL -307 
1020 PRINT "0. K. 

" : PRINT "THE TAPE JUST RECORDED CAN NOW BE LOADED INTO APPLESOFT DC. ": END 



6 



concoct 2/ the user group newsletter for june 1978 



£cipplG computer inc. 



HOW TO SET LOMEM WITHOUT 
HARDLY TRYING 

LOMEM is the start of the vari- 
ables storehouse; HIMEM marks the 
top of the program store. Between 
the two is your working space. 
Entering BASIC with BC will set 
LOMEM to 2048, the normal 
default value. But there are times 
(when using the Heuristics Speech- 
lab™ for instance) when LOMEM 
must be set to a different value. 
The pro will incorporate such an 
operation right into his programs, 
rather than leaving it to chance. 

Well, then, is there an easy way 
to reset LOMEM inside a program? 
The answer is yes, and we guarantee 
that your life will be simpler as a 
result. The few statements shown 
below will set a new LOMEM within 
an existing BASIC program. Of 
course, doing so will destroy exist- 
ing variables, so do it before any are 
defined in the program. You can, in 
fact, insert this little routine at the 
start of your program so that it 
conveniently does the whole job for 
you. Actually, POKE statements 30 
and 40 are the ones that do the 
work, the rest of the program is 
shown as an example, and figures 
out what data to POKE. 

8 REM HOW TO SET LOMEM INSIDE fi B 
0S10 PROGRAM (THIS DESTROYS fiNV 

wjmi definitions) 
io urn m urn*?* 

20 8^256 :£=fi MOD 25S: REM SEPARA 
T E NEW LOMEM INTO LOW AND HIGH 8 

m. 

00 POKE 204,0: POKE 205,0: REM RES 

ET POim FOR VARIABLE TABLE 
40 POKE 74,0: PORE 75; B: REM RESET 

UJffH POINTER 
50 PRINT "LOMEM RESET": END 

STRING + STRING = 
CONCATENATION 

A string is a series of characters, 
zero to 255 characters in length. To 
symbolize that it is a string being 



operated upon, a string-variable 
name ends with the $ symbol. 
APPLE can operate on string vari- 
ables, in whole or in part, just as it 
operates on numeric variables. And 
this ability to manipulate strings - 
to reformat them, etc. — is a power- 
ful tool. 

Concatenation is an important 
facet of string manipulations. To 
concatenate strings means to append 
one to another, to "series connect" 
hitherto independent character sets 
in order to operate upon them as a 
single entity. The concatenation 
function does exist in APPLESOFT 
and APPLESOFT II BASICs but, 
unfortunately, not in Integer BASIC. 

There is, however, a simple rou- 
tine that will let you concatenate 
strings with Integer BASIC. It's 
listed below, and operates by defin- 
ing each string, finding the length 
of the first, and telling APPLE to 
tack the start of the second string 
to the end of the first string, and so 
on down the line. The example 
shown here is for two strings only; 
the maximum length of any con- 
catenated string is, of course, 
limited to 255 characters. 



10 DIM flf(#},Bf(48) 

20 AI^ABCDEF": REM BUILD fit 

38 Bf^GHIJKL": REM BUILD Of 

40 PRINT m^mr^m 

50 L= LENCAD: REM FIND LENGTH OF 

CONTENTS OF m 
68 mmm: REM ADD Bf ON AFTER 

LAST CHAR IN Of 
78 PRINT ■ft^Bfc'Bf^Bf: END 

HOW TO GIVE A NUMBER 
SOME CHARACTER 

Both APPLESOFT and APPLE- 
SOFT II contain the functions ASC 
and CHRS. These are opposites - 
complementary functions, if you 
will - in that ASC returns the 
decimal ASCII number equivalent 
of its designated string-variable 



argument, while CHRS returns a 
single character equivalent of its 
designated decimal-ASCII number 
argument. 

Examples: Say, M$="M" is some 
string variable of interest to us in 
APPLESOFT. When you tell APPLE 
to PRINT ASC (MS), APPLE 
responds with a "77" on its screen. 
(Remember, first character only ; 
decimal 77 in ASCII corresponds 
to the letter "M") On the other 
hand, tell APPLE to PRINT CHRS 
(77), and you get the letter "M". 

A rather simpleminded example 
of the use of this pair of functions 
could be to associate them with the 
RaNDom function in a program to 
generate random alphanumeric 
sequences. 

Except that you cannot do it 
in Integer BASIC, because, alas, 
Integer contains only the ASC 
function. But don't despair, for all 
is not lost. Below we give you a 
very short routine that gives Integer 
BASIC the equivalent of a CHRS 
function. Insert it in your programs 
wherever you wish to and - presto! 
- you can convert decimal numbers 
to their ASCII character equivalents. 

PEM CREATEING A 'OR*' FUNCTION 

, WHICH COVERTS A NUMBER INTO 1 

IS fbCll CHAR EQUIVALENT 

REM MAKES A$ THE FIRST V 

ARIALBE DEFINED IN THE PROGRAM, 

SO HE KNOW WHERE IT IS 
20 INPUT B: REM GETS THE NUMBER TO 

SE CONVERTED. PRINTING CHARACTE 

RS ARE ifel AND UP 
38 m 2850, B: REM INSERTS NUMBER 

INTO THE STRING VARIABLE W> 

SO IT CAN BE PRINTED AS A CHARAC 

TEA 

40 PRINT B; s CORRESPONDS TO " 

.• pi; 

50 GOTO 26: END 



7 



[cippkz computer inc. 

10260 Bandley Drive 
Cupertino, California 95014 
(408)996-1010 



FIRST CLASS 
U.S. Postage Paid 

Permit No. 
11050 
San Francisco, CA 



Downloaded from www.Apple20nline.com 



concoct 2/ the user group newsletter for june 1978 



[cippkz computer inc. 



OUTSIDC TH€ 
ORCHARD 

N6UU PRODUCTS 
. • . of interest to 
Apple users 

FROM VIDEO TO UHF - Another 
modulator unit, this one from ATV 
Research, is available to transform 
APPLE IPs video output to a video- 
modulated UHF signal. For B/W or 
color, the unit — called the Micro- 
Verter model MVX-500 — outputs 
a signal tunable to one of four 
channels above television channel 
14. It does not require direct con- 
nection to your television receiver's 
antenna terminals, and it is powered 
by four AA cells, which the manu- 
facturer claims will last in excess of 
1000 hours. Suggested price: $35, 
from dealers or factory direct. ATV 
Research, 13th and Broadway, 
Dakota City, NE 6873 1 ; 
(402) 987-3771. 



HARD-COPY GRAPHICS 
TERMINAL - The Panographic-84 
is a precision x-y plotter with 100- 
step resolution in both directions; it 
is driven by zero-drift, adjustment- 
free stepping motors. Plotter pro- 
grams can be written in BASIC or 
machine-language. Interface to 
APPLE is via our Parallel Printer 
card. Soon to be available is a chart 
reader that will allow you to use 
the plotter as an input device. The 
assembled plotter, with computer- 
operated pen lifter and molded 
cover, sells for $1400 (delivery 60 
days ARO); as a kit, without lifter 
and cover ($995 (90-days delivery); 
the pen lifter kit is $85 ; the cover, 
also $85. Pan Dynamics, Inc., 
2950 Nebraska Ave., Santa Monica, 
CA 90404; (213) 829-2332. 

CO-RESIDENT ASSEMBLER - 

Microproducts has introduced a co- 
resident Assembler claimed to be 
much more powerful than MOS 
Technology's Assembler for the 
6502 MPU, and thus better able to 
exploit APPLE IPs advanced fea- 
tures. The new Assembler has two- 
pass implementation, and incorpo- 
rates a ten-command text editor, 
and a Microproducts printer driver 
for which the company makes an 
APPLE II/PR-40 printer interface. 
One of the features of the Assembler 
is that it permits the text file to be 



saved or loaded from tape. Micro- 
products, 1024 17th Street, 
Hermosa Beach, CA 90254; 
(213) 374-1673. 

TAPE RECORDER CONTROL - 

ROR and Candex Pacific have 
announced a relay activator to start 
and stop audio tape recorders via 
the REMOTE jack. The activator 
plugs into the GAME I/O connector 
on the Apple II, and is controlled 
with PEEK and POKE commands. 
Its connector allows the game 
controls to plug into it so that both 
devices can be used simultaneously. 

Retail price is $24.95, and 
quantity discounts are available. 
Delivery is 30 days ARO. Technical 
questions should be addressed to 
Candex Pacific, 693 Veterans Blvd., 
Redwood City, CA 94063; 
(415) 364-8427. 



8