Professional Documents
Culture Documents
Pet Paper v3 I2 I3
Pet Paper v3 I2 I3
TABLE OF CONTENTS
ADVERTISERS
E a s t e r n H o u s e S o f t w a r e ................................ 1 8 G e n e P o l o w y t s c h ....................................... a . . . 46
A b a c u s S o f t w a r e ............. . .21 A r e s c o P u b l i c a t i o n s „ 0„ ....... 46
A i d c o m S o f t w a r e ............. . .21 M i c r o S o f t w a r e S y s t e m s ....... 47
I n t e r n a t ' l Tech. S y s t e m s . . » „4l Riley Enterprises» = 4 7
E a s t e r n H o u s e S o f t w a r e „„....41 H a r r y H. B r i l e y 0„ ............. 47
E v e r y t h i n g E l e c t r o n i c ......... 46
FOR YOUR GENERAL INFORMATION
T H E P A P E R is p u b l i s h e d t e n t i m e s p e r y e a r b y A R E S C O , I n c . , a t
6303 G o l d e n Hoo k , C o l u m b i a , MD, 2 1 0 4 4 . T e l e p h o n e (301) 7 3°-
5186.
T H E P A P E R is m a i l e d to s u b s c r i b e r s d u r i n g t h e l a s t w e e k o f
each m o n t h except June and December. S i n g l e c o p y p r i c e is
$2 a n d s u b s c r i p t i o n p r i c e is $ 1 5 f o r a l l t e n i s s u e s o f the
current volume. S u b s c r i p t i o n s d o n o t c a r r y o v e r f r o m one
v o l u m e to t h e n e x t . S u b s c r i b e r s w h o do n o t w i s h to o r d e r the
f u l l v o l u m e s h o u l d s e n d $2 f o r e a c h i s s u e d e s i r e d . Renewals
a r e a c c e p t e d d u r i n g the l a s t t w o m o n t h s o f the c u r r e n t v o l u m e
yea r , a n d t h e f i r s t i s s u e o f e a c h v o l u m e is p u b l i s h e d i n Feb.
S u b s c r i p t i o n o r d e r s s h o u l d b e m a i l e d to P 0 B o x 1 1 4 2 , C o l u m b i a
MD, 2 1 0 4 4 i n o r d e r to a s s u r e p r o m p t p r o c e s s i n g .
S e c o n d c l a s s p o s t a g e p a i d i n C o l u m b i a M D 2 1 0 4 5 ( U S P S 450-93° )•
POSTMASTER S e n d a l l a d d r e s s c h a n g e s to T H E P A P E R , B o x 114 2 ,
Columbia MD 21044
T H E P A P E R is n o t a s s o c i a t e d i n a n y w a y w i t h C o m m o d o r e B u s i n e s s
M a c h i n e s , C o m m o d o r e I n t e r n a t i o n a l , o r a n y o f i ts a f f i l i a t e d
c o m p a n i e s , an d C o m m o d o r e is n o t r e s p o n s i b l e f o r t h e c o n t e n t s
o f T H E PA P E R .
R e a d e r s ar e e n c o u r a g e d to s u b m i t a r t i c l e s of g e n e r a l i n t e r e s t
to PE T o w n e r s f o r p u b l i c a t i o n i n t h e P A P E R . Material submitted
m u s t be f r e e of c o p y r i g h t r e s t r i c t i o n s . The entire contents
of THE PAPER are copyrighted c 1980 by ARESCO, Inc 0
SUBSCRIPTION RATES
U S A residents: $ 1 5 / 1 0 issues of current volume. Non-USA resi
d e n t s s h o u l d i n c l u d e a n a d d i t i o n a l $12 f o r a i r m a i l p o s t a g e i f
desired. Com p l e t e sets of p r e v i o u s v o l u m e s w ill be a v a i l a b l e
f o r $ 1 5 / s e t (all t e n i s s u e s o f the v o l u m e ) , p l u s p o s t a g e . No
p u r c h a s e orders will be a c c e p t e d for orders; p a y m e n t m u s t a c
c o m p a n y the a p p l i c a t i o n f o r s u b s c r i p t i o n . C O D ( v i a U P S ) is
a c c e p t a b l e f o r p r e v i o u s v o l u m e s e t s only, a n d t h e p u r c h a s e r
will incur the U PS COD charge of $1.15* P e r s o n a l c h e c k s , MC,
V I S A , A m e r i c a n E x p r e s s c r e d i t c ards, a n d c a s h a r e a c c e p t a b l e
m e a n s of p a y m e n t . Checks d r a w n on foreign banks should include
a n a m o u n t s u f f i c i e n t to c o v e r t h e c u r r e n t c u r r e n c y e x c h a n g e rat e .
ADVERTISING
A d r a t e s h e e t s w i l l b e s e n t to i n t e r e s t e d p e r s o n s u p o n r e q u e s t
xc T H E P A P E R , P 0 B o x 1 1 42 , C o l u m b i a M D 2 1 0 4 4 .
DEALERS
D e a l e r s m a y o r d e r c o m p l e t e s e t s o f t h e p r e v i o u s v o l u m e s as w e l l
as a m i n i m u m o f f i v e (5 ) c o p i e s o f e a c h m o n t h ' s c u r r e n t i s s u e .
D e a l e r s are i n v i t e d to i n q u i r e b y m a i l o r b y t e l e p h o n e to (301)
730-5186
SOFTWARE
S o f t w a r e w r i t t e n f o r a n d d i s t r i b u t e d b y T H E P A P E R is i n t e n d e d f o r
u s e o n the 8K PET, a n d w e d o n o t m a k e a n y c l a i m s t h a t s a i d s o f t w a r e
is a p p r o p r i a t e f o r u s e o n a n y o t h e r C o m m o d o r e c o m p u t e r s y s t e m .
2
EDITORIAL
S E E N E X T P A G E FOR T A B L E S
6502 INSTRUCTION SET BY MNEMONIC
ADC-ABS ,X . 1 2 5 7D
ADC-ABS,Y 121 79
ADC-IMM 105 69
ADC-IND,X 97 61
ADC-IND.Y 113 71
AND-ABS ,X 61 3D
AND-ABS,Y 57 39
AND-IMM 41 29
AND-IND,X 33 21
AND-IND,Y 49 31
AND-Z PAGE 37 25
AND-Z PAGE ,X 53 35
ASL-ABS ,X 30 IE
ASL-Z PAGE 6 06
ASL-Z PAGE,X 22 16
4
MNEM ONIC____ DECIMAL HEX OPERATION
i
BIT-ABS 2C Test B it s in Accum w ith Memory
-Ea
B1T-Z page 36 24
CLI 88 58 C le ar In te r r u p t D isable B i t
CMP-ABS,X 221 DD
CMP-ABS,Y 217 D9
CMP-IMM 201 C9
CMP-IND.X 193 Cl
CMP-IND,Y 209 D1
CPX-IMM 224 EO
CPY-IMM 192 CO
5
MNEMONIC DECIMAL HEX OPERATION
DEC-ABS ,X 222 DE
EOR-ABS,X 93 5D
EOR-ABS ,Y 89 59
EOR-IMM 73 49
EOR-IND.X 65 41
EOR-IND,Y 81 51
EOR-Z.PAGE 69 45
EOR-Z.PAGE,X 85 ' 55
INC-ABS,X 254 FE
INC-Z.PAGE 230 E6
JMP-ABS 76 4C Jump
JMP-IND 108 6C
LDA-ABS,X 189 BD
LDA-ABS ,Y 185 B9
LDA-IMM 169 A9
6
MNEMQ'M! C DECIMAL HEX OPERATION
LDA-IND.Y 177 B1
LDX-ABS ,Y 190 BE
LDX-IMM 162 A2
LDY-ABS ,X 188 BC
LDY-IMM 160 . AO
LSR-ABS,X 94 5E
LSR-Z PAGE 70 46
LSR-Z PAGE,X 86 56
ORA-ABS,X 29 ID
ORA-ABS,Y 25 19
ORA-IMM 9 09
ORA-IND,X 1 01
0 RA-1N D, Y 17 11
ORA-Z PAGE 5 05
ORA-Z PAGE,X 21 15
7
MNEMONIC DECIMAL HEX OPERATION
ROL-ABS,X 62 3E
ROL-Z PAGE 38 26
ROL-Z PAGE,X 54 36
SBC-ABS,X 253 FD
SBC-ABS,Y 249 F9
SBC-IMM 233 E9 •
SBC-IND.X 225 El
SB C-1ND,Y 241 FI
STA-ABS,X 157 9D
STA-ABS,Y 153 99 .
STA-IND,X 129 81
STA-IND.Y 145 91
•
STA-Z PAGE 133 85
8
MNEMONIC DECIMAL HEX OPERATION
10
DECIMAL hex MNEMONIC OPERA! i '"•!
57 39 AND-ABS ,Y
61 31) AND-ABS ,X
62 311 ROL-ABS ,X
64 40 RTI Return from In te r r u p t
65 41 EOR-IND,X "E x c lu s iv e Or" Accum w it! M- inory
69 45 EOR-Z PAGE
70 46 LSR-Z PAGE S h i f t One B i t Right (Mem)
72 48 PHA Push Accum onto Stack
73 49 EOR-IMH
74 4A LSR-A S h i f t One B i t Right (Accum)
76' 4C JMP-ABS J ump
77 4D EOR-ABS
78 4E LSR-ABS
80 50 BVC Branch on Overflow C le ar
81 51 EOR-IND,Y
85 55 EOR-Z PAGE,X
86 56 LSR-Z PAGE,X
88 58 CLI C le a r In te r r u p t D isab le B i t
89 59 EOR-ABS,Y
93 5D EOR-ABS,X
94 5E LSR-AES,X
96 60 RTS Return from Subroutine
97 61 ADC-IND,X Add Memory to Accui;, wi th Carry
101 65 ADC-Z PAGE
104 68 PLA P u ll Accumulator from Stack
105 69 ADC-IMM
108 6C JMP-IND
109 6D ADC-ABS
112 70 BVS Branch on Overflow S e t
113 71 ADC-IND,Y
117 75 ADC-Z PAGE,X
120 78 S EI S e t In te r r u p t D isable Status
121 79 ADC-ADS ,Y
125 7LI ADC-ABS,X
129 81 STA-1ND,X S to re Accum in Memory
11
DECIMAL HEX MNEMONIC OPERATION
169 A9 LDA-IMM
171 B1 LDA-IND,Y
180 B4 LDY-Z PAGE,X
181 B5 LDA-Z PAGE,X
182 B6 LDX-Z.PAGE,Y
185 B9 LDA-ABS ,Y
DECIMAL___ - ------ HEX M N ! i n ___ OPLkATlO!!
13
J E C 1MAL..... ji.r.x _______ _ opi-kation______ __________
240 TO BEQ Branch I f Equal (R e s u lt - 0)
241 ri SBC-1 ['ID,Y
245 F5 SBC-Z PAGL,X
246 F6 INC-Z PAGE 5X
248 FO SLD S e t D ecm /i Mode
249 F9 SBC-ABS,Y
253 FD SBC-ABS,X
254 FE INC-ABS,X
t
14
READER I/O
10 D E F NDR(X) = INT(RND(1) * X) +1
T h i s c a u s e s a r a n d o m i n t e g e r f r o m 1 to X to b e g e n e r a t e d o n
e a c h c a l l to FNR. To r o l l t h r e e d i c e , j u s t i n v o k e F N R t h r e e
times:
2 1 9 0 J= F N R (6 )+ F N R (6 )+ F N R (6 )
2191 R E T U R N
T h e s t a t e m e n t 20 J = R N D ( - T I ) s h o u l d be e x e c u t e d o n l y o n c e to
s e e d the B A S I C r a n d o m n u m b e r g e n e r a t o r . T h i s t a k e s t he p l a c e
o f the " R A N D O M I Z E " v e r b i n o t h e r B A S I C S . - J e f f P i m p e r
* * * * * * * * * * * * * * * * * * * * *■){-* -a-**** * * * * * * * * * * * * * * * * * * * * * * -a-*-** * * -a--*-** *
T e r r y - I r e a l l y enjoy The PAPER. Some of the items are a
l i t t l e o v e r m y h e a d , s o m e a l o t over, a n d s o m e I g e t a l o t o u t
of. B u t a l l i n all, I e n j o y it. I°d l i k e to s e e s o m e a r t i c l e s
o n p r o g r a m s f o r (or e s p e c i a l l y c h a n g i n g e x i s t i n g p r o g r a m s to
r u n on) the C B M p r i n t e r w h i c h I f i n a l l y r e c e i v e d 1 . 3 y e a r s
after ordering. H o w e v e r , i t d o e s w o rk, a n d I d o n ' t n e e d m o r e
i n f o r m a t i o n t h a n the r e v i s e d m a n u a l o f f e r s „ K e e p s e n d i n g o u t
t h e g o o d w o r d . . . w e n e e d you! - F r e d M i n c h i n
T e r r y - J a m e s M c A r t h u r ' s " S E A R C H " i n V o l u m e 2, i s s u e 10, p a g e
24, is a n a b s o l u t e GEM! I h a d d e c i d e d n o t to r e n e w , b u t h a v e
c h a n g e d m y m i n d , s i n c e I t h i n k t h i s p r o g r a m a l o n e is w o r t h t h e
year's s u b s c r i p t i o n price. S o r r y to say, I f o u n d l i t t l e e l s e
o f i n t e r e s t i n V o l u m e 2.
O f c o u r s e , y o u d i d n ' t q u i t e m a n a g e to t y p e a l l t he m a c h i n e code
correctly. I n l i n e 140, the 2 1 s t c h a r a c t e r i n the s t r i n g s h o u l d
be a 3 i n s t e a d o f a 2 . I h o p e y o u ' l l p r i n t a n o t e to t h i s e f f e c t
i n y o u r n e x t issue; it w o u l d be r e g r e t t a b l e if a n y r e a d e r s m i s s e d
out o n this fine p r o g r a m b e c a u s e of a s i m p l e e r r o r . - J L P i e t e n p o l
##*#***#****-a--B--a-*-a-*-a--a--a--a--a--a--a--M--a-*-a--a--a--a--if-*-a--a--a--B-*-a--a--a--a-B--a--a--*-si--a--s--K--a--*-a--a--a-a--a-*-a--a-
T e r r y - I t w a s g r a t i f y i n g to s e e " S E A R C H " p u b l i s h e d i n t h e P A P E R
a t last! Unfortunately, there are some errors which will keep
it f r o m w o r k i n g . A b o u t m i d w a y t h r o u g h l i n e 140, t h e r e is t he
c h a r a c t e r s e q u e n c e 9028. T h e 2 I n t h i s s e q u e n c e s h o u l d b e a 3*
A l s o , n e a r the e n d s o f l i n e s 3 3 0 a n d 340, t h e r e s h o u l d b e t w o
r i g h t p a r e n t h e s e s t o g e t h e r , i n s t e a d o f one. I noticed that
t h e l i n e s o f c o d e w h i c h w e r e t o o l o n g to f i t i n o n e l i n e of
p r i n t w e r e c o n t i n u e d o n a n a d d i t i o n a l lin e , w h i c h is ok, e x c e p t
t h a t t h e a d d i t i o n a l l i n e is s h o w n s p a c e d o v e r f r o m t h e l e f t edge,
w h i c h w o u l d r e s u l t i n a g a p i n t he cod e . E a c h s t r i n g of code
w i t h i n t h e q u o t e m a r k s has to b e c o n t i n u o u s .
T h e M E R G E p r o g r a m w h i c h I m e n t i o n e d i n m y l a s t l e t t e r is r e a d y ,
a l t h o u g h i t is p e r h a p s s o m e w h a t o u t d a t e d , c o n s i d e r i n g s o m e o f
t h e s y s t e m h a r d w a r e n o w o n t he m a r k e t - T h i s p r o g r a m h a s s o m e
a d v a n t a g e s , a t l e a s t ; i t d o e s n ' t r e q u i r e a n y a l t e r a t i o n s to the
PET, a n d it d o e s n ' t c o s t a n y t h i n g ( e x c e p t s e v e r a l f r u s t r a t i n g
h o u r s o f t y p i n g a n d p r o o f r e a d i n g , s i n c e i t is n e a r l y t h r e e t i m e s
as l o n g as S E A R C H ) . I n a n y cas e , I w i l l s o o n s e n d a l o n g a c o p y
o f it, a l o n g w i t h a l i s t i n g m a d e o n a P E T 2 0 2 2 printer., - J a m e s
F McArthur
tt-a-a^-a-a-a-a-a-a-■***■«■*
T e r r y - I d e c i d e d n o t to r e n e w . I’ m s o r r y , b u t the P A P E R is too
h i g h l e v e l f o r me, a n d I d o n ' t g e t e n o u g h o u t o f it. "Compute'"
is m o r e to m y t a s t e . As n o t e d b y R o y B u s d i e c k e r , c o m m e n t i n g o n
Compute vs. " M i c r o " , C o m p u t e s e e m s to b e t he m o r e " c u s t o m e r "
a n d l e s s " t i n k e r e r " oriented., T h e s a m e is t r u e o f C o m p u t e v s a
the PAPER. A l s o , y o u r l a c k o f a d v e r t i s i n g is p o s i t i v e l y d e t r i
mental, and indicated a pur i s t and elitist attitude. I like
advertising. I l i k e to k n o w w h a t ' s a v a i l a b l e . Besides, the
l a c k of a d v e r t i s i n g r a i s e s y o u r p r i c e s to a n u n a c c e p t a b l e l e v e l ,
considering. - C A Cozart
We've asked readers repeatedly h o w they feel about ad v e r
t i s i n g - a n d th e a m o u n t o f a d s w e c a r r y r e f l e c t s t h e v i e w s
of readers who responded. S o r r y y o u w o n ' t be w i t h us this
year. W e ' l l m i s s y o u and all the ar t i c l e s y o u ' v e c o n t r i b u
ted... - T e r r y
Software Maintenance Bulletin
NOTE: Customers with versions prior to 1.73 may obtain a current version by
sending their original cassette with $2.00 and their name and address to MSS.
Correction: List line 63940 and position the cursor over the G of GOTO.
Press the INST/DEL key 8 times. Move the cursor over into the special char
acters following GOTO 63960, delete one of them, then press RETURN. List
63940 again, and compare it to the “Line after correction" shown below (the
"Line containing error" is underlined to show portions to be deleted).
Change version number and date in lines 15 and 60007 as shown below.
53940 P R I N T "C M D 1 :L I S T " T 1 :P R I N T "CMP 3 :S = " S " ;T 1 = " T 1 ":P V = " P V " :G Q T 0 6 3 9 6 8 T T T T T
PET 6502
RABBIT MACRO ASSEMBLER
Load, Save, Verify, Execute AND TEXT EDITOR
8 K in 38 seconds versus
PETs 2 Minute 45 seconds, • Versions for PET, APPLE II, SYM, KIM
plus more! and ATAR I (1st quarter 1980)
• Written entirely in machine language
High-speed Cassette Routines work with 8K, 16K, or 32K
m w ROM PETs which have the new Commodore cassette • Occupies 8K of memory starting at $2000 —
deck (like the external version which sells for $95.00). Apple version with disk occupies just over
Note: If you have a new ROM PET with the old style 9K
lift-top deck, everything but the high-speed cassette • Macro and conditional assembly
routines will work. • 36 error codes, 26 commands, 22 pseudo ops
— Auto repeat of any key held down, toggle character • Labels up to 10 characters
set. • Auto line numbering and renumber com
— RAM M em ry Test, convert #’s to hex and decimal. mand
• String search and string search and replace
12 Rabbit Commands
• Copy, move, delete, load, save, and append
Note: Rabbit is 2K of machine code at $1800 for 8K PETS, commands
$3000 or $3800 for 16K PETS, or $7000 or $7800 for 32K
PETS. (Specify one of the 5 versions.) Cassette and Manual $49.95
Cassette and Maaaal - $29.95 (Add $5.00 for foreign) (including U. S. postage)
18
by Roy Busdiecker
Not too long ago, while working on one of my oddball projects, I found that I
needed a fast routine to find the end of whatever BASIC program happened to
be in my PET. Obviously, the routine could not interfere with the BASIC
program. A solution that would meet both needs (fast, and non-interfering)
would be a machine language routine stored in the second cassette buffer. As
a side benefit, that approach would also allow me to demonstrate the output
of C.W. Moser's ASSM/TED (reviewed in Issue 6, Vol. 2).
Our strategy for the machine language routine is to "hopscotch" from one link
pointer to the next, until we find one whose value is zero.
The program which accomplishes that strategy is shown in the listing produced
by Mr. Moser's ASSM/TED. In that listing, the far left column gives the
addresses (in hex) into which the machine language commands have been assembled.
The next three columns are the hex values which correspond to the command
mnemonics farther to the right. The next column holds the consecutive line
numbers for the assembly source language which constitutes the rest of the
listing. I typed in t!.e labels, commands, addresses, and comments to the right,
and the assembler converted them to the hex values that the 6502 microprocessor
recognizes.
Now to a description of the program. The labels L0 and HI, located at hex 033A
and 033B (decimal 826,827) reserve space for the answer. After running the
routine, a BASIC command PRINT PEEK (826) + 256 * PEEK (827) will retrieve the
value.
The section from INIT (initialize) to LINKH sets hex 0401 (decimal 1025) as
the address of the first link pointer, so the routine always starts looking in
the right place.
The addresses following LDA in the LINKH line and the LINKL line are modified
by the program as it runs, so they always hold the address of the next line
pointer. The BEQ in the line following LINKH tests for an address of zero,
and transfers control to the line labelled DONE when it find the zero. The
section between LINKL and DONE puts the new addresses after the LDA's, and
the JMP in the line before DONE transfers control back to LINKH to find the
next link pointer.
Starting at the line labelled DONE, the program gets the address of the zero-
value pointer, and stores (STA) its low byte in location L0 (826), and its
high byte in HI (827). V
The RTS returns control to the routine that called it. If you enter the routine
from BASIC with SYS 828, the RTS will return you to BASIC.
A one-line BASIC command that will run the machine language program and print
out its result is shown below.
If you don't have an Assembler program, the BASIC program below will load the
appropriate values into the second cassette buffer. Once you have run it, you
can load another BASIC program on top of it, and still have the machine language
routine available via the SYS command (as long as you don't use the second
cassette!).
6020 DATA 248i,24,170, 173,1,4,141 ,85,2!, 105, 1, 141, 79, 3, 1-Jo, 141, o6 ,3,105,0,1 ■
6030 DATA 80, 3, 7 6,7 y ,o ,173,85,3, 141,518,3, 173 ,86,3,141,59,3, 96
2 0
0 3 6 0 - SD 56 03 0230 STA L I N K L +2
0363- 00 0240 HjJC #00
8 3 6 5 - si 50 03 0250 STA LINKH+2
0 3 6 3 - 4C 4E 03 0260 •IMP LINKH
0 o 6 B — RD 03
ETC
- J- J 02 7 8 DONE LDA LINKL+1 : PASS INFO TO
— SD 3R 03 0280
;“ :j O u T C
STA LO : BASIC
0 3 7 1 - AD j h03 0290 LDA L I N K L +2
h :-’
74— SD 3E 03 0300 STA HI
t 60
: 03 10
0320 . EN
L A E CL r£TiT5
l_r~
c •• EXTERNAL 3
o i d c o m
S OF T WA R E
C o n t e n t s in c lu d e s e c tio n s o n :
PO B o x 165 Clarkson Postal Station
• In p u t a n d o u t p u t r o u t in e s . Mississauga, Ont. 15. 1 3Y1
• F ix e d p o in t , flo a tin g p o in t ,
T» l . (416) 823 - 3237
a n d A s c ii n u m b e r c o n v e r s io n .
• C l o c k s a n d tim e r s .
• B u ilt - in a r it h m e t ic f u n c t io n s .
m icro-G O 9L
This is t h e f i r st m i c r o c o m p u t e r CO program everl
$1B.95
It
• P r o g r a m m in g h in ts a n d su g g e s
g r a p h i c a l l y d i s p l a y s a 9 x 9 Lina grid, P r i s o n e r s , Clock,
and M ov e for B l a c k ( t h* c o m p u t e r ) a n d White (human)*
tio n s .
• M a n y s a m p le p r o g r a m s .
bridge s co re s ®74.95
E n t e r B o a r d #. NS P a i r # . EW P a i r # , C o n t r a c t , T r i c ks for
eac h board pl ayed. The p r o g r a m s will d i s p l a y t he Sc or e
for e a c h hand, m a t c h p o i n t a l l 32 b o a r d s in 1 minute,
print Pair T o t a l s ( f a c t o r e d , r a n k e d by d i r e c t i o n & o v e r a l l
f o r 16 T a b l e s ) and 32 H a nd Re cor ds . ( C o m m o d o r e 2022
Printer recommended.)
J
21
TRY METAPRINTING
by John Matarella
H u m a n c u l t u r e s d e p e n d u p o n t r a d i t i o n to m a i n t a i n a n e c e s s a r y s t a b i l i t y
i n o r d e r to m o r e e f f e c t i v e l y w i t h s t a n d the f o r c e s of change. Thus we
c a r r y o ld c o n c e p t s and p r o c e d u r e s over f r o m the old m e d i a to the new,
e v e n w h e n t h e y are no l o n g e r n e c e s s a r y , or e v e n des i r a b l e .
T r y the f o l l o w i n g M E T A P R I N T I N G r o u t i n e in the i n s t r u c t i o n s e c t i o n of
s o m e of y o u r p r o g r a m s . If the e f f e c t is n o t e y e - p l e a s i n g , it s h o u l d at
l e a s t be novel!
READY.
10 P R I N T C H R $ < 1 4 ? > :P 0 K E 5 9 4 6 8 , 12 M B V K E N C. B R R R O L L
100 P R I N T " : 3 M « * D « » M » M F E T P R I N T E R L A B E L S
10 1 P R I N T : P R I N T ,,M » * * * » W W a U S E N O C O M M A S !
102 r K I N T " PPPPPPPPSiPl 1"
10 3 P R I N T " » » M » M » M MR. J O H N L O S E R 1 H.INE 1 "
104 P R I N T n» l « m i » M 0 D E A D E N D S T R E E T 1 <H_INE 2 "
105 3"
106 P R I N T " P P P P P P P P P P I L O S T N A T I O N 13 1 +LINE 4 -
107 P R I N T " i p p p p p p p p p i i"
108 P R I N T P R I N T
1 09 P R I N T " W * » l < E f i T Y O U R H E A R T O U T W A L T E R D R A K E !V
1 1 0 F O R I = 1 T O 3 2 0 0 :N E X T I
12 0 P R I N T "m S W M L I N E 1 " ; : I N P U T A #
12 1 P R I N T "SSL.IHE 2"; :I N P U T
1 2 2 P R I N T " M O L I N E 3"; : I N P U T C *
1 2 3 P R I N T " * W L I N E 4 " i ■I N P U T D $
170 P R I N T " M W " :P R I N T A * :P R I N T B * :P R I N T C * =P R I N T D f
171 P R I N T " W I S T H E A B O V E O K CY O R N > "
1 7 2 I N P U T R $ IF R $ = " V " T H E N 1 7 9
173 G O T O 100
1 7 9 P R I N T " H O W M A N Y L A B E L S " :I N P U T N
180 G P E N 4 , 4
1 8 5 F O R 1=1 T O N
1 9 0 P R I N T # 4 ,A t :P R I N T # 4 , B t :P R I N T # 4 , C $ ■P R I N T # 4 ,D t :P R I N T # 4 ,C H R $ < 1 0 >
195 N E X T
200 E N D
READY.
Q u e u e has published, a s e c o n d e d i t i o n o f i ts f r e e E d u c a t i o n a l
Softv/are c a t a l o g u e f o r A P P L E , P E T a n d T R S - 8 0 c o m p u t e r s
from major publishers. This c a l t a l o g u e h a s g r e a t l y e x
p a n d e d l i s t i n g s a n d i n c l u d e s s i m u l a t i o n s a n d s t r a t e g y g a mes.
A l l s o f t w a r e c a n be o r d e r e d d i r e c t l y f r o m Q u e u e .
For further informations contact Monica K a n t r o w i t z s Presi
d e n t , Q U E U E , 5 C h a p e l H i l l D r i v e , F a i r f i e l d , CT 06^4-32,
o r c a l l (2 0 3 ) 3 7 2 - 6 7 6 1 .
A SCREEN PRINT MACHINE LANGUAGE PROGRAM
by Paul W Sparks
I n a n e a r l i e r a r t i c l e (THE P A P E R V o l u m e II, i s s u e 3» A u g u s t
1 9 7 9 1 p a g e 3 ) I d e s c r i b e d the u s e o f a S o u r t h w e s t T e c h n i c a l
Products C o r p o r a t i o n p r i n t e r (SWTPC PR-40) i n t e r f a c e d w i t h a
P E T 2001 m i c r o c o m p u t e r v i a the u s e r p o r t - The p r i m a r y p u r
p o s e o f s e l e c t i n g the P R - 4 0 is t h a t it is q u i t e i n e x p e n s i v e
($2 5 0 ); the p r i m a r y d i s a d v a n t a g e w i t h t he s y s t e m d e s c r i b e d
is t h a t it is q u i t e slo w . It was s u g g e s t e d that a m a c h i n e
l a n g u a g e v e r s i o n o f t h i s p r o g r a m w h o u l d be w r i t t e n , a n d s o o n
after that ar tic le was published, I rece ive d a let ter from
C L B u c h a n a n of C a m p S p r i n g s , M d . Mr. B u c h a n a n i n d i c a t e d n o t
o n l y t h a t he h a d r e a d th e a r t i c l e a n d s u b s e q u e n t l y p u r c h a s e d
a P R - 4 0 , b u t he a l s o p r o v i d e d a m a c h i n e l a n g u a g e v e r s i o n o f
th e p r o g r a m e m u l a t i n g e a c h s t e p of the B A S I C p r o g r a m . A
s l i g h t r e f i n e m e n t of t h a t p r o g r a m is p r e s e n t e d h e re.
Th e a p p r o a c h t h a t w i l l be t a k e n i n t h i s a r t i c l e is to go i n t o
s u f f i c i e n t d e t a i l to l e a d t h e b e g i n n i n g m a c h i n e ( a s s e m b l y )
l a n g u a g e p r o g r a m m e r t h r o u g h the l o g i c of the p r o g r a m i n g e n
eral, the l o g i c o f the u s e r p o r t r e g i s t e r s i n d e t a i l , a n d the
a s s e m b l y l a n g u a g e p r o g r a m m i n g s t e p s r e q u i r e d to a c c o m p l i s h
this l o g i c . If you aren't i nterested in asse m b l y language
p r o g r a m m i n g , b u t w o u l d l i k e to u t i l i z e the p r o g r a m , j u s t c o p y
the B A S I C p r o g r a m u s e d to P O K E i n the m a c h i n e l a n g u a g e s t e p s
( L i s t i n g 1), c a l l it u p w i t h a S Y S 841, a n d p r i n t away. On *
t h e o t h e r han d , i f y o u a r e a n a d v a n c e d a s s e m b l y l a n g u a g e p r o
g r a m m e r , a n d d o n ' t c a r e to go t h r o u g h the d e t a i l e d d e s c r i p t i o n ,
go s t r a i g h t to l i s t i n g 2 (do n o t p a s s GO, d o n o t c o l l e c t $ 2 00)
a n d d o w i t h it as y o u wil l . Now, i f t h e r e is a n y o n e lef t , we
w i l l begin.
T h e B A S I C p r o g r a m u s e d is l i s t e d b e l o w . One m a j o r d i f f e r e n c e
b e t w e e n this v e r s i o n a n d t h a t p r e s e n t e d i n the p r e v i o u s a r t i c l e
is t h a t this v e r s i o n d o e s h a v e f u l l h a n d s h a k e b e t w e e n the p r i n
t e r a n d the PET, w h e r e a s t h e e a r l i e r v e r s i o n u s e d a o ne s e c o n d
d e l a y to i n s u r e t h a t the l i n e h a d b e e n p r i n t e d . The other
d i f f e r e n c e is t h a t t h e r e w e r e t w o m i s t a k e s i n the p r e v i o u s
article. I n l i n e 20 1 0 0 , a n "I" w a s p u t i n p l a c e o f a "1", so
it s h o u l d read:
20100 F O R J=1 TO A1
O f a m o r e s e r i o u s n a t u r e , t h e m o s t i m p o r t a n t ste p , P O K E i n g the
c h a r a c t e r into the u s e r port, was o m i t t e d i n m y draft. There
f o r e y o u m u s t a d d l i n e 20 1 4 5 :
2 0 1 4 5 P OKE 5 9 4 5 7 . D2(I)
24
21000 POKE 59459,255 T h i s s e t s the d i r e c t i o n
r e g i s t e r f o r the U s e r
P o r t to a l l l 's to s e t
the d a t a p o r t to o u t p u t
21005 P O K E 5 9 4 6 8 , P E E K (5 9 4 6 8 ) O R 1 S e t s the CA1 p o l a r i t y f o r
r e c e i v e o n the c h a r a c t e r
accept 0
2 1 0 1 0 X = 3 2 7 6 8 : K = 0 :A = 0 :A l = 2 5 Initializes all constants
2 1 0 2 0 Y = P E E K (X G e t s a c h a r a c t e r f r o m the
screen memory
21025 IF Y=28 THEN RETURN T h i s l i n e is a m e t h o d to
t e r m i n a t e the p r i n t p r o
cess. Any value corres
p o n d i n g to a c h a r a c t e r o f
the u s e r 5s c h o i c e c o u l d
be used. For example, Y
=28 c o r r e s p o n d s to the
b a c k s l a s h ("\") b e i n g u s e d
as a d e l i m i t e r .
2 1 0 3 0 I F Y< 32 T H E N Y = Y + 6 4 This p a r t i a l l y converts
P E T m e m o r y c o d e to A S C I I
code o
21035 IF Y>128 THEN Y=Y-128 This line converts a r e
verse character.
21040 POKE 59457,Y P l a c e t he c h a r a c t e r o n
the d a t a r e g i s t e r
21050 P O K E 5 9 4 6 8 , P E E K ( 5 9 4 6 8 ) A N D 31 T h i s l e t s t he d a t a - r e a d y
OR 192 h a n d s h a k e (CB2) to 0 (low).
21060 P OKE 5 9 4 6 8 , P E E K (59468) OR 224 S e t s t he d a t a - r e a d y h a n d
s h a k e to 1 (high) a n d the
p r i n t e r w i l l a c c e p t the
data.
2 1 0 6 5 I F ( P E E K ( 5 9 4 6 8 ) A N D 2) T H E N T e s t to s e e i f t he d a t a
21070 received handshake hand
shake has b e e n sent by
t he p r i n t e r . I f so, t h e n
continue.
21068 GOTO 21065 I f not, t h e n look again.
21070 K = K + 1 : IF K<40 THEN 21020 S t e p to t h e n e x t p o s i t i o n .
I f t h i s p o s i t i o n is n o t 40
t h e n go b a c k a n d r e p e a t
the p r o c e s s .
21080 A=A+1:K=0:X=X+40 S t e p to d o the n e x t lin e .
Z e r o the c h a r a c t e r i n d e x .
21100 GOTO 21020 S t a r t o v e r o n a n e w lin e .
25
L e t ' s r e v i e w th e l o g i c u s e d i n l i n e s 2 1 0 0 5 , 2 1 0 5 0 , 2 1 0 6 0 , a n d
21065. T h e A N D l o g i c w i l l o n l y b e t r u e ( h a v e a v a l u e o f 1) i f
b o t h A a n d B a r e t r u e ( h a v e a v a l u e o f 1). T h e OR ( i n c l u s i v e
OR) l o g i c is t r u e (1) i f e i t h e r A o r B a r e true. For instance
i f y o u w a n t e d to t u r n a b i t p o s i t i o n h i g h , j u s t O R t h a t p o s i
t i o n w i t h a 1 a n d i t w i l l be a 1. Alternatively, you can turn
t h a t b i t p o s i t i o n to 0 b y A N D i n g t h a t p o s i t i o n w i t h a 0. If
y o u w a n t to k e e p the o r i g i n a l v a l u e , O R t h e b i t p o s i t i o n w i t h
a 1. T h e l a s t b a s i c p r i n c i p l e to k e e p i n m i n d is t h a t i f y o u
p e r f o r m a l o g i c o p e r a t i o n w i t h a b y t e , i t is d o n e b i t b y bit.
F o r e x a m p l e , 8 A N D 1 2 7 = 8s
8 = 00001000
127 = 0 1111111
A N D i n g t h e s e tw o n u m b e r s b i t b y b i t w i l l g e t a m a t c h o f o n e s
o n l y i n t h e "8" p o s i t i o n . 8 OR 127 w o u l d be 127 b e c a u s e all
b i t p o s i t i o n s e x c e p t 1 2 8 (the l e f t m o s t bit) h a v e a o n e i n a t
l e a s t one of the n u m b e r s . I f y o u w e r e to A N D a n y n u m b e r w i t h
2 5 5 ( 1 1 1 1 1 1 1 1 ) , t h e o r i g i n a l n u m b e r w o u l d r e s u l t (A A N D 2 5 5 = A)
N o w w h a t d o e s a l l t h a t h a v e to d o w i t h t h e l o g i c s t e p s i n this
program? T h e w h o l e p u r p o s e o f t h e s e s t e p s is to s e t u p t h e
r e g i s t e r s an d h a n d s h a k e s f o r the p r i n t e r o p e r a t i o n . Commodore
P E T U S E R S C L U B N E W S L E T T E R ( V o l u m e 1, i s s u e 3) h a s a v e r y f i n e
t a b l e o f the P I A a n d V I A m e m o r y a n d f u n c t i o n l o c a t i o n s b i t b y
bit. T h e a r t i c l e was w r i t t e n b y K a r l H i l d o n . A l t h o u g h i t is
n o t o b v i o u s l y true, I t h i n k t h e t a b l e w a s s u p p l i e d b y J i m B u t
terfield. I n a n y events, w e w i l l be c o n c e r n e d w i t h m e m o r y l o
c a t i o n s 59 4 5 9 s 5 9 4 5 8 , 5 9 4 6 8 , a n d 5 9 4 6 9 . L o c a t i o n 59459 sets
the d i r e c t i o n o f t h e U s e r P o r t s o i f y o u P O K E 2 5 5 (all ones)
into that location, all lines are output. If any lines had
b e e n zeros, t h e n t h o s e l i n e s w o u l d h a v e b e e n i n p u t . Location
5 9 ^ 5 7 is the d a t a p o r t s so w e P O K E t h e A S C I I v a l u e o f the
c h a r a c t e r w e w a n t to p r i n t i n t o t h a t l o c a t i o n .
P o s i t i o n 0 (the r i g h t m o s t bit) o f l o c a t i o n 5 9 4 6 8 is u s e d to
s e t u p CA1 I N p o l a r i t y . I f w e O R the v a l u e i n t h a t l o c a t i o n
w i t h on e ( 0 0 0 0 0 0 0 1 ) , a l l the o t h e r b i t s w i l l s t a y t h e s a m e
a n d b i t z e r o w i l l b e c o m e a o n e i f i t i s n ' t a l r e a d y one. We
f o r c e d b i t z e r o h i g h to s e t the p o l a r i t y w i t h o u t a f f e c t i n g t he
o t h e r b i t v a l u e s . T h e n e w v a l u e is t h e n P O K E d b a c k i n t o t h a t
m e m o r y l o c a t i o n i n line 21005- L i nes 2 1 0 5 0 and 2 1 0 6 0 are
similar. The l e f t m o s t three bits of m e m o r y l o c a t i o n 5 9468 are
th e C B 2 I N / O U T c o n t r o l e l e m e n t s . A N D i n g 31 ( 0 0 0 1 1 1 1 1 ) w i t h
the c o n t e n t s of l o c a t i o n 5 9 ^ 6 8 k e e p s t he r i g h t h a n d f i v e b i t s
the sam e , a n d t u r n s t h e l e f t h a n d t h r e e b i t s to z e r o s . Then
t h i s n e w v a l u e is O R e d w i t h 1 9 2 ( 1 1 0 0 0 0 0 0 ) , w h i c h w i l l t u r n
th e l e f t m o s t tw o b i t s to o n e s a n d k e e p a l l t he o t h e r v a l u e s
unchanged. Th e r e s u l t is l l O x x x x x ( w h e r e x is t h e o r i g i n a l
value). That v a l u e is P O K E d b a c k i n t o 5 9 4 6 8 . T h e n we s e t
b i t f i v e h i g h b y O R i n g 2 2 4 ( 1 1 1 0 0 0 0 0 ) w i t h t he v a l u e n o w i n
59 ^ 6 8 . Y o u s h o u l d a l s o s a t i s f y y o u r s e l f t h a t O R i n g 32 w o u l d
ha v e b e e n s u f f i c i e n t f o r our use. T h e n e w v a l u e is P O K E D b a c k
i n t o 5 9 ^ 6 8 a n d we h a v e b l i n k e d b i t 6 o f f a n d on, t e l l i n g the
p r i n t e r t h a t the d a t a is o n i ts w a y . The last logic o p e r a t i o n
is a W A I T o p e r a t i o n a n d c o u l d b e w r i t t e n as s u c h . B i t 1 (2nd
f r o m t h e r i g h t ) of l o c a t i o n 5 9 ^ 6 9 ( I n t e r r u p t F l a g R e g i s t e r ) is
t h e CA1 bit. The c o n t e n t s o f 5 9 4 6 9 are ANDed w i t h 2 (00000010)
r e s u l t i n g i n a z e r o u n l e s s b i t 1 is e q u a l to one. Notice that
w e d o n ' t P O K E this v a l u e b a c k in; w e j u s t w a n t to s a m p l e it. If
b i t one is 1, t h a t m e a n s the p r i n t e r h a s s e n t a " r e a d y f o r d a t a "
s i g n a l a n d w e a r e r e a d y to p r o c e e d .
Y o u m a y h a v e n o t i c e d t h a t I h a v e g o n e to a l o t o f t r o u b l e to
c o n t r o l j u s t w h a t b i t s i n the c o n t r o l r e g i s t e r s w e r e c h a n g e d .
W h y n o t j u s t c h a n g e th e e n t i r e b y t e b y P O K E i n g 0 o r 2 5 5 to t u r n
it o f f or o n ? I t h i n k i t is w o r t h t h e t r o u b l e b e c a u s e t h e u s e r
p o r t s h a r e s a V I A ( V e r s a t i l e I n t e r f a c e A d a p t e r ) w i t h t he i n t e r
n a l c o n t r o l s o f th e PET. E v e n i f y o u d i d n ’t h a v e to b e c o n c e r n e d
w i t h the h i d d e n s e c r e t s o f y o u r c o m p u t e r , i t c o u l d s t i l l b e c o m e
troublesome if you aren't careful. For example, p l a y i n g around
w i t h b y t e p o s i t i o n 5 9 ^ 6 8 c o u l d a l t e r t he C B 2 I N / O U T c o n t r o l , CB1
f o r c a s s e t t e # 2 c o n t r o l , s h i f t f r o m g r a p h i c to l o w e r c a s e (or
v i c e v e r s a ) , o r a l t e r CA1 I N p o l a r i t y . I d o n ' t k n o w a b o u t you,
b u t I ' m too c h i c k e n to p l a y " r e g i s t e r r o u l e t t e " , s o I c a r e f u l l y
c h a n g e o n l y t h o s e b i t s t h a t n e e d c h a n g i n g (and o f f e r the s a m e
a d v i c e to y o u ) .
Y o u s h o u l d h a v e a n i d e a o f t h e s t r u c t u r e a n d l o g i c o f the a l g o
rithms that are u s e d here. T a b l e 2 is a l i s t i n g o f the a s s e m b l y
v e r s i o n of t h i s p r o g r a m . I t is p l a c e d i n the s e c o n d c a s s e t t e
buffer, but it could be plac e d in any other l o c a t i o n wi t h m inor
variations. Y o u p r o b a b l y n oticed that there are quite a few
NOPs (non-active spac e r or no operation) s c a ttered throughout
the p r o g r a m . Y o u c a n a t t r i b u t e t h i s to c a r e l e s s p l a n n i n g o n m y
p a r t ( a s s u m i n g I d i d n ' t k n o w h o w l o n g the p r o g r a m w a s g o i n g to
be) o r to c a r e f u l f o r e t h o u g h t ( a l l o w i n g y o u the o p t i o n a n d s p a c e
to a d d i m p r o v e m e n t s i f y o u c a r e to d o so).
L e t ' s go t h r o u g h the p r o g r a m , s t e p b y s t e p , i n i t s a s s e m b l y v e r
sion. T h e l i n e n u m b e r o f t h e B A S I C v e r s i o n t h a t c o r r e s p o n d s to
the s t e p s b e i n g d e s c r i b e d a t t he t i m e w i l l b e f o l l o w e d b y the
s p e c i f i c a s s e m b l y l a n g u a g e s t e p s a n d a n e x p l a n a t i o n of t h e i r
function.
27
** 21005 POK E 59468, P E E K ( 59468) OR 1
851,2,3 LDA 59468 Pu t the contents of l o c a t i o n
59^68 i n t o t he a c c u m u l a t o r
Note : This is h o w y o u PEEK,
85 ^ 5 ORAIM 1 I n c l u s i v e OR the contents of
the a c c u m u l a t o r w i t h 1 , and
p l a c e t he r e s u l t i n t h e acc.
856,7,8 S T A 59468. P l a c e the c o n t e n t s o f the
a c c u m u l a t o r into l ocation
59468.
* * 2 1 0 1 0 X = 3 2 7 6 8 j K = 0:A = 0:A1 = 2 5
Note: The n e x t f e w s t e p s b r e a k u p 32768 i n t o h i g h a n d l o w
b y t e v a l u e s b a c a u s e a b y t e c a n o n l y c o n t a i n a n u m b e r u p to
255* T h e s e v a l u e s ar e p l a c e d i n t o c o n v e n i e n t m e m o r y l o c a t i o n s
f o r u s e l a t e r on.
859,0 LDAIM 128 P u t 1 2 8 ( h i g h v a l u e ) i n t he acc.
8 6 1 ,2 , 3 STA 1014 P l a c e the c o n t e n t s o f t he acc.
i n t o m e m o r y l o c a t i o n 10l4„
864,5 LDAIM 0 P u t 0 ( l o w v a l u e ) I n t he acc.
866,7,8 STA 1013 P l a c e the c o n t e n t s o f t he acc.
into m e m o r y l o c a t i o n 1 0 1 3 .
* * 2 10 2 0 Y=PEEK(X+
8 6 9 ,0 , 1 LDA 1013 L oa d the contents of l o c a t i o n
10 13 into the a c c u m u l a t o r
872,3,4 STA 884 P u t the c o n t e n t s o f the acc.
into l o c a t i o n 884
875,6,7 LDA 1014 L o a d the contents of l o c a t i o n
1 0 1 4 i n t o t he a c c u m u l a t o r
878,9,0 S T A 885 P u t t h e c o n t e n t s o f t h e acc.
i n t o l o c a t i o n 885
881 NOP resting
882 NOP resting
8 8 3 ,4 , 5 LDAX add+X L o a d the c o n t e n t s o f the a d d r e s s
l o c a t i o n +X into the a c c u m u l a t o r
Note: T h i s is a u t i l i z a t i o n o f a b s o l u t e a d d r e s s i n g w i t h i n d e x .
A n y l o a d i n g f r o m a n a d d r e s s is e q u i v a l e n t to P E E K i n g , w h e r e a s
a n i m m e d i a t e l o a d j u s t p l a c e s a s p e c i f i c v a l u e i n the a c c u m u l a
tor .
28
888,9 BNE 1 I f the Z f l a g = 0 ( t h e c o m p a r i
s o n p r o v e d the v a l u e s equal)
continue. O t h e r w i s e , s k i p the
n e x t s t ep.
N o te: T h e p o s i t i v e v a l u e l e s s t h a n 1 2 8 f o l l o w i n g a b r a n c h is
the n u m b e r o f s t e p s t h a t a r e p a s s e d o v e r w h i l e g o i n g f o r w a r d .
T h a t n u m b e r p l u s on e w i l l be the a d d r e s s t h a t is b e i n g b r a n c h e d
to. I f the n u m b e r is g r e a t e r t h a n 127, t h e n t h e b r a n c h is n e g a
tive .
890 RTS R e t u r n f r o m s u b r o u t i n e „ This
will r e t u r n the m a chine language
p r o g r a m b a c k to t he o p e r a t i n g
system.
Note: I f th e Z f l a g o O , i n s t r u c t i o n 890 w i l l be p a s s e d o v e r
(skipped).
** 21050 P O K E 5 9 4 6 8 , P E E K ( 5 9 4 6 8 ) A N D 31 O R 1 9 2
907,8,9 LDA 59468 P l a c e t he c o n t e n t s o f l o c a t i o n
5 9468 into the accumulator.
910,1 ANDIM A N D t h e c o n t e n t s o f t h e acc.
w i t h 31 a n d p l a c e t h e r e s u l t
“
back into the a c c u m u l a t o r
912,3 ORAIM 192 I n c l u s i v e O R the c o n t e n t s o f
t he acc. w i t h 1 9 2 a n d p u t the
r e s u l t s b a c k i n t o t h e acc.
914,5,6 STA 59468 Pu t the contents of the acc into
l o c a t i o n 5 9 4 6 8 ( s e t the h a n d
s h a k e low)
91 7 NOP just resting.
** 2 1 0 6 5 I F '(PEEK(5 9 4 6 9 ) A N D 2) T H E N 2 1 0 7 0
926,7,8 LDA 59469 P l c a e the c o n t e n t s o f l o c a t i o n
59469 i n t o t h e a c c u m u l a t o r
929,0 ANDIM 2 A N D the c o n t e n t s o f t he acc.
w i t h 2 a n d p u t t he r e s u l t b a c k
i n t o the a c c u m u l a t o r .
931 NOP resting
932 NOP still resting t
933s^ BEQ 247 I f the Z f l a g = 0 (the c o m p a r i s o n
is n o t e q u a l ) continue.. Other
w i s e , j u s t e i g h t s t e p s b a c k to
step 9260
N otes Branches bac k w a r d s are o f t e n c o n f u s i n g „ It turns out
t h a t o n e c a n b r a n c h + or - 1 2 8 u s i n g o p c o d e s . Values greater
t h a n 1 2 7 are b a c k w a r d s . To g e t t h e p r o p e r v a l u e , y o u m u s t t a k e
the n u m b e r o f s t e p s b a c k w a r d a n d s u b t r a c t t h a t n u m b e r f r o m 255°
I n this case, we n e e d to b r a n c h f r o m s t e p 9 3 ^ b a c k to 9260 So
9 34 . 926=8 an d 2 5 5 - 8 = 2 4 7 0 V o i l a ' !
30
** 21000 A = A + 1 : K = 0 : X = X + 4 0
940.1 LDXIM 0 Put 0 in che X r e g i s t e r
§42 INY Increase the c o n t e n t e s o f the
Y r e g i s t e r b y 1.
* * 2 1 0 9 0 I F A A1 T H E N R E T U R N
943,4 CMPIM 25 C o m p a r e the c o n t e n t s o f the Y
r e g i s t e r w i t h 2 5 (Al).
945.6 BEQ 14 I f the Z f l a g = 0 (the c o m p a r i s o n
is n o t e q u a l ) t h e n c o n t i n u e .
O t h e r w i s e jump o v e r the n e x t 14
steps.
No te: W e h a v e n o w i n i t i a l i z e d f o r the n e x t l i n e a n d c h e c k e d to
s e e i f w e h a v e c o m p l e t e d the l a s t l i n e (2 5 9 s i n c e t h e r e a r e 25
l i n e s o n the s c r e e n ) . If n o t 9 continue.
* * 2 1 0 8 0 A = A + 1 : K = 0 :X = X + 4 0
9^7p8,9 LDA 1013 Load the contents of locat i o n 1013
into the a c c u m u l a t o r
950 CLC C l e a r the c a r r y f l a g
951.2 ADCIM 40 A d d 4 0 to the c o n t e n t s o f t he acc.
a n d p u t t he r e s u l t s b a c k i n t o it.
9 5 3 »^»5 STA 1013 P l a c e the c o n t e n t s o f the acc.
into locat i o n 1013
956.7 BCS 4 I f t h e c a r r y f l a g (C) = 0, t h e n
c o n t i n u e 0 O t h e r w i s e s k i p the
next four steps.
No te: T h e r e a s o n f o r t h i s b r a n c h is to a d d 1 to t h e h i g h v a l u e
i f the l o w v a l u e h a s a c a r r y a f t e r 4 0 h as b e e n a d d e d to it.
958,9,0 JMP 869 Jump back to l o c a t i o n 869 f o r the
n e x t instruction,.
961 RTS Return from subroutine
N o te: T h e o n l y w a y to g e t to t h i s i n s t r u c t i o n is i f t he c o m p a r
i s o n i n s t e p 9 4 3 s u c c e e d s (the c o m p l e t e s c r e e n h a s b e e n r e a d ) .
962,3*4 INC 1014 Incr e a s e the value in m e m o r y
l o c a t i o n 1 0 1 4 b y 1 a n d p u t t he
result back into location 1014
Not e : I n c r e a s e t h e h i g h v a l u e a n d ...
9 6 5 .6 . 7 JMP 869 Jump back to s t e p 869 f o r the
next instruction.
968 BRK Interrupt
Note: The in t e r r u p t here isn't necessary; it's just a good
practice.
A p r o g r a m w i l l n o r m a l l y h a v e s e v e r a l e l e m e n t s or s e c t i o n s i n it
that are not portable. This means that i n f o r m a t i o n in these s e c
t i o n s w o u l d h a v e to b e c h a n g e d i f t h e p r o g r a m w e r e l o c a t e d i n
a n y p a r t of m e m o r y o t h e r t h a n the a d d r e s s e s s p e c i f i e d i n the
listing. I n this p r o g r a m there are three s u c h areas, and if
y o u w a n t to p u t t h e p r o g r a m e l s e w h e r e ( r e l o c a t e it), y o u ’ ll
w a n t to be a w a r e o f them.
3 1
F irst, l o c a t i o n s 1 0 1 3 a n d 1 0 1 4 a r e u s e d as r e g i s t e r s to s t o r e
t h e h i g h a n d t h e l o w v a l u e s f o r t h e s t a r t o f the l i n e a d d r e s s .
T h e s e l o c a t i o n s s h o u l d be g o o d o n e i t h e r t h e o l d o r the n e w
ROM s , a n d a n y o t h e r c o n v e n i e n t l o c a t i o n w o u l d do as w e l l . 1
S e c o n d , the v a l u e s f o r l o c a t i o n s 8 8 4 a n d 885 a r e s p e c i f i e d i n
s t e p s 872 a n d 8 7 8 . I f y o u d e c i d e to r e l o c a t e the p r o g r a m ,
the a d d r e s s e s s p e c i f i e d i n t h e s e s t e p s w o u l d h a v e to be c h a n g e d .
T h i r d , s t e p s 9 5 8 a n d 965 s p e c i f y a j u m p l o c a t i o n ( s t e p 8 6 9 ).
I f y o u r p r o g r a m is r e l o c a t e d , t h e t a r g e t a d d r e s s i n t h e s e s t e p s
w o u l d h a v e to b e c h a n g e d . T h e r e m a i n d e r o f t he p r o g r a m is
r elative and therefore portable.
Some a d v e n t u r o u s b e g i n n e r s m a y be i n t e r e s t e d i n m a k i n g m i n o r
c h a n g e s to th e p r o g r a m f o r t h e i r o w n s p e c i f i c u s e s . For example,
I u s e d a b a c k s l a s h as a d e l i m i t e r (end of p r i n t s y m b o l ) . The
b a c k s l a s h v a l u e is 28 ( A S C = 9 2 ) . Y o u c o u l d j u s t as e a s i l y u s e
a ( A S C = 6 4 ) or a n y o t h e r c h a r a c t e r t h a t y o u like,, Just
r e m e m b e r to c o n v e r t the A S C I I c o d e to P E T code!
Y o u m i g h t w a n t to p r i n t o u t o n l y a p a r t o f the s c r e e n . If, f o r
i n s t a n c e , y o u d o n ' t w a n t to p r i n t t he t o p two s c r e e n lines, t h e n
y o u ' l l h a v e to i n c r e a s e the v a l u e s s t o r e d i n l o c a t i o n s 1 0 13 and
1 0 1 4 ( s t e p s 8 5 9 a n d 864). I u s e d a v a l u e o f 32768 - the v a l u e
f o r t h e t o p l e f t - h a n d c o r n e r o f the s c r e e n , s i n c e I w a n t e d t h e
e n t i r e s c r e e n to be p r i n t e d out. O r y o u m i g h t w a n t to o m i t the
l a s t two l i n e s o f s c r e e n d i s p l a y f r o m y o u r p r i n t o u t . To d o this,
d e c r e a s e the v a l u e of t h e c o n s t a n t (Al) i n s t e p s 9 ^ 3 s ^ to 2 3 .
S i m i l a r t e c h n i q u e s ( c h a n g i n g t he v a l u e s o f t he c o n s t a n t s ) c a n be
u s e d to p r i n t a n y p a r t o f the s c r e e n o r to a d d r e s s v a r i o u s p o r t i o n s
of it f o r g r a p h i c s .
S u p p o s e y o u h a v e a 96 c h a r a c t e r p r i n t e r - o r a p r i n t e r w i t h a l l
th e P E T c h a r a c t e r s . T h e p r o g r a m m i n g c o r r e s p o n d i n g to B A S I C
l i n e s 2 1 0 3 0 a n d 2 1 0 3 5 w o u l d h a v e to b e e x p a n d e d . I t m i g h t be
a p p r o p r i a t e to i n c l u d e t h e n e w c o n v e r s i o n r u l e s a f t e r s t e p 8 9 4
a n d m o v e the r e s t o f t h e p r o g r a m f o r w a r d . I f y o u d o this, r e
m e m b e r to c h a n g e the n u m b e r o f s t e p s to be j u m p e d b a c k w a r d s o v e r
i n o r d e r to ge t to s t e p 8 6 9 . A n d , i f y o u ' r e u s i n g a P R - 4 0
printer, re p l a c e steps 8 9 5-897 with:
895 NOP
896,7 C M P I M 32
a n d g e t a s p a c e i n s e r t e d a n y t i m e a g r a p h i c s y m b o l is e n c o u n t e r e d .
T h e n y o u ' l l b e a b l e to w r i t e i n t he a p p r o p r i a t e s y m b o l a f t e r the
p r i n t i n g is c o m p l e t e d .
N o w this is a f a i r l y s t r a i g h t f o r w a r d p r o g r a m „ T h e n e e d f o r t he
e x t e n s i v e d e t a i l ha s b e e n d e m o n s t r a t e d r e p e a t e d l y b y the f a c t
t h a t t h e r e ar e f e w u s e f u l b o o k s o n t he s u b j e c t ( m o s t d e f i n e the
o p c o d e s a n d the s t r u c t u r e o f the C P U a n d a s s o c i a t e d c h i p s ) .
M o r e t h a n 10 r e f e r e n c e b o o k s a n d c o n s i d e r a b l e e f f o r t w a s r e q u i r e d
to g e t this p r o g r a m t o g e t h e r ! I f e e l t h a t t h e r e is a g r e a t
n e e d f o r t u t o r i a l a r t i c l e s s u c h as this, p r e s e n t i n g " c o o k b o o k "
LISTING 1 - THE BASIC PROGRAM
33
OBSERUATIONS ON UOLUME 2, ISSUE 10
bs Ros Busdiecker
The product review on the PET 2022 tractor feed printer was H.uite
interesting to me, since I recently sold ms PET 2023 friction feed
printer and replaced it with a tractor feed model bs Base 2 Inc (priced
at $600!). From ms point of view, the good points about the 2023 were
its fairls reasonable price and the fact that it prints a reasonable
facsimile of the PET character set. One bad feature was the lack of
tractor feed <due to ms unwillingness to put out another $150 to set the
tractor feature), It wouldn't have bothered fie if the friction feed had
worked more e v e n l y but the paper would be-gin skewing one was or the
other after two or three pages ... bot hersone w h e n list ins a Iona
program.
More serious on the negative side was the fact that the printer does
not print what sou see on the screen. That means that listings which
include lower-case letters on the screen will have those letters printed
as graphic characters when sou list the program on the printer, It also
means that progams designed for output to the printer must have different
statements than ones which put their output on the screen. The decision
was a disappointment to me ... especially in light of Tands's decision to
wake the Radio Shack TRS-80 formats have the same result on screen or
pr l nt e r .
- If sou have a “version 2" (new) PET, or a "version 1" (old) PET
with a monitor program, sou can load the hex ML program between the
quotes in lines 120-210 using the monitor ... this will save tspins
typing the whole BASIC program. Start loading at location 033A (the
hex equivalent of 826). You can also use the monitor to save the ML
programs direct Is, as shown below.
Q£
3
IX- CM •■D r H ■^r o to ■^1" CO o Ci CM * X ■*r X CO O
o Ui
o cr. rH tH o o o to o
O' • X CO o CO o CC •DO
tH o cr« ■rf 4" u.
*-* ’ a X 0 4 •tH o Ll o o o
X
O ■nr X o X o Ll o Ul X vO ^ ■>1- o CO Ui ( J TT o LU ID ul Ul o
Cl 00 o IX Q tH ■H O T—4 CM L L tH u joa 0 0 rH U J Ll r t CD X O U. Ll in o
CO Ll
to «x o o m0 &■ O in 00 <2»
rH N CT-. r H O CC CjTf o m o CTn o V0 C J o
UJ Ct o M3 o CM 00 CT-. o X CM CO CD O <\| CM a o 0 s. o «x ■'t o QQ C l CC o
> o o CM o X CJ UJ O CO CO O O o o Ul Ll tH X vjO r H 0 0 O in Lj o
UJ •N N u O rH t H Cf. U J Ul C. C, 00 cr^ U _ r--> L l H CO CM O o rH o
iUn
ct CO in
iD O rH i n CM O CO CM — LO cr. o cr-.
o rH o CJ^ ■nf or-. r^
X Ul 1—1 r r rH oo o CE CD a : •X X O o CM ■=■ o CO M CM r H CO o o LL o o a: LU
<J X o
O' CJ CM CO o rH to CO LL rH tH to o
O '. IT , c r. CO o
’d" lU o o Ll r H CJ r-
o
<r uj CM 'X X C. o o u. O CO CO o CJ C J o Ll . o d i Ll CM t H L l
C J CM o o o
LU m 1^ t
C-4 o o O in o o O CM tn l~"l U i o o o O Ul CO CM
co a o 00 X M5 o
(n lU
IN
o UJ O «x »x L L CO CM •X O Tj- CM o L L <J^ O'. CO cr* u. «x> O •X X o
U. 3
O CD SO o u. ■H o CD «D0 C . CM 0 3 o U J in o o UJ o o Ci a: o 00 l L o
o u _ CM \C> T—4 00 r H 00 o -rH •X Cl CO CD CO o 00 o £> o
0
UJ U. X
2
ID > CO o 0 3 o •30 o 0 0 o oo o CO ° 0 0 o 00 o CO o 00 O OD O 00 o 0 0
XM O CJ O -«)- U l U l \ 0 \0 r- r- CO '30 cr. CT> •X •X GO CD O o U i U l Ll Ll
I— <=>
I O f-0 r o to to to 1 ^ to f O to «■ r o K> to to to r o to r o
Q o o o CD o o •=> o
<=> o o o
C5 oo o o
M to M
CD O o o
to
o o
CO >
>—I00
UJ
X
35
DISASSEMBLY LISTING OF SEARCH (JAMES MCARTHUR)
BY ROY BUSDIECKER
826 033A A218 LDX #18 918 0396 BUA LDA < 1A ) > Y
828 033C 206AC4 JSR C46A 920 0398 1025 BPL 03BF
831 033F A2FF LDX #FF 922 039A C9CB CMP #CB
833 0341 E8 INX 924 039C 8021 ECS 03BF
834 0342 A8 TAY 926 039E 8444 STY 44
835 0343 B522 LDA 22; X 928 03A0 A 000 LDY #00
837 0345 DOFA BNE 0341 930 03A2 C8 INY
839 0347 8621 STX 21 931 03A3 B990C0 LDA C090, Y
841 0349 CA DEX 934 03A6 1OF A BPL 03A2
842 034A D005 BNE 0351 936 03A8 DEFEOO DEC OOFE;X
844 034C C020 CPY #20 939 03AB 3 OF 5 BMI 03A2
846 034E D001 BNE 0351 941 03AD CA DEX
848 0350 60 RTS 942 03AE E3 INX
849 0351 A201 LDX #01 943 03AF C8 INY
851 0353 AO 04 LDY #04 944 0360 B990CO LDA C 09 0; Y
853 0355 861A SIX 1A 947 03B3 297F AND #7F
855 0357 84 IB STY IB 949 03B5 9DFEOO STA OOFE.X
857 0359 A003 LDY #03 952 03B8 8 9 9 OCO LDA C090; Y
859 035B 811A LDA <1A),Y 955 03BB 10F1 BPL 03AE
861 035D 991C00 STA OOlC/r' 957 03BD A444 LDY 44
864 0360 88 DEY 959 03BF EOBO CPX #B0
865 0361 10F8 BPL 035B 961 03C1 B004 BC-S 03C7
867 0363 A51C LDA 1C 963 03C3 B 1 1A LDA ( 1A),Y
869 0365 DO 04 BNE 0366 965 Q3C5 DOBC BNE 0383
871 0367 A51D LDA ID 967 03C7 A90D LDA #0D
873 0369 F DCF BEQ 033A 969 03C9 9DFE00 STA OOFE;X
875 036B A41E LDY iE 972 03CC 8645 STX 45
877 036D A51F LDA IF 974 03CE A421 LDY 21
879 036F 84B2 STY B2 976 03D0 BDFEOO LDA OOFE;X
881 03? 1 85B1 STA B1 979 03D3 D92100 CMP 0021;Y
883 0373 A290 LDX #90 982 03D6 DO 11 BNE 03E9
885 0375 28 PLP 984 03D8 CA DEX
886 0376 201BDB JSR DB1B 985 03D9 38 DEY
889 0379 2 OBIDC JSR DCS 1 986 03DR D0F4 BNE O3D0
892 037C E8 INX 988 03DC C8 INY
893 037D BDFEOO LDA OOFE; X 989 03DD B9FEU0 LDA OOFE;Y
896 0380 00 BRK 992 03E0 20D2FF JSR FFD2
897 0381 AO U3 LDY #03 995 03E3 C90D CMP #0D
899 0383 C8 INY 997 03E5 D0F5 BNE 03DC
900 0384 £8 INX 999 03E7 F008 BEQ 03F1
901 0385 6 1 1A LDA <1A),Y 1001 03E9 A421 LDY 21
903 0387 9DFE00 STA OOFE,X 1003 03EB C645 DEC 45
906 038A C922 CMP #22 1005 03ED H645 LDX 45
908 038C D002 BNE 0390 1007 03EF DODF BNE 03DG
910 038E E642 INC 42 1009 03F1 ft61C LDX 1C
912 0390 A542 LDA 42 1011 03F3 A41D LDY ID
914 0392 2901 AND #01 1013 03F5 4C5503 JMP 0355
916 0394 D029 BNE 03BF
36
MEM EXPLORER - AGAIN
by Ray Davidson
P R O G R A M #1
6 0 0 0 0 F O R 1 = 8 2 6 TO 857 s R E A D C s P O K E I , C : N E X T
60010 DATA 165,80,41,127,170,232,160,255,200,185,145,192,16,
,
250 202,208
6 0 0 2 0 D A T A 2 4 7 , 20 0 ,1 8 5 , 1 4 5 , 1 9 2 , 4 1 , 1 2 7 , 3 2 , 2 1 0 , 2 5 5 * 2 1 7 , 1 4 5 , 1 9 2 ,
240,242.96
6 O O 3O B $ = C H R $ ( 3 4 ) + C H R $ ( 2 0 ) :I N P U T " A . " ;K
6 0 0 4 0 Q = 0 : B = 2 5 6 + P R I N T " / C / " : F 0 R J=0 TO 19 : P = 1 s L = K + J s M = P E E K
(L):PRINT L ; T A B ( 8 );M;TAB(15)J
6 0 0 5 0 I F (Q=0) A N D M > 1 2 7 A N D M < 2 0 2 T H E N P O K E 8 0 , M s S Y S 1 0 3 4 s P R I
NT"/U/"8G0T060090
60060 I F M = 3 4 THEN Q=OTQsPRINT B$;
60070 I F P*Q THEN PRINT B $ ;C H R $ (M );B $ ;" /u /" *P=0
60080 I F P AND M<>98 THEN PRINT CHR$(M)
60090 S=PEEK(L+1)sPRINT T A B ( 2 3 ) ;M+B*S;TAB(30);M*B+SsNEXTsPR
INTsGOTO 6 O O 3 O
ADDRESS
DEC HEX OP CODES MNEMONIC OPERANDS
826 033A A5 50 LDAZ 80
828 O 33 C 29 7F ANDIM 127
830 033E AA TAX
831 O 33 F E8 I NX
832 0340 AO FF LDYIM 255
834 0342 C8 INY
835 0343 B9 91 CO LDAY 49297
838 0346 10 FA BPL 834
840 0348 CA DEX
841 0349 DO F? BNE 834
843 034 B C8 INY
844 034 c B9 91 CO LDAY 49297
847 034F 29 7F ANDIM 12 7
849 0351 20 D2 FF JSR 65490
852 0354 D9 91 CO CMPY 49297
855 0357 FO F2 BEQ 843
857 0359 60 RTS
?EABV. **'<=?■
i REM ’ ’mMmMMmmmmmmmmmmmmmmmmmmmmmM'
£8000 FOR 1=1034 TO 1 0 6 5 -RERB C POKE I ,C =NEXT
f,m Im BATA 165 .•38,41,127,178, 232 , 160 .•255, 288,135, 145,132,16.. 250,202,20-8
60820 BATA 2 4 7 , 2 0 0 , 1 3 5 , i45,132,41,127,32,218,255,217,145,192,240,242, 36
S0030 Bf-=CHRf <34>+CHRf C20> :INPUT " f t . " , ? :
S8040 Q = 0 :B = 2 5 6 :PRI NT n[ C L P ] " :FOR J=0 TO 1 3 :P = 1 ;L = K + J :M = P t E K (L > :-RINT L TR
-1 TRB(15>;
S8050 IF <Q=0>fiND M> 127 AND M-C202 THEN POKE 38, M SVS 1034 P k INT !*[UPi" -G0.0
38
60068 IF M=34 THEN 3 = 8 1 0 :PRINT 3±;
60078 IF P m THEN PRINT B$ CHRf (M'.'Ef11[UP]:i: r=8
60080 IF P AND M O S S THEN PRINT CHRf C M > ,
58030 3=PEEK <L+ i .:> PR INT TAB <23 )M+ E * 3 ,TAB <39 >M*B+S ;NEXT •PR INT :GO 10 60030
# 3
- D . Sheward
39
PET USERS
TRAP
A BEAUTIFUL
COMPLEMENT
65 For PET, APPLE, SYM, OSI, etc.
Any 1 mhz 6502!
TO ANY DECOR!
Attractive, Durable, Leather-Grained Vinyl — Prevents from “hanging up” via execution
Double Stitching for Extra Strength
Corded Seams Assure Perfect Fit
of unimplemented opcodes! Causes your
Colors - Gold. Chestnut Brown. Olive Green monitor to display location of bad op code!
or Black — Our computers have stopped crashing!
— Debugging easier!
PET /C BM - $18 95 OTHER C O M PU TER
Apple II - $12 95 C O V E R S A V A IL A B L E
— Easy to install — plugs into 6502’s socket.
Apple Disk - $8.95 W R IT E FO R D E T A IL S
TRAP 65 is currently being used to insure that
K N EW -CURSOR FOR PET 2001 OLD ROM there are no bad opcodes in programs before
IN S T A N T P U S H B U T T O N C U R S O R R E T R IE V A L submittal for ROM masks!
• Reviewed in Issue 1 of C O M P U T E
, • Restart without touchinq power
We are using TRAP 65 in experiments on
• Machine language programs in second cassette buffer not lost.
Cy • Simple, illustrated instructions
extending the 6502’s instruction set — PHX,
• Installed in minutes - no soldering PHY, INCD.
• Improved mounting - no sticky tape
t
w o r k i n g w i t h t h e d i s k is a r e a l p l e a s u r e , "but i t d o e s r e q u i r e
learning some new "magic words" and procedures. Commodore's
m a n u a l s a r e g e t t i n g t e t t e r a n d b e t t e r , a n d i t w a s n ' t too
d i f f i c u l t to f i g u r e o u t w h a t w a s r e q u i r e d . I t ' s n o t f o r the
n o v i c e , b u t a n i n t e r m e d i a t e o r a d v a n c e d p r o g r a m m e r s h o u l d be
a b l e to do w h a t ' s n e e d e d .
T h e f i r s t p r o g r a m o n the p r e - p r o g r a m m e d " d e m o n s t r a t i o n d i s k "
is a D i s k O p e r a t i n g S y s t e m (DOS) w h i c h p r o v i d e s a s h o r t h a n d
f o r m of th e s p e c i a l d i s k i n s t r u c t i o n s . I r e c o m m e n d its u s e .
C O M M O D O R E W O R D PR O 2
W O R D P R O 2 is C o m m o d o r e ' s Word- P r o c e s s o r p a c k a g e . Delivered in
a p l a s t i c d i s k - s t o r a g e b o x a b o u t 5" x 5" x l^", the W o r d P r o 2
c o n s i s t s o f o n e i n t e g r a t e d c i r c u i t c h i p (ROM), o n e f l o p p y dis k ,
and an i n s t r u c t i o n booklet. I n o r d e r to u s e it, y o u ' l l n e e d a
C B M 2 0 4 0 d i s k d r i v e , a P E T o r C B M 2 0 0 1 - 1 6 o r -32 ( y o u c a n h a n d l e
l o n g e r text seg m e n t s w i t h the l a r g e r m e m o r y computer), and a
printero
Th e i n s t r u c t i o n s w a r n t h a t y o u s h o u l d h a v e the R O M i n s t a l l e d
b y y o u r d e a l e r . . . p r o b a b l y a g o o d ide a , t o a v o i d a n y p r o b l e m s
with your warranty. Since I have worked with integrated cir
c uits, a n d k n e w w h a t p r e c a u t i o n s to t a ke, I d e c i d e d to t a k e the
r i s k a n d d o it m y s e l f . . . a l l w e n t w e l l , a n d t h e r e w e r e n o p r o b l e m s .
O n c e y o u g e t u s e d to th e p a c k a g e a n d its f e a t u r e s , i t ’s a v e r y
r e s p e c t a b l e w o r d p r o c e s s o r . . . n o t t he b e s t I ’
v e e v e r s e en, b u t
p r o b a b l y th e b e s t a t s u c h a r e a s o n a b l e p r i c e (it l i s t s a t $ 1 0 0 ) .
And i t ’ s far better than a typewriter! You can key in your
text, r e v i e w i t o n th e s c r e e n , a n d m a k e a n y n e c e s s a r y c o r r e c
tions, a d d i t i o n s , o r d e l e t i o n s b e f o r e y o u h a v e i t p r i n t e d .
There are provi s i o n s for tab stops, i n s e r t i n g or d e l e t i n g words
or lines, b u i l d i n g l e t t e r s out of s t a n d a r d parts, and m o v i n g
g r o u p s of l i n e s f r o m o n e p l a c e to a n o t h e r i n the l e t t e r (or
a r t i c l e ! )« A n a u t o m a t i c r e p e a t k e y f u n c t i o n is b u i l t in.
Two p r o g r a m s a r e p r o v i d e d „ . . o n e f o r C B M p r i n t e r s w i t h t h e i r
u n u s u a l c h a r a c t e r set, a n d a n o t h e r f o r the A S C I I c h a r a c t e r s e t
used by most other p r i n t e r s „
Be p r e p a r e d to s p e n d a l o t o f t i m e f i g u r i n g o u t t h e i n s t r u c t i o n s
...they're terrible! I had to p r e p a r e a n i n s t r u c t i o n s u m m a r y of
m y o w n to m a k e t h e s y s t e m u s a b l e ■
>
FLASH! C o m m o d o r e ha s a n n o u n c e d a W o r d P r o I I I w i t h s i g n i f i c a n t l y
i m p r o v e d f e a t u r e s o v e r t h e W P I I . . . a n d t w i c e the p r i c e . It r e
q u i r e s a 32K m a c h i n e , als o . A b r i e f l o o k a t the n e w p a c k a g e
r e v e a l s a p r o d u c t m u c h c l o s e r to w h a t y o u ' d e x p e c t i n a " r e a l "
w o r d - p r o c e s s o r . M o r e l a t e r « ............. „ o R o y B u s d i e c k e r
ATTENTION! D u e to the t e r r i f i c r i s e i n t h e c o s t o f p a p e r , w e
m u s t i n c r e a s e our s u b s c r i p t i o n rates b e g i n n i n g March, 1980.
T h ose of y o u w h o h a v e a l r e a d y s u b s c r i b e d w o n ' t be a f f e c t e d this
y e a r b y the i n c r e a s e , b u t n e w r e a d e r s s h o u l d be n o t i f i e d . Spread
the word around, b e c a u s e in M a y w e ' l l s t a r t r e t u r n i n g $ 15 *00
checks. A c c o r d i n g to o u r p r i n t e r , w e h a v e e n o u g h p a p e r o n h a n d
to h a n d l e A p r i l ' s i s s u e .... . b u t t he p r i c e o f p a p e r h a s i n c r e a s e d
n e a r l y 7 5 $ o v e r the l a s t y e a r . Sorry, friends.
4 3
REVIEW
NEW-CURSOR Un-Crashlng On
$4.95
INTERNATIONAL TECHNICAL SYSTEMS,
Upgrade ROM Computers
Jim Butterfield, Toronto
INC.
P.O. Box 264 If you do much work in machine language, sooner or
Woodbridge. VA 22194 later you’ll write a program that will crash.
Formerly, you were out of luck. Unless you were
N EW -C U RSO R is a momentary switch and resistor de
lucky enough to stumble into a type 1 crash — which
vice which is designed to attach easily to your PET and
would take you to the Machine Language Monitor, or
give you the capability of a semi-warm reset. If you lose
to an ?IN V A L ID N U M E R IC statement — your only re
your cursor, a simple press on your N EW -C U RSOR
medy would be to reset, and wipe memory.
button will cause PET to reset without the shock to
Type 2 crashes (tight loops) could be guarded
your power supply and video system such as you get
against with a little preparation involving fiddling with
when you turn your PET off and then on again.
the interrupt structure. But the nasty type 3 crash (X2
The instructions provided are brief but clear. No
codes) cannot be fixed without kicking the Reset line;
soldering is required and the only tool needed is a
and Reset means memory test, and memory test means
screwdriver to open your PET. It took me (all thumbs)
you’ll have to reload your program.
less than ten minutes to install my N EW -C U RSOR
No more. O n upgrade R O M s, you can come out of
which I received within a week of my order.
a hard crash with memory preserved.
SURPRISE B O N U S — I found that when 1 use
Method: Set the diagnostic sense pin to ground,
N EW -C U RSOR, 1 do not lose information stored in
then kick the Reset line. The processor will re-awaken
the 2nd cassette buffer!
in the Machine Language Monitor with memory
This item is a M U ST for anyone doing machine-
preserved.
language programming.
There’s more: you’re not yet out of the woods. Type
by Dr. Matarella a semicolon followed by RET U RN ; PET will respond
with a question mark. Now move the cursor back to
your register display line, and change the Stack Pointer
(SP) value from 01 to F8. This strange procedure is im
R e v ie w N EW -C U RSO R portant: you must follow it exactly. Once you've done
IN T E R N A T IO N A L T E C H N IC A L SYSTEMS, so, you’re clear. You may return to Basic with an X if
Box 264
you like, or proceed in the M L M .
Woodbridge, V A 22194 Hardware: To make the diagnostic sense pin: take a
Cursor, not to be confused with the cassette magazine standard 12-pin edge connector and wire pin 5 (diagnos
of that name, is a reset button to clear a program or stop tic sense) to pin N (ground). Key the connector so it sits
a crashed program without turning off the PET's power. on the parallel user port. Plug it in whenever you want
This little $4.95 device consists of a pushbutton switch to un-crash, but don’t leave it on the machine.
mounted with sticky tape and two jumpers with alligat The Reset button is a little trickier, since you have
or clips — one grounded to a board mounting screw, the to know where to connect it. Check with someone
other going to a certain resistor on the board itself. who's knowledgeable on PET hardware.
Installing cursor takes just a jiffy and it works Commercial sources: International Technical Sys
exactly as advertised. One push of the button and you tems. Box 264, Woodbridge V A 22194 makes a Reset
are back to the ‘bytes free' message on the PET screen. button.
Cursor is a worthwhile convenience and well-worth the
price.
John Hirsch
44
THANK YOU FOR YOUR INTEREST IN THE
BUT .
Nestar Systems, which owns Palo Alto ICs, who market the Programmer's
Toolkit for the PET, have purchased all rights to the Programmer's
Toolkit Relocater program that was announced in the *** PAPER. This
product is therefore not available through me, and I am returning
any payments you may have made as an enclosure with this notice.
2) Those of you with addressing conflicts in the ROM are advised that
several hardware manufacturers provide solutions for this
problem. A few are:
Thank you,
P O . Box 3 5 4
Palo A lto , C A G REGORY YOB
94301 (4 1 5 )3 2 6 -4 0 3 9
4 5
PET PROSE
There are many people who want specialized A
application programs to use on their PETs, but w h lP . e
ISuttiB nf ® a a g . . .
not knowledgeable enough to design or to write them.
YOU
Charge to M y: 1Z M C V ISA iA cct. No.
G a y lo rd . Mi. 49735
Signature ________________________________
ARESCO
P.O. Box 1142 .. . $
Colum bia, MD 21044
*■9 %
TH E PA PER - V IP E R - R A IN B O W -S O U R C E -—
QUALITY SOFTWARE FOR THE PET*
t l T It • «yct ml C m w iii i w l uilwm Mochlwoo, lac.
*** NOW AVAILABLE FOR MODELS 2001-8, 2001-16, and 2001-32 ***
+ M E T R I C - C A L C ^ + M E M - E X P L O R E R "want to
PET Into a powerful, see exactly how and where your programs
calculator are stored 1n PET's memory? It's a snap
exponj with this SOFTOOL KIT'* product which can
scl be combined automatically with your own
Met programs. Startinq at the location you
beti specify, it qives a screenful of
a ke information ... location address, contents
1n decimal, character or "token"
one ^ *.i«^i^nTrthan calculators Interpretation, and double-byte address,
costln j^^Trtnfsas much. Unlike other integer forms. Based on the series of
convei^erlTthls one lets you use results articles by Roy Busdiecker in The Paper,
In other calculations! $7.95 this version does even more! 17.95
Individual orders sent with payment directly to MSS are shipped via First Class Mall,
at our expense, normally within 24 hours of receipt.
I understand that if any of the programs fail to load, THE PAPER will send me a replacement as soon as I
return the defective tape.
THE PAPER
Pn RDX 1149 SECOND CLASS POSTAGE
COLUMBIA, MD 21044 PAID IN ( u s p s 450-930)°
TO:
4 8