SCELBAL ISSUE 01 8/76
UPDATE
C Copyright 1976
SCELBI C. C., INC.
What It Is....... . .1
PATCH2 Booboo .. .1
SCELBAL on P.T... .2
Paper Tape Format. .2
Tips & Suggestions.. . . . 3
WHAT IS IT? You, the individual readers, IS OUR FACE RED! right impossible to create a pro-
are the ingredients in this experi- gram the size and nature of
So what is this little publica- ment. It is you who will deter- -- -------@"VG>--- SCELBAL and not find a few
tion titled SCELBAL UPDATE mine in what direction(s) the ,...-.. "bugs" or disagreeable features
supposed to be? Well, first of all experiment goes and what con- down the road after publication.
it is just what its title denotes. clusions may be arrived at! We pride ourselves at SCELBI That is the reason for providing
A means of keeping registered on accuracy. It is tough - prepar- some blank pages at the back of
SCELBAL owners up to date on Write us, tell us what you ing complex programs in the the book marked "NOTES."
the status of the program in re- think, send us you suggestions, form of books - making sure that And, of course, a few bugs have
gards to the correcting of "bugs" tell us what you are interested source listings and object listings shown up in SCELBAL at this
that might appear, additional in, remit your program ideas, get transcribed from computer point. These have been corrected
operating information that may send us application programs print outs to type set without by PATCH1 and PATCH2 which
be of interest to owners, clari- written in SCELBAL! errors. For instance, three sepa- are pasted into the first edition
fication of points raised by users rate "proofers" spent countless of SCELBAL on the NOTES
and so forth. More than that, (To avoid any possible squab- hours checking to ensure that pages in the rear of the book
however, this publication is sort bles, lets have it understood that the critical object code listings prior to shipping.
of an experiment. It is an experi- submissions do become the pro- in chapters 12 and 13 of the
ment to determine just how perty of SCELBI C. C., INC.. SCELBAL publications were ab- The problem that necessitated
much our readers would like to However, we shall point out that solutely perfect. After that, the PATCH2 did not show up until
participate in the process of re- to sort of !lrovide a little incen- typeset listing was used to verify just a few days before the first
fining the fundamental program tive, submissions we find worthy proper operation of the program lot of books were due to arrive
as it has been presented in the of publication will receive an and to get an idea of how long it from the printer. This meant, in
SCELBAL manual, or partici- honorarium payment, which might take readers to implement order to ship promised books on
pate in the creation and sharing will, we are sure, more than the program on a computer time, that PATCH2 had to be
with others, of application pro- cover the postage for such using a keyboard loader. (Six to created and rushed to print quite
grams written to run using the submissions. ) twelve hours for most, depend- hastily! The program au thors, in
SCELBAL interpreter. ing on how well they can handle conference, quickly arrived at a
How far could this thing go? a -keyboard.) Even after all that suitable solution to the problem
The potential for tailoring a As has been said, that is up to checking it is a long wait be- and created PATCH2. Author
package such as SCELBAL to a you. We are simply providing the tween sending the copy to the Arnold suggested that the patch
wide variety of applications, of opportunity. We will be provid- printers and getting the first re- be placed at the end of memory
adding additional features, of ing three or four issues during ports in from readers! page 32 where there was plenty
improving its operating effi- the next six months or so as a of room for such a patch.
ciency, is virtually endless. Are service to our SCELBAL cus- At this time, a number of cus- Author Wadsworth, aiming to
you, the users, interested in see- tomers. If, at the end of that tomers have already reported "save such a "large" unused area
ing this done? Do some of you time it appears there is a suffi· that they have SCELBAL up and for a REAL EMERGENCY??"
want to participate in the arena? cient base to support the con· running fine - so we are finally thought he saw another location
Would you like to have a vehicle cept, we are prepared to imple· satisfied with the "proofing" that the patch seemed to just
such as this through which you ment it on a subscription basis. part of the job. The printed perfectly fi t into starting at loca-
could communicate with other If not, then, at least, we will copy does agree with our origi- tion 224 on page 32 in memory!
users? Would you like to join have learned something from the nals. Since author Wadsworth had
with the program authors in im- SCELBAL UPDATE experi- been designated as overall pro-
proving and adding to the pro- ment, and, we are sure, so will Unfortunately, no matter how gram manager for SCELBAL,
gram's capabilities? Would have you! good a job our clerical staff does the clerical staff hastily scurried
groups of you like to work on in preparing a program publica- to have the patch printed up to
specific sections? Would you like You may address your com· tion, the program authors can reside starting at that location
to have a medium for the ments on this matter, along with blow it all when they goof! IN A HURRY! Thus, PATCH2
presentation of application pro- submissions to be considered for arrived from the printer the
grams that use the language. Do publication, to: Well, SCELBI has been pro- same day that SCELBAL books
you want to see application ducing such publications long arrived and were duly pasted in
programs for games, or would SCELBAL UPDATE EDITOR enough to know that it is down- as books were packed [or ship-
you prefer programs that have SCELBI C. C., INC. ment.
more practical applications -
such as programs for handling 1322 Rear - Boston Post Road Alas, as a number of our ever
business, scientific and engi- Milford, CT 06460 alert customers quickly noted,
neering problems?
(cont. pg. 3)
1
PAPER TAPE just $25.00 ea.
specify 8008 or 8080
SCELBAL AVAILABLE Use in their INTELLEC MCS* HEXIDECIMAL FORMAT
ON PAPER TAPE! (*TM) is a suitable compro- for
mise among the many possi-
For several years now the bilities and one that is most PAPER TAPE
company has been producing familiar to industry and uni-
programs in the form of books· versity users where the majority The hexidecimal paper tape
leaving it up to individual users of the requests for such tapes format that will be used by
to load programs into memory appear to be coming from in SCELBI for core images consists
using keyboard loaders. In the our analysis. of the following.
past, with the majority of pro-
grams falling into the under 2K Several features that the A paper tape will contain one
category, most readers were con- firm's staff considered worthy or more blocks of information.
tent with the "oook only" de- in this format include its fre- Each block will be a self-
livery method. Apparently, go. quent testing for reader errors contained unit that includes
ing to a 7K program has bent and capability to recover from a header containing informa-
a number of customers fingers an error condition by simply tion regarding the location of
out of joint. We have had quite backing up a few inches to the the information in the core area
a few request for paper tapes of last block read successfully (in- (an address), the amount of data
the object code, and a number stead of having to re-read an contained in a block (a data byte
for the source listing. entire tape); the header style count), a record type indicator,
block format that allows diffe- the actual data in hexidecimal
We are going to start with rent areas in memory to be notation, and a checksum. The
making the object code avail- loaded, and the fact that, when start of each block of informa-
able. (The source listing may used with a typical ASCII tele- tion will be indicated by a special
be made available at a later type system, the tape itself can character. All of the information
date?) generate a hexidecimal listing of within a block will be arranged in
the data on the tape for checking the order illustrated next on a
One of the reasons the and reference purposes. row-by-row basis.
company has not been in any
great hurry to start providing Thus, it is being announced ROW 1 . Start of block mark
programs on paper tape was that the official standard at consisting of the ASCII charac-
because of the lack of standar- SCELBI for core images pro- ter code for the colon sign (:).
dization of format. While there duced on paper tape for the
are still many formats in use, firm's products will be the ROW 2,3 - Block length count
it is the consensus here at Hexidecimal format which is consisting of two hexidecimal
SCELEI that the Hexidecimal detailed below.
Paper Tape Format promul-
gated by Intel Corporation for
2
characters (MSD then LSD). NOTE: Paper tapes punched in BUT - you may write and ask
The block length count refers hexidecimal format will use the for information concerning paper
to the number of actual data convention of not using the tapes of other SCELBI programs.
bytes in a block. This value may parity bit (eighth bit). This is We will soon be making paper
be in the range 00 to FF (0 to opposite to the convention es- tapes available for most of the
255 decimal). However, a count tablished for most SCELBI pro- programs presented in previous
of zero (00) will indicate an END grams! The decision to follow SCELBI publications - such as
OF FILE block. the convention for the paper our Editors, Assemblers, Moni-
tape format was based on fos- tors, Games, etc.
ROW 4 - 7 - Address at where tering compatibility and in-
data will begin to be loaded in creased standardization, at least NOTE - paper tapes supplied
memory expressed as four hexi- in the area of program loading by SCELBI will be virtually use-
decimal ASCII encoded charac- capability! less if you do not have the cor-
ters. (High address then low responding pUblication! They are
address.) PLEASE!!! being made available as an op-
tional supplement to the books -
ROW 8,9 - Type of block indi- Do NOT write and ask us for not as a replacement. Users will
cator. For standard core images still have to provide 1/0 routines
this indicator will consist of the SCELBAL on magne ! We etc., as described in the related
two ASCII encoded characters books and information regarding
00. Other types of indicators will not be supplyi etic the locations of such routines,
may be used in the future. operating instructions, etc., will
tapes until such time NOT - repeat - NOT be supplied
ROW 10..... X - Data. Each byte with the paper tapes!
of data to be loaded into mem- satisfied that there i's'
ory will be expressed as two
ASCII encoded hexidecimal stable agreement concerning
characters (MSD ,LSD) requiring
two rows on the paper tape. recording methods and formats.
ROW X+l, X+2 Checksum. At this time we are watching the
Expressed as the negative of the
sum of the value of all rows in progress of the "K. C." standard
the block since the start of block
marker (neglecting carries). closely. However, we feel it will
be at least six months to a year,
and possible longer, before
standardization has set in to the
degree that we will invest in the
necessary equipment, personnel,
etc., to start providing programs
on magnetic tape.
FEEL RESTRICTED BY BEING FA? FA? FA? FA? THINKING OF ALTERING (from pg. 1)
LIMITED TO 20 VARIABLES? PORTIONS OF SCELBAL?
Oops! We forgot to tell you author Wadsworth's choice of
You shouldn't........ when it is something. While it is not men- Individuals planning to mod- location for PATCH2 overlook-
so easy to essentially quadruple tioned in chapter fourteen (see ify small sections or subroutines ed the fact that locations 224
this capacity by using a set of the list on pages 19 and 20 in can probably do well enough and 225 on page 32 were already
elements in an array as indivi- that chapter), nor is it shown on using hand assembly methods. occupied by the address bytes of
dual variables! For instance, in- the handy pocket reference card However, those who plan to the instruction JMP ERROR
stead of using a group of vari- included with the book (bound undertake extensive revisions that would be executed if a
able names such as N1, N2, ... N9; at the back with the registration such as, for example, compac- SQuare Root error (negative
simply DIMension an array (in card); the symbol FA is a valid ting the program by taking ad- argument) condition was en-
this case having nine elements) SCELBAL error code! It means vantage of the 8080's extra countered. Author Wadsworth,
named N: that the interpreter has encoun- instructions - would do well to after mumbling something about
tered a Function or Array error remember that SCELBI has "it was just a test to see if the
DIM N(9) condition. assembler programs suitable for readers were awake" agreed to
such tasks that operate in just relocate the patch to start at
Then use the elements N( 1), Why not pencil in a little 4K of memory (and can use location 364 on page 32. A new
N(2),.... N(9) as different vari- note to that effect on your memory beyond that amount to "PATCH2 - Revised" was print-
ables. Using this technique you pocket reference card? The provide extensive symbol table ed to replace the original patch
can add up to 64 more variables error code is especially likely storage). The SCELBI 8080 number two. The revised version
in a program for a total of 84, to come up if you do not have ASSEMBLER program is de- is included in books currently
A program utilizing 84 variables the DIMension capability in- signed to process the mnemonics being shipped. Early customers
will be a pretty "busy" program! cluded in your version of the as they appear in the SCELBAL who received the original patch
program (and have substitu ted manual (original INTEL mne- will find a copy of the revised
NOPs in the indicated memory monics for the 8008) as well as (simply relocated) PATCH2 en-
locations) and then attempt to providing for the extended in- closed with this literature which
perform an operation that speci- struction set of the 8080 CPU. may be pasted over the original
fies an array element! See SCELBI advertising litera- version - to erase all evidence ....
ture f()r .additional information. ....as though the whole thing
never occured !
SCELBAL ©ISSUE 02 - 9/76
UPDATE Copyright 1976
SCELBI C.C., INC.
Modified SCELBAL.... 1
REGISTER NOW!. .... 3
Plugs..... _ ........ 3
Deepspace . . . . . . . . . . 4
Letters ...•........ 5
MODIFIED SCELBAL improvement. It simply means ultra-sophisticated program that program you were stuck in a
that the presentation should in- would have been most difficult nasty situation. Every time you
This is the beginning of a clude all modifications and to explain and quite difficult to tried to run the program that BG
section that we plan to have on a references to the original version safely modify, but rather in a error message came back again.
regular basis in SCELBAL of SCELBAL, and not the modi- format that was more conducive Why? Because eliminating a
UPDATE. The purpose of this fications. Of course, if in doing to explanation and alteration. variable name from a program
column will be to present modi- so one wants to reference an The reader with a minimal statement does not eliminate
fications to SCELBAL that will improved subroutine for- pur- amount of machine language that variable name from the
provide some improved opera- poses of discussion or to indicate programming capability will be variables table. The vari'ables
tion or desirable features to the a point of inspiration, one able to find all kinds of ways in table remains filled. How does
fundamental program. Users are should certainly do so. which various portions of one normally get out of that
urged to contribute to this SCELBAL might be modified to situation? By use of the SCR
column. 4. This column will relate suit individual taste. The range command. Unfortunately, while
only to improvements that can of modifications that one can this command does indeed clear
In order to maintain some be implemented on an 8008 envIsIon are virtually too out the variables names table, it
kind of overall organization of CPU based system. The optimi· numerous to enumerate. Some also clears out the user program
the fundamental program as zation of SCELBAL for an 8080 readers might be interested in buffer, making it necessary for
various improvements are is an entirely different matter studying ways in which to speed the programmer to re-enter the
thought of, and suggestions for which will be discussed at a later up the operation of various sec- revised program. This may not
implementing those improve- date. tions of the program. Other be so difficult if the user has
ments made and/or contributed, users might be interested in high speed bulk storage facilities
it would be wise to layout a few 5. The improvement does not adding "bells and whistles" to and can utilize the LOAD com-
rules for contributors to follow. alter the starting address of any the program. Still other readers mand. Nor is it tough if the pro-
While these rules may not be label that is referred to by rou- might be interested in finding gram is relatively small. How-
considered as hard and fast at tines outside of the area being ways in which to considerably ever, in most cases a program
this point, they will at least serve modified. That is, it should not compact the amount of memory overflowing from excessive
as an initial guide. More "rules be necessary to locate any re- the program utilizes. (Again, variable names will have been a
of the game" may become ferences in subroutines outside reference here is made to the relatively large program and re-
necessary as others join in the of the improved area in order to 8008 version_ Obviously, entering it by keyboard may be
fun. implement the modification. SCELBAL can be considerably a little frustrating_
Naturally, if the improvement or compacted if the 8080 instruc-
In the example modification alteration does not require as tion set is capitalized upon. As A user that has really studied
to be described in this issue, the many machine instructions as pointed out earlier, however, SCELBAL and that has a resi·
following rules were adhered to. the original version, then NOP that matter will be handled dent Monitor facility on their
instructions may be inserted to separately from this column.) computer system might discover
1. The improvement was the next label point, or a jump that a shortcut to getting out of
made by altering the machine instruction may be used to con- The modification to be dis- that type of situation would be
code within an address range de- tinue operations to the next cussed in this issue can be to use the Monitor program to
limited by labels. label point. Of course, if the im- classified as a "bells and initialize the variables table to
provement relates to a subrou- whistles" feature. the effectively empty condition.
2. The modification is essen- tine, then a RET instruction This can be accomplished by
tially complete and self-con- would be used to conclude the Have you ever created a placing a zero byte at the start
tained within the boundary es- shortened program. SCELBAL program and inad- of the regular variable symbol
tablished in item number 1 vertantly used more than 20 table (which is at address PG 27
above. That is, it was not Following these initial guide- regular variable names? If so, LOC 210), and, re-initializing
necessary to "patch" the pro- lines should help to prevent you probably did not discover the value in the variables counter
gram by establishing subroutines chaos as contributors with your error until you attempted at PG 27 LOC 077 to a value
external to the area modified. various interests begin to point to run the program and received of 001.
out ways in which the program a BG error message. After some
3. The improvement does not may be improved, incorporate head scratching, when you That action is one of several
rely on another improvement or additional features, or possibly finally figured out th'at the prob· that is performed when a SCR
modification. Adherence to this correct any potentially trouble- lem was caused by too many command is issued. But, the
rule will insure that readers do some situations. variable names, you attempted SCR command also results in the
not end up with a problem of an easy solution by combining user program buffer being
having to refer to previous modi· As pointed out in chapter 15 mathematical statement lines to effectively erased. It might be
fications ad infinitum. Note that of the book, SCELBAL was reduce the number of variable nice if one could have two types
this does not mean that a new deliberately published, not as a names. Alas, however, you dis· of initializing commands. One
contributor cannot modify an highly compacted, intricate, covered that after modifying the would be an all·inclusive
1
initializing command just like /
the SCR command; the other
would be a special command ORG '''' 1 346
that only initialized the variables
symbol table. /
The modification presented o5 "81 /(CC) FOR 'E'
herein provides that capability 315
by replacing the SCR command U /E
with two single letter com- III
mands. One single letter com- R /(CC) FOR'S'
mand signified by the letter S 323
for "scratch" provides the all-in, C /S
elusive initializing capability for /
the interpreter. The second com- E /SET H&L TO ADDRESS OF 'RUN'
mand signified by the letter E OR G 8 II 354 /** IN COMMAND LOOK UP TABLl.'
for "erase" allows the program- L /SET D&E TO ADDRESS OF START
mer to effectively erase just the / /*.OF LINE INPUT BUFFER
variables symbol table while I /COMPARE STRINGS
leaving the user program buffer NOLI ST., LLI 342 /GO TO 'RUlf' ROUTINE ON MATCH
intact. 5 /.*RESET D&! TO START OF
"8"LHI 881 /THE LINE INPUT BUfFER
This improved capability can T /SET H&L TO ADDRESS OF 'E'
be provided by modifying the I LEI /** IN COMMAND LOOK UP 1A8LE
section of SCELBAL that starts N I.DI .,26 /COMPARE STRINGS
at the label NOLIST and ends CAL STRCP /IF MATCH., HAVE 'ERASE' CMND
with the label NOSCR. The G JTZ RUN /ELSE.. SET PNTR 10 ADD1t OF ·S'
source listing for the original LDI 826 /SET PNTR TO START OF INPUT 8'
version of this section is dis- LEI 8.,8 /COMPARE STRINGS
cussed in chapter 4 on pages 5 LLI 346 /IF NO MATCa.. CONTINUE PGM
and 6. The area in the assembled LHI .,81 /ON MATCR.. POINT TO USER PGM
listing starts on PG 10 LOC 354 CAL STRCP /tt LINE PffTR & INITIALIZE TO
and ends at PG 11 LOC 066. JTZ HAVEE /STARTING ADDRESS OF THE BUFF
LEI 350 /FIRST THE HA (PG 33) THEN THE
The source listing of the /LA (LOCATION IPI) PORTION
modification that follows illus- LCALLI "ST"R"CP
trates how the improvement was /NOV SET H&L TO ADDR 0' START
affected by re-organizing the JFZ NOSCR
order in which specific initiali- /OF USER PROGRAM BUFFER
zing actions were taken; splitting LLI 364 lAND INITIALIZE THE BUFFER
the original SCR command in /WITH A ZERO BYTE
the command look-up table into LMI 833
two character strings, one con- /** SET HAL TO AODR OF THE
taining a S, the other an E; and INL /NUMBER OF ARRAY'S COUNTER
"tightening up" the program a /CLEAR THE ACCUMULATOR AND
little bit by ascertaining the XRA /INITIALIZE THE COUNTER
possible contents of the D and INOV POINT TO START OF ARRAY
E and the Hand L CPU registers LMA /VARIAB1.ES TABLE - INITIALIZE
whenever the program returned /NOW POINT TO START 011' REGULA'R
from the STRCP subroutine. DeL /VARIABLES SYMBOL TABLE - INIT
/PO INT TO VARIAB1.!S COUNTER
Assembled object code listings LHM /INITIALIZE TO COUNT OF ONE
of a modification for both the / •• POINT TO START OF ARRAY'S
8008 and 8080 processors are LLA / •• STORAGE PAGE
presented on the following page.
LMA /.. FORM A LOOP TO
To operate the modified ver- /.. CLEAR OUT A1.L LOCATIONS
sion, simply remember that the / /.. IN THE ARRAYS STORAGE AREA
SCR command has been re- /BACK TO EXECUTIVE WHEN DONE
placed by the single letter com· HAVEE.. LHI 127
mand S. Additionally, a new ISAFETY HALT FOR UNUSED BYTE
command, invoked by entering I.LI " 75
an E followed by a carriage re- XRA
turn when in the executive
mode, will cause the array and LMA
regular variable symbol tables to
be effectively erased without dis- LLI 128
turbing the contents of the USer
program buffer. LMA
2 LLI 218
LMA
LLI " 77
LMI 881
LHI 857
LLA
/
SCRLOP., LMA
INL
In SCRLOP
JMP EXEC
/
HLT
/
8008 8080 REGISTER YOUR COpy OF SCELBAL NOW!
"1 346 001 01 346 001 The first two issues of SCELBAL UPDATE were sent to all
fIJ 1 3117 01 347 305 purchasers at their purchase addresses. It cost a considerable amount
3" 5 01 350 001 of money to send out copies of SCELBAL UPDATE. Future copies
"I 358 lUI. 01 351 323 wiJI only be sent to those purchasers who have registered their copies
323 of the publication. The registration card may be found on the last
I I 351 page of your SCELBAL book.
10 3511 066 342 10 354 056 3.1&2 002 A
10 356 056 .8. 10 356 046 001 013
18 36. 846 II. 10 360 036 000 002 PLUG Now you can cook-up
II 362 .36 .26 10 362 026 026 011 FOR
I. 364 If' 6 332 ""2 10 364 315 332 002 SCELBI hot programs on your
II 367 151 171 113 10 367 312 070 011 COMPUTER
1. 372 136 126 10 372 026 026 "8080"
1. 374 .46 ••• 10 374 036 OQO 011
10 376 1663116 10 376 056 3.1&6 010 A gourmet's delight of practical "how to"
.56 181 11 000 046 001 facts, including description of "BOBO"
•••II 186 332 8e2 II 002 31S 332 instruction set How to manipulate
151 135 III 11 005 312 035 "BOBO" stack. Flow charts, Source
11 ••2 846 351 036 350 listings, Routines for multiple precision
11 805 066 888 11 010 056 000 operation, Programming time delays tor
II 186332 8 02 315 332 real time applications, Random number
III 871 811 11 012 30a 011 generators, Completely assembled float-
'JI'11 812 866364 11 014 056 364 ing point math program, Input/output
176.33 11 017 066 033 processing for basic I/O programming
II .14 868 11 022 054 through interrupt processing, Code,
11 817 151 11 024 257 numeric conversion routines, Real time
11 822 271 11 026 167 programming. Search/sort routines,
II 824 .61 11 027 05S Plus many more finger-lickin' goodies,
11 826 357 11 030 146
11 .27 261 11 031 157 Order your copy of Seelbi's "8080"
11 .3. 271 11 032 167 Software Gourmet Guide & Cook Book
11 131 11 033
11 .32 856 827 11 03.1& 0.1&6 027 today! Only $9.95 ppd, Bon appetite!
II 833 866875 056 07S
'11 134 151 11 035 257 1(11111 (O"'IlIJIIU
271 11 037 167 (ONIUnN(J IN(.
II 835 "66 128 11 041 056 120
II .37 271 11 042 167 1322 Rear Boston Post Road
11 841 86621. 11 043 056 210 Milford, CT 06460 •
II '42 271 11 045 167
11 '43 866 177 11 046 056 077 A PLUG FOR CREATIVE COMPUTING
11 '45 876881 11 050 066 001
11 '46 856 857 11 OSl 046 OS7 The game presented on the next page is a slightly revised version
11 .58 261 11 053 157 of a program that appeared in an excelIent magazine that is appro-
11 lSI 11 055 priately named CREATIVE COMPUTING. The magazine is pub-
11 .53 27. 11 057 167 lished by an enthusiastic and creative organization headed by
11 855 868 054
II 857 118 868 811 11 060 302 060 David H. AhL In addition to games such as that shown in this issue,
184 266 8.8 11 061 303 266
1 1 861 the magazine regularly presents a variety of articles, book and
II 861 .8. 11 062 166 product reviews, educational material, and a good selection of
11 862 general information which we feel most of our customers would find
11 .65 11 065 highly interesting. Recent issues of the magazine contained 88 pages
(8 1A1 x 11). Considering the fact that relatively little advertising
11 878 11 070 appears in those 88 pages, the amount of text and editorial material
per issue far exceeds any other computer·related pUblication that has
t come to our attention to date. Individuals interested in subscribing
to the pUblication may do so at the following rates. 1 year - $8,00,
3 years - $21.00. If you have any doubts, you can get a sample copy
for $1.50. (The magazine is issued bimonthly.) Subscription orders
should be forwarded directly to:
OBJECT -1 CREATIVE COMPUTING
P. O. Box 789-M
Morristown, NJ 07960
3
510 DI~ D(4) D 1780 GOTO 27611 THE PROG~AM RUtI
510 DIH E( 4)
1791 se-18 fOR VAIIIT A.Of ACTION CHART7 Y
528 DIM C(2) SOMi 0,
lull C(8)016 I 11RE PHASERS
611~ DIM 1'1(5) E 2 11RE ANTI-MATTER I'IISSILE
1818 p8-1 3 11RE lIYPERSPACE LANCE
6115 P!!I~T 1828 GOTO 978 4 1"18£ PHOTOtl TORPEDO
611 PR1~T 'VA'IT AN ACTION CKART1 '1 183B 58·4 5 lIYPtRDN NEUTRO l'lEI.D
1840 C(lld4 6 SEL~-OESTRUCT
615 I~PUT 11$ 7 CHANGE I/El.OCITY
185B 1'8-2 8 DISENGAGE
618 p!!I~T 668 E 9 PROCEED
628 I ' "0217 GOTO P 18611 GOTO 970
630 GOTO 77~ n~E PKASERS'
I'\IIE ANTI-MATTER I'll SS ILE' 187e se 0 2
66111 P!lI"T ~IRE HYPERSPACE LANC!'
670 PRI"T I FIRE PHOTO'" TOfl?EOO· 1888 C(8)030
688 p!lltlT 2
1891 1'e-5
690 pRI"T 1988 OOTO 978
780 PHl~T • .1\ 19te CllIo,I2
718 PRI~T 5 MYpmON tlEUTRO I'l ELD' 192' tI-11I WHICK SYSTE/I (1-3)72
1938 1l0TO 18 60 WHICII SPACECRAI"T (1-3) 13
728 PRIST 6 SELI'-UESTIlUCT' S 19411 PI-4 TIM:: TC ~)U KA ~
738 pIII>lT 7 CHA>lGE Vtl.OC I TY' 195e IF HI noll! THVI 261B YOU HAW Je., lIIflTS 01' STORAGE,
7.8 PRINT 8 DISE>lGAGE' 196. ~(n-N( i l - I TH' CLCSEP YO~ GET
1970 ~-2B8 E:NE-MY, THE B::n":::R Il'EApON71
7S8 PRIOfT ' 9 P,\OCEEO' MOUtlT71
1980 GOTO 143. C~iAf'..T£ YOU.HAVI lB •• lIIflTS 01" STORAGE.
768 PRINT P 1990 N(I).rHfl+N II'EA!'ON72
778 PRI~T '\IlIICH SY~Tm (\-0)'/ A MoUIIT72
2888 1l0TO 11311! YOU.HAVE 10., lIIflTS 01' STOIlAGE.
"-1815 l~pUT ~ 2.1. C( I )-4 Il'EApDN73
928 II" GOTO 2388 AMOllNT'l1
202. GOTO IS 68 YOU HAVE 6.0 UNITS 01" STORAGE.
638 II" 1\1_2 GOTO 2.38 2838 1'1 0 20 II'EA!'ON7 S
2840 I ~ f'lC2'" GOTO 2648 MOllNT71
848 GOTO 2488 2858 ~(2)-~(2)'1 NOT !!HOUGH SPAC!. RESEl.£CT,
28641 t- 58e YO!.LHAVE 6 •• lIIflTS 01" STORAGE.
85e D8-8 2878 GOTO 1438 Il'EAPOIf7 4
28Se ~(~!l.N(2)+N MOllNT73
868 D( 1 )."
2898 GO TO 1I3B RANGE TO TARGET. 537.88S8
878 N( I )-8 218e C(I)-4 RELATIVI VEl.OCITY. 8,5989952
ACTION77
881 1'1(2)0, C 2118 GOTO 10611 CIIAIIICE TO BE EI"I"ECTED, 7+ 2
89. ~(3)o8 212B PI-16 QHAIIIGE BETOND MAXIMUM POSSIBLE.
98" '\1(4)-" 2138 II' f'l( 3)-. GOTO 2668 INCRIASIf'lG TO MAXIMUM,
2148 ~(3)0f'l(0)-1
918 Do8 E T'lE RlMARKSN RANGE TO TARGET, 521,6848
2U_ t-S58 GRAM HA\!f REl.ATIVE VELOCITY, 2,9
920 'PRINT 'VKICH SPACEC1:tAF: (1"3)' s 21611 OOTO 1438 AND ARE i:-RE~r"JTE::D HERE TO ACTIOf'l74
2178 f'l( 3)'~( J) +tI SAVE PRCGRAM SCAIIINERS REPORT !!HE/lY DAMAGE KO.1l
925 INPUT ~ SPACE etiOGf1AV Vv' _'... H-lJS YOIJ!I VESSEL. DAMAGE' 3,713214
938 II' N_ I G~ TO I 798 2188 GOTO 1138 Fir l\j A 1L~ SYS~;'t:M fl\.JNNIf\;G
2198 C(I)02 SCf:L8AL I.NlTl-' DIMeNSION RANGE TO TARGET, 504 •• 848
948 I ' 1'l-2 GO TO 1838 22118 GOTO 18 611 RELATIVE VEl.OCITY, 2.'
2218 PI-U CAF'A:3:~;TY IN~TA~LEO.I ACT I OK79
9$8 [F M-J GOTO 1871 222' II' f'l(4).e GOTO 26811!
22311! N(4)-f'lC4)-1 RAN911 TO TARGET. 487.4848
968 GO TO 928 RELATIVE 1/El.0CITT. 2.8
22418 t04118 ACTION? I
978 C-COH 2258 GOTO 1438
2268 N(4)-N< 4).1'4 SCANNERS REPORT IINmv DAI'IAOE NOV,
98B PRINT 'YOU HAVE'ICJ' tr.llTS 0,. STORAGE,
2278 OOTO 1130 YDIJ!I VESSEL DAMAGE, 5.935885
998 pRI~T 'VEAPON' J P 2288 C( 1)-,1999998 "T....,15 IS Dt.E:PSl:lACE A TAC-
2298 No I 8 II! •
992 ItlPUT 1/ TICA:~ SIMt:,",A~ ION 0"; SHIP· •
995 "RI~T 'Al'IO~T" 2300 OOTO 1868 •
2310 1'1-6 •
998 INPUT III 2320 II' '4(5)0. THE" 2'1\110 ~().S~1Ip COMBAT IN DEED •
2338 f'I(S)-f'l(5)-1
18e8 11'101-1 GOTO 191~ R 234' ~-2S0 SPACF yot. ARE ASSIGN:--n RANGE TO TARGET. 205,28,,1
1818 IF" 10102 G()TQ 2310 2358 GOTO 143. RELATIVE VELOCITY, 2.'
2368 N(5)-1II(5)_~ PA I HU~ A SFr:TlON OF ACTIOf'l73
1828 IF" 11-3 GOTO 2188 OUT.
2370 GOTO 1130 YOLP STAR EMPIRr S BOP. SEl.ECT ANOTHER COURSE 01' ACTIOIII.
2lSB E(I )-1 5II! ACTION72
leo8 II' 101-4 GOTO 2198 UfFf::' AGAI:-JSi IH)STILE SCANNERS IIE1'DRT I!HI!:NY DMAGE NOV.
2398 E(2)-588 YoUR VESSEL DAMAGE. 83.53137
18"8 IF" 1/-5 GOTO 2288 o 24011 !( 3103 At iF~S AL t YCdR t~COUI\J
1858 GOTO 980
le6e 1 F' IIJ*C( l)"C GOT!) 2538 2410 E(4)'4 :I::RS WrL~ BE AGAI,'\j~T
1870 C-C-I'l*C( I ,
2"28 GOTO 858 i:LE V~SS::L:; 1 'Vl. WI~I
243. E( I ,. 203
18S8 II' Vol TlIEl'/ 1998 FIQS·' b:: 8l::(JUIRED TO 6.689635
2440 E( 2)0358
1898 II' "-2 THEN 2888 G lECl A \/EssrL rH~)~j O!\;E Or 96, 17733
1111 II' V03 THVI 2178 2450 E(J)." 99.95"26
2468 EU)03 TI-"-H:E rY"cs, EACH WITH ITS
1118 11'101.4 THEN 2268
2478 GOTO 858 QVJ\J C-ARACr-ERISlICS
2488 E( I ).150
1120 OOTO 2368 2498 E(2).480
2508 E(0)05
1138 II' C.I GOTO 988 R 2518 £(4).2 TV?E S;JEE,O Cn,RGO SHIELDS
1148 REM L SCU~;l '0);. 16 1U
115. SI-S9*R>lD(8)
7 CRUI"lH 4X ?L 2,1
1160 t:\.(3.Ft~D(") +5).'86 3. BA'LESHIP lOX 30 5-1
\179 pRII'lT A SPED GiVEN
.QTHcCi SHlPS CARGO SPAt!::
11811! PRIIIIT 'RAf'lGE TO TARGET,'1R F\ UNiTS Ol- S"'AC~ A,qOARD
1198 PIII~T 'RELATIVE 1I!l.0CITY, 'lSI SHIP WHI~~~ C,..\\I SF FIL_ED
12'9 PRINT 'ACTIOr>l'I W: 1;-. WI:A.PONS. PROTE(:T IO'-J
~!-E RELAT .\',' STR~"\'G-H
1205 INPUT" M,
1219 IF "01 GOTO 1948 C::' -HE Sr!!P'S ARM:J-~ A:\D
1220 I I' '102 GOTO 2830 SH ELC 'r~RCE O~CE: A $HI;"J
1230 II' H-3 GOTO 2120 I--l~S 3EEN SEU:C:T::~ YOU
1240 II' "-4 GOTO 2219
1250 II' H-5 OOTO 2310
1268 I I' H- 6 G~TO 16611
1270 II' pj- 7 GOTO 1398 • 2520 BOTO 858 RANGE TO TARGET. 18S.6841
1288 II' H-8 GOTO 2768 IIELATIVE VELOCITY. 2.'
2538 PRIf'IT '>lOT ENOUGH SPACE, RES!l.ECT.· ACTIOtl71
1290 I I' R< 580 GOTO 1 _ SCAHNZRS REPORT VlI!MY DAMAGE NOVt
2540 GOTO 980 ENEMY IlESSEL DESTROYED.
131011-11-(51-8.3).1.25 * 2550 PRI>lT 'CHANGE BEYO~D MAXIMUH POSSIBLE, YOUR IIl!:SSEl. DAMAGE, 94.711187
1340 II' ~.15811 GOTO 2590 25611 PRIf'lT 'I~CllEASI'IG TO MAXIMUM.'
VANT ANOTII'!R IlAT'1LE7 f'l
1350 II' R-e THEN 1370 2578 SIoS8 llEAD"/'
2588 aOTO 1318
1360 h-R * 2590 PRINT 'OUT 01' RA.~GE, DISENGAGED.'
1378 pRIf'lT * 2688 GOTO 27611
2618 PRINT 'PHASEn BANKS PllAtNED.'
1380 GOTO 1180 2620 PRINT 'SELECT ANOTIIER COURSE 01' ACTIOf'l. '
1390 P~ltlT 'CHA~GE TO BE EI'I'ECTED.',
1395 l~pUT 52 2638 GOTO 1280
IU0 II' (SI-S2)'S0 TH&i 2550 26•• PRIf'lT 'OUT.
ule SI-S I_52
1428 GOTO 1180 * 2659 aOTO 2620
l431?! Jl\II""PSlIICZ/1:t)f 1.5
2668 PRINT 'OUT. w_ Be AcLOWED ARM IT
1450 1:)0_ C2* .,,,. 3* "'h!lt."iD( e» 15 2670 GOTo 2620
2688 plll'iT 'OUT. WII WF APON:::>Y FROM THf
1468 0-0+00 2690 aOTO 26211 OWING
1470 Plllf'lT 'SCA~~ERS REPORT E>lEI'fY DA.'IAGE NOI/. 'J D
1480 IF D_99 THE;; 2728 2788 PRINT 'OUT.
1490 GO TO 1523 2718 GOTO 2628
2720 PRIf'IT 'DlElIY IIE!ISEL DESTIIOYED.'
1580 oe-0 2730 GOTO 15211 PI-1;\SFI1
2748 pRIf'lT 'YOUR VESSEL DESTROYED.' 2 AN11-M/, I 1[P
1520 K.E(I)+E(2)·~~D(') .2760 !'IIINT
2770 !'IIINT 'VA~T A.'10THEn BATTLE? 3,
1548 E-E( 3> +E( 4).Jl~O(")+5/P"*R~D(") 2780 INPUT 'IS
2798 II' '1-217 GOTO 685 5 HYrrRO:'~ ~\[t;-:- AI
1560 P'j_E*CK/R)fl.85 28811 END
V'J:::AP'JN -'-yP~:;; EFfL In:'
15700(:n-C3.P'3+3*n*R:-.1DUO)/S.S
;-C~_LOWING
15880(1)·OCI>+Ot2)
ST,)fiAr.r SPACF A,\D
159" If'" CZ*OI1J)/(R*se"JI>2.2 GOTO 1626
1601 Dc:n_oe*2/CRf2*PI,
16110(l)-n(1)+O(J>
162:0 'PR1~T "YOU,. V£$Sa. OA"IAGE1'10CI) It-'F FOLLOWING n[i
1630 II' D( I ) -99 O'TO 2740 DEEPSPACE PROGRAM <:IRIoN~IHS
1640 II' 0.99 GryTO 2768
16511 GOTO 1313 OR1GINAl. Atr:'1I0R. UNKNOWJ\ TVP':: CARGO SPACF RFN(JTH
1668 pRI~T 'SELl' DESTRUCT I'AILSAFE ACTIVATEDll' 12 4
4
1671 PRJUT ·lUPUT 1 TO R£L.E4'5E FAILSAFE. 'J THE PBOGRAM H,:IU; IS A:S AllAPTATI()N 4 1[,
1~j
1675 INPUT U FOR S('ELBAL A PIWGRAM THAT WAS MODlFIEfl 2(,
6
16811 II' IJo I TH&I 1731 i,"'D"I""I"'"CO;~~~~ ~~r:I'~:~~rl;~;~Ml~~i~~ (~~~I!rHl~
1690 GOTO 1290 T-it TIMF YO,;
1700 PR I tiT'S El.1'- DESTRUCT ACCOMpL I SHED, ' COPYRIGHT OWI'ER . YOR WHICH WE KWENU OUR (,<\ME At>-; SVV FR
1711 II' R'60 THEIl! 1740 THANKS ON BEHALF OF OUR READBRS \'\I,T,.. A
1728 PllltlT 'E>lEMY VESSEL M.SO DESTROYED.' LEAPt;
1738 GOTO 2768 COPYRIGHT 1G7G II\~E,; AI VITAL IN'ORMATIOW
1748 D(4)-32BB/R
175B Dol>+!)( 4) CREATIVE COMPlJ'l'I!>G
1768 II" 0- 99 THEN 1728
1778 PRI"T 'Ef'lEMY IIl!:SSEL S\mVIVES VlTH"Dl' DAMAGE.'
4
LETTERS rest were something else. A the program looks for the next Mr. Toy has apparently made
study of this problem revealed character! This delay seems to some very useful discoveries in
Mr. S. J. Toy is one of those that at least for TAB the con- be unusual, so readers may well regards to the availability of cer-
hearty souls who utilizes a tents of the accumulator must be advised of this fact in con- tain CPU registers during I/O
Baudot encoded teleprinter with also be saved on output. To nection with this partiCUlar pro- operations. His observations
his computer system. These make a long story short, the sim- gram, especially if they are using should be of considerable inter-
machines are generally consid· plest solution was to change the an 8008." (True - the delay is est to users with special I/O de-
erably less expensive than the contents of 015 010 from 003 rather disconcerting on an 8008 vices who find they need more
sought after ASCII encoded de- to 001. This reloads the accumu- based system. 8080 users, how- CPU registers available. The
vices. We don't know how many lator with a "space" each time a ever, will find the delay barely stipUlation made in the publi-
other SCELBAL users may be space is supposed to be sent." perceptible. Ed.) cation regarding limiting the
using the same type of machine Don't change your system yet - use of CPU registers to just A
but we thought Mr. Toy's com- read on! Ed.) "I still have not determined and B was given on the basis
ments - relating to the use of why the octal numbers in the of design guidelines that the pro-
such a machine - and other mat- A few days later another let- CHR table program on page gram authors established. In
ters, would be of interest to all. ter was received from Mr. Toy 14-24 do not come out cor- other words, the program
(Users with Baudot machines and the discussion started above rectly. However, I am now authors, during the development
might be interested in commun- was continued............ . reasonably satisfied that my I/O stages, reserved those two regis-
icating directly with Mr. Toy on "On the matter of the TAB routines work properly on all ters for use during I/O opera-
mutual grounds.) function, my original quick fix functions, so I will not spend tions, so that they would have
turned out to be for the comma much more time on this. For the freedom of using all other
When Mr. Toy originally re- controlled routine only, PCOMl. yourit:li!0rmation I am enclos- CPU registers if desired. They
ceived his copy of SCELBAL he It is also necessary to similarly inga prhltout of my results. did not, during the development
was apparently a little crest- modify TABLOP for the num- process, keep track of whether
fallen when he discovered the erically controlled spacing, and ~l~aSe .note that I have sub- every other possible register was
limitations on the use of CPU the BACKSP for backspacing. thus actually in use during I/O
registers specified in the book. The latter would require a stituted a dash for the READY operations. Mr. Toy's observa-
The recomendation that only patch so I gave up on this tack, message. This involved changing tions are as interesting to the
CPU registers A and B be used modified my output routine to only two bytes in SCELBAL; authors as they may be to others
for I/O routines met with the save and restore A. ...........Inci- 001 352 is reloaded with 003 and may be taken for what they
following comments........ . dently, PCOM1 and TABLOP and 001 353 is reloaded with are worth. (Which is a lot if your
"Since the accumulator is loaded are identical except for addres- 255. The result is a single line running a Baudot machine!)
with the data to be inputted or ses so one of them can be elimi- space for "READY" instead of
outputted this really leaves only nated if memory space is need- three. This uses up much less Mr. Toy's observation regard-
register B. I normally need H ed. " paper, especially when opera- ing the saving of the accumula-
and L for the Baudot-ASCII con- ting in the "calculator" mode." tor's original status during an
version. After casting about for Mr. Toy then went on to a output operation that utilizes a
several days trying to decide new topic............... . Not one to give up. Mr. Toy TAB is correct. The users outpu t
what hardware modifications "I have tried all the example soon followed up with:...... . routine should exit with the
had to be made, I finally decided programs in the SCELBAL man- "I finally discovered why the original character in the accumu-
to look into the possibility of ual except for the last one. They program on the Table of ASCII lator still present.
program modification. To my all appear to operate properly characters would not work. An
surprise I found that the ECHO except the two programs invol- "8 X" in statement 130 was Our thanks to Mr. Toy, (and
routine leaves Hand L free, so ving the CHR function on pages missing. A printout of the cor- our apologies to all readers) for
there is no problem on output. 14-24 and 14-29. In the table rection and a RUN enclosed. discovering the clerical error on
The input situation, however, program the last character of the You may also be interested in line number 130 of the example
was not as easy. After consid- octal number comes out as a let- the substitution of characters to SCELBAL program on page 24
erable study I concluded tenta- ter. In the line printing program use the model 15 TTY." of chapter 14. The line should
tively that D and E were free. only the first character in the read:
So I went ahead and developed line comes out correctly. Unless THE EDITOR REPLIES
some I/O routines on this basis. my I/O routines are associated 130 Q3=INT(N - 64*Q1 - 8*Q2)
The results so far indicate appa- with these problems, which Communications of the type
rent success. (But wait - read on seems unlikely, it would appear Mr. Toy has submitted are exac- The suggestion regarding the
some more! Ed.) I have now that registers B, D and E are free tly why we established the sup- use of a hyphen to shorten the
tried everything in the chapter on input, and B, H, and L are port publication SCELBAL READY seems like a good one
on operating SCELBAL up to free on output. In addition, on UPDATE. It is through such for those that want to imple-
and including page 14-3 with the output, A must be saved and re- communications that SCELBAL ment it.
correct results, with one excep· stored for the TAB function." itself can be improved, or tailor·
tion. In addition, simple prob- ed to suit the requirements of Users who anticipate using a
lems in addition, subtraction, Mr. Toy must really be work- individual users or groups of Baudot coded device might be
mUltiplication, and division yield ing his system out because in a users. Mr. Toy's letters are the interested in contacting Mr. Toy
the correct answers. few more days he added the fol- first of what we hope become a directly to discuss I/O routines
lowing comments ......... . flood 'of similar such communi- etc.. His address is:
The one exception mentioned "After several hours of hard ques aimed at disseminating in-
above was that the TAB func- labor I finally found out why formation abou t SCELBAL Mr. S. Joseph Toy
tion did not work properly. In- the CHR program on page 14-29 amongst its users. Route 3, Box 73
stead of all spaces between is so complicated that it requires Chico, CA 95926
"HELLOS", the first character about half a second for each Now, to answer or explain a
was a space as expected but the character to be processed before few of the questions raised by
Mr. Toy.
5
SCE.LBAL ISSUE 03 11/76
UPDATE (C) Co.pyright 1976
ScELBI C.C.• INC,
STRINGS Coming. ,1
Payroll Program , . . 1
Roadrace Garne, , , . 2
Bug Exterminated , . 3
More FOR your NEXT .. 3
STRING CAl'ABILITIES FOR SC£I"BAL STRING CCNCATENATIONS The reaaon th il fom." WAIl chQsen ovtl:t the norf1lii.l PROORAM CAI.CULAT£SWEEKLY WAGES
"function" format IS t,hat the SCBLBAl. notation is ALONG WITIl FWT AND FICA DEDUC"I'lONS
wedOne of the mOlt StrinltS can be oom::aten.B.t.eO Ulm,- the ... operator, more conciie and requires less memory to impltment.
for additions to SCELBAL Concatenation ill the joining together of two or mort>
/ttlinga. For l'.x,a.mple, "AB"""CD' forms "ABCD,"
is capability to manipulate character Itrings in the and A$+BS (8:4) + 'Q' forms a st:ri.og of AS jOined
with the fourth character through the end of tile
manner permitt.td on mOSl wse computer SYStemS eighth element of B$1U\d the htend '<;1:.' SCELBAL users that operate a Illnall buainet.s m.'ght
find the fonowing prOlf8m quite a lime &liver, 'I'ype
when running extended BASle. Soon. a supplement ADDITIONAL FUNCTIONS ADDITIONAL FUNCflONS in the number of regular and OV8itirne ho'W'l worked.
number of peraonal allowancet churned, and tht'
will be available for SCE L'BAL that will glw it Btring Two new numeric functions add additional power Three new functions acid ad.di~onal power to the hourly pay rate. The program rMpOMIl lA-1th gross
to the language; language:
mampulating feawM capable of performing: the PIlY, dedUCtions, and net pay" The cakulations are
LEN(A$}: 'l'hil function re'lllfnS the length of a LEN{A$): This function return. the length of a hued on eurnmt stlv~nunent 8t.andwl,
following tyPf>J of operation,; string or s-t.ring .nay .. Ii decnnal number. For uam- Itrj,ng o:t \Jtnng IU'f'IlY 118 a decimal number. For t/Xam-
pie, if A$ hM the value as in the above e:umplea, pIe, if A$ has the value WI in the above aample, 1.8 PRINT '1976 WEEJQ.Y PAYROl.l. PROOM'"
1. UP to 64 ~umg, andJor s.tring mays. LEN(A$) returns 5. LEN{A$) return. 6. 185 PRINT
each string up to 80 characters in length. 118 PRINT
ASC(A$): This function returns the decimal value ASC(A$): This function retumll the decimal value 11$ PRINT
2. SUbstring capabilities $It follows; of the frut character of the ttting or string lU'l1.ly of the lirat character of the string or string array 128 PRIlIT 'RI;GlJLAR 1l0URS WORKED.' J
A. The light pm of a at.ring, lIPl'Ciiled 10 ASCH. For example, ASQA$) WOlltd specifiad in ASCII. For example, ASC( AS) would 125 INPUT 1111
B, The middle part of a string. retUrn 193, becaU~ AS!:1 ;1) hall a value of "A," return 193, bee.ulle A$(:l;l) has " value of "A" 13e PRINT '01/EltTlIIE 1l0URS WORKI;!:>.·J
135 INPUT 011
C. The left par;. using a. These fUnctiON can be used lUiywh~re in a numeric VAL(A$): This function L'Oflvetts the ehaJ1lCtent in I'll PRINT 'VITH HOl.I>ING ALLOWANCES.' J
e-xpre6lllon where a mguJar function is legal. the ~ trom an ASCII repreJentat10n of a decimal 145 INPUT VH
D. A atring array """ be IUbstOnged number 10 ita numeric vtUue. ~'OX- example, VALf',Z') Ise PRINT ·SINGl.E (.) OR IlARRIEO (I)')
in the same ex.pIAlHIion, l:etum.2, ISS INPlIT SM
168 IF 511 • , GO TO 17e
3, Two ad.ditloMl numeric functions: Thef.(! functaons shoUld be used only at the 165 II' SII •• I GOTO 158
A. LEN . will rewrn the length beginning of an expr-eNion. The argumentli of the&e 178 PRINT 'HOUlU.Y WAGE.')
functions lhouJd be either a plain string, llUeh as A$, 175 INPlIT HW
of a. &-trillS. or a string array 8'Uhecriptoo by a regular vmable. i.e.,
B, ASC ~ will return thedecimal !I$(J). So LEN(AS) and ASC(C$(N6)) would be lopl, la. PRINT
value of the tirut character in a but LEN(CS(6)) and ASC(A$( :2)) would not be legal. 211. PRINT ·REGlJJ.AR PAY .')IlH_HW
(The reason for this ~triction is that on an 8008 sys-
ruing. tem using a function lUte LEN(A$(6)) puahelO the PC atl PRINT 'o'VE1llTU1t PAY .'10H*J.S.H\1
Ablck down more than 8 !ave)s, An 8080 system 215 GP • RA'*HV+OH*l .. :i.liV
4. One additional string functJon CHR$· would not have this problerrq 228 PlUM,. 'GROSS PAY . ' j GP
(will replace CHR). 238 Il' 51! . . , GOTO 245
235 GOSUI!! 3811
5. String IllTa..VR do not requin dimensions, STRING EXPRESSION 24. GOTO 2Se
245 GOSUS " . .
EL Con~ten8tion of string exp~l!8ion5. A IItrtn~ exprealiion is any .tri.ng vvi$hJe. stting
Hl'TllY. twg literal, use of CHR$ function, or any e2-5S PRINT 'T"T DEDUCTION -'JTX
7. Input and output of biringS, concatenation of thellf!, }!~or example: A$+'THIS' or
CHR$(N)+'T'+W$(D+E;6~), St:ring eJ.preliit'ioos IiiI..m 268 S$ • 0. 585_01'
legal in PRINT stat.el1lents (where they :replace the 278 PRINT 'I'ICA IIITH HOl.!:>ING .'IS$
old text .trin~5) and on the right of an ..- in a LE'T. 281 I'll' • Gp-TX-$$
298 PRINT 'NET PAY. 'INP
The following diSCutston will amplify the capabi· MEMORY USAGE l1:n GOTO 110
liti(!$, of the M.ring handling routinet that wID be made JaIl TT • GP - (W*l 4. 1&)
available in the new wppJement. STRING LE1' The string paclcage 1.s deaigned to IAlpplement :Je5 II' TT ••••• GOTO 315
SCELBAL conflguwi to run in ;y.tmfill. with 12 K or 311 II' TT •• 25 GOTO 320
STRING VARIABLES The Btnng LET Bl.at~ment is similar to the ~1ar more of m.emory, The string pa<'Julge OlSoe8 one page
LKT, and may take tWo forms: for working pointer. and rE.'glsterB., one page for a 315 TX • "
A strins vmable may he any letter followf'd by a strmg variabJes 6Ymbol table, and rt$ many pages as
dollar sign ($), For elllmple. A$ would be a legal string'" string t>xl)teliflmn the Ulet _rgns for ltorqe of the actual l\.nngs. The I,.318 RUtll!N
string vmable, A string variable mllY he mb.acnpted or Itrin~ operating routinefl reqUire about 1.5 K of
in thf' norma) fashion: D$(3j would yield the third tnElmory, 320 TT •• 67 GOTO 330
ejp1nent. of the string lU'l'ay 8$. The diffl!\:rence be, string may = ttring e:iLpreDio"1 325 TX • (1.1"'(TT-25)
tween numcrie ~yG and string array:s :is that unsub- Thp. IUppiementary string haodlinS .B.ddition to 328 RETtll!N
acriptad fl.tring variables are treated thfl Slllltt' as one Fa. example, AS· 'EXAMPLE , or C$(N)=A$+D$(:3) 338 IF TT •• 115 GOTO 348
with a subscript of one. so Ai Bnd A$(l) reference or 30 LET AS*A$+C$ 335 TX • 6.72 + (lh280(TT-67»
tb.:! saDH.' string, String lilTays do not require {or 33e RETURN
Qllow) B dimension to be specifi,M in a DIMen&ion SCELBAL 15 in the checkout &nd documentation 340 II' TT . . 183 GOTO 3S'
statement. This feature allows the full strjn~, capa-
bility to bt' implemented in a system without the STRING OUTPUT st.q;es. The supplement !s acheduled to he placoo on 1345 TX • 16.32 + UJ.23.(TT-1J~P)
artlly option installed. 348 RETUlIN
A fitting may bP output in a PRINT statement t,hp mnricC't in a few months at a modt'tIl'W It 350 IF TT •• 240 GOTO 368
SUBSTRINGS KUbjeet to the normal rules (ot spAcing and t.abbmg 355 TX • 31.'6 + ('.21.'TT-183»
along with numPl')C data. For exwnple: PRINT is anticipatad thllt paper tapes of the object of 358 RETURN
It is often desirable to ~ess certain char1V'ten 'AB'+'CI)' would print ABCD, or flRINT A$;2*2.BS 360 II' TT . . 27. GOTO 371
within a string by specifying the startang anti "Itoppinp: "iIQuld print A$, then immedjH~ly pnnt 4, then tab the string Bllpplement wil1 also be made avadabie for 365 TX • 43.93 + '8.26*'TT-248»
pOJitions U1 tha.t strmp:, ThiB capability is know as to the- next r.olumn wd print B$. 368 RETURN
a('t~g a subrtnnp:, To /lCC'-""6 J chataete!1l swtinl( purchliSe 370 IF TT . . 346 GOTO 38e
the N'th ehar&:ter in a string AS the fannAt would 375 TX • 54.87 • '0,3'_(TT-27'»
be: A.${:l'\;J). where 1\ and J couJd hf:! any expres· STRING INPUT 378 RETURN
sions.. For example. if A$ cont3jnoo "ABCDE" then JII' TX • 74017 • '0.36*(TT-346»
A$i:1;4) would yiflld "ABeD." A strinp: Ill11lY ·could Strings or strin~ can be input Ul!tng me J115 RETtll!N
aiso be substrine-Pli: B$(4:2;3i which w(JUltl yield tilt 410 11 • GP - ntH.lil.i&'
second thro\4th fourth charac:tem of the fourth ele- I~"PC'T .tatement in normal fashIon, For ~5 II' TT ••••• GOTO 415
ment 01 8$, If the !lellli~()!t)j) and expre8S:ion foJ\(lw. 41. IF TT •• Ill! GOTO 420
mil" it were omit~d, thl:.' rej!;ult would ~ 1111 the char- example: INPU'I'AS,BS(31.X wouid printll 'f and pk 4H TX • e
a.cten to the right of tincluding) th.. S'th character. 418 RETURN
Thus, A${ :3) will ~ault ~n "CDE." Subscripted for the string value- of AS, then when the CR was 420 IF TT . . '6 GOTO 430
strings are bmdled m a s1ffiil~ ta,hion: 8$(5;3) 425 TX • (0017.'TT-48»
would res.ult in all citantcters to the right of the cntered, would print another? .and ..sk for B$(3), PREMIUMS FOR YO!:R PROGRAM 428 RETURN
s.ecund character of the fifth t'lemtnt of B.$ bemg 430 11 TT .. 173 0010 440
specified. and 1.b~!"I would fin~ly Input N in the of>rmaj fashion 1f you bave- developed your own original. program ~5 TX • 8.16 + ('.2e.(TT~'6»
to perfonn taSks that may l~ of interest to other 438 RETUlIN
CHR$ FUNCTIOr; 1\0t.1:' that this. featur~ rept"ces tilt' old auiornatk SCELBAL UHtS, GhWlC~ are you are In a pOSition to ..... I f TT •• 264 OOTO 450
make II(UfH-' money, Onginal programs that we l\::cept 445TX' 23.56 + ,e.17.'TT*173»
The CHR$ function II u/iAd to genenn.e R single conversion of ASCn input usmg the S. for pUblication in SCELBAL UPDA'rE enm th(' 4411 RETURN
cha~cU:!r IItrinlt by COliverlinl( the decimal value of ita author ao hQnrmuium check and a hand!lOme ~r· 450 I, TT . . 346 OOTO 468
al1f1.illU!'nt to ASCII. For example. CHR$ (193) would STRING COMPAltlSON Uficate, We are particularly .fiU;1\".MtOO in progrBMs 455 TX • 3,.e3 + '8.25-'TT-264»
result in the stnng "A." This 5trin$ function repJaces that may be of value to $Cleo-tilts, engm8em, and 458 RETURN
the oW CHR function. Stnnp: expreuions can be t:ompar-w! using the busin"li8lllffii. Prognms that solve commonly eneoun- 468 II' TT . . 433 GOTO 47e
tered fonnula£ in varioUS di.8ciplinet for example. 465 TX • 59.53 • '0.211_'TT-346»
normal comparison o~aton; aucl! as "',<,>,>",<''', Plc.ue .end your $\1bfTlluioTUI to; 468 RETURN
478 II' 'l'T . . SIlIl GOTO 4S1
or <:,:>. If the condition is ut\uied, a value of 1.0 is SCEJ..DAL UPDATE EDITOR 475 TX • 83.8' + '8.32*'TT-"33»
t~urned as a numeric t/':!fI'llJt, and 0 is- returned othl'!r- SCELBI C. C, INC. 471 RETlllUI
wise. The comp3tlson goe,. charat:.~ter by cha.rfWter l1li8 TX • 185,33 + <8.36*'TT-5"»
until unequal ehanct.f'.ts l\I'l!! lound, or until aU of Ute 1322 R.e$,r - Bostoo- POlt Road 485 RETURN
cha.ract;.ars in the abo1i.eat string have been tested. In Milford, c'l' 06460
the fanner .t'.a&e. the t,e:a:t complll'lBOn 'is made between
the two unequal chll,qiCl6rs. and in the latter, tht'
iengUl is USfWi JlIl th~ deciding factor.
The string literal i& just hke the old te..t in a TRANSLATION FROM OTHERSASlC'S
PRINT statement: either Aingle or double quOte8 en- Prugranls writtEn for ou,1'Jr BASIC', ClUl proh.hiy
closing the charac~n that form the 8tring. ~'or be tnH'lalaU!d to ScBLBAL with atrings u follows:
example. '''l'HIS STRING" or 'ABeD $ 44.'
ItIGHT$(A$,N) beoom.. A$( :N)
LEFTS(A$,N) become, A$(:l;N)
MID$(A$;N ,J) become, A$(:N >l)
1
III 0111 C(2) R 1515 11' 1_217 OOTO 2" IIIIICR CAlI (1-">'1"
2111 pRlltT 'IIKICII CAlI (1- •. " , 1$81 EI'ID
2U INpllT C(I) o 1M. . . . C(I)OI aoTO 16115 IIIIICII COURSE (1-5>? I
IM5 ....5
241' CloINT(CII» A 1611 11-.53 PRESENT VELOCITY - . NO. 0 .. ~ONS - •• 5••••••
RD 161S sot. NO. 0" IIIL~S - . TINE PASSED - • SECONDS.
au 11' CII »4 GOTO all. VllAT IS TOUR NEV I'tATII: OF GASH
I 62' Rt'l'URII
2M I" C(I)el &OTO 11111 1625 11' C(I )02 SOTO 1651 ROAD COIIDITIONS. CLEAR AND STRAIGHT.
117. GOTO 3•• 163' II-M PRESENT VELOCITY - 48 •• 110. Or.GALLONS - .... 783999
28' PRINT 'INVALID OAR TYPE. NEV CAR" 163511-.5 NO. 0 .. IIIl.ES - •• 1"'3418 TIllE PAUED - I ••• SECONDS.
291 GOTO 23. 16... S-13 IIUIT IS TOl!!! Nn RATE 0' GA"6
3,. PRINT
351 PRINT 'IIKICII COl!!!SE (1-5)" 1645 Rlt'l'tlRN ROAD GONDITJONS. ~INSI CURYE AHEAD!
3M INptIT CIt) 165. I ' C{ 1)03 OOTO 1675
37. C(l)oINT(C{t» PRESENT VELOCITY - 77•• NO. O'.~ONS - ....561999
NO. 0" MILES - •• 1717391 TIME PASSID - Ill•• SECONDS.
31. I l' C(2)~1 IOT.O "I' A 1655 e-7I VllAT IS TOUR NEV RATE 0" GAS1-2
1661 11-.,,1
39. I" C{II»5 IOTO " " 1665 SoU ROAD CONDITIONS. TRROUGH CURVl;.
.... &OTO U. I 678 RItTURN
"I' PRIIT 'INVALID COl!!!SE N!lIIBI!R. NEV CHOICE" PRESENT VELOCITY - 3'.' NO. 0' 6A!.LONS - .... 567999
110. O".IIILES - •• 3369565 TillE PA!!ID - 3•• ' SECONDS.
"at IOTO 368 1675 B-" VllAT IS TOUR NEV RATE 0' GASH
51' &OSUB I M' 161511_.39
51' B-B/I. ROAD CONDITIONS. VEHICLE AREAD 51. rEIT.
53' 11.1-.5 1691 5-18
PRESENT VELOCITY - 66•• NO. 0" GALLONS - '.4351999
5'" HI" CE ""1It95 RItT!IIUI NO. O".IIILES . . . . .8.4347 TIME PASSED - ..... SE;CONDS.
55. CO )-C(I )/2 IIKAT IS YOUR NEV RATE 0" GASH!
561 V-' ROAD CONDITIONS. VEHICLE PASSED IIY 31 •• MPH.
57. PRINT PRESENT VELOCITY - 12 •• NO. 0'. GALLONS - •• "2',999
NO. 0 .. IIILES - '.63t9564 TIllE PASSED - , •• , SECONDS·
58. RI-' WHAT IS TOUR NEV RATIO .. GAS?3
591 T_,
ROAD CONDITIONS. IlEHICLI AHEAD H. rEET.
61. 000.
PRESENT V~OCITY - 61 •• NO. O".GALLONS - .....99999
61. QI-' .-' NO. 0" IIILES - •• T826186 TIllE PASSED - 61.' SECONDS.
62. PRINT 'PRESENT \/II.OCITT -', VI' NO, 0 .. 6A!.LONS ·'tAl VllAT IS TOUR !lEV RATE 0 .. GAS?"
63. pRIIIT 'NO. 0" HILES -'lint· TIllE PASSED -'IT" SECOlfDS.' ROAD CONDITIONS. 1Ii:HICLE PASSED lIT 28 •• IIPH.
64' I" 111>-5 GOTO 1461 PRIESENT 1lEL0CITY - 72.1 110. or 6A!.LONS - •• 3955999
NO. 0 .. IIILIES - •• 93913.3 TIME PASSED - T•• ' SECONDS.
65. PRI"'T 'IIIIAT IS TOtIR NEil RATE 0 .. GAS" WHAT IS YOIlR N~V RATE 0" GAS73
661 INPUT II PROGRAM WAS ADAP,ED •
671 I" 0<-11 410TO TI. K SCELBAL BY MAKING
68. 11' G>II 110'1'0 TIl MINOR CHANGES AND EliMINAclNG •
FEW REMARKS STAfEMENTS •
69' 80'1'0 12. ESSENCE OF THOSe STATEMENTS
TIl PRINT 'NOT VALID. IIItV RATE" PRESFNTED HERE •
71' GOTO 661 •
72. I .. 0<9 TIIEN TS.
PRESENT VELOGITT - 79.. MO. or 6A!.LOHS - •• 1831998
131 z,-%+ I "HOADRACC" PJTS THE PLAYER NO. 0" IIILES - 3.395648 TIllE PASSED - 281 •• SECOIiDS.
cHE DRIVER'S SEAT OF A CAR VllAT IS YOtIR NEVRATE 0' GAS? ..
7U I" t>4 TIIEN 761 CHOICE SELECTED FROM THE
751 IOTO 79. ING POSSIBILITIES. ROAD CONDITIO~" VEHICLE AHEAD 5•• '~ET.
'M PRINT 'TOtIR mOillE III..EV. YOU lOT Hlf 11'1' A PISTON.' 1 - vw PRESEI'IT VELOCITY - 81.. NO. or 6A!.LONS - •• 1687998
NO. 0' NILE! • 3.569561 TIME PASSED - 29 •• ' SECONDS.
" . GOTO 1117. 2 . 283 NOVA VIIAT IS YOUR NEV RATE or GASH
TS. to. 3 - Z 28
79..... lIfT( lIoG-H"V+V) FERRARI ROAD CONDITIONS. WHICLE PASSED BT 2(••• IIPH.
811 T-T+18 THE SELi'CTED CAR IS TO BE DRIVEN PRESENT VELOCITY - 8••• NO. or·GALLOIIS - •• 15..3998
ALONG A HICHWAY CHOSEN BY Tf'E liD. 0' NILES - 3.7'13'175 TIME PASSED - 311 •• SECONDS.
811 PRINT PLAYE~ WHIC'" IS RANKED IN DIFrl VllAT 15 YOUR NEV RATE or GAS, ..
C~LTv FROM I !EASY) 10 5 iQUtCE
"'......V>.82. PRINT 'ROAD CONDITIONS." DIFF'CULT)' THE DEGREE OF DIFFI· ROAD CO~D1TIOIIS' III!HICLE AREAD 'III rEET.
83. 11' OOTO 858 CIJLTY RELATES TD THE NUMBER Of
CURVES AND OTHER HAZARDS THAT PRESENT VELOCITY - 81.' NO. 0 .. 6A!.LOIIS - •• 1399998
851 HI_HI+W .. 61 ~AY BE E"'COUNTERED ON THE ORIVE 110. 0 .. MILlS - 3.917387 TIllE PASSED - 31'.' SECONDS.
IIUIT IS TOUR NEV RATE 0" GAS'.
861 I" 0<. OOTO 89.
871 AloAI-{ 90S) 15811 ROAD CONDITIONS. VEHICLE PASSED BT 33.' IIPH.
881 I" 11.1<1 OOTO 138. PRESEI'IT VELOCITY - 81.' 110. 0" GALLOIlS - . . . 255998
NO. 0 .. IIILES - •• '913 TIKE PASSED - 311••• SECONDS.
898 I .. RI-I OOTO 1'58 VllAT IS TOUR NEV RATE 0" lIAS, I'
911 I ' QI-I OOTO 98. ROA!) CONDIT I ON5. CLEAR AND STRAIaRT.
911 Q-INT{{C{II)+I)"RND{I»
PRES!lfT VELOCITY - 128 •• 110. o,QALLOTIS - '.89S99B£-81
921 R-INTH3.75-C(2»"RND{I» THE PLAYER MUS·) SUCCESSFULLY NO. 0" IULES - ".369561 TINE PASSED - 33••• 5lECOIIDS.
NEt;OTIATE FIVE MI LES OF TREACH- IIKAT IS TOUR TlEV·RATE 0 .. -.571.,.
93. I ' R>' GOTO 129. OROUS ROAD WHILE BEING LIMITED
'''I I .. Q>' &OTO 13... TO A GALLON OF GAS. THE PLAYER ROAD CONDITIONS. 1II:RICLE ARbD 518 "UT.
95. PRINT' CLEAR AND STIIAIGHT.·
961 PRINT OF AN "ACCELORATOR" PRESENT VELOCITY - 158 •• NO. 0 .. &ALLONS - '.535998"£-11
971 GOTO 621 UP OR SLOW DOWN THE PRO- NO. 0 .. !IlLES - ".713839 TillE PASSED - 341.1 SECONDS.
9!!' H-INT<15+35.RND(.» VllAT IS TOl!!! NEV RATE 0" GAS,.
9S1'1 tt-H+S.C( I) THE CAR NATURALLY. A
CAN FASTER lAND STICKS ROAD CONDITIONS. VEHICLE PASSED BY 52 •• IIPH.
I.·. . I ' V>H GOTO 158'
III. PHINT • THROUGH Cl!I!1/i:.' fHAN A VW. PllIESENT VELOCITY· 96.' 110. OF GALLONS - e.535998U-'1
11112. PRINT GUZZLES 110. 0" IIILES - 4.921734 TIME PASSED - 35••• SECONDS.
IIIAT IS YOUR NEV RATE 0" GAS,.
1838 QI-'
ROAD CONDITIONS. CLEAR AND STRAIGIIT.
I.... IOTO 62.
PIIES!lfT VELOCITY - $8 •• NO. OF GALLONS - '.535998"E-81
11·51 boE-(V-DH'3 NO. 0' IIILS! - 5 ••4782' TillE PASSED - 361.' SECONDS.
IIl61 I" E<. GOTO 11111 YOU NADlE IT (LUCK) 1111
YOII VANT TO TRY IT AIlAIII? N
III" PRIIIT • lImICLE'JEJ' rEE T ANEAI)"
I.se PRINT
leu GOTO 621
1111 , .. 11-D<5 THIiN 118e
Ill' PRIIiT • VUfICLE PASSED BY'J
1121 o-II-D
1131 PRINT DJ' "PM."
115. PRINT
1161 JU-' HAZARDS ALONG THE DRIVE
II TI GOTO 621 RANDOMLY SO NO TWO GAMES
1181 PRINT • VI!)IICL!: BEIIU PASSED.' ALIKE FRANKLY. THIS GAME
TO REMAIN FUN
119. 0-!NT(25+"'.RND('» THAN A LOT OF THE
121' PRINT 'G1IAYNOUND IIUS Iff OTIIER LAIIE DOING'HI' IIPH.' ONE SEEMS TO
DAvS
12... o-V+D
12st PRINT 'CRASH VELOCITY .tIDI' MPH .. '
12 TI PRINT '111ItIIE IS THE P"UNERAl. BEING HII.II'I '
1288 GOTO 1561 HAVE FU~'
1291 l'RIIiT • VI!)IICLE AREAD 5111 rEET.·
1311 PRINT
131. .,. IIIT(2 5+35*RNDII»
1321 RI-I
133. &OTO 62. ROADRACEPROGRAM
13'" PRIIiT • VAMINGI CUNY!: AHEADI •
135. QI-I
1361 PRINT
131. OOTO 6111 ORIGINAL AI;'rHORc UNKNOWt>
138. PRINT ·Dl:CEU.1tNT1 BUT 'lrA1T . . . . TOU RAN OUT 0 .. liAS.'
141. GaTO 155.
1428 PRINT 'BUT SOME HOW '1'011 IlADE ITI' THE PROGltAM ~\l.ESF.N'l'ElJ HER£. lS
1431 PRINT
AN ADAPTA'l'lON FOR SCELBAL OF A
1.... RI-" PROGRAM THA'!' WAS MODU'lED BY
145. GOTO 62. BILL CO'J'TER OF P)'I'TSF1ELD. MASS.,
1461 1:'RINT AND IS Rji;pRINTED HERE WITH THE
1<l78 PRllfT
UBI PRIIIT 'YOU !tADE IT (LUCK) III t • PERMISSION m' TIlE COPYklGHT
1491 90TO 1561 OWNER POlt WHICH WE EXTEND
15•• PRINT' ARE TERRIBLE.' OUR TH~"KS ON BEHALF OF O[;R
1511 "-H- 5"C{ I)
READERS.
1521 PRIMT II" VAS TIlE SPEED THROUGH THE CUNVE.·
1531 PRINT VJ' V AS TOUN SPEED. BY THE VAT ...... COPyltlGHT 1976
154' GOTO 197'
155. PRINT 'YOU LEAD roOTED I DIOT II '
156111 PRINT 'YOU VAHT TO 1'RT IT AGAIII? " CRU'lWE OOMPU'flNG
157. INPl1T II
1572 PRINT
1573 PRINT
2
10 DIM A(S) PATCH3 atmply consist of the JQUOWlng &equence:
15 f('1! X-I TO 5
20 I.£T IHlO -SQROO PATCH3, LLI 201 Pntr to A/V storage I.,IST
2S PRI"1' X;,,(X> LAl027 •• Pntr to A/V page 10 OIH ,,(5)
30 "IXT X LMlOOO 15 fOR X-O TO
35 u.~ JMPEXEC CIe",AtVn. 20 I.£T A(X>-S~R(X)
Now go back to Exec 25 PRI"t X;"(X)
1.0 30 "£>\T X
1';414213 The object code for the patch for an 8008 would. 3 5 E.NO
1;"732051 appear JUi.
RIiAOY
2·~·O 11 307 066 201 PATeH3, LLl201
!lUI<
2-. 23606b 11 311 066 027 LHl 027 SQ AT I.I"E 20
RE.aOY 11 313 076000 WI 000 R IiAOY
15 fU); X-- I Tu 11 315 104266 OlD JMP EXEC
12 364 104 307 On JMP PATCH3
RIiADY While the object code for an 8080 wo'QId o
appEliltas:
15 fOil x-a TO 1.0
BUG mUND & EX'tERMINATED 11 307 066201 PATCHS, LLl201 1";414213
RUI< 1";732()51
SQ ..T I..IIIE 20
2-':C
'The bug is cau&ed by a fMlure w reeet the ARRAY! 2-;236U6b
VARIABLES nag (PG 27 we 201) whO!> '" .,,'"
A minor bug hat; been discovered ll.'1d corrected hy n 311 046 027 LH! 027
condition ca\.l.ieS an abnonaal exit. The problfll» is.
the program authors Since no hlWe been ealltly correc~ by addinp; a small patch to uurure 11 313 066 000 LMl 000 IUAIl\'
that the ARRAY IVARIABLES !lag 11 alwayl! reset
received by SCF~tBAL users it ia that tile after an error meMge ia dill-played. A flult.clhle p~td1 11 316 303 266 010 JMP EXEC
may be inst.alloo beginnins at PO 11 LOC 307 after
bUg wt\S in the kttent atage! The bug would appear chaneing the infitJ'UcUon at PG 12 LOC 3&4 from: 12354 303 307 011 JMPPATCH3
under the ronditlOnf. illustrated here when an euor JMPEXEC
condl\ton oCcured m a FORINEXT loop. Once an JMPPATCH3 Usem m.y d~ to pute thl$ pat.ch nottre mto one
of the NOTES page$ .t the back of their copies 01
errol' m~,e was generated, thp interpreter would
sc:ELBAL. or to copy thia information mto tbetr
COntmUe to dlsplay an r.n'or tnElQ!ilIJi\1' even after the Tha actua.l print-out below illustrates how the bug is boob for I&&fekeeping.
elinUnated by the above patch. The tirst tUne the
error producing fault had been remcwoo from the
program 1s execuutd after the patch i. inatalled the
high level pro~um. 'Ill is only ottW'OO wh en error condition is dispiayed ~ the A/V lIag haa
vanabl(" WlUl used m the loop. An example- of .stW not been raaet. HbWf!\!'er. the execuoon ot the
problem u iliusLrIltt:d frnm an actual print-out pt\!. pakh <Ill... the ARRAY IVARlABLES llai to be
sented below. Note that even after the %'8ll(I:e of X properly ft!Set and thereafter thB progtlW) exeeUf.er;
properly.
is chl'Ul@ed {rom an tn'V8,Ud 8xgtmU'!1nt for a lIQum
fooL operllLiun (·I} to II valid argument (0) that the
"SQ" error mel>l:i~~(~ continues to he lil~lH!11lted.
Getting MoN' FOR your ~"EXT! ADDR 8008 8080 MNEMONICS ADDR 8008 8080 MNEMONICS
Sometimes It IS desirable to be able to Jump to 8 new level 030 013 066 1 lUI 056 ,"4 NI;XT. 1.1..1 I .... 030 17.. 036 026 026 026 1.1l1 026
of a nested FOR/NEXT IO(1p before a loop has been com· 016 000 066 000 030 116 046 000 036 000 l.E.l 000
plewa. In the onginal version of SCBLBAL a dl.reet attempt 030 015 066 202 056 202 1.111 000 030 1100 106 046 012 315 046 012 cAe. HOVI.~
to do 110 will :rcswt in an error IDe!l.ll.age, An lmprovl!ment to 030 017 317 106 1..1..1 202 030 203 066 3SS 056 325 0:.1 325
SCEl.BAL it> ple~nted her~ that will allow the interpreter to 030 021 010 00.. 030 205 056 001 0 ..6 001 1.1<1 001
jump to II neW level in a lu!!nes of nt'$ted FOR/NEXT lOOplS 061 055 1..118 030 201 106 012 013 315 0111 013 CAt:. IHSTR
without cfiUsinfl l,ln enol' m~SMle. Thjji 1M aceompliahed by 030 022 371 160 1..8 030 212 304 113 .(.Ai.
tnsertmjO! a few instructions l\1 Lh.. origil\!ll NEX'f' statement 1)(;1.. 030 213 UO 11... 7
routme. The instructions that DIe inserted ~uae the entire 030 023 066 201 056 201 1.IIB 030 214 150 126 030 312 126 030 .N1liI
contents of the FOR/NEXT software stack to be 030 02.. 106 240 002 315 2 ..0 002 030 217 00 ... 002 306 002 "T1- FO~XT
for 81 variablt!" name indicated in A NE2(T staU!tntnt ISO 042 030 312 042 030 I 030 221 066 276 056 276 AIll 002
of .tmply Uamllllng the top·rnos.t variable rultne .as Wa& the 030 025 066 I ..... 086 1...4 030 223 056 026 0 ..6 02«>
case in the origmal venio'tlt :\'ow. an f!rmt condition 030 025 106- 31 .. 002 31531 .. 002 MI;XTl, 1..1..1 201 030 225 370 167 u.! 276
meMsge will nM he (H5Piayed unlH6 the 030 027 CAl.. G&TCHft 030 226 066 330 056 330
not pre!UJnt fUlywh~re In the 031) 032 066 201 056 201 Jtz .Nl;Xt2 056 001 0 ..6 001 I..bl 026
It Willi displayed if the &'p@cified v~~ble -wat; nnt m 106 003 003 315 003 003 1..1..1 144 030 230 106 012 013 31$ 012 013 utli
posioon of the FOR/NEXT stack.! 111111. 030 035 110 025 030 302 025 030 CAl. COIoCT I 030 232 30" 173 1..1..1 330
m FORINEXT st.Rtement execution la 030 037 066 1"'4 056 14.. I 030 235 2 ..0 247
110n {or Improved pe'dormance. It 307 176 "i.XT2, 1..1..1 201 030 236 110 302 030 302 302 030 1..1<1 001
pro(i:rlim. If you do not de.&ite 030 042 074 001 376 00 I CAl. 1.00P 030 237 066 004 056 004 \JI(. U,STR
tJ1t)e addmg it to yOur version. 030 042 110 066 030 302 066 030 Jtz ..I;XTI 030 242 056 00 I 046 001 (.A£
030 0 .... 066 146 056 1"6 030 244 106 244 022 315 2104 022 .. 1lA
TnI' upgradl.n~ may 00 accomptiAhoo 030 047 076 000 066 000 1..1..1 1"4 030 246 066 304 05t> 304 JYt Iwi.XT5
030 0$2 WIIi 106 255 0122 315 255 022 1..'1 0~4
niques by &imply UlieftJnlo! the ins.truetlons 066 205 056 a05 el'l 001 030 251 361 160 I..bl 001
030 05.. 056 027 0..6 027 .l1t .NI;XT3 030 253 056 026 046 026 CAL. YI.()AIl
ils.terisn m the ~comvan:YIDg listing between 030 055 307 176 UI 146 030 256 317 106
002 007 Wli 000 030 257 066 277 056 217 0:.1 30..
JTZ NEl(T4 and l'ORNXT, LAI 306 (II... 22 And 23) of lIIe 030 057 002 007 030 261 371 160 CAl. 1$TORI.
030 062 004 136 306 136 I 106 224 003 315 224 003
030 06.. 360 157 030 262 066 310 056 310 Us
036 026 026 02t> HiXTJ" 1.1.1 205 030 264 0.116 001 046 001
030 06-6 0116 14S 036 1..5 I..bl 027 030 265 106 255 022 315 2.115 02 .. Ull 026
030 066 016 002 006 002 Wilt 104 353 030 303 353 030 I.Iii1
106 370 002 315370 002 030 270 1..1..1 277
SOurCE hliltng un p~ 36 m chapter &ix Or, the entire block 030 070 ISO 135 030 312 13.11 030 111..1: 030 272 041 035
030 072 111..(; 030 274 066 277 056 277 U...I.&.. I.y....
of code from address PG 30 LOC 013 to PG 31 LOG 004 030 073 06«> 205 056 20.11 OS6 026 0 ..6 026
056 027 046 027 AIl1 136 030 277 374 163 0:.1 310
may be aitkred al> prnsented het\!, The h\t~r :method con- 030 07" 317 106 I..I..A 030 302 106 22" OO~ 315 224 003 1..b1 001
030 075 011 005 1..01 026 030 302 066 310 056 310 ~At:. 'STORI.
forms to the rUit"K ptt'lWnt.ed in the article "MODlJo'lEU 371 160 030 303 056 001 0 ..6 001 JI1P "i.lCT~
030 on 110 066 030 302 066 030 1..1.1 145 030 305 106 2SS 022 315 2SS 022
SCELBAL" winch apPQred in Issue 02 of this bulletin. The 030 307 066 277 056 277 I
030 100 006 306 076 306 I.IlI 002 030 310 056 026 0 ..60ll6
aqueezin~ m o{ the instruction. to conform to those 030 102 026 316 016 316 cAe. STRCPC 030 313 307 176 IiIEXT5. u~E.
104 226 002 303 226 002 030 315 00.. 005 306 OOS 1.1.1 277
hnes WM Utx:ompillih~l by removlt\l 5eVerai '1..Hl In- 030 104 ,J.tz..I.<.1;.X.T.4..... 030 317 061 055
030 106 066 360 056 360 030 322 370 167 I..bl 026
structiOnS after CAreful analysls of t))e orlF.inal coding And in. 030 III 056 026 046 026 030 324 066 000 056 000
030 114 337 126 317 106 ud"
vokinj.t swerai otber nwmOTY !J.liVin~ mJlt.ru(;tion repbtCf.'rtt~f\t~ 030 114 060 054 030 326 066 277 056 217 ~AL EVAI.
030 116 3 .. 7 136 030 327 371 160
at pOInts d6u1Wd: by tm'ow61n th~ moditl~ lintlng. 030 120 060 054 1..1..1 205 030 331 106 22.. 003 315 22.. 003 UI 310
030 121 373 162 Wli 027 030 332 066 30'1 056 304
A short f'-JUU'rlple pro"ided below illustrates ttl.; effect of 030 122 060 05.. I.Iii1 030 333 056 001 046001 Wli 001
the unproved capabilIty. ~otf! that wheT! st,aremant line 20 030 123 163 030 335 106 255 022 315 255 022 CAL YstORi;
18 added to lht· p~rw:n, the originoo Vt1t!dbn of SGELBAL 030 126 37'" 056 205 .............uDuel.i 030 336
biluked an error mel>6age to be du.plnyed. The tlJULl lttJl'\ 066 a05 066 144 056 14" Ul 277
illustrat.es how the program exf'eute~ when the modifi(~a.tion 030 126 OSO 04'" ,J,Z IwI;XT3 030 3"10 056 026 0'16 026
030 130 307 171> FOIUIXT. I..Al 306 030 3 ..1 371 160 uil 026
is mstaUf':d. 030 132 002 007 030 344 066 034 056 034 l.Al1
030 135 002 007 loCI 316 050 ADI ODS
OS PRl1<T 05 PRINT 030 135 00'1 13.. 306 134 Jill' U\l!OR 030 3'16 106 012 013 04'" IlC!.
10 FOR X-I Tu 3 030 137 360 157 030 350 30'1 315012 013 UlA
15 fOR yo I TO ;I 10 FOR X-I to 3 030 141 337 126 I 030 3::13 2"10 173 I..i..l 000
25 PR1HT Xl 15 fUR Y-I TO 3 030 142 060 054 030 353 066 202 2'17
30 PRINT TAI;'.)IY 20 U Y>2 GOTO 40 030 1"3 3.. 7 136 ,f.;EXTla, 1.1.1 360 030 355 1.1i1t
35 .. LXT Y 25 PRINT Xl 030 144 066 360 OS6 360 Wil 026 030 357 OS6 026 056 202
30 PRINT TAB(a)j Y 051 045 I.r.t 370 046 026 I..W 217
40 NEXT X 35 I<&I(T Y 030 US 373 162 030 360 ISO 126 030 167 1.1(&
030 146 060 1111.. 030 362 00 ... 003 312 126 030
45 £1<0 ...0 "EXT X 030 14T 37'1 OS" J:.i>< 030 363 066 203 306 003 CAl.. f.VAI.
45 LNO 030 ISO 353 163 1111.. 030 366 3'10 056 a03 t.i:.l 304
030 152 36'1 1'12 £IIll 030 367 167 I..bl 001
READY 030 153 153 1..1. 030 310 CiiL FSTORl:.
030 154 }
RIiAOY 030 155 £11£ 030 378
030 1S6 030 37" liI!EATf)" 1..1..1 144
!lUI< 030 160 1..1..1 205 030 375 I..bl 026
030 161 II<;' 031 000 1.111,
030 162 031 002
030 163 £.AM I..i..I 034
030 164 031 00"
RUN 030 166 RRiL.Ce Ilill
030 167
1.0 1.0 AIlI 13.. tAL 11<5TR
030 170 .(.Ai;
1'.0 2.0 1.0 1.0 030 171 !.I.A
1.0 2.0 IwIlA
1-.0 3'.0 FI< AT I.ltH" 40 030 172 1.1ltl
030 173 1.<.1 202
2.0 1".0 11<1. u.1 026
LilA
2.0 2.0 J:.LK
~U '01Uil< T
2~0 3.0 RUN LLI 360 401 003
ocll 0:.1 a03
:1.0 1.0
1.IID I.IIA
3.0 2.0 1.0 1.0
3'.0 3".0 1.0 2~O
READY 2.0 1.0 lli1..
Un;
2.0 2.0
20 IF Y:»2 GOTO "10 3·0 1.0 !.JiD
3.0 11';0 u,1.
3
SCELBAL ©ISSUE 04 1/77
UPDATE
Copyright 1977
SCELBI C.C., INC.
SCELBAL II. . . . . . .1
Letters . . . . . . . . . .2
Twenty Variables . . . 3
String Functions Now .. 3
Math Functions Soon ... 3
SCELBAL II upgrading the fundamental con- became more sophisticated in nal publication will initially reo
UNDER DEVELOPMENT cepts and routines from that their demands for program per- main as the prime reference.
point to take advantage of the formance, SCELBAL could be Preliminary indications are that
As SCELBAL owners know, increased power of instruction upgraded. Since the entire fun- the 8080 custom ized version,
SCELBAL was developed pri- sets available on more advanced damental organization and logic with DIMension capability, will
marily for 8008 system owners. CPUs would be a pretty straight- of the interpreter had been pre- reside in about 5K of memory
There were several reasons for forward task. sented, users would not be (without using page zero). A few
doing so. First, when SCELBI forced to wait for such advances minor operating improvements
COMPUTER CONSULTING, Additionally, we of course to come from SCELBI if they (such as increasing the number
INC., first went into business, knew that an interpreter written had the desire and capabilities to of variable names allowed) are
it produced a microcomputer for an 8008 could be directly proceed on their own! planned. The possibiJitiesslor the
based on the 8008 CPU. A assembled to operate on an 8080 inclusion of other features re-
number of those systems are even if it was not "efficient" in Naturall y, many users 0 f mains open at this point pending
still out in the field and many making use of that CPU's capa- SCELBAL do not wish to be- feedback from users. (By :this it
owners had indicated a desire bilities. This meant though, that come involved with the intimate is meant operating improve-
to have the capabilities of a many users who were planning details of the interpreter's opera- ments. The addition of extend~d
high level program available. on eventually upgrading their tion. They just want to be able functionsf.such as siJ;les, cosines,
We no longer manufacture personal systems from an 8008 to use the end result. Fine. exponents, string handling capa-
microcomputer systems, but to an 8080, with the existence SCELBI intends to continue to bilities and so forth constitu te
we felt an obligation towards of SCELBAL, could do so with- improve the program as weIl as not merely improvements, but
those who had helped us pioneer out having to modify a single to provide the language for other actually the creation of addition-
in the field of the personal one of their SCELBAL higher types of microcomputers when al features. More has and will be
computer. level programs! it appears that there is a market said about such matters in other
sufficient enough to justify the articles. )
Second, in addition to those Finally, it was felt that pre- expense. It is hoped that by list-
8008 microcomputer systems senting SCELBAL in detail, with ening to the thoughts of many How long before SCELBAL II
sold by SCELBI, there were complete source listings, flow other users, and by providing an will be released? Probably
several thousand similar sys- charts, etc., for the primitive opportunity for others to com- another five or six months. We
tems (8008 based) known to be 8008 CPU, in the manner in municate their needs, the overall want to provide time for plenty
in existence produced by other which it was done (not using any quality and capability of SCEL- of feedback from users to try
early microcomputer system of page zero, not trying fancy BAL can be improved. Indeed, and catch any gremlins 'tr add
manufacturers along with packing tricks, etc.) would result there is no end in sight to the needed improvements. Register-
numerous personal systems in an information source which potential. The limiting factor, ed SCELBAL owners will be
based on the MARK-8 article U.!lers could have fun with! One as in most endeavors, is time and notified when SCELBAL II is
that appeared in RADIO can pick almost any section one money. available. Chances are, you will
ELECTRONICS magazine some might be interested in and find hear more about its development
two years ago. Many of these ways to improve it by using Even as the first copy of in these pages as it progresses.
people had written to us indi- better coding techniques, etc. SCELBAL was published, work
cating that they felt the rapid 8080 owners, as pointed out in was underway to produce a In the meantime, if your in-
growth of the acceptance of the chapter fifteen, could go to revised version that would capi· terested (even anxious?) to work
8080 and other more advanced work with vigor on compacting talize on the increased power of on such a project yourself, the
CPUs, and the attention they the program if they so desired. the 8080 instruction set (over following information may help
were getting, would leave the (The key here is that those up- that of the 8008). Work is pro- you get off to a smooth start.
early 8008 users high and dry grading from an 8008 to an ceeding smoothly. Feedback Reversing the storage format for
without ever having a high level 8080 do NOT have to modify from SCELBAL customers who three critical double-byte values
language developed for it. the interpreter to increase its are 8080 system owners indicate used in SCELBAL will enable
efficiency if they are not interes- they are highly interested in one to capitalize on using a num-
Third, we felt that developing ted in doing so!) such a revised package. ber of the 8080 double-byte
such an interpreter for a micro manipulating instructions. These
CPU as primitive as the 8008 is More than all those factors Essentially, the revised version storage locations are all on page
now considered, instead of being combined, however, SCELBAL titled SCELBAL II will simply 26 (octal). They are the loca-
a waste of time (as apparently was developed with the inten- be a compressed version of the tions used to hold the User
tion that it become an ever-evol- original program. It will remain Program Line Pointer (360 &
everyone else thought it would), ving program. As new machine organized in essentially the same 361), the Auxiliary Program
types became available, SCEL- manner, using the same subrout· Buffer Pointer (362 & 363) and
would be a valuable experience. BAL could be adapted. As users ine names etc., so that the origi- the End Of Buffer Pointer (364
After all, if it could be accom-
plished for such a primitive CPU,
1
and 365). Values placed in these CHANGES AFFEG'TING LETTERS fool the syntax error-checking
locations in the original SCEL- USER PGM LINE POINTER routines, an "equal" sign or a
BAL version are in the order of (PAGE 26 LOCS 360/361) don't know how many left hand parenthesis is entered
PAGE ADDRESS followed by people might be interested in the following the statement number.
LOW ADDRESS. Reversing the ADDR CONTS following modification for The modified program can still
order to LOW ADDRESS fol- SCELBAL but it is very useful be used for its original purpose,
lowed by PAGE ADDRESS 15255 000 to me and saves much time com- but it will be necessary to enter
makes it possible to use 8080 in- 15260 033 pared with doing the same thing a statement number by itself to
structions such as "SHLD" when 15330 146 without a computer. remove a line. The purist can
manipulating data for those loca- 15331 151 maintain two versions of this
tions etc. 15362 136 From time to time I find it portion of SCELBAL.
15364 126 desirable to rearrange a table of
These locations are referred to data so that the lines are arrayed One advantage of this method
at numerous points throughout 16000 163 in numerical order from top to is the large buffer space avail-
SCELBAL. The following lists 16002 162 bottom. One way to do this is to able. Another advantage is that
all the points known to us at the 16252 136 use the SCELBAL program the data is easily stored by using
time of this writing and indicates 16254 126 entry routines, entering the the SAVE command.
the new contents of those loca- 16341 163 other columns as statement text.
tions if one wants to set things 16343 162 This works fine except when Mr. S.J. Toy
up so that the LOW ADDRESS two or more lines have the same Chico, CA
value is followed by the PAGE 17211 136 number. One way to overcome
ADDRESS in those storage loca- 17 213 126 this is to rearrange the routines (A listing of the modification
tions. It is recommended that in NOTEND so that statements for the 8008 version of SCEL-
these changes ONLY BE 30134 136 with the same number are BAL is provided below. A
INCORPORATED IF THE 30136 126 entered without deleting the sample of the modified program
USER INTENDS TO TINKER 30164 163 earlier statement. The changes in operation was submitted but
WITH CUSTOMIZING THE 30166 162 still allow a statement to be is not shown for space consid-
PROGRAM FOR AN 8080 SyS- deleted, by entering only the erations. It appeared to operate
TEM. There is no other reason 31153 162 statement number. The re- as intended. Looks like a clever
for making the changes if such 31155 163 arranged list is obtained by way in which to utilize the pro-
is not the case! Consequently, entering a LIST command. To gram's built-in editor as a sorting
the revisions are shown only routine! - Ed.)
for the 8080 version with ap-
propriate 8080 codes. CHANGES AFFEG'TING 11 354 006 203 ** LLI203 See if. line no. only
AUX PGM BUFFER POINTER 11 356 056 026 ** LHI026
11 360 307 LAM Line no. only if zero
(PAGE 26 LOCS 362/363) 11 361 240 NDA Remove line
11 362 110005012 JFZ NOSAME
CHANGES AFFEGl'ING ADDR CONTS 11 365 066 360 LLI 360
USER PGM LINE POINTER 11 367 056026 LHI 026
(PAGE 26 LOCS 360/361) 11 371 327 LCM
11 372 060 INL
ADDR CONTS 30140 163 11 373 367 LLM
30142 162 11 374 352 LHC
11132 000 11 375 317 LBM
11135 033 31147 126 11 376 010 INB
11173 000 31151 136 11 377 106 144012 CAL REMOVE
11176 033 12 002 104 266 010 JMP EXEC
11 257 146
11 260 151 CHANGES AFFECTING HEY! WE FORGOT TO TELL YOU......
11 275 146 END OF BUFFER POINTER
11 276 152 The ROAD RACE program presented in ISSUE 03 of SCELBAL
11365 146 (PAGE 26 LOCS 364/365) UPDATE was provided courtesy of CREATIVE COMPUTING! The
11366 151 magazine CREATIVE COMPUTING is published by an enthusiastic
and creative organization headed by David H. Ahl. In addition to
12011 136 ADDR CONTS games such as that presented in ISSUE 03, the magazine regularly
12013 126 presents a variety of articles, book and product reviews, educational
12031 136 11 017 000 material, and a good selection of general information which we feel
12033 126 11 022 033 most of our customers would find highly interesting. Recent issues
12077 136 of the magazine contained 88 pages or more in an 8 1/2 by 11 for-
12101 126 12170 365 mat. Considering the fact that there is relatively little advertising
12115 163 12174 055 space allotted in those 88 plus pages, the amount of text and edi-
12117 162 12201 054 torial material per issue far exceeds most other computer-related
12130 136 12206 365 publications that we have seen of late. Individuals interested in sub-
12132 126 12212 055 scribing to CREATIVE COMPUTING may do so at the following
12265 136 rates. 1 year - $8.00, 3 years - $21.00. If you have any doubts, you
13107 000 12267 126 may obtain a sample copy of a recent issue for $1.50. (The maga-
13112 033 12273 162 zine is published bimonthly.) Subscription orders.may be forwarded
13122 136 12275 163 directly to the publisher:
13124 126
13140 163 16004 365 CREATIVE COMPUTING
13142 162 16012 055 P.O. Box 789-M
13164 146
13165 151 Morristown, NJ 07960
2
OOPS! We strongly recommend be made available for SCELBAL PREMIUMS FOR YOUR
that readers take James sug- users. The new functions, which PROGRAMS
I believe I have found 2 errors gestions and change the two will be made available as a sup'
in SCELBAL which have not bytes indicated to avoid simi- plemental publication, will pro- APPLICATION NOTES
been mentioned in your UP- lar problems in their systems. vide users with the following ARTICLES
DATES. As for you James, your detec· additional capabilities when in- COMMENTS
tive work has earned you an stalled: SIN, COS, EXP(e),
1) 11 030 is 001 should be 000 hororarium check that should LOG(e), and ATN. The SIN and If you have developed your
2) 26 364 is 000 should be 033 buy quite a few stamps in case LOG functions are calculated own original programs to per-
you need to report any similar using Chebyshev optimized Tay- form tasks that may be of in-
In the first case, use of SCR discoveries - which we hope lor series. The EXP and ATN terest to other SCELBAL users,
command causes the first regular you will not! - Ed) are calculated using continued chances are you are in a position
variable location to become un- fractions. The COS function is to pick up a bit of cash! User
available. You are thereafter STRINGS SUPPLEMENT calculated using the SIN func· submitted programs accepted
limited to 19 regular variables. tion. The argument of any func- for publication by SCELBI earn
tion is reduced to an interval an honorarium check and a nice
In the second case, INSERT NOW AVAILABLE where the Taylor series or con- certificate attesting to the
picks up the 000 and uses it as a tinued fractions is reasonably author's performance! We are
high address with results which The Strings Supplement accurate. The argument range particularly interested in pro-
vary but are generally disastrous. to SCELBAL is now avail- for the functions will be as grams that may be of value to
Use of SCR replaces this 000 able. The 68 page booklet follows: scientists, engineers, and small
with 033 and that makes every- (81/2 X 11) may be obtain- businessmen. However, games,
thing fine. ed for $10.00 from the pub- SIN -4194303<X<4194303 and general purpose routines
lisher at the address shown COS -4194303<X<4194303 are frequently accepted.
String variables sound great. below. The booklet pro-
get the feeling that my poor vides the source code and EXP -89<X<89 But, you don't have to be
little 8008's 16K limit is going assembled object listings LOG X>O a SCELBAL programmer to
to be reached soon. for both 8008 and 8080 earn some coins. We are als9
systems for routines that ATN -lE37<.X<'lE37 interested in seeing articles of
A suggestion: We need a cas- will enable SCELBAL general interest to .SCELBAL
sette data read data write capa- users to add String Func- The soon to be available users, as well as application
bility. I've tried to use the arrays tion capabilities to their booklet will contain source and notes, and even comments or
values block as a means to do systems. Users intending object listings as in other publi- suggestions!
this, but I was not happy with to add the Strings capa- cations related to SCELBAL.
my results. SCELBAL should be bilities should have a mini- Prospective String Function You may submit your efforts
able to analyse a checking ac- mum of 12K memory (read users should note that assembled to the address given below. Mat-
count on tape as well as format and write) available in their object listings for the mathe- erial accepted for pUblication
the data into records organized system. matical functions will reside in earns the author an honorarium
into blocks for recording. some of the same memory loca- check based on originality, use-
Details of the Strings tions (pages 50 through 54 fullness to readers, length, com-
Thanks for SCELBAL. It is a Supplement capabilities octal) as various string routines. pleteness and quality of presen·
lot of fun. were provided in Issue 03 This overlapping was based on tation etc.. Submissions accept-
of SCELBAL UPDATE, the premise that from memory ed for publication become the
James C. Tucker space considerations (particu- property of SCELBI C.C., Inc..
Exeter, NH The $10.00 price for the larly for 8008 baSed systems) The act of submitting for pub-
STRINGS SUPPLEMENT users would not find it practical lication is certification that the
(Thank you James! Looks like includes postpaid delivery to have both string functions material is original and that the
you have found the bug that was by U.S. Mail service. and mathematical functions in- author agrees to the terms of
bugging several people in regards Address orders to: stalled at the same time. (String this announcement. While every
to the disappearing variable function users theoretically are attempt will be made to return
storage location. Seems if you less likely to be concerned with rejected material accompanied
just loaded the program into extended mathematical func- by a SASE (self-addressed,
memory and started operating tions it seems.) Users who might stamped envelope) SCELBI
you could have 20 variables. desire to have both types of C.C., Inc. assumes no responsi-
Later, after using a SCR com- capabilities installed simultan- bility for submitted material.
mand you only had 19! Nice sously would need to relocate
piece of detective work. one set of routines and would Material to be considered
probably want to have 16K or for publication should be for-
We hadn't received any com· ORDER DEPARTMENT more of read and write memory warded to:
plaints regarding the second item SCELBI C.C., INC. available in the system.
you noticed. Probably because SCELBAL UPDATE EDITOR
most people took the advice PO BOX 133 - PP STN It is anticipated that the SCELBI C.c., INC.
given in chapter fourteen to use MILFORD, CT 06460 extended mathematical func-
the SCR command when starting tion routines will be available PO BOX 133 - PP frrN
to use SCELBAL. But it could COMING SOON! in the form of a supplemen- MILFORD, CT. 06460
certainly cause a problem as you tary booklet near the latter
pointed out and is likely to EXTENDED MATHEMATICAL part of February, 1977. Price
occur if one, for instance, FUNCTIONS FOR SCELBAL of the supplement has been
uses the LOAD command pegged initially at $5.00 in-
and proceeds to revise a user Now in the final documenta- cluding postpaid delivery by
program without having used tion stages are five extended U.S. Mail.
an SCR command. mathematical functions soon to
SCELBAL ©ISSUE 05 • 6/77
UPDATE Copyright 1977
SCELBI C.C., INC.
Unlimited Variables.. .1
Math Functions Here. .3
Corrections . . . . . .. .3
High Level Functions. .3
Value of VAL ....... 3
UNLIMITED! (WELL· ALMOST) VARIABLE NAMES! Finally, a note of caution. test the operation of the pro-
The modification checks to gram being developed. If it looks
One of the improvements Several notes of caution are in see that variables do not run like storage will be tight in a pro-
into a user's source listing. gram; load the source entirely
most often suggested for SCEL· order. First, the modification as However, no check is made before executing a RUN com-
to see that the user buffer mand! Since variable names are
BAL is to increase the number shown in the accompanying list- does not run into the variables added to the variables table as a
table. It is thus theoretically program is executed, the modi-
of variable names allowed. The ings is for the essentially un- possible to "bomb" the vari- fied program will indicate if
ables table if one was, for in- buffer space is exhausted.
original version allowed a total modified version of SCELBAL stance, inserting new lines
into a source listing and alter- Have fun with the new capa-
of 20 regular variable names. as presented in the basic publi- nating with the RUN mode to bility!
It was possible to increase the cation. If you have made modi-
effective number of variableis • fications to your version - be
in a system having DIM capa- careful. Same goes if you have
bility installed, but even when implemented any of the supple-
performing "tricks" such as ments.
that, the number of variable In particular, if you have been LISTING FOR AN 8008
names was limited to a maxi-
mum of 84. A good many playing around with compacting
users felt it would be nice to SCELBAL for an 8080 machine e.e eill I
substantually increase the num- and have changed the order of 109 981 ORG 005 033
il05 033 I
ber of variable names allowed in the bytes stored in the End of LOOK. CAL N EIrIVT
1l0S 033 NDA
a program - without having to User Program Buffer Pointer 0115 036 106 045 il0S JTZ 1..00KUII ICALL NEIoI VAl' STORAGE RTN
~0 5 037 249 JMI' LOOK3A ICHECK STATUS ON RETURN
snitch from elements in an array. (Page 26, Locations 364, 365) 005 042 1St! 155010 I IIF FOUND MATCH IN TSL - PROCESS
005 045 194 135 illl! 1'1 EIoIVT. 1.1. I I 20 II F HAVE EOT - ADD ENTRY TO VT
O.K.! Here it is - a modifica- as mentioned in SCELBAL UP- 035 0llS LHI 026
tion to SCELBAL that will DATE Issue 04, you will have to 005 047 066 121! LEI 371 IPOINTER TO SYMBOL
theoretically allow you to have change things around a little bit 005 051 ilS6 026 1.01 054 I.*SUFFEF STO RAGE AREA
as many variables as can be in the accompanying listing in 305 053 "46 377 LAM 11'0 INTER TO START 0 F
defined by valid two charac- the vicinity of the LOOKU3 il05 055 036 "54 CPI 001 ISS NEIrl VAl'S STORAGE AREA
ter symbolic names, provided subroutine at Page 05 Location 005 056 307 IFETCH (CC) OF STRING IN SF!'
157 etc. 005 060 074 "01 Jrz LOJIWA ISEE IF IT IS EQUAL TO ONE
~ 0 5 "63 110 067 12105 IJUMP AHEAD IF NOT EQUAL TJ ONE
you have enough memory in "'05 065 121 66 122 1.1..1 122 IELSE SET RNT!' A!,D CLEM' 2NC
~0 5 ~ 67 076 12100 Li11 000 IBYTE DF NM1E TJ ZERO
your system to store all the ~0 5 070 353 LOOKUA. LHr ISH P:JINTEF Tv
364 LLE. 11'1 PST LOCATION
variables desired! If you have installed Strings G05 371 307 LAM liN VAPIAELE~ TAELE
240 NDA ISEE I F E~l'A:' TO ZERO
Essentially, the modification or Mathematical Supplements, 005 e 7 2 I 50 I 5~ 00 S JTZ LJ}XU3 Ii? SO~ !JJTHlt~G IN TABLE.
changes SCELBAL so that it or if your User Program Buffer I
stores variable names and their storage area does not end at ~05 073 066 121 I SET 1'0 INTER TO 15T CHARACTER
values starting at the top (high- Page 54 Location 377 in your 005 076 056 026 LOOXUI. 1..1..1 121 1**0 F NAME IN THE SYMBOL BFR
est allowable address value) of system, you will need to alter 0115 076 le6 356 1122 LHI 026 I SAVE IN D&E AND FETCH
the User's Program Buffer and the values in the accompanying 0115 100 307 CAL SIrlITCH IPO INTER TO VT. THE.'l FETCH
listing marked with a "$$" nota- 005 102 061 LAM I FI RST ENTRY TO THE ACC
1l0S US 317 DCL lAND 2ND ENTRY TG REG B
works downward toward the tion in the comments section 0115 106 1"6 164 003 l.SM IDECREMENT VT PNTR ONCE MORE
source code in the buffer which (such as Page 05 Location 54 005 107 106 356 022 CAL DEC ISAVE VT 1'0lNTEP AND GET 55
005 110 277 CAL SWITCH 11'0INTEP. SEE If HAVE SAME
is stored in ascending address and Page 11 Location 44) so 005 113 1 10 132 005 CI'M INAME. TO NEXT ENTRY If
!l60 INOT. BUT. IF fIPST LETTEP
values as new lines are entered. that the end of the User Pro- 005 116 301 JFZ l.JOKU2 IHATCHES - THEN TRY
The variable names table pre- gram Buffer storage area is 005 117 277 INL ISECO:-lD. If FIND NA"IE
viously assigned to Page 27 start- set up properly by the new l.AB IHATCHES CAN STOPE VALUE
005 122 11~132005 CPM I SO Cl.EAI' ACC TO INDI CATr
ing at Location 210 is no longer unlimited variables modifi- 035 123 JfZ LOilKU2 IMATCH. THEN RETUP~l TO CALLEI'
used if the user elects to install cation routines. 005 124 250 XRA
005 125 007 PET IPUT 4 INTO REGISTER E
this modification. 005 130 I IFETCH VAPIABl.ES TABLE
016 004 II'OINTEP WT:l I'EGS fi ..L
It is assumed that those 005 131 353 LOOKU2. LSI 004 I SUBTRACT 4 fROM PNTR VALt;E
Listings of the modification who have otherwise modified 005 132 364 LHt: IFETCH FM ADDP I'OINTED TO
005 132 106 113 003 ISAVE VAPIAELES TABLE
for both 8008 and 8080 mach- SCELBAL or relocated the 005 1311 307 LLE IPOINTER IN D&E
005 135 335 CAL SUBHL IrEST LAST BYTE FRO~ V;
ines are included. The routines program, will know how to 005 136 346 LAM 11F NOT EOT. ca:VT SEARCH
shown may be simply "over- proceed to adapt the modi- 005 141 240 LOll
laid" over the original routines. fication. 005 142 110 076 005 LEI. / I f FOUND EaT
005 1113 NDA I Sl'ETRACT 6 f!lO~ I'NTR AN D
12105 144 016 006
106113003 JFZ LOOKtll
12105 145 I
005 150
01215 150 LOOKU3. LBI 12106
1105 152 CAL SUSHI.
1
005 155 335 l.DH I SAVE VARIABLES TABl.E 0e 5 102 315356022 CAL SVITCH I SA\lE IN D&E AND fETCH
005 156 346 l.AM 11'0 INTEl' TO VT, THEN FETCH
005 157 056 026 LEL IPOINTER IN DloE 005 I ~ 5 176 DCl. IFlpST ENTPY T0 THE Ace
005 161 066 364 l.BM lAND 2ND ENTRY TO REG 8
005 163 31117 LH! 026 I**SET POINTER TO DID 005 106 055 CAL DEC IDECRE.MENT \IT PNTl' ONCE MOl
005 164 273 CAL s"! TCH ISAVE VT POINTER AIW GE, 51
005 165 160 176 005 LLI 364 101' USER PROGRAM BUrrER 005 107 106 CPM IPOINTEI'. SEE 11' HAVE ~AME
0115 1711 060 JFZ LO)I<U2 INAME. TO NEXT ENTRY! f
005 171 3117 LAM II'ETCH EO B PAGE VALUE 005 110 315 164 003 INL INOT. BUT, I f fiRST ~ETTEP
005 172 274 LAB 1.1ATCHES - THEN TRY
005 173 100 222 1102 CPO ICuMpARE WITH \IT pNTR VALUE 005 113 315356022 CpM /SECO;';D. If fiND :,AME
005 176 106 356 022 JfZ LOOKlI2 IMATCHE~ CAN ST0R~ VAI..UE
005 201 076 000 JTS OKooK2 111' pas HERE, NO CONfl.ICT 005 116 276 XRA ISO CLEAR ACC TO HJDICATE
005 203 106 174 003 RET /MATCH, THEN pETt'RN Ta CAL:
005 206 11116 356 022 INl. III' NOT, FETCH LOW ADDR 005 117 302 132 005
005 211 066 121
005 213 307 LAM 101' END Of USER PGM Bf pNTR 005 122 054
005 214 060
005 215 317 CpE lAND TEST fOR ROOM ~N PAGE 0a5 123 110
005 216 353
005 217 364 J'FC BIGERR 111' NOT, HAVE AN ERRORI 005 124 216
80S 22111 370
1!05 221 061 OKOOK2, CAL SWITCHIII' OK, RESTORE V':' pNTR 005 125 302 132 ~05
005 222 371
BB5 223 006 377 l.MI 000 ITO Hlol. AND MAKE EDT MARKER 0" 5 I 30 257
11105 225 1107 CAl. lNDEXB IADD 6 BACK TO \IT pNTR 005 131 311
11105 226
01l1l IIIIlIl CAL SWITCH I SA\lE VT PNTR IN DloE 005 132
011l 1110
Bill 11111 Ll.I 121 ISET PNTR TO 1ST CHAR IN SB 005 132 006 004 LOJKU2, I..BI 004 IPUT 4 INTO REGISTEn B
1116 1Il3
IlIIil IIl4 LAM II'ETCH 1ST CHARACTER TO ACC 005 I 34 142 LHD II'ETCH VARIABLES TABI..E
III 10 107
IIIIIl III INL IADVANCE BUffER POINTER 005 135 153 LLE IPOINTEP. INTO PEGS K&1..
II III 114
IIIIIl 117 LBM II'ETCH 2ND CHAR TO REG !3 005 136 315 113 003 CAl. SUBHI.. I Strl'TRACT 4 FRO:-l PNTF VAL\!
IIIIIl 117
IIIIIl 122 l.HD IGET VARIABLES TABLE 005 141 176 LAM /FETCH I'M ADDp POINTED TO
1110 124
011l 127 Ll.E IPOINTER IN H'L 005 142 124 LDH I SAVE VARIABLES TABl.E
111111 121
010 132 LMA I STORE SYMBOL NAME 005 143 135 LEI.. IPOINTEP IN D&E
01111 135 DCL liN THE VARIABLES TABLE 005 1"4 241
I! II! 135 LMB 005 145 302 076 005 NDA ITEST LAST EYTE fRO:-l VT
010 136 eoI - TH CHARA CT ERS •
010 141 JfZ l..OJKUI II f :-lOT EOT, CONT SEARCH
010 142
010 143 LAI 317 I SET ACC TO ALL ON ES TO F1.AG 005 150 I
010 144
010 141 RET IJOB DOIfE, RETUm TO CAI..LER 005 1511 006 0116 LOOKU3, LBI 006 II I' FOUND EOT
010 150
010 151 I 005 152 315 113 11103 CAl. SUBHL I SUBTRACT 6 FROM PNTR AND
I! 10 152
010 155 ORG 1110 1110 005 ISS 124 LDH I SAVE VA?IABl.ES TABl.E
010 155
010 160 I 005 156 135 L.EI.. 11'0 INTER IN D&E
010 162
010 165 1116 045 110S STOSYI, CA~ NEWIIT ICALL NEW VAR STORAGE RTN 005 151 046 026 l.HI 026 /**So;T POINTE? TO EtID
010 165 2411
010 170 1511 117 IIIIl NDA I CHECK STATUS ON RETum 005 161 11156 364 LLI 364 10 i' USER PRJ GRAM !3UffER
010 172 016 11114 III' roUND HATCH' PROCESS 1105 163 116
010 114 11116 113 1l1l3 JTZ. STOSY4 l.AM I fETCH EOB PAGE \lALUE
010 175 11114 127 010
010 177 LSI 1i11!14 III' HAVE EOT THEN SET UP 005 164 272 CPD ICOMPARE 1oI1TH VT PNTR \lAl.U
JTS OKOOK2 111' PO 5 H ERE, NO CON Fl.I CT
o I~ 200 CAL SUBlIl. ITO ADD ENTRY 005 165 312 176 III1S
010 21111 JMP STOSY5 I TO THE \lARIABLES TABLE 005 170 054 INl. 111' NOT, fETCH LOll ADDR
010 204
010 207 I 005 111 116 I.. AM 101' END Of USER PGM Ill' PNT
010 212
010 215 11116 356 022 STOSY 4, CAL SWITCH/ICESTORE VT POINTER TO Hlol.. 005 172 273 CPE I AN D TEST 1'0 I' ROOM ON PAG E
010 21 S 016 01113
011 041 106 113 003 l..BI 003 Il.OAD 3 INTO REG B 005 113 322 222 002 JI'C BIGERR III' NOT, HAVE AN ERROR!
011 041
011 043 CA~ SUSHI.. ISUBTRACT 3 I'ROM \IT PNTR 005 176 315 356 1122 OKooK2, CAl. SWITCH/II' OK, RESTORE \IT pNTR
011 045
011 046 I 0115 201 066 000 l.MI 000 I TO Hlol. AN D MAKE EO T MARKE
1103 165 106 255 022 STOSY5, CAl. I'STORElI'PACC INTO \IT ~OCATION5 1105 203 315 174 1103 CAL INDEXB I ADD 6 BACI< TO VT pNTR
005 033 104 255 11102
005 033 JMp C~ESYM ICl.EAIC SYMBOl. BI' , EXIT 1105 2116 315 356 022 CAL S10IITCH ISAVE VT pNTR IN DloE
005 036
005 037 I 005 211 056 121 Ll.I 121 I SET PNTR TO I ST CHAR IN S
005 042
005 045 250 l.OOK3A, XRA ICLEAp THE ACCUMUI..ATOR US 213 116 I..AM I fETCH 1ST CHARACTER TO AC
005 045 1116
005 047 310 164 11103 CAl. DEC lAND PLACE 1105 214 054 INl. IADVANCE BUfFER POINTER
005 051 061 164 003
005 0 S3 370 165 0111 LMA IZERO 1105 215 106 I..IlM I FETCH al D CHAR TO REG B
1110 S 055 106
005 056 310 DCl. I INTO 005 216 142 I..HD I GET VARI ABl. E5 TABl.E
005 060 061
005 063 370 l.MA ITHE "05 211 153 LI..E IPOINTER IN HloL
005 065 104
005 067 CAl. DEC IVAPIASLES 80S 228 167 LMA I STO RE SYMBOl. NAM E
005 072
005 011 l.MA ITABLE 815 221 855 DCL lIN THE VARIABL.ES TABl..E
005 072
005 013 DCl. I,DI' THE U5 222 160 l.I1B 1- BOTH CHARACTERS •
005 016 L.A! 371
005 "'76 l.MA IINITIAL. VALUIc 815 223 1816 371 I SET ACC TO AL.L. ON ES TO n
005 100
JMP l.OOKU5 IGO nNI SH UP 8115 225 311 !'tET I JO B DON E, RETURN TO CALL!
2
I
1116 356 022 l.OOKU4, CAl. SWITCH/POINTEI' TO VT INTO H&L 002 223 ORG 010 100
016 003 l..BI 003 ICOUNT OF 3 INTO REG B 010 100
106 113003 CAl. SUSHL ISUBTRACT 3 fPOM VT PNTp 010 100 I
I 010 103
LOOKU5, CA~ 5AVEHl./SAVE VT POINTE? Ille 104 315 045 005 STOSYI, CAL NEWVT ICAI..L. NEil VAl' STORAGE RTN
l.LI 221 ISET UP PNTR TO APITHMETIC 010 107 241
106 317 022 I..HI 001 I**STACK POINTER 010 III 312 117010 NDA ICHECK STATUS ON RETURN
066 221 l.AM IFETCH POINTER VALUE 010 114 006 1104 JU STOSY4 Ill' !'OUND MATCH - ppOC£SS
056 001 ADI 004 IADD 4 1'01' NEil ENTRY 010 117 315 113003
3111 l.MA IPE5TOFE STACK POINTER II 10 111 303 127 010 l.BI 004 I I , HAVE EDT THEN SET UP
0114 004 l.l.A lAND SET UP NE;; AS VAl.UE 010 122
370 CAl. I' STOPE IT'UT THE fPACC ON THE AS 010 124 CAl. StiEHL ITO ADD ENTRY
360 CAL RESTHl. I?ESTOPE VT POINTER 010 127
106 255 022 CAl. I'l.OAD IpUT THE VAl' INTO FPACC 010 121 JMP STO SY5 ITO THE VAPIABLES TABl.E
106 337 022 JMP PAR'SE ITO THE PApSE ROl1TINE 010 132 I
106 244 022 I 010 135
104 231 005 ORG 011 041 IPOINTE!; TO STApT OF 010 135 315 356 022 STO SY4, CAl. S1oI1 TCHI RESTO RE VT PO INTER TO Hlol.
I ISS NEil VAP'S STORAGE AREA 010 136 006 003
l.LI 371 I~EPLACE WITH NOp INSTPUC 010 141 315 113 1103 LBI 003 Il.OAD 3 INTO REG !l
LHI 054 010 142
l.AA 010 143 CAl. SUBHl. I SUBTRACT 3 I'pOM VT PIlTR
I 010 144
I
315 255 ~22 STOSY5, CAl. f5TORE/ fPACC INTO VT l.v CAT ION S
3113 255 002
JMP CLESYM I Cl.EAp SYMBOL Bf & EX I T
I
257 l.00K3A, XRA ICl.EAp THE ACCUMULATOP
315
066 311 161 164 003 CAl. DEC /ANll Pl.ACE
056 054 055 164 003
300 161 l.MA I ZERO
315
DC~ IINTO
l.MA /THE
CAL. DEC IVAPIAEI..ES
LISTING FOR AN 8080 010 141 161 l..MA ITA!?LE
010 150 055 DCl. 1,01' THE
010 lSI 167 !..MA I W I TlAL VALUE
ORG 005 "33 010 152 303 165 010 JMP l.00KU5 I GO !'IN I SH U?
I 010 155 I
315 045 005 LOOK, CAl. N E",VT I CALl. N Ell VAl' STO RAGE RTN 010 155 315 356 022 l.QOKU4, CAl. S"'!TCH/!"OI~TEI' ':'0 VT INTO H&:"
247
312155010 NDA I CHECK STATUS ON RETURN 0111 160 006 003 l.BI 003 IcomlT OF 3 INTO PEG B
303 135 010
JTZ LOOKU4 II I' FuUND MATCH IN TBL • PROCESS 010 162 315 113003 CAl. SUBHl. I SUBTP.ACT 3 FR()M VT pNTR
056 120
046 026 JMp L.00K3A 11 F HAVE EDT • ADD DlTRY TO \IT 010 165 I
036 371
026 054 I 010 165 315 317 022 l.OOKU5, CAl. SAVE:Hl./SAVE V-: PO INTEl'
176
316 001 NEINT, L.l.1 120 IPOINTER TO SYMBOl. 010 110 056 227 Ll.l 227 I SET UP PN'!"P ":"~) API THMETI
302 061 005 l.HI 001 I •• STACI< POINTE?
"56 122 I..HI 026 1**BUfFER STORAGE AREA 1110 172 046 IiHII LAM I fETCH POINTE? VALUE
066 'Hl0
142 l.EI 317 IPOINTEp TO START OF 010 174 176 ADI 004 IADD 4 FOP NEil EN':'nY
153 1.01 054 010 175
116 LAM 1$$ NEW VAl'S STORAGE AREA 010 117 306 "all LMA IPESTOPE STACK pOINTEP
247
312 150 005 If ETCH {CCI OF STRING IN BfR 167
1156 121 CpI 001 ISEE I f IT 15 EQUAL TO ONE 010 200 151 l.l.A lAND SET UP NEW AS VAl.UE
046 026 JFZ LOOKUA
IJUMP AHEAD II' NOT EQUAl. TO OIlE e 10 201 315 255 022 CAL I'STOPE IPUT THE I'PACC ON THE A~
1..l.1 122 IELSE SET pNTR AND CI..EAR 2ND 010 204 315 337 022 CAL RESTH1. IPESTDPE VT POINTER
l.MI 000 I BYTE 0 f NAME TO ZER:J li:U 207 315 244 022 CAl. fl..OAD IP\lT THE VAR 1:-110 !'PACC
l.OOIWA, l.Hr: ISET P:JINTE"I TO 010 212 303 231 005 JMP PARSE IT<) THE PARSE ROUTINE
LLE Iflp!T L.)CATIJN 010 215 I
l.AM lIN VARIABLES TABl.E 010 215 O?G 011 041
NDA IEEE 1 I' EQtlAL T0 ZER0 011 041 I
JTl !..OOKU3 I l f ~O, NOTHING IN TABl.E iii I I 041 056 377 Ll.I 317 IPOINTEB TO STAI'T Of
I 011043046054 l.HI 054 ISS NE10I VAil'S STORAGE ARU
LOJXUI, l.l.1 121 ISET pJINTEP TO 1ST CHA~ACTEP 011 045 111 l.AA ll'!EPLACE 'illTH NOP IN STRUC
l.HI 026 1--0, NAME IN THE SYMBOl. BFR 011 046 I
EXTENDED MATHEMATICAL A FEW CORRECTIONS MATHEMATICAL LISTING OF
FUNCTIONS AVAILABLE FUNCTIONS HIGH LEVEL
C. A. Bannister of Richmond, MATHEMATICAL
Five extended mathematical VA, was the first to report some THE OTHER WAY! FUNCTIONS
functions are now available for object code errors in the listing
SCELBAL. The new functions, for modified SCELBAL shown One of your fellow SCELBAL 18 ZC«
made available as a supplemen- on page 3 of SCELBAL UP- users, Robert Leonard, 3003 11 SMo)(
tal publication, provide users DATE Issue 02. The object code Driscoll Drive, San Diego, CA.
with the following capabilities errors only occurred in the 8008 92117, sent in a nice set of sub- 12N=2
when installed: SIN, COS, listing. routines to calculate the sine, 11 Z--Z*()(t2)/(I'*OI+1»
EXP(e), LOG(e), and ATN. cosine, tangent, arc tangent,
log and exponent. The LOG and 14 SMoSN+Z
The SIN and LOG functions EXP functions he provided are
are calculated using Chebyshev natural base. The trig functions 15 H=lt+2
optimized Taylor series. The expect the angles to be given in 16 IF AIlSG!». ael!1 TI£N 11
EXP and ATN are calculated radians. The variable names
using continued fractions. The It seems that the object codes assigned and line numbers of l1RETURH
COS function is calculated using for XRA, LMA and LLA direc- the various routines he provides
the SIN function. The argument tives got fouled up in the listing. are summarized as follows: .iIi;:=1
of any function is reduced to an The code for XRA should be
interval where the Taylor series 250, for LMA it is 370 and for 21 c:s-1
or continued fractions is reason- LLA it is 360. 22N-1
ably accurate. The argument 21 Z-2*()(t2)/O,I>(Ht1»
range for the functions are as Alert Bannister also noted a
follows: typographical error on the first 24 CS-CS+Z
line of Mr. Toy's routine shown
SIN ·4194303.(X"4194303 on page 2 of Issue 04: The code. 2e .......2
COS ·4194303.:X<4194303 for LLI should be 066 not 006 26 IF .(Z». 8111 TI£N 23
as printed.
EXP -89.cX<89 27 RETURN
LOG X:>O Thanks for the use of your
sharp eyes - and our apologies Je 00StII18
ATN -lE37<X.(lE37 to our readers for letting those
errors get by. Ed. 31 00StII 2e
The supplemental booklet
contains source and object SIN(X) == SN GOSUB 10 12 1M=SNICS
listings as in other publications GOSUB 20
related to SCELBAL. The COS(X) '" CS GOSUB 30 63 RETURN
assembled object listings pro- TAN(X) =TN GOSUB 40 48 IF Ii(. 7 TI£N 68
vided reside in locations on ATN(X) = AT GOSUB 80
pages 50 through 54. They may GOSUB 100 41 IF lO1. 4 TI£N 78
be reassembled to reside else- LOG(X) = LG 42 .....Y$IlR(1+()(t2»
where by the user if desired.
String Function users should EXP(X) = EX 41 Z-V
note that those same pages are
used by sections of the String 44 AT='"
Functions. 45 N=1
The price of the Mathemati- 46 Z=Z*(Y't2).(N1'2)/( (1*+1).(1*+2»
cal Supplement to SCELBAL is
$5.00 in the U.S. including U.S. 47 AT"AT+Z
mail delivery. Foreign purchasers
should include $2.00 for airmail The subroutines making up 4S NaN..2 Z». 800001 TI£N 46
delivery of the supplement. the high level package are shown 49 IF AIlS(
alongside this column.
511 RETURN
6IlZ-x
STRINGS PATCH 61 AT=X
t>2 ~:s
Robert also mentioned that 6:i 2=SGIHZ).(-(xtN)IN)
he likes to use a patch to elimi-
Mr. H. J. Lewis of Canada has nate the decimal point and zero 64 AT=f1T+Z
after whole numbers. Says he
likes the format for its neat- 65 N=N+2
ness in games, etc. If you want
spotted a glitch in the Strings to take a look at it, the patch ~ IF FtBS(Z».80OOO1 TI£H 63
he uses is presented here:
Supplement. The following 67 RETLlI<N
7e 2=1. 579796
patch, (named in his honor!) 7:1 AT=Z
should be installed at Page 50 7211=1
Location 327: - 73 2=SGN(Z).(-1/(IfI'O(tlO»
74 AT=RT+Z
JFZ HJLFIX 75 H=lt+2
It will replace the JFZ SSTRCL 76 IF ftBS(Z». Melli TI£N 73
77 RETLif<N
instruction. The patch, which 025147 JMPPATCH 6li .....B
may be placed on Page 54 at 81 IF X{1 TI£N 85
82 )(=XI2
Location 301, is just two in- PATCH, LLI 166 lll ........+1
structions: LAM 64 ooTO 81
HJLFIX, CAL SWITCH NDI 370 85 IF K) 5 TI£N 89
RTZ &6 X=2*l(
LAI256
JMP SSTRCL CAL ECHO 87 ........-1
JMP NODm>
This patch will correct an anom- as ooTO 85
8!i X=(X-. 787187)/()(... 787187)
aly in the string comparison rou- 911 LG=2*«()()..«)(t3)1l)+«)!t5)I'5)+( ()(t7>1
tines that can effect string com- 7»-. 34i573
911.G=lG+(...... 693147)
parison operations. 92 RETURN
Thanks for the very nice 188 Z=1
high level math package Robert.
Many thanks to Mr. Lewis Hope you enjoy the check we 181 EX=!
for his persistence in analyzing have sent you for your efforts!
and solving this problem and -Ed. 1112 tM.
bringing it to our attention! -Ed.
183 Z=Z*lCIN
184 EX-EX+Z
185 H=lt+1
186 IF AIlS (Z». 800001 TI£N 183
187RETlb
What is the VALUE of VAL? the prices to obtain a total'! The VAL function cunverts numerical value for the total of
characters in a string from an all the prices in the list with a
String functions are designed TOMATOES 24 ASClI representation of a deci- routine such as:
to allow the user to manipulate LETTUCE 79 mal number to its numeric
"strings" of alphanumeric CARROTS 38 value. In other words, the prices FOR X 1 TO 4
characters instead of mathe- ORANGES 98 in the example can be converted LET T VAL(B$(X» + T
matical quantities. from character string format to NEXT X
One could use string capabili- actual numeric values that can PRINT T
However, there may be times ties to list the items and their be mathematically manipulated
when it is desirable to manipu- prices. But the character strings by SCELBAL! This is because the VAL func-
late information in essentially themselves are useless for cal- tion would convert the numerI-
two forms - as a string of charac- Assume the lines in the above cal character strings to mathe-
ters, and as a numerical value. culating mathematical informa· example are each composed of matical VALUES!
tion unless one has the special two strings 'A$' (item) and 'B$'
Suppose, for instance, one capability to convert between (price). The 'price' strings in the If reader interest warrants, we
wanted to have the computer one mode and the other. That example would be elements in will discuss capabilities of the
make a list of groceries show- is what the VAL function in string arrays B$(l) through String Supplement for SCEL-
ing the price for each item, and the SCELBAL String Supple- B$( 4). One could obtain a HAL some more in the next
then also mathematically sum ment provides! issue of this publication
SCELBAL ©ISSUE 06 3/78
UPDATE
Copyright 1978
SCELBI C.C., INC.
SCELBAL-I1 Release ... 1
Bowling Handicapper. . . 1
Baudot User's Tips. . . . . 2
TC & Trace Capability .. 2
F-N Variables Patch ...3
SCELBAL-I1 the objectives of this supple· program storage room. That has been helping him calcu-
READY FOR RELEASE mentary pUblication were didn't stop him though. He sent late information used by bowl-
multiple-purpose. First, it would in the following program that ing leagues
For sometime there has been provide a vehicle for informing
a question as to whether or not SCELBAL customers of program 10 INPUT A Input total games to date
SCELBAL·lI would ever be re- corrections that were liable to
leased in source format. In be required in a program the 20 PRINT "INPUT SCORES";
appreciation of our early cus- size and scope of an interpreter.
tomers, a compromise has been Second, it would be an experi- 30 INPUT B,C,D Input scratch scores
reached. As detailed in a sepa- mental pUblication to determine
rate flyer that will accompany if users wanted to work through 40 PRINT "SCR TOT";
this edition of SCELBAL Up· the publication to amplify the
DATE, the revised edition de- package in any way. We said we 50 INPUT F Input previous scratch total
veloped specifically for 80801 would provide this publication,
Z-80 systems will be made free for a limited period of time, 60 PRINT "HDCP TOT";
available to registered SCELBAL and possibly on a SUbscription
owners for a modest fee as an basis thereafter, if users showed 70 INPUT G
uncommented assembled source this is what they wanted.
listing. Since SCELBAL-I1 essen- 80 PRINT "TOT";
tially follows the general struc- Well, the free period is over,
ture of the original version, and support for such a publica- 90 INPUT H Input previous total pins -
SCELBAL owners with 8080 or tion on a SUbscription basis has
Z-80 systems should find the im- not been demonstrated. Only a keeping this list eases problems
proved version attractive and handful of readers have sub·
understandable. Those not hav- mitted material for publication with changing players in singles
ing the original SCELBAL docu- even though an honorarium is
mentation would likely find it presented for published mater- leagues
somewhat discouraging to ial. Only a fraction of a percent
attempt to decipher the uncom' or readers have expressed any 100 PRINT "HDCP": Input player's previous
mented listing of SCELBAL·II. interest in having this pUblica-
In any event, SCELBAL-II will tion continue on a SUbscription 110 INPUT I handicap
only be made available to pur- basis.
chasers of the original SCELBAL 115 PRINT
The journal has lived up to
-documentation. its task of informing SCELBAL 120 PRINT B+C+D rrAB(12);8*IrrAB(24 );3*I+B+C+D
THIS TO BE LAST ISSUE users of program bugs discovered
OF SCELBAL UPDATE by users over a more than suffi· 130 PRINT "_••• ";TAB(12);"·--_·" rrAB(24 );"-----"
cient time span. SCELBAL, with
As we indicated when we be- minor alterations pointed out in 140 PRINT F+B+C+D rrAB(12);G+3*I;TAB(24 );H+B+C+D+3*1
gan publication of this journal, this journal, is a proven inter-
pretive language. The above three lines give
formatted output of scratch
total, handicap total, and
cumulative total suitable for
a 32 column TV display
150 PRINT (F+B+C+D)/A;TAB(12);.66667*(190· (F+B+C+D)/A)
The above line prints the new
average and handicap
160 GOTO 20 If next player has bowled the
same number of games change
this to go to line 10
170 END
Best wishes to all its users!
BOWLING HANDICAPPER IN ONLY 512 BYTES! Harold says that while the siderable amount of work and
above program requires quite a can be run on a minimal system.
Harold F. Bower has been 8008 system for some time so he few more manual entries than
running SCELBAL in an eight K had a limited 512 bytes of user would be required if master Howard is stationed in Ger·
files were maintained in string many at HQ 5th SIG CMD,
variable format, and could be DCSOPS-TD, APO New York,
saved then later loaded and NY 09056. He has recently up-
modified with the new results graded his system to a 12K Z-80
being saved for the next time, so he should really be cranking
the program does save a con· out handicaps by this time!
1
MORE FOR BAUDOT MACHINE USERS which effectively bypasses the can be used only with whole
column counter incrementer. in- numbers. Even a number-roun-
Mr. S. J. Toy, a frequent con- not be used to terminate the cidently, the Delete key, in my ding routine does not always
tributor to this publication, still entry. Instead, I use another case is the BELL key of the work because the last stage of
runs a SCELBI 8008 system key, which in my case is the model 15 TTy..... division frequently results in
with a baudot teletype machine Blank key on my model 15 the value extending back out
for basic I/O. He recently sent in TTY. The STRINF routine is re- One needs to be careful that to 7 digits.
some more information on his arranged so that CRLF is skip- registers B, H, and L are free
modifications of SCELBAL to ped when the blank key is used. when the routine is used. Loca- My new function changes the
facilitate its use with a baudot My previous changes on page ting the routine here covers both value at location 025 035 which
device. 017 that substitute a semicolon numerical and CHR inputs. This specifies the number of digits to
for the comma have been re- addition is useful only if the pre- be printed. It replaces the SGN
"A while back I described moved, and all routines there are ceeding modification to INPUT function, which I have never
some modifications I made to restored to their original form. is made. used, and occupies the same
the INPUT portion of SCEL- While this allows more than one space with one byte left over.
BAL. [See Update Issue 02 - input per line on the TTY, it Another improvement I have The Function Names Table is
Ed.] Since that time I have dis- also requires that the end of the made to SCELBAL is to add a also changed to DIG. The sub-
covered that it would not work line be terminated by a follow- function to limit the number of script of DIG is the number of
with the CHR function, mainlY ing PRINT statement. This digits printed out. This has been digits to be printed. A user pro-
because the latter follows a dif- seems to be a good tradeoff. The a problem in printing tables of gram statement would take the
ferent route through SCELBAL. CR key can be used at the end data where either allowance form of:
To overcome this I have made of the line but it is probably must be made for printing out
several changes that now make better to use a PRINT state- the full 7 digits or accept an 100 PRINT DIG(3)
INPUT even more useful. ment, which makes the carriage occasional overlap between col- This will limit all values to three
return automatic. My modifi- umns. The INTEGER function significant digits, until a subse-
To allow more than one item cations to INPUT now consist does not seem to work for num- quent statement changes the
of data to be input on the same only of the following: bers with more than 4 digits [a limit. Besides the 3 digits, allow-
line, the CR key obviously can- result of binary rounding opera- ance must be made, of course,
tions that start to show their for a possible minus sign and a
003046 *** Code for Blank key which re- affect when numbers exceed 4 decimal point. A listing for the
places code for Control/C. digits - Ed.], and in any case Digits Function follows:"
003 050 105003 Address in re-arranged STRINF 007360 106000020 DIGX, CAL FPFIX Cvrt FP to fixed.
routine to skip CRLF op. 007363 066124 Point to LSW.
007365 307 LLI 124 Load to Acc.
003102 106 141 003 STRINF, CAL CRLF 007366 066035 Point to digits
003105 312 LBC 007370 056025 LAM Number storage.
003106 106113003 CALSUBHL 007 372 370 Load new nmbr.
003111 372 LMC 007 373 104010010 LLI 035 Jump to suppress
LHI025 printout of nmbr
LMA and to return.
JMP 010 010
If one wishes to retain Con- particular input device ......By 026305 304 304 ASCII "D"
trol/C the test for Line Feed can adding a test for the Blank key 026306 311 311 ASCII "I"
be sacrificed instead, since LF is and the Delete key, which are 026307 307 307 ASCII "G"
not normally used during input both non-printing, the column
of data. counter incrementing routine [Thanks for all the new infor- digits outputted. Your's looks
can be skipped. If this is not mation. We have had a number like a real straightforward tech-
To input data into the same done, the position of the column of people ask about a modifica- nique to use! - Ed.]
line as data being printed out will be displaced by one charac- tion to restrict the number of
from memory under TAB con- ter, although this can be com-
trol, it is necessary to increment pensated for by changing the TEXT CONTROL & TRACE CAPABILITY
the COLUMN COUNTER each TAB value. Skipping the column SUBMITTED BY SCELBAL USER
time a digit is input. This is ac- counter incrementer, however, is
complished by inserting a col- better, as it simplifies program-
umn counter incrementing rou- ming. The complete routine to
tine into CINPUT, which is pro- be inserted into CINPUT.....that
vided by the user for his own I use .... .is as follows:
074-- CPI Test for Blank key. Robert Pearce of 504 McCoys the TEXTC routine that he has
150 -- --- JTZ Skip col cnt increment if Blank. Fork Rd, Walton, KY 41094, named TEXTCM. The modifi-
074- CPI Test for Delete key. says he is not a technical writer cation provides the user with
150- -- JTZ - ~- Skip col cnt increment if Delete. but he took the time to send in the capability of halting a listing
066043 Point to Column Counter. some pretty clear explanations of a program at any time by de-
056001 LLI 043 of how he added some "extra" pressing any character on the in-
317 LHI 001 Load column cntr into B. capabilities to SCELBAL. We put keyboard (except C/R or
010 LBM Increment column counter. think his additions will be of CTRL/C). Doing so places the
371 INB Restore column cntr to memory. interest to many SCELBAL program in an "input loop"
LMB users. effectively halting operations
while the user inspects the
The code for the Blank key entered. If either JTZ is true, the The first improvement he system's display. To continue
or the Delete key is in the ac- jump is to the byte immediately discusses is a modification to the display the user may type
cumulator when the routine is following the end of the routine,
2