Dale’s Atari 800 Games › ACE newsletters
ACE newsletter, December 1982 – January 1983
The newsletter of ACE, the Atari Computer Enthusiasts of Eugene, Oregon. Read the scanned issue (PDF).
Scanned from my own copy of the newsletter. I sent my scans to Kay Savetz in 2021, and Kay put this one on the Internet Archive as ACE_1982_12.
In this issue:
- Stan Ockers Castle Hexagon (page 8)
- Stan Ockers Hexpoke (page 9)
- Stan Ockers Machine Language Programming #2 (page 13)
Below is the text of the whole issue as read by machine OCR (Tesseract) from the scan. It hasn’t been corrected, so expect mistakes, especially in program listings. The PDF is the real thing.
Page 1 (scan)
Ent HUSIASTS 3662 Vine Maple Dr Eugene OR 97405 DECEMBER-JANUARY, 1983 Mike Dunn & Jim Bumpas, Editors Mower Level
Page 2 (scan)
News and Reviews by M.R.Dunn, Co-Editor ‘Some very interesting products have been released for the Atari. O.S.S., (10379 Lansdale, Cuperinto, CA 95014) the originators of the Atari BASIC, BASIC A +, etc., have come out with a very ambitious new line of products for ‘the Atari, and are now shipping them. They have two new types of DOS, OSIA+ ver.2 and ver.4 for double-density drives. The Version 4 allows you to use double-density, double sided, with various sector sizes so you can use it with an 8” or almost any drive. The version 2 can be used with either single or double density drives and is an improved version of the original OS/A + Version 2 is included with all 0.S.S. products, and version 4 is available from makers of Atari double density drives and controllers —see below. Macl65 is a new, very powerful and fast full Macro assembler with debugger, compatibie with the Atari Assembler files. | expect this will become the standard of assemblers for the Atari at only $80. TinyC at $100 and C/6S (a C-compiler) for only $80 which runs with MACI65 expand the Atari's language abilities to a new level. All are very well documented, and we could use full reviews of them by you out there who know enough about them to do so! To go along with your new DOS, Software Publishers, Inc, 2500 E. Rando! Mill Fid., Suite 125, Arlington, TX 76011 now has a double-density disk controller board, the ATR8000, allowing you to connect any 5¥ or 8" drive to your Atari for $500, and for only $250 more, a 64K upgrade with CP/M! The basic price Includes a RS-232 and Centronics parallel ports, so you save the price of a 850 interface. The CP/M will read disks from Xerox, Bigboard, Cromemco, Kaypro, Osbourne and North Star. More in the next issue after we get one. Also from Texas, Newell Industries, 3340 Nottingham In., Plano, TX 7507, who brought us the "Fast Chip” for the OS, now has a new OS board which allows you to put RAM or ROM and use the extra “hidden” 4K. $115 and up depending on the amount of memory, and a “SuperMon” monitor to put in ‘one of the slots for $30, Several months ago, | reviewed the MicroCue printer buffer by MicroCompatatible Corp. | was having some trouble with it, so sent it back to the company. They called me, and gave me the choice of getting It fixed, or waiting a while for their new model and getting a new one for free! | now have their new SmartBuffer. They have also changed their name and address: Data- Match, 3810 Oakcliff Ind. Ct, Doraville, GA. 30340. The buffers come in various models, and price depends on number and type of ports as well as amount of memory. Mine has serial and parallel ports, and you can input and ‘output either. All the new models are programable—it is easy to change printer codes, so you can use a word processor set up for one printer, e.9., Atari 825, and use any other printer. The buffer works by allowing your ‘computer to send the data to the printer at computer speed, then printing out while you are doing other things with your computer. A great time saver, and especially handy for the Atari because of the limited software for various printers. The ability to connect your computer using the parallel port, then connecting a serial printer is also a great plus; otherwise there are no word- processors allowing the use of a serial printer. This company really stands behind its products. Write them for details on prices, they start under $300. Alfred Handy Guides, POB 5964, Sherman Oaks, CA 91413 sent us a collection of their guides which cost only $2.95 each. Understanding Atari Graphics is a very nice little book loaded with much information and hints, including various charts (in colon), lots on the GTIA modes, etc. Very nice and very handy. There is also one of the best guides I've seen on VisiCalc, and ‘others on Understanding such subjects as LISP, BASIC, PASCAL, Word Processors, DataBase Managements, and others. A very nice collection of booklets so inexpensive you can afford to buy them if your interest is one of the above. Call 800-292-6122 if your local store doesn't have them. ‘Speaking of handy guides, several months ago | recieved a 14 page guide, really a multiple folded card, called the Atari ProCard from On-Line Computer Centers OKC, 10944 AN. May Ave, Oklahoma City, OK 73120. It has all kinds of neat stuff —mostly tables of the kind you use all the time, but also various printer codes, error codes, Internal character set codes, etc. It costs $9.95, and | figured no one would buy it, but | find | use it at least 2 or 3 times a day when I'm using my computer and really find in invaluable!! Elcomp, 53 Redrock Lane, Pomona, CA 91766 has just released a number of new products. How to program your Atari in 6502 Machine Language $10, is a nice 106 page book filled with hints and “pearls” on how to get started in 6502, Not a comprehensive text-book, more of a book explaining difficult concepts and giving hints and aides to help you along the way. Their new inexpensive wordprocessor, ATEXT-1 is now ready, $30 tape, $35 cass, or $70 cart, | had a prelimery version but have not yet recieve the final version, so will wait until | do so before reporting on it. Their EPROM burner $180, and EPROM Cartridge for $30 are also out now. For Christmas, I'll suggest a few products | use all the time and recommend to anyone without reservations —not to imply other similar products are not as good or better for your needs. These are just the ones | se the most. Filemanager 800+ by Synapse for an easy to use Database system (see review this issue by Kirt Stockwell. \“Happy- ‘Holidays & 2 For word processors, | like Text Wizard for short articles, quick letters, etc, and Letter Perfect ROM version for multiple page essays and reports. The ROM version has the added benefit of being able to use any printer by making a user-defined printer handler, and is worth the extra money. ValForth by ValPar is an excellent, complete FORTH with many options — don't believe you can do any better. ‘The new MACI65 by OSS Is a macro-assembler hard to beat at any price, but at only $80 including the excellent new OSIA+ version 2 DOS is an incredible bargain. Paint by Reston is my favorite “Draw” program, even though you cannot save the pictures on a file and use them, as in the also excellent MicroPainter and Graphics Master by DataSoft. ‘The best BASIC is BASIC A+ by OSS; | much prefer it to MicroSoft except when just copying a program from a MicroSoft listing. ‘Any of the Tricky Tutorials from Santa Cruz Educational Software. ‘Tach-master for measuring your disk drive speed and DataLink for your Modem are two programs by Tony Dobre and available from Swifty | use constantly. The Atari Computer by Lon Poole (Osborne/McGraw Hill, Atari Games and Recreations by Kohl et al (Reston), and The BASIC Handbook 2nd Ed. by David Lien (CompuSoft) are all excellent choices for the beginner to intermediate Atari owner, while the Compute’s! Second Book of Atari is for the the more advanced user. For hardware products, Mosaic memory boards seem to be among the best, with Axlon and Tara also very good. For printers, | have had or used the Centronics 737, 739, Epson, MPC and others, but my present printer, the IDS MicroPrism is by far the best in print quality and features. The Percom Disk drives are very worthwhile — our bulletin board has been using 2 of them 24 hours a day for several months without one hitch. The SmartModem by Hayes is the nicest modem | have used. There are also many other very good products, but the above are the ones | use all the time, so are on the top of my mind. All the companies mentioned are well known to me, either by meeting the heads at the various computer faires, visiting their companies or talking to them on the phone and all are very helpful and contantly trying to improve their products. It is interesting to note many of the products above were also recommended last year, although many are now in improved form. ‘The most helpful person of all to the Atari community has got to be Bill Wilkinson of OSS, whose company not only started it all with the original Atari BASIC, but has continued to expand the capabilities of the Atari through new languages, operation systems, books, and through his fantastic articles in Compute! He even finds time somehow to answer questions on the phone, although he tends to call back in the middle of the night because it is the only time he has left over!! Thanks Bill, and have a nice Holiday Season. also wish to thank all the other vendors who have been so generous in sending us review copies of their products and to all the people who help put together the newsletter, write the articles and produce such fine programs. Last year | listed everyone and it took a page; this year it would take the whole Newsletter, so I'll give special thanks to our most prolific authors: Stan ‘Ockers, Sydney Brown and Ruth Ellsworth, and of course, Marc Benioff, who is now busy at USC. Thanks you all and have a nice holiday season! For your pleasure, you can send to our program exchange chairpeople Chuck and Jody Ross (during December and January only) for the following Disks: Best of 1982 — Game Disk Best of 1982 — Utility Disk Christmas Disk 1982 — mostly games from the Newsletter from July to Dec plus some great Christmas music by Ron and Aaron Ness, written with the help of Jerry White's Music utilities from PDI. “The Pilot by Ruth Elisworth —filled with educational programs and demos written in Pilot SCOPY 810, our licensed high speed copy utility from Alliance Software which we can sell only to members. A really great and useful program. 410 @4. OR Any 2 on a double d disk, $15 except for SCOPY 810 Write: Chuck and Jody Ross, 2222 Ironwood, Eugene, OR 97401 re > ine, SG sce, LPP tet, SB see, BB
Page 3 (scan)
BURST IO
by Pat Wamshuis, Editor, Portland Atari Club Newsletter,
3116 S.W. Evelyn St., Portland, OR 97219
(Reprinted from the June, 1982 issue)
(The P.AG. is one of my favorite Newsletters, especially the monthly “Toolkit”
section with its outstanding utilities. Pat is not only an excellent editor, he is also
a talented programmer and a wonderful person. The following should be be very
useful for you. —MD)
BURST 10 (input-output) is an extremely fast method of transferring block data
from cassette or disk to the computer memory oF from the computer memory to
your storage device. Burst 10 (aka block 10) is not supported by ATARI or
Microsoft BASIC. BASIC supports either single string transters or the GET and
PUT for single bytes of data. However, 1o save a graphics 8 screen to disk using
PUT ina FOR. . .NEXT loop requires some three minutes. Using Burst IO you can
dump a screen to disk in less than three seconds,
Where will you want to use Burst 10? Anywhere you have a large block of data
to move in or out of memory. For example, you can save and retrieve any screen in
any graphics mode. You can save, load or edit complete character sets. You can
redefine player-missile data, then save and load them using Burst 10. You can
load contiguous blocks of data or complete data base management files. if you
saw the introductory program for the PAC program library disks with the
PORTLAND ATARI CLUB banners flashing across the screen, then you saw an ap-
plication of Burst 10. In that routine the one thousand bytes of player-missile data
was loaded from the disk so fast nobody even noticed the disk was turned on!
First, a litle background. ('m going to talk about writing to a disk. The pro-
cedures are the same for writing to a cassette.) When BASIC writes to the disk, It
‘only writes in segments of 128 bytes. It never writes a single byte as is implied by
the PUT command. When you issue a PUT command, BASIC takes that single
byte and adds it to an 1O buffer of 128 bytes. The buffer is merely a part of your
memory which is dedicated as a temporary accumulator where BASIC collects
your individual bytes for an eventual sector write operation. (A sector is a block of
128 bytes on the disk or a record of 128 bytes on the cassette)
BASIC keeps adding individual bytes to the buffer until the butfer is filed
When the buffer is filled, it writes the contents of the entire buffer to the disk in
‘one operation. The only way you can write a partially tilled buffer to the disk is to
CLOSE a fle or END a program. This is why you must CLOSE a file or END a pro-
(gram to get the last segment of your data saved.
Similarly, when you do a ‘GET #3,A’ BASIC does not read a single byte from the
disk. Rather, on the first GET command, it reads an entire sector of 128 bytes into
the 10 buffer, Then it sets a pointer to the first byte In the butfer and is ready to
move single bytes from the IO butter to where you want them. When the pointer
‘Goes beyond 128 bytes, BASIC knows it must read in the next complete sector
and reset its pointer to the start of the 10 buffer before it can do the next GET in
struction.
In BURST 10, however, BASIC and the operating system do not use the IO but
fer. Instead, you simply tell the Gentral Input-Output (CIO) routine in the operating
system where the data starts in memory and how many bytes to write. BANG! The
‘operating system moves the data out in 125-byte chunks directly trom memory to
the disk. (I'l explain why it's 125 byte chunks instead of 128 byte chunks later)
Reading is even simpler in burst 10. You tell the ClO to read 65,000 bytes of data
‘and tell it where to start storing the bytes in memory. When it gets to the end of
the fil, it stops reading
Let's say itagain, tor emphasis: You simply tell the’C1O where to start saving or
loading the data and how many bytes to transfer.
“The operating system does the transfer and returns the status of the operation,
either A-OK or an error number, in a memory location which can be PEEK'd by
your program.
How do you doit? Well, frst OPEN a fle for read or write. BASIC then sets upa
block of control data for the file. You can have eight files open at a time. BASIC
keeps track of what you are calling each file, where the buffer for each file is (or
where the start location is for Burst 10), whether its a ead or write operation, the
‘number of bytes involved, and some hardware-peculiar information which you tell
it about using the AUX1, AUX2 bytes in your OPEN statement.
Oh, yes! Italso keeps track of where the machine language routine is for get-
ting in and out of the particular hardware which you are accessing: cassette, disk,
printer, modem, CAT screen, etc. That's why you can talk to all of your hardware
devices the same way. CIO only keeps track of WHERE the hardware driver is, not
how it talks to the specific device. When the boys in the back room at ATARI
‘wrote the rest of the operating system, they wrote the machine language routines
{or getting in and out of the standard devices, such as the disk, cassette, printer,
etc. Then they made a table, called a Device Handler Table, which tells the CIO
where each handler is. You can add your own handler routines and add them to
the table. For example, if you have an odd-ball printer, or teletype machine, or a
igitizer pad, or another computer, or any device at all, you patch in your code for
talking to the device and add an entry in the device handler table to tell the CIO
where the code is. Then you talk to the device the same way you talk to adisk, the
CRT, or a printer. That is, you simply use GET/PUT, PRINT WINPUT for burst IO.
BASIC needs 16 bytes of data to keep track of each file which it has opened.
For our purposes, FILE 0 data starts at location 834. Call the location 1OCB (In-
‘put/Output Control Block) for File 0. Then |OCB #1 Is at |OCB + 16, |OCB #2 is at
1OCB +32, etc. At our IOCB# +0 we POKE the direction command for our transfer:
7 for read, 11 for write, 12 for append. At |OCBH# +2,3 we POKE the start address
for the data. 1OCB# +6,7 gets how many bytes we want to transfer. That's all!
Then we do a little machinelanguage call routine to jump directly into the
operating system’s-CIO routine. This Is the string you see so often which looks
like this: BURSTIO$ ="nhh*LVd". The ‘*' and ‘dare in inverse video. Once the
JOCB# data is set_up, we initiate a burst 10 by the statement
“°XFER = USR(ADR(BURSTIOS), 16° CHAN)”, where CHAN# is the file number we
sed in our OPEN statement forthe file. The BURTSIOS routine moves the CHAN#
to the hardware index register and jumps to the operating system's CIO routine
which does the burst 10.
Let's take another look at the screen editor which we ran in the June newsletter
as an example of saving or loading text screens.
1 DIM F§(15)OPEN 43,
22 "Read of Write “GET #3,CIF C
32 “NEW of Add “GET HAGA <6-4(-65,W =
4.2 “FILE ":INPUT FS:OPEN #1,A.0,FS:IF A=4 THEN 8
5.2." 26 Creates next screen’:? “E Elis now GET 420.7 "|= Saves
8 C= PEEK(560) + 256° PEEK(561) +
8 POKE B50,Ara(A=O}POKE 852,PEEK(G):POKE 853,PEEKIC+ 1):POKE
856,192: POKE 857,3,
10 G =USRIADA(hn LV"), BRIE W THEN 8 (* and din reverse video!)
11 GET s.GIF PEEKED) <1 THEN
12?
LN 1 opens the keyboard and screen editor so we can create a text screen. It also
gives us the ever popular green screen.
LN 2,3 find out If we want to read or write a screen, An “Ri” returns an 82 so we set
A-=4 for READ in our open statement. We also set a flag W=0 which we use later
to indicate we are not writing successive screens, If the keyboard returns
anything other than an 'R’, then we set A =8 for a write and set the write flag to
W-=1. If the keyboard input is ‘A’ for APPEND, we set A=9 for the OPEN state-
ment. (Remember, this code is cryptic because I'm trying to squeeze a complete
‘screen editor into less that 1K bytes.)
LN 4 OPENs FILE #1 for our burst !O. So the start of our OCB for this file will
be 834 + 16, or location 850,
LN 5 issues the prompt to remind the user of the control characters used 10
create a screen, edit a screen or save the screen,
LN 6 demonstrates the power of the Atari operating system. This single line
allows us to create an entire text screen using all of the editing features of the
(OS screen editor: enter, backspace, delete, insert, move the cursor, etc. ,
LN 8 finds out where the pointer for the start of our screen data is so we can
use the location in our busrt 10.
LN 9 sets the IOCB command for a read or write, depending on our input in
LN 2,3. POKE 852,PEEK(C):POKE 853, PEEK(C + 1) set the start location of our
screen data. POKE 856,192:POKE 857.3 tell the IOCB how many bytes to
transfer (The BASIC manual tells us a Graphics 0 screen has 960 bytes. (2256
+ 192),
LN 10 initiates the burst IO to either read or write a screen to disk. If we are
writing screens, we go back to create the next screen,
LN 11 waits for a keyboard input if we are reading screens. Following any
keyboard input, we go read the next screen if the CIO returned a 1 tor a status
code. This means A-OK. If it runs into an end-of-file, we get a different code
{and fall through to LN 12.
LN 12 clears the screen, and closes the file. If your disk has MENU on it, use
RUN "D:MENU" instead.
How about saving any screen in any graphics mode, including modified
display lists? OK. First, recall that the screen display data is saved right at the
top of memory. Location 106 always points to the top of memory. (Sometimes
we lie to the operating system and tell it that top of memory is lower than it
really is. This lets us steal some memory trom BASIC for our own machine
language routines or character sets or player-missile data, etc.) The very top
‘of memory holds the text window for our screen if we used one. Then the rest
Of the screen data is saved below the window. Finally, the display list is saved
Immediately below the screen data. So-o-0-0-0-0. Why not save the display list
along with the screen data? This way we can handle modified display lists
also. (Thank you, Sheldon Leemon, from the Michigan ACE!)
If we look at the pointer in 106, we have the Start of our data for burst IO. If
we subtract the start of the display list from the top of memory, we have how
many bytes {o transfer. Might as well save all of the color registers and the
‘graphics mode also. We can do this by discrete PUTS before we start the
burst 10.
When we retrieve our screen, the complete graphics mode will be set up
the same as when we saved the screen. Better save the contents of 106 also.
(if we're writing a program for another machine, we should tell our program
the top of memory is as low as we can and stil fit our program in, That way,
‘our program might run on machines with less memory than ours.)
Here's one approach to a general purpose screen savelload routine:
Note we are going to save the display list also. Since the display list points to
where the screen data is, we must first POKE 106 with the lowest memory
which still permits our program to run, This will make the saved display list
‘compatible with smaller machines. If we get this general purpose, we will do
‘well to save and restore the contents of 106 also, LN 32500 saves the screen;
LN 92510 retrieves the screen,
1? “)D'SCRSAVE.LST":? :? "Save any mode screen to disk.”:? “Load any
mode screen from disk.":?
2 2 “(Saves all colors + display _list.)":?
3.2 "GOSUB 32500 to save screen,":? “GOSUB 32510 to load screen.”
"Send FILES = D:filename.DAT"
4? “MODE = Graphics mode of screen”
5.2 "Must POKE 106,128 to be compatible with 32k machines.”:? :STOP
10 REM D:SCRNSAVE LST Savelretrieve any mode screen with display list &
all color registers.
Page 4 (scan)
32500 RAMTOP = PEEK 106)*256:DLIST = PEEK(560) + 256" PEEK(561)
BYTES = RAMTOP-DLIST:HI = INT(BYTES/256):LO = BYTES-HI"256
32502 CLOSE #5:OPEN #5,8,0,FILES:PUT #5,MODE:PUT #5,PEEK(560;PUT
45,PEEK(561)
32503 FOR Il =704 TO 712:PUT #6,PEEKiII): NEXT III]OCB=834 45°16
32504 POKE —10CB,11:POKE OCB + 2, PEEK(560):POKE
1OCB +3, PEEK(561):POKE IOCB + 6,LO:POKE IOCB + 7,HI
32506 SCRSAVE = USR(ADR("hhh*LVd"),5"16)CLOSE #5:RETURN (reverse *
ILES:GET #5. MODEGRAPHICS MODEGET
32511 FOR I= 704 TO.TI2:GET #5,COLR-POKE I, COLRINEXT I
32512 IOCB =834+5"16:POKE IOCB,7:POKE IOCB + 2,PEEK(560):POKE
JOGB + 3,PEEK(561):POKE IOCB + 6,255:POKE IOCB + 7,255,
32514 SCRLOAD = USR(ADRY"hhh* LVd"),5* 16);CLOSE #5:RETURN (reverse *
and a)
The idea when retrieving a screen is to replicate the graphics status of the
machine when you saved the screen.
Now you can generate, edit, save and retrieve PM data or character sets. Go
modify those FONDEDIT or SUPERFONT programs to eliminate the DATA
‘statements and save the complete character sets directly. Go ahead and save
strings longer than 256 bytes. You know the address of the string from the
‘ADR function and how many bytes it takes from the LEN functon so you're all
set for BURSTIO! Machine language routines for page six will load in an
instant. Once you get them entered the first time, simply burst them out to a
isk file for future use. Speedy. Elegant!
10 REM Jnbadopdonouodanoooiok
20 REM * A DEMONSTRATION OF x
30 REM ¥PSYCHOLOGICAL TESTING
40 REM * *
50 REM * = LINT HUTCHINSON
60 REM & *
70 REM Oda IOIIIARAO DOIG
80 REM
90 REM
100 REM feeboocboGuOboOG:
110 REM MAJOR VARIABLES*
120 REK JeonpdonOdupOOC
130 REK
140 REM * NAMES LAST NAME OF INDIVIDUAL
150 REM * D(300) ARRAY OF 300 TEST TEST ITEMS
160 REM * SEX$ SEX (M OR F)
170 REM * RECORDS = INDIVIDUAL'S RECORD THAT RESULTS (
R,T,Z SCORES) ARE STORED IN
180 REM * ITEMS TEST ITEMS THAT THE INDIVIDUAL RES
PONDS TO
190 REM & DATAS NAME OF FACTOR SCALE CREATED
200 REM * CHECKED NUMBER OF TEST ITEMS CHECKED
210 REM *¥ A DATA STATEMENT INDICATING SPECIFIC
TEST ITEM USED IN CREATING A FACTOR SCALE
220 REM * L LENGTH OF RECORDS
230 REM * RSM,SD USED IN CORRECTING FOR NUMBER OF T
EST ITEMS CHECKED
240 REM xk JU, KK TOTAL NUMBER OF INDICATIVE AND CON
TRAINDICATIVE DATA TEST ITEMS USED TO CREATE
FACTOR SCALES
250 REM
260 REM obobkPROGRAMIOEEK
270 DIM NAME$(30),D(300) ,SEX$(1) ,RECORDS(14) , ITEMS (10)
,DATAS{20)
280 OPEN #1,4,0
290 OPEN 42,4,0
TABLE"
300 7 CHRS(125):POSITION 10,7:7 "LAST NANE":POSITION 1
0,9:7 "SEX"
310 POSITION 20,7: INPUT NAMES :POSITION 20,9:INPUT SEX$
27 CHRS(125)
320 RECORDS (1 ,2)="D:
330 L=LEN(RECORD$)
340 IF L040 THEN RECORDS ((L#1) , (L#11)=
350 RECORDS (11,14)=". Sco"
360 OPEN #3,8,0, RECORDS
370 7 #3; NAMES; CHRS( 155) ;SEX$
380 CHECKED=0: POKE 752,1
390 FOR I=1 TO 300
400 7 CHRS (125): INPUT #1; ITEKS
410 POSITION 10,12:7 " I AM "; ITEMS
420 POSITION 10,13:GET #2,U
430 IF CHRS(U)="Y" THEN D(I)=1:CHECKED=CHECKEDH : GOTO
450
440 D(T)=0
450 NEXT I
460 7 #3;"NUNBER CHECKED ='
9,0
AT) IF CHECKED)20 AND CHECKED<(=48 AND SEX$="M" THEN OP
EN #4,4,0,"D CONY.77"
480 IF CHECKED)72 AND CHECKED(=110 AND SEX$="M" THEN 0
PEN #4,4,0,"D:CONV.77"
" :RECORD$ (3,10) =NAMES
"| CHECKED: POKE 65,0:POKE 55
490 IF CHECKED)110 AND CHECKED(=198 AND SEXS="H" THEN
OPEN #4,4,0,"D:CONU. 77"
500 IF CHECKED)138 AND CHECKED(=225 AND SEX$="H" THEN
OPEN #4,4,0,"
510 du=25:KK=13:GOSUB 550
520 JJ=19:KK=0: GOSUB 550
580 CLOSE #1:CLOSE #2:CLOSE #3:CLOSE #4
540 POKE 559,34: POKE 752, 0:END
550 FOR J=1 TO JJ
540 READ A
570 R=RED(AD
580 NEXT J
590 IF KK=0 THEN 640
600 FOR K=1 TO KK
610 READ A
62) R=R-DIAD
630 NEXT K
640 INPUT #4;R5H, SD
650 Z=INT((R-RSH) /SD)
640 T=50H10#Z
670 READ DATAS
680 7 #3;DATAS,"T-SCORE ="
R
690 R=0:T=0:2=0
700 RETURN
710 DATA 1,2,3,4,5,6,7,8,9,10,11 ,12,13,14,15,16,17,18,
19,20,21,22,23,24,25
720 DATA 42,47,69,81, 124,141,142, 143,200,201 ,227 ,236,2
44
730 DATA FIRST SCALE .....
740 DATA 2,6,7,11,11617,32,43,61,74,79,92, 111,123,125,
200,201 210,220
CONY.77"
3
8
3
s
4 750 DATA SECOND SCALE.....
Page 5 (scan)
NOTE: If this were an actual program, much more care would have to be taken
to mask keys and trap errors. No attempt has been made to do this in this
demonstration, —Lint
Here is a demonstration of how you can create a program to display and
evaluate psychological tests. In fact, any test or set of test items which
requires a YES or NO response can use this or a similar format. This program
will not run as is. It Is designed only as an example of techniques which can
be used. This demonstration will:
1, Show how to use a one-dimensional array to store responses
2. Show how factor scales (dimensions) can be built using data statements
Of specific test items
3, How to interface conversion scales to correct raw scores
LINES 280-310
Open #1 is the file [D1:TABLE] that contains the actual test items [items]
which wl be diaplayed onthe screen fo individual evaluation. Each tes itn
can be evaluated as either applying "Y" or not applying "N” to the individual.
The type of test items displayed on the screen could be: shy, happy, sad,
impulsive, ete.
Open #2 is to the keyboard so the individual responding to the test item will
not have to hit RETURN.
Alter this has been taken care of, the individual's last name [nameS] and
sex [sex$] are determined and inputed.
LINES 330-380
The file which will store the individual's records, #3, is created using his/her
last name {name§}. If the last name is less than 8 characters (10 including D:),
X's are added so an extension "SCO" can be attached. This procedure is not
necessary but allows you to selectively print only files with the “SCO”
extension,
‘The name and sex are then put in this file as identification. The CHRS(155)
on LINE 970 allows the variables to be put in the file in separate fields by
generating an EOL character.
LINES 390-450
The loop | is from 1 to 300 - 300 being the total number of test items
contained in file D1:TABLE. If you only have 10 test items to be evaluated, the
loop will be from 1 to 10. These test items, to which the individual responds,
are displayed one at a time on the screen. The test item is correctly
positioned on the screen with the additional words:
AM (and then the test item)
Line 420 waits for a response. If the response is “Y" then two important
events take place at LINE 430:
1. The ARRAY D at location | Di!) is given a value of 1 if a “Y" is inputed
2. The number of test items checked is increased by 1
Notice: The ARRAY D at Line 270 is DIM D(300). It is no mere coincidence:
the number of test items in D:TABLE also equals 300. and the loop | also is
equal to 300. A Jungian might consider it synchronicity but you and | know
better. The ARRAY 0(300) is being used as a place holder. Every time an
individual indicates a test item with a “Y" response, the number "1" is
dropped into the array.
EXAMPLE: If the 5th test item {item$} in the file D:TABLE is “strange” the
screen will display on the 5th time:
AM STRANGE
The [I] variable in the loop for | = 1 to 300 (LINE 390) also is equal to 5, it being
the 5th time through the loop. If the response Is “Y" to this test item
(CHRS(U) ="Y"), then the value of the ARRAY D at D()) will equal 1 or DS) = 1
‘This way we have indicated the 5th test item was responded to with a"Y” and
the value of O46) is 1
It the response is anything else than “Y” then (i) will equal 0 or in this
case D(5) = 0 at LINE 440. We know for certain the individual response was
not a"Y” to this test item. If you decide to leave LINE 440 out of your program
the test items not responded to with a "Y" willbe filled with garbage. Garbage
in... garbage #S*8e'@ out .... Thank you, Fritz. You might even consider the
possibility of filling the ARRAY D(300) with 0's before any response Is asked
Of the individual!
In this demonstration, the number of test items checked [checked] is
Important in determining which conversion file to use (#4 D:CONV.7), LINE
430 increases the value of [checked]
LINE 460 turns the screen off for faster calculations, turns the sound off and
enters the number of test items checked in the individual's file.
\‘Happy~
‘“Happy-
‘Holidays
‘Holidays
&
5
LINES 470-500
‘These lines use two varabias [checked] and [sexs] to determing which
conversion file to open (#4 SONV.22)". In reality the extension 7? could
Selanyining imitamnat rat ineleating he fie 12.34and the contents
are male (m) or female (t).
LINES 510-520
Variables [J] and [KK] together indicate the total number of test items
used to construct a factor scale (such as dominance, submissiveness etc.) In
this demonstration, the first factor scale is dependent on a total of 38 test
items - JJ +KK. The data statements [A] indicate which specific test items
make up this first factor scale, Le., test items 1,2,3,4. ..25 LINE 710 and test
items 42,47,69. . 244 in LINE 720 — a total of 38 test items. The raw score [R]
{or thi 98 ea em fat factor scale is the oll of each teat t's value (1 or
0) as determined by the individuals input (“Y""
{lt the otal ratoe of neleative test ems and KK fs the total number
of contraindicative test items making up the first factor scale. The (Ju] test
items (taken from the first 25 data statements) are added together and then
the {KK} value is subtracted from this, resulting in the raw score [R] for the
first factor scale. There are 25 data statements with values added [JJ = 25] and
13 data statements with values subtracted [KK = 13}
LINES 550-670
The loop [J] (J = 1 TO J) indicates how many data statements will be read
at LINE 560. At 570 the raw score [RI is increased in the following manner:
= R + DiA)
Up to this point [R] = 0 and [A] is the first data statement A=1 at LINE 710.
+. specific test item #1
‘+value of specific test item #1
[RJ is equal to the value found in the ARRAY D at location 1 which in reality,
Js test item #1, or the first test item displayed on the screen for the individual
to evaluate. If the value of D(1) is equal to 1, then we know the individual
checked test item #1 with a“Y". Italso increases the value of [R] raw score for
the first factor scale by 1.
Ifthe value stored in D(1) =0, this indicate, the individual had checked test
”. The value of [R] in this case does not increase:
R + RIA)
0+ O11)
0+0
1. specific test item #1
0- value of specific test item #1
R=0
Once the total number of indicative data statement test items [JJ = 25] has
been processed, LINE 890 checks to see if there are any contraindicative data
statements test items to be calculated for the first factor scale. If there are
contraindicative data statement test items [KK]
LINES 600-630 will read the data statement test items and subtract them from
the raw score [R} already calculated tor this factor scale. When this is
‘completed, [R] is passed on for corrections and conversion.
LINES 640-700
Since the proper conversion scale has already been determined and
opened, 2 variables appropriate to converting the raw score of the particular
‘group are pulled out. Raw score mean [RSM] and standard deviation [SD] are
pulled trom the disc. The raw score [RJ is then converted so the influence of
the number of test items checked [checked] is no longer an influence in the
final score.
The name of the factor scale is read {data$] from the data statements (in
this case FIRST SCALE.) and this along with the (7), [Z}, and [R] values are
stored in the individual's file
LINE 690 clears the values of (Rl, [1], and [Z] and the program returns from this
subroutine to LINE 510,
LINE 520 indicates the total number of indicative data test item statements
[dJ=19] to be read, and the number of contraindicative data statements test
items [KK =0] (none in this case) for the next factor scale,
‘The program repeats the procedure of calculating the raw score [R, [7], and
{Z| scores for the second factor scale and returns to LINE 540 when
Completed. If there were more factor scales to be calculated, their [JJ] and
IKK] values would be placed next.
Since this demonstration only has 2 factor scales (FIRST SCALE and
SECOND SCALE), the program then closes all open files, turns the screen
back on, and ends the program
Page 6 (scan)
BUILD YOUR ATARI
A TABLE
by Steven Berg, Philipine Islands
My Atari 800 had been sitting on my coffee table for far too long. It was time for
4 new home with a reasonable price. One can build this table for the Atari and ac.
cesories with one sheet of 3/4”plywood and little else.
Begin by cutting the plywood into the sizes shown in figure 2. Glue the 20"
length of F'1 to the 20” length of F2. Allow to dry for 24 hours. | will describe the
Construction as if you are facing the table as shown in figure 1
| you want the rear of piece B to be flush with sides A then reduce its width
from 23¥% to 22% inches. If you have an MX-80 size printer, then cut the hole for
the paper beginning 2” from the front and 4" from the right side of piece B, Cut
the hole 1” in width and extend it to the left 12” so as to make a 1x12 inch slot
Move 3” to the left of the left edge of the paper slot and cut a second hole 2" fron
the front 1” in width and extend it to the left 3". The second hole is for your elec.
trical connections,
If you have an MX-100 size printer, shorten side A (right) by 6" so that side A
(right) will be flush with piece B and begin the paper slot described above 2" from
the right edge of piece B instead of 4" and extend it 14°
Nail and glue piece C to B and then nail sides A to B & C. Cut a hole for the
power cord on the lower front of piece D. Nail and glue side E to piece D. Be sure.
fot to do the reverse (nail D to E) or you will not have enough room to stack two.
disc drives on the shelf formed by the two pieces.
Nail and glue D & E to C, B and A (right). Cut 1/4" from the height of piece G (to
make it 5%"), Nail and glue piece F (F1 & F2) to piece G making sure there will be
22" gap between G and C when it is attached on the table. Nail and glue piece F,G
to pieces A & C (F only) and B (G only).
Cut a % by % inch groove in two 23% inch long 2.x 2's. Place the bottoms of
the side A’s in the grooves and nail the 2 x 2's to the bottoms of the sides. Drill
the appropriate hole for your casters in the 2x 2's and install the casters,
| used a % x 34 veneer for the plywood edges. An alternative is wood veneer
tape. Recess all the furniture nail heads with a punch and fill all the holes with
Wood putty. Sand the table. Stain as desired and rub it with tung oil, | used 1"
furniture naits, brads for the veneer and six 2” furniture nails to attach the 2 x 2's.
‘You may want to use one of your extra pieces of plywood to separate the cor,
puter paper on the shelf from the electrical power supplies behind the disc drive
which sits on the left side of the shelf. | placed the power supplies for my 800 and
‘my 850 interface below the shelf for my monitor and between piece C and my 800,
CUTTING PATTERN ON OuTSide Cover
6
CASTLE HEXAGON
Castle Hexagon uses Mode 4 graphics. Notice in particular the detail of
the bricks. If you type the program in be sure to notice the characters
Strings in lines 124-170 are really control characters. You should press CTRL
and the appropriate letter when typing these lines.
| you try to figure out how the program works, it might help to know the
Passage numbers between rooms can be found by summing the room
numbers. The passages blocked are found in line 212. Passage #23 between
rooms ~ 20 and #3 is blocked and is opened when a match is made in room
£2. {18! char. represent 0). The additional passages in line 216 are always
blocked.
The sound routine is in VBI and as such is separate from the Basic
program. If you make a match and the tune starts playing, you can continue
on while the music plays (interrupted if you go to another room), The routine
{s slightly different from the one in "Vultures." It uses pure notes and has
Pause between notes. The pause length is controlled by a POKE to 1779,
The ending routine cycles through various Mode 4 characters. f you want
to see it without playing the game, insert: 305 GOTO 600.
—Stan Ockers
SCRAMBLED EGGS
Instructions: You and your shipmates are marooned on an island which is
nothing but rock. The only food available is seagull eggs.
The Seagulls are too scared to land as you might take to them so they lay
their eggs while still flying around in the clouds.
‘You must try to catch the eggs without breaking them. Breaking 12 will end.
the game.
Program Description: Lines 1-6 define all strings for the shape of the man, the
eggs, and the broken eggs for his head.
Lines 10-55 set up the pointer for the string used for PM Graphics.
Lines 56.101 put up the display and game name used in the display mode,
Lines 102-195 initialize and set up the player missile graphics, colour and
width registers. They also put the players and missiles in their original
Positions.
Lines 197-199 set up the varialbes to their starting values and the program is
ready to start
Lines 200-299 contain the main program loop. In this loop resides most of the
main functions such as direction control and movement of the eggs.
Lines 300-304 randomly choose the missile in which the next egg appears.
Lines 310-343 are used to draw the broken eggs in GR.7 on the ground. Also
the broken egg sound is produced here.
Lines 350-360 print the score and check to see if “game over" has been
reached,
Lines 361-380 contain the game over routine and the timing for the automated
display routine.
Lines 990-999 are used to clear the PM area and draw the scenery for the
game.
—Sydney Brown
Page 7 (scan)
LISTINGS EGGS buy Sydney Brown Another fine gane from Australia-but look out for Lines 6,310,340,368,and 700-they have graphic charactors Use the REM chr$ #'s to enter the unprintable charactors for the aachine language subroutes g19 Psc75.842= 361 27 0 GAME. 0 UE R [SS Serres BUTTON FD RESTORT GONE) 368 COLOR 3:FOR W=66 TO 79:PLOT 6,W:0R AWTo 159) HINEMT Hifon O10 99 STEP VENeNCCeNe: POKE 53278, en 272 273 27a ens 278 en 278 29 300 TF Pl1=8 OR Pi=9 THEN GOSUE 390 IF P2=8 OR P2=9 THEN GOSUB 390 IF P3=8 OR P=? THEN GOSUB 390 IF P4=8 OR P4=9 THEN GOSUB 390 IF Pl=1 THEN GOSUB 320 IF P2=1 THEN GOSUB 380 IF P31. THEN GOSUB 380 IF Pasi THEN GOSUB 380 Goro 200 ReINT (RND(0}8441):ON R GOTO 301,30 2,303,304 301 302 303 304 310 att a9 330 sae 394 336 X$2£48: RETURN X$=£38-RETURN X$2E18: RETURN XS5E28 RETURN PS(75,€4)="":POKE 53278,0 REH P8(75,84)=10 HEARTS (chr$# 0's) RETURN AeHt-52 COTO 239 asHe-52:G0T0 339 A=H3-52-COTD 339 a-H4-52:G0T0 339 10: PS CH, WED PPOOEEOOUE INERT W em 0 REM ACE NEWSLETTER 3662 VINE HAPLE E UGENE OR 97405:LOOK FOR GRAPHIC CHARAC TORS ON LINES 6,310,340,368,700 17 “O":HI=O:REM by Sidney Brown 5 DIM PS(1),M8(37) ,B8(5) ,¥8(3) WS(7),E 18(2) ,£26(2) ,E38(2) ,E48(2) ,28(78) ,x8(2 ) BHR" CB MACK CCCCCSSESEESSE BSS"EFEES YS" COMER" 22 "ELSE CERES" ":EgESMOO":Eds=" T PEM HSechr$# 24,(,24,¢,8,189,25,159 295, 255,127,440 ((4¢,0, (¢<S859885F, 29 A:Yéechrs# 24,¢,12 REN WS=chr$8 B,247,255,254,22 -E18=c bré® 8,3:E2¢=chr$$ 12,12:E48=chr$# 192 392 10 UX=PEEK (194) +2568PEEK (135) :UXEPEEK 140) 4256XPEEK(141) 50 GRAPHICS 2:POKE 712,8:POKE 708,254: POKE 53248, 0:POKE 53249, 0:POKE 53250,0 POKE 53251 ,0:POKE 53252,0:POKE 53253, ° 55 POKE 59254,0:POKE 53255,0:7 #6;" 5 CRAMBLED EGGS" 460 FOR Wel TO 40:7 #6;"@@@0"; :NEXT W 66 7:7." PRESS START BUTTON TO START THE CANE"; 90 POKE 59279,0 95 IF PEEK(53279) (6 AND PEEKI77) (14 7 HEN 95 100 GRAPHICS 7:POKE 82,0:POKE 589,46: OKE 752,1:7 " SCRAMBLED EGGS 17 401 7" USE STICK 1 AND HOVE MAN TO CA TCH EGGS MISSING 12 EGGS ENDS TH E Gane"; 102 POKE 704,40:POKE 705,254:POKE 706, 14:POKE 707 ,202:POKE 712,2 104 POKE 708,14:POKE 709, 254:POKE 710, 94: POKE 711,14:POKE 623,17 106 PX=PEEK(106)-24:POKE. 54279, PX:POKE 59277,3 108 POKE 53256,3:POKE 53257, 0:POKE 532 ‘58, 0:POKE 53259,1:POKE 53260 ,85:POKE 5 255,41 110 POKE 53249, 1:POKE 53250,1:POKE 532 52,1:POKE $3253, 1:POKE 53254,1 120 OX=256XPX+984-UX: BX=INT (OX/256) : AX =OX-25688X 421 PORE VX42,AX:POKE UX+3,BX:POKE UKE 4,113:POKE UX+5,2:POKE UX+6,113:POKE ¥ xt7,2 190 GOSUB 990 195 $1330, 392)=78 :P8(459,465)=Ws:PH(2 04, 208)=B8:P$(588, 624)=HS 197 Hi=100:H2=160:H3=110:H4=120:POKE 5 3252, Hi:POKE 58259, He: POKE 53254,H3:PO KE 53259,H4: T1=1:12=-1:1991:14=-1 198 He142:C=0:N=20::EC=0:EH=0:GOSUB 350 199 POKE 53251 ,M:POKE 53248, 194 200 POKE 53278,0 201 IF PEEK(53279)=6 THEN 100 210 ST=STICK(O) IF (ST=9 OR ST=10 08 S Te11) AN H)50. THEN HeH-4 211 IF (5T=5 OR 5T=6 OR ST=7) AND HC19 THEN HeHe4 12 POKE $3248,H-B:POKE 59251 ,M 40 IF EC/SINT(EC/S) AND AC=1 THEN N= Ne1:AC=0:1F NCS THEN N=S BAL IF EC/S(DINT(ECIS) THEN AC=i 280 C=CH:IF C)N THEN C=0:GOSU8 300:PS (19, 201=x8 251 Z8=P$ (17,88) :P8(19,90)=26 252 HisH1+T1 :POKE 53252,H1:IF H1¢SS TH EN Tt=t 259 IF H1)195 THEN I1=-1:FOR We22 TO 0 STEP ~2-SOUND 0,W,10,10:NEXT W 254 He-He+T2: POKE 53253,H2:1F H2¢65 TH EN Tet 255 ST=STICK(O)<IF (ST=9 OR ST=10 OR S T=11) AND H9SO THEN Ht 256 IF (ST=5 OR ST=6 OR ST=7) AND H(19 0 THEN Heltta 257 POKE 53248,H-8:POKE 53251 ,M 260 IF H2)1S5 THEN 12=-1:FOR W=22 TO 0 STEP ~2:SOUND 0,W,10,10:NEXT W 261 H3-H3+T3: POKE 53254,H3:1F H3¢85 TH EN T3=1:FOR W22 TO 0 STEP -2:SOUND 0, W,10,10:NEXT 262 IF H9)125 THEN 195-1:FOR Wee TO 0 STEP ~2-SOUND 0,W,10,10:NEXT W 263 Hé-H4+T4: POKE 53255,H4:1F H4C75 TH EN T4=1:FOR W=22 TO 0 STEP ~2:S0UNO 0, 4,10, 10:NEXT 264 TF H4)165 THEN 14=-1:FOR W22 TO 0 STEP ~2:5OUND 0,W,10,10:NEXT W 265 PS=PEEK(53248) : P6=PEEK (53249) :PT=P EEK (59250) :PB=PEEK(53251) 266 IF P5)3 THEN GOSUB 330 267 IF P4)3 THEN COSUB 332 268 IF P73 THEN GOSUB 334 269 IF P8)3 THEN GOSUB 336 270 P1=PEEK(53256) :P2=PEEK 53257) :P3=P EEK(53258) :P4=PEEK(53259) 7 339 BERND(O)#0+66 340 SOUND 0,6,8,14:P8(80,90)="™:COLOR A:PLOT @f2,BHL-DRAWTO A#8,BH1 :PLOT Att B42: DRAWTO A49,.B42 341 REM P$(80,90)=10 hearts 342 PLOT A,B+3:DRAWTO A¥6,849:PLOT A¥2 BEA:DRANTO AF4,844;COLOR 2:PLOT @t4,8 DRAWTO A¥6,B:PLOT A#3,B41 943 DRANTO Até,BEL:PLOT A+S.BH2:DRAWTO ‘A¥S,BE2:SOUND 0,0,0,0:EHSEMH :POKE 53 278,0:GOTO 350 350 SOUND 0,0,0,0:7 "2:7 :7 :7 “EGES SAVED—EGGS LOS} HI SCORE "yo7 CEM, 27 27 Hy 355 IF EMD11 THEN 360 359 POKE 77,0: RETURN 960 IF EC)HI THEN HI=EC:GOTO 350 3617" CANE OVER"? "PRE 33 START BUTTON TO RESTART GAME"; 969 POKE 53248,134;POKE 53251 ,142:POKE. 59279,0 366 IF PEEK(77)>7 THEN 50 67 IF PEEK(S3279)()6 THEN 356 368 COLOR 3:FOR We66 TO 79:PLOT 0,W:0R AWTO 159,W:NEXT W:FOR W=20 TO 90 STEP 10:P8(W,W49)="(10 hearts )":NEXT W 369 GOTO 195 980 EC=ECH:SOUND 0,21,10,10-GOSUB 350 :60TO 310 390 SOUND 0,2,8,14:FOR Wel TO 20:NEXT W:POKE 53249 ,H#4:POKE 53250, +4 ‘391 FOR We180 TO 246 STEP 3:S0UND 0,W, 12,4: NEXT 399 SOUND 0,0,0,0:FOR W=1 TO 300:NEXT W:POKE $8249,1:POKE 53250 ,1:EM=EHH :6O SUB 350:GOTO 3t0 700 E1s=" "Fes "EB Ste" Eas" @@Ge" Fab" 701 REM E1s=chr$ €4,4,4,4:F26=chrst 0 12,12,0:E3¢=chr$ #16,16,16,16:F3¢=chr$ 40 O:Fas=chr$ #0,128,128,0 990 FOR WePx#2544384 TO PX256+1023:PO KE W,0:NEXT 991 COLOR 3:PLOT 0,65:POSITION 0,79:PO KE 765,3:XI0 18,44,0,0," 992 COLOR 1:PLOT 14,0:DRAWTO 100,0:POS ITION 0,7:POKE 765,1:XI0 18,#6,0,0,"5 “PLOT 21, 8:0RAWTO 77,8 993 PLOT 100,8:DRAWTO 121,8:PLOT 39,9. DRAWTO 49,9:PLOT 135,0:DRAWTO 159,0 999 RETURN ar
Page 8 (scan)
CCS ee EST
Castle Hexagan
oe
Gpper evel
1 REY eeoraeaencEoEnn
2 REM 4% ACE NEWSLETTER *
2 PEM #8 2642 VINE HAPLE OR xt
4 REM xx EUGENE, OR 97405 *
S REM 4x DEC/JAN ISSUE 82/83
6 REM He #10 YR *
7 REH XekekeReceRececeteeesaEE
10 REM eoreeneneKeeE
20 REM #8 CASTLE HEXAGON 43
30 REM 8x 5.0. 10/82 #8
40 REM skeeERKseeeRsxeneEEs
45 GRAPHICS 18:POSITION 4,4:7 #6;"CaSt
LE": POSITION 6,6:7 84; "HexAgOn”
49 REM # Sound generation in VBI, Data
in page 6 ¥
50 DIM VBI8(75): RESTORE 52:FOR Je1 TO
TS:READ A: VBIS(.),J)=CHRS(AD :NEXT J
52 DATA 174,252, 6,240, 67,173,244, 6,240
32,206 244, 6,208.57
54 DATA 189,0,6,141,0,210,10,294,294
56 DATA 141 2,210,232 189,0,6,240,30,1
Al 248, 6,232,142, 252,6,208,90 206,248,
4,16,29,169.0
58 DATA 141,0,210,141,2,210,173,243,6,
LAL 244, 6,208,941 252, 6,141 ,0,210,14
42,210, 76,98, 228
60 RESTORE 42:FOR Je1596 TO 1749:READ
A: POKE J, A-NEXT J
€2 DATA 104, 160,9,162,0,169,7,76, 92,22
8
64 DATA 81 20,68, 49,40,20,53,30,50,10,
33, 20,60,40,72,20,91,30,81 10,73, 20,68
_ 40,81, 20 81,30,85,10,81,20,72,40
45 DATA 5,20, 108,40.81,20.48, 40, 60,20
,53,30,50,19,53,20,60,40,72,20,91 30,8
1, 19.72 20, 48,30, 72,10,81,20,85,30
68 DATA %6,10,91,20,81,40,81,20,0,0,53
49, 60 ,20,53,20,81 20,81 ,20,91,20,01,2
9,68,20,72,20,85, 20,81 60,8120
$7 DATA 53, 80,53,20,81,20, 68,20,53,20
40,20, 68, 20,60,,80,60,20,53,20,50,40,50
20,53, 20,60 40, 68,20,60,20,53,20
48 OATA 53,20, 60,20,68,20,81 60,81 20,
3,80 53,20, 81,20,68,20,53,20,60,20,72
29, €8,80,0,0,100,5,80,5,60,5,40,5
49 DATA 20,5,0,9,20,5,40,5,60,5,80,5,1
00,5, 9,0,100,2,9,2,140,2,0,2,100,2,0,2
140,2,0,0
80 AADR(UBIS) :BFINT(A/Z56) :C=A-29648
POKE 1538,C:POKE 1540 8: POKE 53761 ,174
POKE. 53763,170:POKE 1779,5
82 A=USRI1536) ;POKE 1788 88
90 cosue 1000
100 DIK NXTRNS (69) , BROS (48) , BLD (48) ,L
10843) ,POS (48) ,P8{4B) ,CC8(20) ,cOs(z0) ,
T#(43) ,PD8(8) ,RNB{23) ,HB(23) ,US(23)
109 REK % HS-Roos"assoc. with chest co
ntents, CB$-Color of background
410 DIM 0BJ8(23) ,Q8(322) ,R8(345) ,CRYEL
44) ,CB8(23) ,M8(15) ,F6(37) :RNE(23)="
RESTORE 112:FOR Ji TO 23:READ A
111. HB(J,u)=CHRS(AD:NEXT J:FOR Jet TO
23:READ A:CB8(J)=CHRS(AD :NEXT J
142 DATA 3,22,12,15,18,16,20,19,1,2,4,
6,9,10,13,14,8,17 ,11,5,21,7,0
113 DATA 18,66, 84,100,34,140,0,180,98,
178, 4,16,174,178,52,20,6,0,254,210,64,
242,50
414 REM X Randonize room" nases *
115 FOR Jel TO 23
446 ReINT(RND(0)823) :FOR Kei TO J:IF R
ASC(RNS(K)) THEN 116
118 NEXT K:RNS (J, J}=CHRB(R):NEXT J:K=0
119 KeKELTF ASC(RNB(K)) C47 THEN 119
120 RNS(K K)=RNS(18,18) :RNB (18, 18)=CHR
sa7)
121 REM ¥ Put objects in proper place
’
122 FOR Jet TO 23:K=ASC(HS(W)) -OBJ8(U,
JV=PNS (KEL KHL) °NEXT J: CRY=ASC(OBUB(22
):0BN8 (22, 22)=CHRS (17)
123 REM #X ALL STRING CHARACTERS IN LT
NES 124-170 ARE CTRL (EXCEPT THE X'S A
NO BLANKS) x8.
124 NXTRMS="4PD EBAFCGTBHE, FADGBECFKLI
DHHLTNKGUOHSHRTLOUMAUKSR, QUQPUTPLUYCRY
RsuoT"
425 BROs="9P ooap00000000000000000000
‘000000000000NH00 Ni"
427 BLDS=" | UYUVTITTTTTTTTTTTTTTTTTTTT
TITTTTTTTTTTTTRSRS
130 LOS=" EFEFARAAAAAAAAAAAAARAAAAAAA
AAAAAAAARAABBCDCD
140 ROS="TJ AATIAAAAAAAAAAAAAAAAAAAAA
[AAAAARAAAAAGHER GH
180 CCH" WZZZLXXXXAKXXXK"
"XBBBYZZZL XXXKAXXXXK"
‘EFARAALJ"
179 PEM § Hooe nanes
180 G#="##AHOGHEXUDES##ZRACHOE UMONHESS
HUDXPHG#RLO JPOGHO® JREDHWEELURGEFDOGUR
(Qs40DFH#SL.00RZU#4UDZKLGHEZKLS#"
181 @8199)="#4F KLQDAGROOES#SXUSOHAURE
H###PDJLF#ZD0C##. UROEKRUVHUKRHE SF KOLO
POLOBEFRSSHUMNHWOHE"
1a Sr oc os es
182 08(183)="'49V5\ JODUVEES#ULOYHRELLG
(OH#F RORUHG#EDOOVAZRRGEFURVVERZHERRNERT
‘#NORZQ### TXLOD#SHO##4EUDUVEEDODOFHE"
163 G8 (281 )="#FDAGOHUMLFNESEDUERIAVDO
WHEE ESUD\HUFUKUEE”
185 RS=""#F DUWOHEFU\SW##YDPSLURRVEODLUE
SSULOFHWVSV#EDNKE#GLOL Q.J#KDOO####ZLUFK
VEGHOS TXHAGRUSEHCURRP!
186 (91) ="4GDUNEGXOJHRGESKHLUKUEOXU
HU\ENL.QUXUF KOPEHUVURUFHUHUXV#CHQEDDF
NUPLUKEUKRS"
187 R6(166)=""#NOL JKieEVEURRPRSF DUOHINL
(WE RHQ 8 Z0WF KUR ZHU #KAUUHEUWDEDHE EEN
uHURUEURRPEEFDUMOHADUPRU\
188 R8 (256)= "HSH HEE EEE DUWOHFOLE
‘UDU\#DOFKHPL.UIXU#ODE #F DUWOHFKOSHORSE
‘VWRUHURRPS###PRONKUETXOUNHUY"
200 T$(1)=CHRS(0):T#(43)=CHRE(0) : 7842)
=T8:FLAG=0
209 REH * US-Passage # blocked at cert
ain room x
210 RESTORE 212:FOR J=1 TO 23:READ A:U
$(J)=CHRS(AD :NEXT J
212 DATA 0,0,0,23,0,0,0,0,12,0,0,18,31
,0,0,0,16,0,39,35,42,0,37
219 REM & Set up passages blocked x
214 FOR Je1 TO 23:ARASC(US(U)) IF A=0
THEN NEXT J
216 TS(A,AI=CHRS(1) :NEXT J:78(38,38)=C
HRS (1): T8040, 40 }=CHRS(1) :78(43,43)=CHR
ore
300.7::7" PRESS START”;
02 IF PEEK(52279) (06 THEN 302
904 7 CHRS(125) :GOSUB 1100:cosuB 1230
306, POSITION 6,0:7 "carrying: ":POSITIO
N2,19:7 "this is rooe # ":CUX=19:CUY=
u
310 RMeINT(RND(0)#8) : PRRM=ASC(NXTRMS(R
HRSEINT (PND(O)¥3#4))):A=RM¥PRAM: IF ASC
(T8(A0190 THEN 310
350. RY=ASC(NXTRMS (ANKSH) ) :RE=ASC(AXTR
M6(RIKES#2) ) :RO=ASC(NXTRMS (RHK3ES)
356 IF RI=PRAK THEN RTAM=R2:LTRH=RA
357 IF RE=PRAM THEN RTRM=RS:LTAH=RL
398 IF R3=PRRM THEN RTRM=RL:LTAH=RE
399 POKE 1779, 1:POKE 1788, 198
‘360 POKE 559,0:POKE 712,ASC(CBS(ASC(RN
(RIEL I)+1) ):POKE 710, 48:POKE 77,0
361 POSITION 1,1:7 "TO ROOM # "{LTRM;
“POSITION 26,1:7 "TO ROOM # ";ATRH
362 POSITION 14,18:7 "TO ROOK # *
i" ":POSITION 17,19:7 Ai"
36M LT=ASCITS(RMELTRM)) ;RT=ASC(TS (RHR
TRH) :GOSUB 1250
366 IF LT)0 THEN GOSUB 1215:COTO 370
368 IF LT=0 THEN GOSUB 1210
370 IF RTO THEN GOSUB 1225:cOTO 382
372 IF RT=0 THEN GOSUB 1220
382 POKE 559,34:X=23:Y=19:G=15RASC(RNS
(RHEL) HH1:H8=R6(Q,QH14) ;GOSUB 1500:POS
TTION 22,19:7" "5
983. IF OBJS(RMEL, MHL )=RNS (HH, RHEL)
THEN POSITION 22,19:7 CHRS(170)
384 X=24:Y=0: Pat AXCRY+L HB=Q6(P, P+13)
casuB 1500
390 POKE 712, ASC(CBS(ASC(RNS(RAEL 1141)
) :POKE 740,48: POKE 77,0
392 POKE 209,18:POKE 208,14
400 S=STICK(0):IF STRIG(O)=0 THEN 410
402 IF $=14 THEN CUX=19:CUY=9
404 IF S=13 THEN CUX=19:CUY=16
406 IF S=7 THEN CUX=33:CUY=11
407 IF S=11 THEN CUX=6:CUY=11
410 LOCATE CUX,CUY,Z:POSITION CUX,CUY:
7. "¥" :TRSTRIG(O)
Page 9 (scan)
490 IF TReO AND CUY=16 THEN TEMP=AH: Re -=PRAM: PRAM=TEHP GOTO 350 44) IF TR=0 AND LT=0 AND CUX=6 THEN LT -=RHYLTRH:PRAM=RH: RM=LTRH:GOTO 350 4450 IF TR=0 AND RT=0 AND CUX=39 THEN R ‘T=RMFRTRH: PRAH=RM: AMERTRM:GOTO 350 460 IF TRO AND CUY=9 THEN GOSUB 2000 470 TF FLAG=1 THEN FLAG=0:GOTO 360 420 IF FLAGS3 THEN POKE 1768,10:GOTO 6 00 490 POSITION CUX,CUY:? CHRE(Z) 500 coTD 400 600 7 CHRS(125) :POSITION 1,0:7 "YOU FO WO THE 800K congratulations!" 602 POSITION 2,19:7 “start to repeat select for new gase” 608 FOR Je0 TO 123:1F 927 AND JCG2 TH NEXT J 610 F8(1)=CHRS (J) :F8 (37) =CHRS (J) F812) =F$:FOR Ke3 TO 16:POSITION 1,K:? FS; (612 A=PEEK(S3279) :TF A=é THEN GRAPHICS 0:POKE 756,START/256:GOTO 122 614 IF #5 THEN GRAPHICS 0:POKE 756,ST ART/256:7 :7 “dust a sec ...":G0TO 114 (616 NEXT K:NEXT J:GOTO 608 999 REH ® Change character set ¥ 1000 DIM 2Z6(32) :RESTORE 1010:FOR T=t TO 82:READ A:ZZ8(1)=CHRS(A):NEXT T 4010 DATA 104, 104,133,204, 104,133,203, 104,193,206, 104,139,205, 162,4,160,0 4012 DATA 177,203,145, 205, 196,208,247, £230, 204,230 206,202,208 240,96 1014 POKE 106,PEEK(106)-5:GRAPHICS 0:6 (SUB 1800: START=(PEEK(106)+114256: POKE 756, START /256:POKE. 752,41 1016 A-USR(ADR(ZZ8) ,57344, START) :RESTO RE 1020:FOR T=START#520 TO STARTH727:R EAD A:POKE 1,A:NEXT I 1018 RETURN 1020 DATA 170,170,170,170,170,170,170, 170,255, 255,255,255 255,255,255 253,25 5 ,255 255,255 259,244,208, 64 1030 DATA 253,244,208,64,0,0,0,0,0,0,0 10,1,6,26,106,1,6,26,106,170,170,170,1 7 1049 DATA 127,31,7,1,0,0,0,0,255,255,2 55,255, 127,31,7,1,64,144,164, 169, 170,31 70,170,170 1050 DATA 0,0,0,0,64,144,164,169,170, 1 70,168,148, 160, 160,128, 128,170,171,170 (174,170 , 186,170,234 1060 DATA 191,289, 251,254,190, 46, 10,2, 191,47,11,2,0,0,0,0,191 299, 251,254,19 0,238, 250,254 4070 DATA 0,0,0,0,128,224,248,254, 128, 224,208 254,190 238,250 ,254,254,251,23 9,191,190, 184,160, 128 1080 DATA 254,248,224, 128,0,0,0,0,254, 251, 299,191,190, 187,175,191,0,0,0,0,2, 41,47 191 1090 DATA 2,11,47,191,190, 167,175,191, 2,2,10,10,42, 42,170,170 ,255,127, 63,31, 15,7,3,1 1092 DATA 64,192,208, 240,244, 252,253,2 55, 170,170, 170,170,170,170,170,170 1099 REM % Change display list * 1100 DL=PEEK(560)+2568PEEK (561) :POKE D L43, 70:POKE OL+6, 7:POKE OL+25,6:POKE D L426,7 4110 FOR =O TO 3:POKE DL¥27+U, PEEK (DL 42940) :NEXT J:FOR J=8 TO 23:POKE OLtU, A:NEXT J: RETURN 1199 REK X Draw figures using strings * 1200 FOR JO TO H:L=WiJ:POSITION X,Ytu 2) PSUL#, LAW) :NEXT. J: RETURN 1210 PS=LDS:He11 :W=d: X=4:¥=4:GOSUB 120 0: RETURN 1215 PS=BLDS:HeL1 :We4:X=d: ¥=4:G05UB 12 00:RETURN 1280 P$=RDS:HeLL Wed :Xt (00: RETURN :Y=4:GOSUB 12 1225 PS=BRDS :H=11 W=4:X=92:Y=4:G0SUB 1 200:RETURN 1230 PS=CC#:H=3:We5:X=17:Y=7:GOSUB 120 0: RETURN 1240 P§=CO$:He3:We5:X=17:Y=7:COSUB 120 O: RETURN 1250 P#=PD$:H=0: U8: X=16:¥=16:GOSUB 12 (00: RETURN 4500 POSITION X,Y:FOR J=1 TO LEN(HS):7 CCHRS(ASC(M8 (J) )~3) ;:FOR Ket TO 3:HEXT K:NEXT J: RETURN 1900 7 "Castle Hexagon gets its nase f roa": 7 “its six sided rooms with doors at" 1810 7 "alternate walls. Runor says a n':7 “ancient aanuscript of wisdon"cal led" 1820 7 "the "Book of Known’ lies hidde fn in':7 “one of the castle's aany room 1830 7? "Your job is to find this treas ure.":7" Each roa has a chest cont ining” 1840 7 "an ites associated with anothe r":7 “room. You can only carry one it et 1850 7 “at a tine, Position the curso Fon”:? "the chest and push ‘fire’. M 1860 7 “doors have been bricked over b "7 "some will aagically open when t 1870 7 “chest contains the proper ites "27 "Position the cursor on the desir es" 1672 7 "door and push ‘fire’ to wove b etween"':7 “rooms. The ‘mat’ in the mi 18747 “represents the room you just "7 “from, Just remember you are f 7 into the room, (the sap should help)."":7" A final warning ... it's not" 1678 7 “easy and if you re-run the pro gran":? “all the rooas get switched ar ound! ""; 1990 RETURN 1999 REN X Exchange chest contents * 2000 GOSUB 1240: TEMP=CRY:K=ASCLOBJS (RH 412) :Pat4akH :CRY=K 2010 OBUS( RMF , RIEL )=CHRS (TEMP) :X=24: =0:H8=08(P,P#13) :GOSUB 1500:POKE 1788, 474:FOR J=1 TO 100:NEXT J 2020 POKE 1788,196:GOSUB 1290 2025 IF CRY=17 THEN FLAG=3 2090 IF TEMP=ASC(RNS(RKH)) THEN GOSUB 2500 2040 RETURN 2099 REM X Clear passage * 2500 FOR Jet TO 100:NEXT J:POKE 1786, 1 O:FLAG=0:A=ASC(US (RHEL) :IF A=0 THEN R TURN 2510. T#(A,A)=CHRS (0) :FLAG=1 : RETURN MUSIC SOURCE LISTINGS 10 ; SOUND IN VBI ROUTINE 20 AUDCL ="s0201 ;(59761) 30 AUDFL ="#0200 ; (53760) 40 REST ="$4F3.;(1779) ‘SO RESTONT ="$6F4 ; (1780) 60 DURCNT ="86F8 ; (1784) 70 STRPOS ="S6FC ; (1788) 80 AREA ="8600 5 (1536) 90 #=$0000 0100 TUNEL LOX STRPOS ; Position is in dex a 0110 BEO TUNE ; Not active 0120 LOA PESTCNT ; Pause active? 0130 BQ TONE ; No 0140 DEC RESTCNT ; Yes 0150 BNE TUNE? ; Pause not finished 0160 LOA AREA,X ; Frequency 0170 STA AUDF1 ; into channel 1 0180 ASL A; 1 octave down 0190 NOP 0200 NOP. 210 STA AUDFI#2 ; into channel 2 0220 INK ; Next byte 0290 LDA AREA,X ; Duration 024 BEQ FINI; Quit if Dur ="0 0250 STA DURCNT 0260 INX ; index for next byte 0270 STX STRPOS ; Update string pos. 0280 BNE TUNE2 ; Skip over 0290 TONE DEC DURCNT ; Tone finished? 0200 EPL TUNEZ ; Not yet 0310 LDA #400 ; Shut off tones 0320 STA AUDFL 0380 STA AUDFI¥2 0340 LOA REST ; Initialize pause 0350 STA RESTCNT 0360 BNE TUNEZ 0970 FIN STA STRPOS ; 0 in String pos 0980 STA AUDFS ; and all sound off 0390 STA AUDFi#2 0400 TUNEZ JP $6462 BALLOONS FIX IW THE AUGISEPT ISSUE, CHANGE THE LISTING OF THE BALLOONS PROGRAM in Line 1600, FLAGG=0 not POKE FLAGG,O as listed HEXPOKE The following program was part of Stan Ockers article last month on ‘Machine Language Programming’ Sorry to have left it out 1 REM PROGRAY FOR “MACHINE LANGUAGE PR OGRAMING, PART 1, NOV ‘82 ACE NEWSLETT ER 10 REK oreo: 20 REM t HEXPOKE 4x 30 REM #8 5.0. 9-62 90 REH skoorcneocncct 50 REH 100 DIM H8(16) ,08(23) ,NSL5) =| 47@9ABCDEF™ :O8="@ABCOEFCHT o 110 OPEN #6,12,0,"5:":0PEN #1,4,0,"K-" POKE 752,1 300 7 CHRS(125) ;"INPUT ORIGIN IN HEX' INPUT N$:GO5UB 2010:AD=N;STRT=N: COSUB 1110 390 X=10:Y=4:GOSUB 910: AD=STRT: POSITIO 1 10,2:PRINT "STARTING ADDRESS ";STRT POSITION 10,22:7 “DECIMAL VALUES" 400 GET #1,k 410 IF K=a5 AND Y)4 THEN GOSUB 910:Y=¥ ~2:G05UB 910:AD=AD-8 420 IF K=61 AND Y(16 THEN GOSUB 910: Y= ‘Y#2:COSUB 910: AD=ADH8 430 IF K=42 THEN COSUB 910:COSUB 510 440 IF K=43 THEN GOSUB 910:COSUB 530 450 TF ((K)47} AND (K(58)) OR ((K)84) AND (K(7L)) THEN GOSUB 810 460 IF K=27 THEN COTO 300 470 IF K=82 THEN AUSR(STRT) :GOTO 300 500 POSITION 20,20:7 PEEK(AD);" ":POS TION 10,20:7 AD:GOTO 400 2012345 ELETKLAN
Page 10 (scan)
——
Branch on MInus (neg. flag set Net)
SPELL by ‘
Ruth Ellsworth eee Coeees
Listing in PILOT Ten eR: OUTT
770 vaste
sine es 730 € 510 Xext9:ADSADHL:IF 2081 THEN x=10:Y=
SAS ESC CT CLE 790 40 Y#2:TF YOU6 THEN Yod:AD=STRT
800 POS:5,$ 520 GOSUB 910: RETURN
410 R:SPELLING REVIEW 810 WRITE:S, $ONE 590 X=X-3:ADSAD-1:1F XC10 THEN X91: Y=
20 Riby Ruth Ellsworth 820 8 Y-ReTF YC4 THEN Yad:Xe10:AD=STAT
30 R:ACE NEWLETTER 830 WRITE:5, 9 540 GOSUB 910: RETURN
40 R:3662 VINE MAPLE ORTUE 240 A 800 REH SUBR. TO PUT NEW NUMBER IN
50 R:EUGENE, OREGON 97405, 50 H:S0NE HEnORY ee
60 #START 260 T: 10 NL=16¥(ASC(DS(K-47) 1-64) : POSITION
70 T:TYPE IN 5 SPELLING woRDS 870 TY:GO0D! SOME TS SPELLED soe C600 X,Y? CHREOK) ; :XeKH1:G05UB 910
807: ONE AT A TIME D! should be in inverse lettering for 820 GET #1,K:IF Ke126 THEN GOSUE 910:
90 AsO ali words to ake it stand out =X-1:G05UB 910:GET #1,K:GOTO 810
100 a: sTu0 80 TW:$0NE 15 SPELLED s0NE 824 TF ((KDAT) AMO (KESB)) OR (KDA)
110 a:sTHEE 890 0S:5,5 AND (KCTL)) THEN 28
120 4:¢FoUR 900 URITE:S, SONE 26 GET #1,xK:60TO 824
190 A:SFIVE 910 Pa:100 828 NO=ASC{O8(K-47) )~64:NANLANG: BORE
140 ¢:481373-16 920 WRITE:5,9 DWN
150 C:e81a74e2 990 E 830 POSITION X,Y:7 CHS(K);:Xext2:IF x
160 WRITE:5, SOE 90 #140 82 THEN Xe10:Ye¥#2: IF 916 THEN Y=a:a
170 WRITE:5 980 POE:5,5 D=sTRT-1
180 WRITES, $TW0 960 URITE:5, $140 (890 AD-ADH :GOSUB 910:RETURA
190 WRITE:5, 970 4. 900 REM #4 POS. AND 7 INU. OF CHAR
200 WRITE:S, STIREE 980 WRITES, 2 910 LOCATE X,Y,Z:POSITION X,:7 CHRS(Z
210 WRITE:5, 990 A: #128) ; RETURN
220 UAITE:S, sFOUR 1000 Ks #Tv0 1000 REH 8 PRINT DEC, # NIN HEX #4
230 WRITE:S, 1010 T 1010 Hed096:ZFLG=0:FOR Te1 TO 4:JeINT(
240 WAITE:S, — SFIUE 4020 TY:Go00! sTWo 15 SPELLED sTV0 N/M) :1F J)0 THEN ZFLG=1
250 Pa:100 1030 TH:STWO 15 SPELLED $140 1020 TF (90) OR (ZFLG=1) OR (192) THE
260 WRITE:5,9 41040 POS:5,5 NT HBCU HD;
270 Cc: 5 41050 WRITE:5, $140 1090 NeN-HAUH=M/16:NEXT RETURN
canst SEnUi ZR: io:paciea 1100 REM 4% PRINT SCREEN OF HEH. DATA
290 leat) :aTUO 1070 WRITE:5,) ”
300 Ut#e=2) THREE 1080 € 1110 7 CHRS(125) FOR Y=4 TO 16 STEP 2:
310 Utdae3) FOUR 1090 #THREE POSITION 5,Y:N=AD:GOSUB 1010: POSITION
320 Utdaed) FIVE 1100 Pas:5,5 toy
330 J:aseC 1110 WRITE. 5, THREE 1420 FOR K=O TO 7:N=PEEK(AD):GOSUB 101
240 5EC 1120 0:7" "; :ADRADHL: NEXT K
350 C.48=7\5 1130 URITESS, 2 1190 NEXT Y: RETURN
960 tée=t0) 3560 Aigo: 2UG0 PEM 8 CONVERT HEX IN NE TO DEC
2370 U#E=0) ONE 1150 4: STIREE oN
980 UC4B=1) -¥TH0 1160 7 2010 Ne0:FOR Tei TO LEN(NS):NewhLGHASC
2390 Ul48=a) SATIRE 1170 TY:GOOD! STHREE TS SPELLED sTHREE {OS(ASCINS(Z))=47))~64:NEXT T:RETURN
400 Ut46 1180 TH:STAREE 15 SPELLED sTHREE
410 Uit@=4) :#F IVE 1190 P05:5,5
220 J:ATHRI 1200 WRITE: 5, THREE
40 THR 1210 a: 100 2
440 Cs40=\5 1220 WRITE:5,) Z
480 JURC=HA) ATH 1230 € om
460. JAC=48) THRE 12a0 sFouR See
a 1250 FO5:5,5 eee
220 1260 WRITE: 5, #F0UR Sak
a0 1210 A en
iS uriora rt tov0 WRITE 5,9 * 7 gee
S10 Ul4C=4) -¥FIVE 1270 A iz z 4 foc
Q a ess
sa C:40=75 1220 TY-Goo0! $FOUR 15 SPELLED sFouR =P 3 z
550 JitD=ta) /¥FOR 1390 TN:SFOUR TS SPELLED $FOUR Sen ge 2
960 U(#D=#B) -4FOR 1340 POS:5,5 Ey pes &&6
570 Jle0=#c) :4F oR 1950 MRITE:5, $FOUR a . @
380 UCAD=0) -40HE 1360 A100 ale 32 4
599 Ul#O=t) :#TU0 1370 WRITE:S, He 890 hes gee
400 U(#0=2) THREE 1980 E ‘
610 Uie0=3) -¢FOUR 1390 sF IVE 3g s 8
#20 UL#0=4) FIVE 1400 POS:5,5 qs HSPs 2E5 veeeg
bat J ast ato ear’, rte a H
‘640 LAST 1420 A o £
650 C:4E=7\5 1430 WRITE:S,? a g
60 Jt E=Ha) -ALAST 140 A 2 i
670 iKE=H8) LAST 1450 H: FIVE Egg " t
680, HAE=AC) :ALAST 1460 T 3 8 a
690: JUAE S40) /ALAST 1470 TY:GO00! $FIVE TS SPELLED $FIVE
700 U(WE=0) :3ONE 1480 TH:AFIVE 15 SPELLED SFIVE
To U(4e=1) :¢TU0 1490 PO5:5,5 Mors OckeRs MAcHIWE A
720 UL#E=2) :ATHREE 1500 WRITE:5, $FIVE LANGUAGE
720 UlNE=3) FOR 41510 PA:100
740 ULE=4) :AFIVE 1520 WAITE:5,)
Additional OP—Codes
Table i
Page 11 (scan)
STRINGING ALONG WITH PILOT by Ruth Ellsworth Having felt tangled up in strings when | first began programming in BASIC, | was delighted to discover ATARI PILOT made strings easy to use and much easier to understand, In ATARI PILOT a string is any group of characters used together as a group. They can be a series of letters, numbers, symbols, or words, and can be used in combination. Strings are stored in “string variables,” chosen by the programmer and indicated by placing a “$" before the string name. For example SNAME could be a string variable in which a personal name will be stored. As an illustration with my children, we thought of strings as being like slots in a toy shelf. Each slot has a name, and any toy desired is placed in the assigned slot and retrieved by going to the slot named. ‘One does not need to dimension strings in PILOT. One needs only to use the A: command followed by the undefined string variable to allow a desired string to be assigned to that variable in a program. The simple spelling program at the end of this article illustrates this common use of string variables. String values can be assigned in several ways. They can be assigned from the keyboard during the run of a program using the Accept (A) command or placed into the accept buffer without keyboard input by using the command A:= followed by the string variable. The Compute (C) command assigns values to string variables in a program without keyboard input during programming so its value is set when the program is run. Thus in the program below, if one desires to place spelling words directly into strings SONE, $TWO, etc. before the program is run, one changes the A:SONE to C:SONE = desired word. Through the use of the Compute command strings can be combined to form new strings. This is done by giving the string variable name the value of other strings values in the program which may be combined in any way desired. We found this ability of the PILOT language especially useful in word land story games to from compound words or ideas. It is also possible to use associated string values in Atari PILOT. My children decided associated values were like looking at a stack of dishes (yes, Virginia, all the boys in our house do dishes). We have a stack of plates which are stacked several sizes together to save space. The ones we used most often are slid under ones of a smaller size. They decided all the values for associated strings are placed together, one under the other. When the value is desired, its location is indicated by the use of repeated $ to show its location in the stack. Two dollar signs, for example, show the value was second from the top. The more $ the further down in the stack as indicated by the number of dollar signs. Thus, $FIRST = ONE places the value ONE on the shelf; SONE=TWO places TWO under the associated value ONE; and STWO=THREE places the associated value THREE under TWO. In this example SONE=ONE, $SONE=TWO, and $$SONE= THREE. Those more accustomed to programming or familiar with FORTH may not like this Particualr explanation, but it has worked well for us. | offer it only in the event ‘someone else may find it useful. One may, instead, want to think of the $ sign as addresses and of going to suceeding addresses. In addition to allowing string variables to be displayed in a program with the Type command, PILOT allows the variables to be dumped so their values may be displayed with the DUMP command, and to be changed using the VNEWS command. | have included an example of the VNEWS command in the spelling program which allows the program to run continuously without defaulting to regular text mode. The program included here is simple, but one of the most used educational programs at our house. It allows the child to input 5 words at a time which are selected randomly through the use of the random number option in PILOT. The words are first displayed in the order entered, and then individually. The child selects the length of time the word is displayed before he attempts to spell it by pressing the return key so the screen can be cleared and he can try spelling it. The time could be controlled by placing a PA: command and a time umber in place of the A: command in the program. Each word is displayed after the attempt whether itis spelled correctly or not to reinforce the correct ATARI PILOT FOR BEGINNERS A Review by Ruth Ellsworth ATARI PILOT FOR BEGINNERS by Jim Conlan and Tracy Deliman with Dymax is the most comprehensive teaching tool for ATARI PILOT ! have seen. What it lacks in sense of humor and fun that PICTURE THIS! had it makes up in the completeness with which it covers the PILOT language. | discovered several things about PILOT which | had missed or overlooked, such as the fact the Turtle moves backward, ‘The book is divided into short chapters suitable for lessons which include a self-test with answers and a summary of the ideas presented in the chapter just completed. The illustrations are simple but well chosen, and it is well indexed allowing easy review and reference. No assumptions are made as to the reader's knowledge of either computers or computer language. A brief description of the PILOT language is followed by an explanation of the use of the keyboard with special ‘emphasis on the control keys. Sound, which is easier than graphics in ATARI PILOT, is presented first, then turtle graphics, followed by general programming skills. Though every subject was well covered, | liked the approach to graphics found in David Thorburg's PICTURE THIS! better, in spite of being less comprehensive, If | were trying to learn about ATARI PILOT, | would study the first four chapters of ATARI PILOT FOR BEGINNERS then read PICTURE THIS! before completing the rest of ATARI PILOT FOR BEGINNERS. However, in the event only one book can be chosen, ATARI PILOT FOR BEGINNERS is definitely my choice. 11 Under The Tree By Brian Dunn, author of Brian's Arcade This month | am going to write an article on some of the games | like and think will be very good Christmas or Hanukkah presents. Pac-Man and Centipede from Atari Inc. Pac-Man and Centipede are both very good games and they both look almost exactly like the arcade versions. The graphics on Pac-Man are very close to the arcade version and the sound is identical. Centipede is also a very good duplication of the arcade version. The sound and graphics are extremely good and are very close to the arcade version of Centipede. Both Pac-Man and Centipede are available from Atari Inc. or your local software dealer. They both come on a ROM cartridge and cost about $45. Protector Il from Synapse Software Protector Il is a very good space game. | like Protector Il for a couple different reasons. Protector II has very good graphics — a lot better than Protector |. The game also has superb sound and great animation. The game comes on a disk for around $30. For a full review of Protector II read the last A.C.E. Newsletter under "Brian's Arcade”. Wizard Of Wor from Rokian Software Wizard Of Wor is an outstanding arcade game which could also be called an arcade adventure. if you have ever seen the arcade game Wizard Of Wor and you like it you will love the home version because the arcade version and the home version are almost identical right down to the sound, graphics and mazes. Wizard of Wor is available on disk for $40 and on ROM cartridge tor $45, For a full review of Wizard Of Wor read the next A.C.E. newsletter. Rumors... I've heard the author of Caverns of Mars has come out with a Caverns of MArs Il. | heard itis really good but instead of scrolling down the screen you scroll to the fight of the screen which means the game is kind of like Air Strike from English Software and is also like the arcade version of Scramble ‘or Super Cobra. I have also heard, from a reliable source, that Atari Inc. has the home ‘computer rights to Donkey Kong and Donkey Kong Junior and both of those games are supposed to be best sellers next year, just wait. If Atari is going to release both of those games | think they should put both of those games on one cartridge if possible, Up and Coming games which look good: Miner 2049'er. Although | have not seen this game, from the advertisement in the latest Compute! magazine it looks like a very good game somewhat similar to Donkey Knog. It has 10 different screens in which you must get to the top in each of them. | am hoping to get a review copy of Miner 2049'er and if 1 do | will review it as soon as | can. Miner 2049'er is available from Big Five Software for $49.95. Miner 2049'er is available on ROM cartridge and is the first 16k ROM cartridge ever. Well that's all for this month folks, so | want all of you to have a very HAPPY HOLIDAYS. —Merry Christmas and Happy Hanukkah from Brian Dunn Meet Ruth Ellsworth The stereotype of computer hobbyists as esoteric whizkids is quickly fading as the personal home computer becomes ever more popular. Just look at Atari Computer Enthusiasts of Eugene: we have members from all walks of life and of all ages. For example, meet Ruth Ellsworth, whose normal role is being the mother of five boys and one girl ranging Is ages from 3 to 22. She and her husband, who teaches at Lane Community College, raise their family on a small farm outside Eugene, Oregon. Their lifestyle is quite different from many computer butts. Following a do-it-yourself philosophy, they raise much of their own food and butcher their own meat. They built their house and sew their own clothes. Their 12-year-old son has his turn on the family Atari after he has milked the family cow. Ruth became interested in microcomputers after seeing a public TV program on computers in education about 2 years ago. To Ruth, the computer seems a way to help her children learn at home: to reinforce what they learn at school and to fill in possible gaps. As an educator myself, | appreciate her concern from a different perspective. A student's attitude and success are very reflective of the interest shown by parents (as well as teachers) in what the child is doing at school. Ruth has the foresight to see the many teaching situations provided by the computer. Education has been the occupation of Ruth's ancestors back into the 13th Century. She herself has participated in the formation of ACE's new Educational Researchers, an organization dedicated to the educational use of ‘computers both in the school and at home. ERACE is proud to announce a new compilation of programs Ruth has written in PILOT. Programmed Inquiry, Learning Or Teaching is a programming language designed with teacher and student in mind. It is an authoring language for educators who want to design their own lessons, as. well as a learning language for students who want to learn to “teach” the computer to do things. Ruth has written several programs for her children which she now shares with the members of ACE. Included are several math drills in which the student has the choice of addition, subtraction, ‘multiplication or division. My children especially like competing against themselves in the timed drills. My 3year-old enjoys matching colors and coloring flowers and balls with simple movements of a joystick. An etching program in two versions allows the child to draw and filin colors. She's even included one dealing with music on a keyboard depicted graphically on the screen. Still in the works to be added is a spelling program. | you have Atari's PILOT cartridge, these programs are for you. Ruth has laid some groundwork upon which many of you will build. | look for much more to be done in PILOT, both by Ruth Ellsworth and by you whose imaginations are sparked by her creativity. =R. DeLoy Graham
Page 12 (scan)
BUMPAS REVIEWS ADVENTURE INTERNATIONAL, Box 3435, Longwood, FL 32750 (no prices iven) has two new pieces of software available. They are fully warranted for 1 year. If a defect occurs beyond 1 year they will replace the item for $5: The first is DISKEY by Sparky Starks, The disk contains a number of Utilities which will recover damaged disk information. You may examine and modify the information on the disk. You may be able to repair some files which you thought were lost, ‘The documentation comes in a digest-size booklet of 64 pages, and seems very complete. It includes a good discussiort of Atari disk parameters before It gets to the use and "abuse" of DISKEY. I've had a lot of fun with these utilities. I've never seen the “inside” of a disk before. So I've been using it mainly to explore around on some of the disks | have. | hope | learn enough about machine language to repair damaged disks by the time | need it. The second Al disk is BASIC ROUTINES by Jerry White. This piece of software is crammed with dazens of short routines and utilities divided into 20 items on a menu-driven disk. Most of the items provide a basic foundation for many of the programming routines you will need to use in developing your own software. ‘There are also some utilities to use in editing and otherwise manipulating your BASIC programs. There is also a 64-page digest sized booklet with a chapter (and program listing) for each Menu item, as well as three additional chapters discussing methods to conserve memory, speed up your program, and using PEEKs and POKEs. This work by Jerry White is presented with color & graphics, sound.and text and may be valuable to anyone who wants to begin programming their own software. BRIDGE MASTER ‘This program is available on disk for $21.95 from DYNACOMP, 1427 Monroe Ave., Rochester, NY 14618. It is an upgrade of their former Bridge 2.0. If you ‘own the original, you may obtain the upgrade by sending them your original cassette or disk, together with $5 plus $2 handling. They were VERY prompt. | received the disk in what seemed less time than was required for my order to reach NY. | also sent off two pages of questions, and they were also very prompt with responses to the questions. Most of my problems with the program was due to my lack of understanding about Duplicate Bridge. I've ever played Duplicate. The documentation tells you the program generates hands numbered trom ‘0-999, A numbered hand produces the same card distribution each time you seiect it. You may play the same hand as many times as desired. You may also switch positions in the same hand, and see how you may do on the other side. The documentation also tells you the ‘0° hand produces a random hand each time you select 0. I didn't find that to be true, and asked Dynacomp where the random hand could be found. Their response showed me the hands were actually numbered from 0.00 to 998.99. That's 100,000 hands, instead of 1000. Who needs another random hand ‘generator? | hope | live long enough to play 100,000 hands (not likely!). The program keeps score and saves it to a disk file so you can come back to it any time. The menu lets you display the last hand played. So it you're playing the numbered hands sequentially, it’s easy to pick up where you left off. There are no graphics — it's all text. With all the scoring and reading and writing to disk it seems slower than the 20 version it replaces. It has added some functions not covered by the 20. They've added pre-emptive openings, Blackwood and Stayman conventions. The program will also recognize demand bids and jump-shift responses. These are all nice improvements. Dynacomp says “sometimes it makes dumb plays!" | can second that! It makes them by your partner, as well as by your opponents, so maybe it evens ‘out. Little things like trumping one's own high card, setting up an opponent's loser. The program makes you look like a very good Bridge player — you can win a ot It's good practice for someone wanting to learn to play. I think I'm a pretty good player, and I'm having fun with it. —Jim Bumpas ERACE In the last month we have made contact with three other user groups Interested in educational software and applications. Bill Nordstrom, from the Twin City Atari Interest Group (ESIG/TAIG), has sent us their first efforts in compiling a listing of available software and software manufacturers, They are cataloging this information using “Filemanager 800". Hopefully we will be able to intertace with them to build a complete listing and avoid duplicating our efforts. Bill says they are also soliciting information on educational software and will appreciate hearing from anyone. We also heard from David An! at MACE. He will be sending some programs land information on programs they are using in the Michigan school system where they have decided to install Atari computers ‘The user group from MIT has shown an interest in what we are doing and will be in touch with us. ‘The December 7 meeting begins the software evaluation criteria development. We discussed our concepts of program content and design. ‘Alice Erickson suggests we try to develop a software program based on our evaluation criteria which will allow us, or anyone, to more thoroughly and ‘objectively evaluate and rate software. Evaluations will then be more consistent. The manufacturers and writers will then know how the programs are rated and what we as users expect to see in a program. ERACE has taken on a formidable project and we can use any help you have to offer. If you have any information on educational software let us know. DATA PERFECT/ FILEMANAGER + REVIEW/COMPARISON by Kirt E. Stockwell The first major difference shows up when loading the program into the computer. Data Perfect loads quickly and in a straightforward manner. Filemanager+ loads quite slowly, with builtin pauses and hard-crashed sectors which give a disk drive fits. | personally dislike commercial software marketed this way. (Seems like abuse of the equipment.) There must be a better method of protecting copyright privileges. ‘Another item not escaping my notice is: Data Perfect resides entirely in memory, whereas Filemanager + keeps only the kernel in RAM and must stop. to load the various utility segments individually as they are to be used. The problem here is room. While Data perfect is written in machine language, FileManager+ appears to be written in Basic. This leads to another point | want to bring to your attention. Filemanager functions best on a two-drive system, This saves the user from having to swap data and program disks constantly. There is a provision made in the program to circumvent this problem. An option allows you to “initialize” your data disks. This feature writes parts of the program to your data disks, making the program more convenient to use and cutting down on the amount of free data space on the disk. Lest it seem my intention here Is to run FileManager + into the ground, there are many other things which need saying. First of all, the documentation provided with FileManager + is miles ahead of what passes for documentation with Data Perfect. FileManager+ documentation actually guides you step-by-step through examples of creating input and output formats as well as examples of how to use each utility incorporated into the program. Some features are common to both programs. These include the ability to define field types such as: Alpha Numeric, Dollars & cents, repeating numbers, Computed numeric and computed Dollars & cents. FileManager also allows modification of a format even though there may be many records ‘stored using an old format which is to be changed. Modification of a format is, followed by the conversion of the database to fit the new format. This is an ‘essentially automatic function. This does not, however, destroy either the old format or the old database. Functions similar to this can be used to combine databases created using two differing formats. FileManager + also states the program can take advantage of the AXLON. RAMDISK. Both programs store the record format on the disk which holds the actual data, Both also provide for backup copies of the format and the data. Data Perfect also provides backup of the program disk: The program is written on both sides of the disk as it is sent. Data Perfect is inherently more powerful and flexible than FileManager + This Is not to say everybody who needs a database manager should run out and get Data Perfect. Here we have a classic example of a program so powerful and flexible most-people can't use it. For those of you who are familiar with computer languages used on LARGE systems, such as IBM Mainframes, Data Pertect has many similarities to APG (Report Program Generator), 'While not exactly a language, RPG requires learning many specific facts and certain routines in order to manipulate the program to accomplish what you need. Data Perfect is much like this. While you will need to study and fiddle and probably foul up some, the end product is a database tallored to your needs and as powerful as if you had paid a professional programmer to write it for you, The reporting capabilities are stupendous, again acting very much like RPG. | urge SYNAPSE to hire someone to convert FileManager + into Machine Language, and encourage LJK to hire a competent documentation specialist to write a full length book to explain Data Perfect. Both programs are top notch, and both are capable of performing at a higher level than most users are apt to need. For those of you whose needs are relatively simple, | suggest the acquisition of FlleManager +. For more complex reporting and data manipulation, Data Perfect may be more appropriate. Another item you may wish to take into consideration is the ability to merge Data Perfect and Letter Perfect files. At this time, one of the more potent considerations might be the amount of time you are willing to spend learning to use the database manager of your choice, and how complex your needs are likely to get. map 12
Page 13 (scan)
Machine Language
Programming No.2
Index registers, flags and branching
‘There were a couple of mistakes in the Machine Language Programming
#1, The pound signs indicating immediate mode were omitted before $79 and
SAA in Listing 2. Also, the words “Contents” and "Address" were reversed in
Figure 1. The listing of D:HEXPOKE, omitted last time, appears in the
centerfold of this issue.
Besides the accumulator the 6502 CPU also has two Index registers called
'’ and ‘Y'. They can easily be incremented (with single byte instructions INX
oF INY), or decremented (DEX,DEY). Normally they are used to modify the
address involved in an operation. LDA $0600,X for example means load the
‘accumulator with the byte at location $0800 MODIFIED BY X. If X's 0 the byte
at $0600 will be used. If X is 3 the byte at $0603 is used while if X=SBA, the
byte at $06BA will be used. To get numbers into the index registers there is a
full compliment of load X and load Y instructions Just as there are LDAS
(immediate, absolute and zero page addressing modes).
To see the value of the index register suppose the address of the byte of
the upper left hand corner of the screen is $7C40 and we want to put a line of
‘A's’ across the top of the screen. We could write a program to store an ‘A’
{rom the accumulator into each of the 40 bytes involved but it is much easier
using X to modify the address and just change X:
LDA #21 ‘A’ Use Table 9.6 change to hex
Loop STA $7C40,X
INX : Next position
Go back to loop 39 more times
A couple of problems present themselves however. .
(1) we must be sure X starts at 0
(2) We must stop the looping process after 39 loops.
The first problem can be taken care of by a LDX #800 before the looping
starts, but what about the second? For that we must learn about FLAGS,
Flags indicate some action has taken place. There are a number of them in
the CPU, (all in one register actually), and they are either set (value= 1) or
reset (value=0). Most operations set or reset the flags depending upon
results of the operation, For example, the LDA instruction will set the ZERO
FLAG if the accumulator gets loaded with a zero and reset it if it doesn't. It
will set the NEGATIVE FLAG if a negative number gets loaded, and reset it
when a positive number is loaded. We haven't talked about positive and
itself (the one you are trying to determine, not the op-code), begin with SFF
‘and count backward up to and including the op-code of the instruction to
which you want to branch. Remember SEF comes after $FO. The count is then
used a5 the second byte of the branch operation. Listing 1 is a ‘do-nothing’
rogram which you can use to practice branches. In summary; branches
depend on flags set or reset by the previous instructionis).
Rather than use an index for counting it is sometimes convenient to use a
memory location. There are increments and decrements for both the absolute
and zero page addressing modes. Table 1 gives an update of op-codes
Covered in this session. Try rewriting the line of ‘A's program using a zero
page counter rather than index register X. There are only a few zero page
locations tree for our use. Appendix D of the Basic Manual shows these to be
SCB to $1.
Use "Hexpoke’ to find the address of the upper left corner of the screen,
($58 is low order and $59 is high order byte). Using this address in the STA
—_____.X operation, load and run the ‘A's program. Fast wasn't it? actually
‘machine language instructions take only a few millionths of a second each so
the whole program took far less than a thousandth of a second. You often
have to keep this speed in mind because things can happen too fast!
Problem #3
First extend the ‘A's program to fill 256 screen spaces with A's. Then try to
fill the whole screen with A’s. Use index Y to keep track of 3 increments of the
high order byte of the screen address. You will have to create a program
which modifies itself. This is not good practice but can be done until we show
4a better way to handle the problem. If you run into problems with a failure to
fill when X is zero, try DEX, then STA then the branch. Remember STA affects
no flags,
Problem #4
Try to use loops to get an idea of how fast machine language instructions
execute. Create a loop within a loop, the outer loop changing once every time
the inner one goes through 256 cycles, (65,596 inner cycles to go through the
outer loop). Even this may not provide enough delay to time the process. If
not, create a third outside loop of 20 or so repetitions. You can use X and Y
registers, absolute or zero page locations for the increments or decrements.
—Stan Ockers
0520 ;
0530 ; Do Nothing Progra
"to Illustrate Br
Pegative numbers but numbers 800 tu STE aro posiine wie renter a0 anches
Tou SPE are negate ike
All load instuctions affect the zero and negative flags while store s
instructions don't affect any flags. The increment and decrement instructions 0611 0550 =" $0000
also affect thooe same two lage and thee are special netrtions ais
executed or not depending on the condition of the flags, These BRANCHING 0000 ANCE 0560 START LDA #608
INSTRUCTIONS permit us to Go conditional looping lose och oe
ceria condition olds an, Lave reste Oar Se ce 8 9002 DodA 0570 BNE GETBYTE
Conditional 1oop. 0004 CA 0580 DNONE DEX
0605 1003 0590 BPL UPONE
10 ; Put A's across top of screen 0007 83 0600 DEY
20; 0008 30FA 0410 BMI DNONE
0000 30 =" $600 000A EB 0620 UPONE INX
0600 68 40 PLA 000B CB 0630 INY
0601 Az27 «50 LOX #$27 i 39 in decimal 000C FOF6 0640 BEQ DNONE
0603 A921 «60 LDA #821 ian ‘At 000E BD0002 0650 GETBYTE LDA $0200,X
9605 9D407C 70 LOOP STA $7C40,X ; Put on screen 0011 @5CR 0640 STA $cB
0608 CA 80 DEX i Next position 0019 FOEB 0470 BEQ START
0609 DOFA = 90 BNE LOOP i Again if not 0015 DIED 0680 BNE DNONE
zero
060B DOFE 0100 HOLD BNE HOLD i So screen not 0110 ;
cleared 0120 ;
' Abe 15 use our teat of he oro f
down rater tart up Tho tranches pace Gan ae Oe ee 0130 ; ANSWERS TO PROBLEMS
foro flag being rese (ranch on Not Equal to sero ENE ah we wil eo pve
printed from right to left rather tran the oral way because tre inden se i
decrementing. The loop is done 39 times for hex values $27 thru $01, it is not 0150 ; Problem #1: A really wierd clock
done Tor X'=0, (int ty BFL inland, Ile not necsnoany vo veins Te
accumulatior each time because the decrementing of X or branching does not 0160 ; I find the upper left corner at $7C
affect the accumulator.
All branches are two byte instructions and they are relative branches which 40 (32K)
‘means the point they branch to is measured forward or backward relative to 0170 ;
the branch location itself, Positive numbers ($00'$7F) branch forward to future i
code while negative numbers (S80:SFF) refer to branching backward to code 0600 0180 "$600
already written. To see where the branch goes you have to count bytes In a
particular manner. On a forward branch start counting (in hex) with byte one 0600 68 = 0190 PLA
being the byte following the branch instruction {the next op-code). Count up
to but not including the op.code to which you want to branch (remember the 0601 A512 0200 AGIN LDA $12
umber after SOF is $10). For backward branches, start with the branch byte 0603 8D407C 0210 STA $7040
13
Page 14 (scan)
0606 A513 «©0220
0608 8D417C 0230
0608 A514 ©0240
0600 8D427C 0250
0610 4€0106 0260
0270
0280
0290
0300
0613 0310
0600 68 0320
0601 AMAA 0330
udness 10
0603 8D01D2 0340
0606 AD7002 0350
0609 BDO0D2 0360
060C 4C0606 0370
0380
0390
0400
060F 0410
0600 68 0420
0601 AMAA 0430
0603 800102 0440
0606 AD7B02 0450
0609 0A 0460
060A 0A 0470
0608 8D00D2 0480
060E 4C0606 0490
0500
0510
$13
$7041
$14
$7042
AGIN
; Problem #2
i For paddle controllers
=
PLA
LDA
STA
MORE LDA
STA
JP
$600
#808 i Pure tone, lo
$0201 IN AUDCI
$270 ; Paddle 0
$0200 i in AUDFL
MORE ; forever
; For joystick controller
PLA
LOA
STA
REPT LDA
ASL
ASL
STA
MP
$600
4808
$0201
s278 j Joystick 0
A
a
$0200
REPT
14
The
Game Writers’ Column
by Jon Atack, Eugene A.C.E.
‘THE GAME WRITER'S COLUMN is a new column especially for Atari users
who know the basics of machine language but don't know how to put
everything together to get the smooth graphics and awesome sounds of the
‘commercial games. Each month, we'll be going over techniques used in just
about every arcade game on the market, including:
* Vertical Blank Interrupts
* Player-Missile movement routines
* Display Lists
* Display List Interrupts
* Sound and Music routines
* Special Effects in colors and sounds
+ System Secrets used by game-makers
First of all, before you can write in assembly language, you should have an
assemblerieditor. All an assemblerleditor does is take the assembly language
‘you type in (called Source Code) and translate it into the machine language
the Atari understands, also called Object Code. The one | use now, and the
‘one | strongly recommend to anyone programming in machine language is
the SynAssembler, written by Synapse Software. It requires a disk drive and
48K, but is the fastest and easiest to use assembler | have seen. After using
the ‘Atari Assembler/Editor cartridge and being frustrated by its bugs and
snail-paced assembling speed, | set out looking for a faster assembler which
Is just as easy to use with perhaps a few more powerful features, and the
‘SynAssembler is it. Whatever you do, DON'T buy the Atari Assembler/Editor
‘aariridge. | did, and it was a mistake.
(On to this month's topic: Vertical Blank Interrupts, referred to as VBI. VBI is
the key to the smoothness of the graphics in commercial games. But first, a
short explanation of vertical blank Is in order. When the TV js drawing a
picture on the screen, it starts at the top left corner and draws lines from left
to right until it finishes at the bottom, Then it waits for a few microseconds
before it starts to draw another picture. This period of time between drawing
the screens is known as the Vertical Blank, when the TV isn't drawing
anything on the screen. A Vertical Blank Interrupt is simply when the Atari
Interrupts what it's doing to run a program timed with the TV screen, so itis
executed during the vertical blank of the TV. Vertical blank occurs every
1I60th of a second, or 60 times every second.
Why is this important? First of all, VBI is useful for routines which need to
move at a regular pace, never speeding up or slowing down, such as music
routines. Second, graphics changes can be done during the vertical blank to
make sure they don't occur when the screen is drawing over them. This is
how commercial games achieve their ultra-smooth graphics: By doing all
animation and screen drawing during the vertical blank. The change comes
‘on the screen neatly and smoothly without the image jerking or blurring.
‘Another use is for monitoring user inputs, such as reading the joystick, so the
responsiveness stays the same speed even if the main program slows down,
Implementing your own VBI routine is surprisingly easy. There are two
RAM vectors for VBI: one for immediate VBI and one for deferred VBI. The
only difference Is immediate VBI runs before the Operating System's VBI
routine, and deferred VBI runs after the O.S, VBI routine. Which to use? The
immediate is better for graphics changes and general 1/0, but if the VBI
routine is very time-consuming in execution it has to be deferred, or else the
screen jerks 60 times a second, giving unsightly effects. Also, deferred VBI is
Useful for writing to hardware registers after the O.S. VBI routine has written
to them, giving you the last word, so to speak. For example, this is how to get
rid of the annoying attract mode when your game is running.
‘Once you have decided whether your VBI should be immediate or deferred,
you should place your routine in memory, link its termination to the regular
VBI processing, and modify the appropriate RAM vector to point to it. Here's
how:
1 Place your VBI routine into memory. At the end of it, have it do @ UMP.
‘SEA5F for immediate VBI or a JMP $E462 for deferred VBI.
2 Now, in your regular program, you must set up the RAM vectors so
your VBI routine will be run
3a Load the X-register with the Hi-byte of the address of the beginning
‘of your VBI routine,
Example: LDX #840 if the address was $4060
4 Load the Y-register with the Lo-byte of the address of the beginning
df your VBI routine,
Example: LDY #880 if the address was $4080
5 For immediate VBI, load the accumulator with a 6 (LDA #6). For a
deterred, load the accumulator with a 7 (LDA #7).
6 Do a JSR SE45C. $E45C Is an OS. routine called SETVBV which
changes the VBI RAM vectors $222,$223 and $224,225 to point to
your VBI routine, Control will be returned to your program within
{160th of a second or less.
‘An example to set up an immediate VBI routine located at $600 (Page Six)
follows,
130 JSR SE45C
‘and your VBI routine will have to end with a JMP SE45F.
Your VBI should begin running in 1/60th of a second following these
instructions. if you have any problems or questions, fee! tree to call or write.
‘My number is (503) 344-8347 or 686-8357, and my address is:
—Jon Atack
1865 West 29th St
Eugene, Oregon 97405
In closing, | have also included two sound routines from my new game
‘Meteor Storm. One is in assembly language form and one is in BASIC, for
people who don't have an assembler. Both use techniques which will be
‘covered in a future column, and feel free to modify them or use them in your
‘own games, Until next month, good luck and great gaming!
Jon Atack
Page 15 (scan)
00001; SOUNDS by Jon Attack 90100 ; Special Sound Routine 0110 ; 00120 by Jon Atack 00130 ; 00140 ; ritten on the SynAsseabler 00150 ; 00160 ; HS 00 is equivalent to 00170 ; .BYTE 0 on the Atari Asseabler oreo ; 00190 ; Try changing the values of 00200 ; TIMER, INC, & RISE for 00210 ; different sound effects. 00220 ; 0230 OR $600 STARTS AT 6600 00240 START LDA #0 0250 STA SOUND 0260 Lon 984 00270 STA $0208 INITIALIZE SOUND REGISTERS 00280 Loa #0 00290 STA $0207 0300 LOA #80C oos10 STA $0205 00320 STA $0201 00330 LDA #192 TRY DIFFERENT NUMBERS HERE 00340 STA TIHER 00350 LDA #160 TRY DIFFERENT NUMBERS HERE 00360 STA INC 00370 STA RISE 00380 ; ‘SOUND ROUTINE 00390 LOOP LDA INC 90400 STA s0e04 0410 DEC INC 0020 STA $0200 00430 LDA INC 00440 Beg END 00450 MP RISE 00460 ‘BCS GOON 00470 LDA RISE 00480 ac 00490 ADC 4450 00500 STA INC 00510 LDA RISE 00520 SEC 00530 Sec #2 00540 STA RISE 00550 Loy #20 (00560 LOOPS JSR DELAY 00570 vey 00580 ‘BRE LOOPS (00590 GOON JSR DELAY 00600 oH LOOP 00610 END LDA #0 00620 STA $0201 00630 STA 80205 00640 5ST@ SOUND 00650 RTs (00660 INC .HS 00 00670 RISE .HS 00 00680 TIMER .HS 00 00890 COLOR .HS 00 00700 ; DELAY AND CYCLE COLORS 00710 DELAY LOX #60 00720 LOGP4 INC COLOR 00730 LDA COLOR 00740 STA $0016 00750 ex 00760 BNE LOOP4 0070 RTs. (00780 SOUND .HS 00 15 SOUNDS by John Attack Basic listing 1 REM SOUND ROUTINE by Jon Atack 2 GRAPHICS 17: S=PEEK(S60)+2564PEEK(561 ):POKE S#8,7:POKE S49, 6:POKE 5#10,7 9 RESTORE 600: TRAP 8:A=1595:POKE 7S2,1 DIM $1384) :FOR D=1 TO 52:READ B:A8( D,0)=CHRS (B) :NEXT D: RESTORE 4 READ B:POKE A,B:AeAtL:GOTO 4 5. IF PEEK(764) (0255 THEN 8 6 POSITION 3,3:7 #6:"A WE 50H E":PO SITION 5,5:7 €6;"5 0 UN D":POSITION 3 19:7 #6;"by jon atack" 7 FOR D=0 TO 3:POSITION 3,13:7 #6;A810 #1341 ,0813413) | :FOR E=1 TO 21:NEXT E:N EXT D:IF PEEKI764)=255 THEN 7 8 POKE 1654,26 9 POKE 764,255; JeUSR(1535) :GOTD 5 10 REH MACHINE LANGUAGE DATA 15 DATA 104,169,0,141,121,6,169,4,141, 8,210,169 20 DATA 0,141,7,210,169,172,141,5,210, 14,1 30 DATA 210,169,192, 141 ,104,6,169,160, 141 ,102,6 40 DATA 141 ,103,6,173,102,6,141,4,210, 206,102 50 DATA 6,141 ,0,210,173,102,6,240,37,2 05,103 60 DATA 6,176,26,173,103,6,24,105,80,1 i102 70 DATA 6,173,103,6,56,289,2,141 ,103,6 1160 80 DATA 20,32, 106,6,196,208,250,32,106 1,76 90 DATA 36,6,169,0,141,1,210,141 5,210 Mat 100 DATA 121,,6,96,0,0,0,0,162,60,298,1 05 110 DATA 6,173,105,6,141,10,212,141 22 ,2OB 202 ,208,244,96 120 DATA 0,0,-2 500 REM PRESS ANY KEY DATA 600 DATA 80,114,197 243,83,32,97 ,206,2 49 ,32,75 101 217 ,112 210 ,229,63,115,32 399,298 610 DATA 89,32,107,197 249,208,242, 69, 115,211 ,32 225,78, 121 , 82,203,229 89 620 DATA 240,82,101 211 243,32, 65,110, 217 82,235 ,69,121,0,0
Page 16 (scan)
b> Br wn & sic ‘ye ee >| /_— * > » 8 . 4 » v o . a + ° ° ay 5 rs : . > 2 « ° “ 7 ~% VAZ LA | k = “al * ee ia ————} TYPESET COPY From Your Computer If you have a modem, word processing and communications programs, you can transmit your manuscript, article, newsletter, or other text va telephone and have it converted into space-saving, easy-to-read type! Computer typesetting offers you high quality copy at "do-t-yourselt” rates: Just $2.00 per 1,000 characters. And it’s easy to encode your copy with our designated typesetting commands, Hundreds of type styles to choose from with 8 styles and 12 sizes "on line’’ Write or call Dennis Hunt for a brochure and simple instructions. EDITING & DESIGN SERVICES 10 East 13th Avenue Eugene, Oregon 97401 Phone (503) 683-2657 ¢ & \Happy~ \“Happy~ ee i RS Holidays ‘Holidays ‘Holidays Holidays 8 PS o fam ° 7] iS] toa is} wv OV g Se Ue w sa 24s ae; ce S ra << Eo Bo 2 LOW al 2S 3 0 K oO sO ao Atari Computer Enthusiasts A.C.E. is an Independent computer club and user's group with no connection to the Atari Company, a division of Warner Communication Company. We are a group interested in educating our members in the use of the Atari Computer and in giving the latest News, Reviews and Rumors. All our articles, reviews and programs come from you, our members. ‘Our membership is world-wide in scope; membership fees include the A.C.E Newsletter. Dues are $10 a year for U.S., and $20 a year Overseas Airmail and in clude about 10 issues a year of the ACE Newsletter. Subscription Dept: 9862 Vine Maple Dr., Eugene, OR 97405. President—Kirt Stockwell, 1810 Harris #139, Eugene, Or 97403 / 503-683-3005 ‘Secretary—Charles Andrews, POB 1613, Eugene, Or 974401613 / 503-747-9892 Librarian—Chuck and Jody Ross, 2222 Ironwood, Eugene, OR 97401 503-343-5545 Editors—Mike Dunn, 3662 Vine Maple Dr., Eugene, Or 97405 / 503-344.6193, Jim Bumpas, 4405 Dillard Rd., Eugene, Or 97405 / 503-484-9925 ERA.C.E. (Educational SIG) Editor—Larry Gold, 1927 McLean Bivd., Eugene, Or 97408 1 503-686-1490 ‘Send a business-size SASE to the Ross’ for the new, updated ACE Library List!! Bulletin Board (503) 343-4352 (On line 24 hours a day, except for servicing and updating. Consists of a Tara ‘equipped 48K Atari 400, 2 doubledensity disk drives, an Atari 825 printer, a Hayes SmartModem; running the ARMUDIC Bulletin Board software written by Frank C. Jones, See the Nov '82 issue for complete details. Hien D> —Haupe ‘Holidays ‘Holidays Py “Holidays > lappy~ ‘Holidays 3 SB eee, ‘Holidays