Casio PB 100 Instruction Manual
Casio PB 100 Instruction Manual
=> Thank you very much for purchasing the Casio PB-100. This unit is a "handy type"
personal computer which is excellent for those who are beginning to learn about
t computers.
By using this handy personal computer, you can enter the world of computers and can
freely perform programming using BASIC language.
CONTENTS
Prior to Operation 3
Use Precautions 3
Power Supply and Battery Replacement 4
4-4 Arrays
( Prior to Operation)
This computer is delivered to you througl) our strict testing process, high-level
electronics technology and rigid quality control.
In order to insuie long life of the computer, please be sure to note the following
precautions.
■ Use Precautions
• Since the computer is constructed using precision electronics parts, never attempt to
take it apart. Also, do not subject the computer to shock such as throwing or
dropping or to extreme temperature variations. Be especially careful to avoid
locations where there is high temperature, high humidity or a lot of dust.
Furthermore, if the ambient temperature is low, the display response speed may be
slow or there may be no display. However, it will return to normal when normal
temperature conditions are resumed.
• Do not attempt to connect any equipment to the adaptor socket other than our
exclusive optional equipment.
• While the computer is operating, a will be displayed. At this time, key operation
will be ineffective except for one section. Therefore, always be sure to press the keys
while confirming the display.
o Be sure to replace the batteries every 2 years regardless of the amount of use.
If worn out batteries are used, they will leak and may cause a malfunction so never
leave them inside the computer.
• For care of the computer, avoid using thinner or benzine. Wipe off with a soft, dry
cloth or use a cloth which has tieen dampened with a neutral detergent.
In case of malfunction, contact the store where it was purchased or a nearby dealer.
Prior to seeking maintenance, please read this manual again and also check the power
supply as well as program or operatiorral error.
- 3 -
■ Power Supply and Battery Replacement
This unit uses two lithium batteries (CH2032) for a power supply.
If the contrast is weak even when the eontrast control is adjusted for maximum contrast
(refer to paye 11), this means that the batteries are worn out. Therefore, please replace
the batteries at the earliest opportunity using the following procedure.
Furthermore, even though the unit is functioning normally, be sure to replace the
batteries every 2 years. Screws
• H o w t o R e p l a c e t h e B a t t e r i e s ^ iI 1^ ,
(1) After turning the power switch off, loosen the two
screws on the rear panel and remove the rear panel.
(4) Using a dry cloth, wipe off the new batteries and
insert them with the <3side facing up.
(6) Replace the rear panel and tighten the screws ana
after turning the power switch on, press the ALL
RESET button.
- 4 -
Chapter 1
im 1 ® 1 G3|GD|(X3—^
CdOta "kjp
cp~c|D
io »n» «n' ooio w imin mri
CDCIDCcDCDCIDCEICO^ClDCID
Each key has 1 or 2 operations. The operations can be divided using the shift out mode,
whereby the keys are pressed directly, and the shift in mode, whereby a key is pressed
after pressing the ® (SHIFT) Key.
Sd]©© S(s)(aia
(SSljDEESISCriSCE) 0(5)(b)H
S(1](1]IZ)CI](13IZICk]CD@ (l](e)(3lO
(XI(X)E®[1]Cn][m]®@(13 feilFli exe i
In the shift in mode, the alphabet keys become one-key commands and the
numerical keys become program area designation keys.
▶ In the extension mode (press ■ "EXT" will be displayed.), small English letters
will be displayed in the shift out mode and special symbols will be displayed in the
shift in mode using the alphabet keys.
Cursor Keys
Press to move the cursor left or riglTt. If pressed once, it moves one character. If you
keep pressing, it will continue to tnove automatically.
O N
All Clear Key
I N S
Delete/Insert Key
' • Deletes one character at the position of the blinking cursor.
• In the shift in mode, press to open up one character space for character insertion.
- 7 -
^ Stop Key
P(os-;dd clurinn proyra(T> uxeajion, "STOP ' wil be d.bpiayed and proyra.n execuiion
li_si()p at the end of the line.
.nny exeaiiion tiace with "SI OP" on the display, this key will display the program
;a number and the line number.
^ Execute Key
When the result of a manual calculation is required, press instead of
In the "WRT" mode, when writing in a program, press to write (store) each line in
the computer. If this key is not pressed, nothing will be written in.
In the "RUN" mode, press for data input during program execution or press to
continue program execution while "STOP" is displayed
^ Answer Key
r manual calculation, press to call out the calculation result (answer) of the previous
dilation.
J Exponent/Pi Key
len inputting exponential value, press after inputting the mantissa portion,
- 9 -
1-2 How to Read the Display
j Displays the calculation value or result. The respective display positions are composed
I of 5 horizontal and 7 vertical dots. Up to a maximum of 12 positions are available for
display of numbers or characters. (Zero is displayed as 0.) If a formula or statement
exceeds 12 positions, the numbers or characters will move to the left and up to a
maximum of 62 characters can be input.
The blinking cursor is displayed until 55 characters have been input. From the 56th
character on, a blinking " | " will be displayed instead.
A 4-position numerical display is available on the upper portion of the display to
indicate the number of remaining steps.
Furthermore, during operation, a will be displayed in the rightmost position of the
4-position display on the upper portion of the display.
Also, various symbols such as "DEG", "RAD" and "GRA" for angular units, "(T]"
(when the ® Key is pressed), "RUN" (RUN mode), "WRT" (WRT mode), "TR" (TR
mode), PRT (PRT mode) and "STOP" will be displayed to indicate the respective
situation.
S
MDL "!, ~
- -~
- -j'iLr -rrp L
U i Ti -TJ L r. *-.'
Adjustment of display contrast can be performed using the adjustment control located
on the right side of the computer.
Turn in the directioti of the arrow to increase contrast. Turn in the opposite direction
to reduce contrast. This is used to compensate contrast of the display in accordance
with battery capacity or to adjust to compensate for the viewing angle.
The standard RAM area (memory) of this unit is 544 steps/26 memories. However, this
can be increased to a maximium of 1,568 steps/222 memories by using the OR-1
optional RAM pack. This expanded RAM area can be used the same as the standard area
and permits step number increase and memory expansion (refer to page 12).
(procedure)
(1) Turn ilie power switch off. r
PCS pad portion
(2) Loosen the two screws on the rear panel
and remove the rear panel.
- 11 -
(3) Insert the pack into the socket on the
computer body and slide the clasp into a
locked position.
* Never touch the connector portion of the ■f— Clasp
RAM pack or the PCB pad portion of the
computer body.
ill Hi
(4) Replace the rear panel and tighten tfie
screws.
After installing or removing the RAM pack, be sure to press the ALL.
RESET button with a pointed object after turning the power switc^t on.;, ^
If the ALL RESET button is not pressed, the memory contents may
changed or a meaningless display may be shown. .' ;
Use care not to allow the connector portion of the pack or the PCB,R3ci,^'^
portion of the computer body to become dusty or dirty, and avpid
fingerprints on them as this will cause poor contact. ' > <«• n
Be sure to place the removed pack in its case and store In a location where ft
is not subject to dust or dirt. : %4v
There are normally 26 memories (variables). The number of steps at this time is 544.
The maximum number of standard memories is 94. Using a RAM pack, this can be
expanded to 222. For memory expansion, program steps are converted to memory using
8 steps per memory.
Example:
Expand by 30 and make 56.
Operation:
Select the RUN mode (press ® (^ ) or the WRT mode (press @(T| ).
A DEFM command is also used to confirm the number of memories which are currently
designated.
Example:
A total of 56 memories are designated.
DEFM SQ [ * * * VAR : 56
• When a large number of program steps are already in use. in order to protect the
existing program, if a designation is attempted which would cause an insufficient
number of steps, an error will occur. (ERR 1 insufficient number of steps)
• The exclusive character variable ($) is not counted when designating since it is a
special memory.
- 1 3 -
Chapters i
How to Calculate
."v.-:
Munual calculation and program calculation are performed in the "RUN" mode. (Press
and RUN will be displayed.)
Furthermore, with respect to "DEC", "RAD" and "GRA", since these only apply to
angular unit, the display of these has no effect for a calculation which has nothing to do
with angular unit.
The number of input positions for this unit are 12 positions for the mantissa portion
and 2 positions for the exponential portion. Internal operations are also performed
using 12 positions for the mantissa portion and 2 positions for the exponential portion.
The range is 1 x 10"®®-±9.99999999999 x 10^®®and 0.
The number of output positions is 10 positions for the mantissa portion and 2 positions
for the exponential portion. However, if an exponential portion is attached, the
mantissa portion will be 8 positions.
• For function results, etc., when the number of display positions (12 positions) is
exceeded, up to 12 positions will be displayed, including the 0 and the decimal point.
- 1 4 -
Example:
Example:
Example:
2 + 3- 4x5-^6 becomes 2 + 3- 43|t5/6
The functions usable with this unit are as follows.
Function Name
Trigonometric function
cos X COS X
tan X TA N X
ACS X
AT N X
Natural logarithm
Common logarithm log X LOG X
Change to integer
- 1 5 -
i Delete fraction from the Integer portion FRAG X FRAG x
j Change to absolute value \x\ ABS X
1 - Symbolize positive number -> 1 SON x
1 0->0
^ • In the case of the RND function, the argument must be enclosed In parentheses
s EXP is a command to call out the numerical value of the exponential table '
2431-1593-838
i Operation:
1 SdiaicadKDd) sa
7 4 1 + 8 5 2
1 5 9 3
( i K D ^ m o ® 2 4 3 1 - 1 5 9 3
8 3 8
Also, the numerical value which Is displayed following a calculation can be used In the
next calculation just as it Is.
Example:
25.3+13.9=39.2
39.2X7.6=297.92
( 2 i ( 5 ) Q ( 3 ] a ( i i ( 3 ) i z ] [ i ] a fl 3 9 . 2
aSCDfe] 3 9 . 2 * 7 . 6
m 2 9 7 . 9 2
- 1 6 -
3 - 5 E r r o —r M e s s a g— e s v - —- ^ ; ~ ~ i ' ' ;^- - - - -iT I'vn']-l-fly
If the formula or substitution siatetneni cfo not conform to BASIC grammar or if the
calculation range of the computer is exceeded, an ei roi will occur during execution and
an error message will be displayed. Concerning power (.vt.)') however, when y is a
natural number, an error message will not be displayed even if .y is smaller than 0 (zero).
The following error messages are displayed for manual calculation.
E R R 2 (Syntax error)
E R R S (Mathematical error]
For manual calculation as well as for program calculation and program write-in, key
operation is performed as follows.
(1) Alphabetical
• Numerical input
- 1 7 -
• Symbol input
Operation: ®clD@ci3t5!DdL)
Operation:
@(3.... (extension mode designation)
I(1]Q(1]|6|(1]|T)B(§](5) -2.369e-45
L I S T
Press or ®aD RUN _
- 1 8 -
• Deletion
For deletion, move the cursor to the position to be deleted and press the ® Key. Each
time the key is pressed, one character is deleted and the characters to the right of that
will move one position to the left.
© g ) S U N
Press @ . S I N
© © © INPUT X.Y
Press . INPUT Y
• Insertion
For insertion, move the cursor to a position located just to the right of the character
after which you want to make an insertion. At that position, press and one
character space wil be opened up. Then press the desired character, number or symbol
k e y.
© © © T = A $
Press and open up one charac
ter space. T_=A$
Press &3CL . T $ = A $
© PRINT X
Press PRINT _ X
Press Cs]©[rD . PRINT SINX
- 1 9 -
Chapter 4
Manual Calculation
In this case, calculations are not made automatically by storing calculation formulas as a
program.
Calculations are performed manually by substituting the calculation on the right side of
the numerical formula for the left side or by calling out the contents of the variable.
This is called "manual calculation".
Example: 124-36-0x5^4=36.75
Operation:
SMinraKDBeaisiaa 12-1-36-9*5 /4 ~
SB 36.75
For memory calculation, etc., when storing the numerical value or calculation result
or when totalling, variables are used. Letters of the alphabet (A through Z) or a
combination of letters and numbers {when used as an array) are used for variables
and they operate as memories.
A substitution formula is used to input a numerical value or a calculation result into
a variable.
- 2 0 -
Example: Store 1234 in variable A.
Example: 7X8+4X5=76
Operation: 708Q405BS 76
-21 -
i
1 • Memory calculation
12X31=372
75^12 = 6.25
1
Operation: A[=i12BS
Aa4583 5 4 0
1 A U 3 ^ m 3 7 2
1 ySQASS 6 . 2 5
Example 23+9=32
53-6=47
-)45X2=90
99+3=33
To t a l 2 2
Operation: M@23Q9BB
M [ = ] M a 5 3 a 6 B S
M@MCa450200
i ME]Ma99Q38a
MBS 2 2
1
1 * For this calculation nnethod, since the result of the respective calculations are not
known, when you want to see the calculation results, use the following method.
1
1
230900 3 2
Mini^oa
'f: 530600 4 7
M@MQ@00
1 4 5 0 2 0 0 9 0
1' M(DMO@BS
1
99Q300 3 3
MEUVjO^Sa
MOO 2 2
S
t
- 2 2 -
1
sV-
4-3-2 How to Perform Function Calculation
• Trigonometric functions (sin. cos, tan) and inverse trigonometric functions (sin"',
cos"', tan"')
Whon using trigononiotfic/inveise iiigononietric functions, be sure to designate the
angular unit.
Example: sin 12.3455*-0.2138079201
Operation: @(D-* "DEG*
SIN 12.3456® 0.2138079201
TA N ® 3 5 ® -0.612800788
O p e r a t i o n : 5 . 6 2 . 3 11 8 52.58143837
1 0lH!ilc':>(*!«^l23 0 . 5 2 6 5 4 0 7 8 4 5
The input range of power (.vt>') is A-> 0.
Example: Give "1" to a positive number, " -1" to a negative number, and "0" to a
SGN OOS
SGNa2iiai
. 12.3X4.56" 56.088
Operation: ABS78-905-6SiBB 1 4 . 0 8 9 2 8 5 7 1
Operation: |NT®c:L780Oa96®iBB 8 1
• This function obtains the maximum integer which does not exceed the original
numerical value.
Example: 100^6=16.66666666
Operation: SET E4 SB (designates 4 effective positions)
100a6BB I 1.667e01
Example: 123 ^ 7 = 17.57142857
12307® [I'7.57
Example: 1-f 3=0.3333333333
- 2 5 -
For arrays, one-dimensional arrays are used with letters attached such as A(/). B(/),etc.
Since these arrays are used both with the normal 26 memories and with expanded
memories, pay attention to the following array arrangement.
A = A ( 0 )
B=A( 1)=B(0)
C=A(2)=B(1)=C(0)
D=A(3)=B(2)=C(1)=D(0)
E=A(4)=B(3)=C(2)=D( 1 )=E(0)
Y=A(24)=B(23)=C(22) • = Y ( 0 )
Z=A(25)=B(24)= =Y(1)=Z(0)
A(26)=B(25)= =Y(2)=Z(1)
A(27)=B(26)= =Y(3)=Z(2)
Expanded memories
A(93)=B(92)= =Y(69)=Z(68)
When arrays are used in this manner, since the same memory may be used depending on
the array argument, avoid using the same memory in the same program.
Example:
Can be used at the same time A, B, C, F(0), F(9)
Cannot be used at the same time F, G, A(5), A(6)
- 2 6 -
Program calculation is a method for-
0 Programming the calculation contents to be executed.
(2) Storing the program in the cotnputer.
(|)Using that program, obtaining the result automatically by simply inputting data.
Let's examine the programming concept and programming procedure required to
process a given problem using the computer.
• What is a program?
In order to make a program, there are various rules or grammar. However, this will be
explained later in detail. At this time, let's take a look at an example of a simple,
fundamental program to see what it looks like.
Command Operand
Example;
1 INPUT A 633 5 steps
Total 22 steps
These are fixed numbers which are used in a program and are used to write numerical
values directly into the program.
In other words, algebraic terms are "variables" and cxjnstant numbers are "constants".
Also, in addition to the above, there are character constants and character variables.
A character constant is a character string which is written directly and these are
enclosed in quotation marks such as "ABC" and "END". A character variable is not a
numerical value but a variable which contains a character string. Various character
variables can be made by changing the character string.
Furthermore, a character string is a group of characters which is enclosed in quotation
marks such as "123". This is not a numerical value. In other words, "123" just happens
to be 1 and 2 and 3 in sequence and is considered the same as "ABC". A character
variable is made by attaching a "$" to a regular variable (A, B, X, Y, etc.). These can be
freely selected from within this range.
Example: A$.B$,C$,X$,Y$
Since this exclusive character variable can use a character function (MID function)
which will be explained later, it is much more convenient than other character variables.
• Numerical variables and character variables which contain the same letter cannot be
Example: y=2*X-F3
In V= 2'l'X+3, the left side is the variable and the right side is the numerical expression.
In other words, the meaning is different from normal mathematics where "the left side
(V) and the right side (2*X+3) are equal".
It means "input the operation result of the right side (2*X+3) into the left side (V)".
It may be easier to understand by thinking of V = 2 *X+3 as Y ■<- 25)«X+3.
- 2 9 -
Operation: Number of remaining steps
0Designate the WRT mode.
® ( T ) P 0 123456789
f Program areas with no
The currently designated programs written in
program area will blink.
* This display varies depending
on the number of memories
or the size of the written
program.
* The area numbers will not be
4 0 l j P R I N T l i V, W B 3 3 4 0 P R I N T V. W
0 Write line 50.
»•' 5)0
Program execution is performed in the RUN mode. (Press ®(@) and "RUN" will be
displayed.)
There are 2 methods for executing a program which has been written.
I (omitted hereafter)
Operation:
• This " ? " is because an INPUT
* When performing following the previous example, a " ? " is displayed. When the
program is in an input await condition, " ? " will not be released even if Q3 is
pressed. Therefore, press ® (Q) then perform operation (2) to re-input data.
Also, to execute from along the way, input the line number after the RUN command
then press the BS Key.
- 3 2 -
Example: To start from line 20.
Operation: RUN 20 SB
• For method J.', it is not necessary to designate the program area to be executed.
However, for method @ . 't is necessary to designate the program area to be
executed. (If the program area Is different, the program written in that program area
will be executed.)
Operation:
• To execute the program
®[i)
4 7 SB 1?
• Next, input the value of variable B.
6 9 B B
s s
Also, when in an input await condition as a result of an INPUT statement, other opera
tions such as manual calculation can be performed.
Furthermore, when you want to stop program execution while in an Input await
condition, press ® .
- 3 3 -
5-4 Program Editing
fkiminrijiaj or i _
30 W=A-B
40 PRINT V,W
50 END
READY P0
If the list is not required from the beginning, designate the line number.
To l i s t f r o m l i n e 3 0
Operation:
30 W=A-B
LIST 30®
4 0 P R I N T V, W
50 END
READY P0
• During LIST command execution, each line will be sequentially displayed, so if you
want to stop, press the li^ Key.
To resume the stopped LIST command, press the GDI Key.
- 3 4 -
1
a. Partial change
P ^ 123456789
^ Blinking means that a program is
written and this is the currently
designated program area.
• Call out line 20 using a LIST command.
i LIST 20 83 20 V=A+Br
• Move the cursor below the
(D® 20 V=A±B
«
If a cursor movement keys (dJand©) remain pressed for more than 1 second, the
cursor will move quickly and continuously.
1
O® 30 W=A-b1"'
«
Be sure to press the (SQ Key. If it is not pressed, only the display will change and the
written program will not be changed.
• If left as is, line 30 can be changed, so press CS3 and the change is complete.
ES
»
Since any other key operation will result in an unnecessary change being made, avoid
pressing any other keys besides the BS and ES Keys.
READY P0
*
30 W=A-B
4 0 P R I N T V. W
50 END
READY P0
- 3 5 -
b. Complete change of one line
30LjW[=)va2aa 30 W=V/2
ready P0
L 1ST sa 10 INPUT A.B
20 V=A=t:B
30 W=V/2
40 PRINT V. W
_50_ END
READY P0
(2) Addition
Addition may be made in line units by writing new lines between existing lines.
Example: Add "U = \/^2" between line numbers 30 and 40 of the previous example
and change line 40 to "PRINT V, W, U".
Input line number 35 to make input between line numbers 30 and 40.
bu 4
35l j U ( = ) Va 2 I I B 35 U=V^2
For inputting between line numbers 30 and 40, line numbers may be freely selected
in the range from 31 through 39.
To change line 40, call it out using a LIST command and add ",U".
LIST 40Sa 4 0 P R I N T V. W
s d o
50 END_
- 3 6 -
Let's list the program to confirm the additions.
READY P0
LISTGE
10 INPUT AtB
20 y=A^B
30 W=V/2
35^ U^y*2
.40 fRiNT_V*W
P R ! N T. . v ^ W i y _ _
10 END
READY P0
Deletion
a. Partial deletion
@(D I P ^ 123456789
• Call out line 40 usin} a LIST command and move the cursor below the " V
b O O
LIST 40 4 0 P R I N T V. W
4 0 P R I N T y. W
40 PRINT W.U
5 0 2
50 END
- 3 7 -
List the program to confirm the deletion.
READY P0
40 PRINT W>U
50 END
READY P0
3063
C o n fi r m t h e d e l e t i o n .
READY P0
40 PRINT W,U
EJMD
READY P0
- 3 8 -
Line renumbering
20 M=N*N
30 L=SQR N
40 PRINT M.L
50 END
Move line 20 between lines 30 and 40.
Operation: @Q] P
20 M=N*N
35 m 30 L=SQR N
READY P2
L 1ST aa 10 INPUT N
20 M=N>fcN
30 L = SQR N
35 M=N>»^N
40 PRINT M,L
50 END
READY P2
- 3 9 -
• In this condition, the contents on line 20 were
moved between line 30 and line 40 but line 20 still
remains, so delete it
P _1_3456789
2 0 8 3
READY P2
L I S T 8 S
10 INPUT N
30 L = SQR N
35 M=N^N
40 PRINT M,L
50 END
READY P2
a. Complete debug
To check logic composition of
I . Ta b l e t o p d e b u g 3 p r o g r a m .
Since table top debug is performed during programming, we will explain conversation
type debug using the display here.
(2) Conversation type debug
It an eriur oixurs cluniuj program execiution, an eiror message will be shown on the
display. These errors will be shown in line uniis and will indicate the kind of BASIC
language error. Based on the error message which is shown on tlie display, debugging
is then manually performed while conveising with the display. For the meaning of the
error messages, refer to the Error Message List on page 61.
Example:
10 INPUT X
20 IF X^0;PRiNT •X^0':GOTO 10
30 Y=XT2 + 3*X+15
40 PRINT Y
50 END
Line 20 of the above program is a judgement of the input range of power When
A*<0, program execution will return to the INPUT statement on line 10.
30 Y=Xt2 + 3X+15
Operation:
@(S3RUN 023 I ?
• Suppose "45" is input at this time. The display would show.
45 OS ERR2 P0-3O
This means that "a syntax error occurred on line 30". Confirm the p r o g r a m c o n t e n t s .
program contents.
c a ^ m P _123456789
The " 5|c" was omitted between "3" and "X" on line 30. Therefore, correct it by
following the procedure for program editing.
30 Y=Xt2-F3_X
40 PRINT Y
-41 -
(3) Debug while executing the program
Conversation type debug is performed by obtaining information from the computer
using an error message. However, when an error message is not displayed but the
calculation result is not as it should be, repeat program execution and confirm the
calculation results along the way.
There are two ways to do this: (1) the execution process is stopped using a STOP
command; (2) execution is performed in one line unit using the TR (trace) mode.
10 Y=0
20 INPUT N.X
30 FOR 1 = 1 TO N
40 Y=Y+X*X
50 NEXT 1
60 PRINT Y
70 END
In order to see the value of Y in this FOR-NEXT loop, the result of each loop is viewed
using a STOP statement.
Operation:
• The STOP statement should be placed right after the calculation formula. Therefore,
write a STOP statement between line 40 and line 50.
45 STOP 30
^(DRUNSa
8 7 3 0
7 5 6 9
- 4 2 -
• If the program is resumed, it will stop at the next STOP statement and the value of Y
can be obtained again.
Y SQ 1 5 1 3 8
Operation:
RUNBa P 0 - 1 0
?
r H s To *
& P 0 - 2 O
'TR" and "STOP" will
Continue program execution. • 33 7 be omitted hereafter.
4 33 ?
8 7 3 3
P 0 - 2 0
QQI P 0 - 3 0
S23 P 0 - 4 0
The value of Y -Y S3 7 5 6 9
m P 0 - 4 5
Repeated hereafter
Debug using the TR mode is ideal for checking the entire flow and is convenient for
checking to see where mistakes have been made.
- 4 3 -
&6 Program Commands
Example:
INPUT A
As a result of an INPUT statement, a " ? " will be displayed and an input await
condition will occur. At this time, if data is input and the US Key is pressed, program
execution will proceed to the next process.
Furthermore, when in an input await condition, even if the GS Key is pressed, the
condition will not be released. Therefore, when you want to stop the program along the
way. press @ (^.
• Data which can be input using an INPUT statement includes numerical values or the
results (answers) of numerical expression (for numerical variables) and character
strings (for character variables).
In the case of INPUT A
= 9 8 7 6 5 4
- 4 4 -
• KEY function
This function is used to read one character into the character variable by pressing one
key during program execution. This function is different from an INPUT statement and
does not stop in an input await condition (" ? " display). Even when there is no key
input, program execution will proceed sequentially.
Format: character variable = KEY
Example:
10 A$=KEY
20 IF A$= ^A' THEN 100
30 IF A$= '*8' THEN 200
40 IF A$= THEN 300
50 GOTO 10
This program shows the data input using the KEY function and a portion of the
distribution. However, a determination will be made using the IF statements whether
the character data read by the KEY function on line 10 was input or not. Using the
KEY function, even if the HQ Key is not pressed, the first key input only will be read.
However, since program execution will not stop as it does when using an INPUT
statement, an input await condition is achieved by incorporating the following IF
statements.
The IF statements on lines 20 through 40 are judgement commands and perform
distribution using character variables which were input using the KEY function. For
details concerning IF statements, refer to page 48.
- 4 5 -
The output control function following the PRINT statement is a CSR function, which
designates the location where the following data is to be displayed.
For the numerical expression, a variable or calculation formula is written. In the case of
a variable, the contents of the variable will be displayed. In the case of a calculation
formula, the calculation result will be displayed.
PRINT 789
In the case of a character expression, the characters enclosed in quotation marks will be
displayed.
Example:
PRINT 'ABC
• CSR function
The CSR function is an output control function and designates the location where the
data is to be displayed.
numerical expression
Format: PRINT CSR
expression' character expression
0 1 2 3 4 5 6 7 8 9 1 0 11
Example:
ABODE
- 4 7 -
GOTO A* ICQ to "oe number which Is the result of A* 100
(jump to line 200 if A is 2)
GOTO #2 jump to the P2 program area
GOTO ttX jump to the program area which is the value of variable X
(jump to the P8 program area if X is 8)
GOTO #P+1 jump to the program area which is the result of P+1 (jump
to the P5 program area if P is 4)
A GOTO statement is used to repeat program execution from the beginning or to jump
to another program to perform a particular calculation.
The comparison expression following the "IF" compares the right side and the left side
of "=" or "^" and if YES, program execution proceeds after the "THEN" or If
NO, program execution proceeds to the next line.
This operation is shown in the flowchart below.
This means that if the IF statement condition is fulfilled, the process goes in the "YES"
direction and if the IF statement is not fulfilled, the process goes in the "NO" direction.
In other words, an IF statement indicates a branch and selects the next operation as a
result of judgement. An IF statement can be used to terminate a loop (repetition) when
the number of data is unknown or to select the next operation based on a calculation
result, etc.
Constants/variables/numerical expressions/character constants/character variables can bef
used for this comparison.
- 4 8 -
5-6-5 Loop Command
• FOR-NEXT statement
A FOR "NEXT statement is used when you want to perform similar operations
repeatedly and the number of repetitions (loops) is known.
In other words, this is a command to repeatedly execute the command between "FOR"
and "NEXT" while a variable changes from ii to m in increments of C.
When execution reaches m, it proceeds to the command following "NEXT".
- 4 9 -
Example:
To increase variable I in increments of 2 between 1 and 10.
FOR I -1 TO 10 STEP 2
NEXT I
I
NEXT A
FOR P =0 TO R
NEXT P
* Nesting
Up to 4 FOR-NEXT loops can be stacked. This stacking is called "nesting".
-FOR A =
-FOR B--
This shows 4-stack nesting.
-FOR C=-
rFOR
i-NEXT D
I NEXT 0
NEXT B
NEXT A
When nesting is performed in this manner, attention must be paid to the NEXT
statement and its variable which correspond to the FOR statement.
- 5 0 -
FOR I-l TO 5 STEPl
FOR J =2 TO 20 STEP 2
5
NEXT I This kind of FOR'NEXT loop
cannot be assembled.
NEXT J
Furthermore, exit from FOR'NEXT loop is permitted but entry to FOR'NEXT loop is
not permitted.
FOR A =
FOR B
THEN-
NEXT B
NEXT A
• GOSUB statement
A subroutine is also called a subprogram . It is different from programs shown so far
(called "main routines"). It is a separate program to be called out from a main routine.
The command to call out this subroutine is a GOSUB statement. Using this command,
program execution jumps from the main routine to the subroutine and after executing
the program in the subroutine, jumps back to the original location in the main routine
» using the RETURN statement in the subroutine.
-51 -
rhe numerical expression following the GOSUB statement indicates the initial line
lumber of the subroutine area. Without a RETURN statement at the end of the
lubroutine area, program execution cannot return to the main routine.
1000 A=B
subroutine area
100 GOSUB 1000
1 9 9 0 RETURN
9 9 9
10.A=B
999 RETURN
- 5 2 -
• Nesting
Similar to the FOR*NEXT statement, GOSUB statements can also be stacked. The
number of times the subroutine is i:alled out is fixed.
This nesting can be performed up to 8 levels. Therefore, a subroutine can be called out
from a subroutine.
Subroutine
Subroutine
Subroutine
Subroutine
- 5 3 -
5-6-7 Multistatement
A multistaterneni is used to connect two or more commands using a
Example:
10 A=2
20 B=10 10 A=21B=101C=50
30 C=50
When followed by a line number, the program will start from that line number. If it is
omitted, the program will start from the initial line.
Example;
a
R U N m •■• s t a r t f r o m t h e b e g i n n i n g
I
5-6-11 List Command
• LIST command
A LIST command is used to display the program contents. It can be used in both the
"RUN" mode and the "WRT" mode.
When followed by a line number, display will be made in sequence starting from the
designated line number of the currently designated program area. When no line number
is designated, display will be made from the beginning of the program.
In the case of "LIST A", this is a command to display the programs in all program areas.
It displays program contents sequentially from P0 through P9. This command cannot be
used by writing it in a program.
When performed in the "RUN" mode, the program contents will be displayed
sequentially from the designated line. However, when performed in the "WRT" mode,
one line is displayed each time the OS Key is pressed.
Example:
(RUN mode) (WRT mode)
If performed in the "WRT" mode, program editing (refer to page 34) is possible.
This MODE command is the same as the designation which is performed by pressing the
® Key during manual operation.
- 5 5 -
5-6-13 Output Format
• SET command
A SET command is used to designate the display output format. It designates the
number of effective positions and the number of decimal positions.
The LEN function is used to count the number of characters in a character variable. It
permits the size of the character variable to be known.
Example:
If A$= '"ABODE*, LEN(A$)=5.
• MID
The MID function is only used with the exclusive character variable ($). It extracts a
certain number of characters from the character string in the $ variable.
This means to extract n characters from the mth character of the character string stored
in the exclusive character variable ($).
Numerical expression m should not exceed the number of characters stored. Also, m + n
should not exceed the number of stored characters + 1.
Furthermore, when numerical expression n is omitted, all of the characters from mon
. will be extracted.
Example:
If $--= '"PB-100*
MID (2.3) - ^B-r and MID (4)= *100*
- 5 6 -
• VA L
The VAL function changes the numbers In a character variable into a numerical value.
F o r m a t : VA L ( c b a r a c t e r v a r i a b l e )
Since this function changes the numbers in the character variable into a numerical value,
when there are no numbers in the character variable (for example. "ABC"), an error will
o c c u r.
E x a m p l e : I f Z $ = V S S e S * . VA L { Z $ ) = 7 8 9 6 3
Note: When this function is used in a program and an error occurs as a result of the
data in the variable being other than numbers, "ERR 2" will be displayed and
the program area and line number will not be displayed.
The VAC command clears the data in all variables. It makes numerical variables "0" and
makes character variables "null".
This command can be used by writing it in a program or manually. Therefore, when you
want to clear all data prior to executing a program, make input at the beginning of the
program.
10 VA C
Manual execution
VA C m
Note: This VAC command cannot be used in a mullistatement (refer to page 54).
Therefore, write it independently on one line.
A CLEAR command is used to clear a program which has been written. It is executed
manually in the "WRT" mode.
Format: CLEAR
CLEAR A
A "CLEAR" command only clears the program which is in the currently designated
program area (P0, PI, etc.) A "CLEAR A" command clears all programs in all program
areas from P0 through P9.
- 5 7 -
Example:
• Program recording
•NO.r
• Program callout
Even if a program has already been written in the designated program area prior to
callout, the former program will be erased starting with the initial line number of the
program to be loaded and the new load will be made correctly.
- 5 8 -
• Recording of all programs
Operation:
S AV E A [ " fi l e n a m e " ) GQ .1.
Operation:
LOAD A ["filename") OS I
Display during program load ) AF I PB— 1 00 m
'T' ' I '
A l l fi l e s fi l e n a m e
Even if programs are already written in program areas prior to callout. the former
programs will be cleared and then the new programs will be called out.
Furthermore, both the SAVE A command and the LOAD A command can only be used
m a n u a l l y.
• Data recording
Format: PUT ("filename") variable 1 [.variable 2]
(Items in brackets may be omitted.)
The data which is recorded on the tape is the data in the variables from variable 1
through variable 2.
When recording the data in the exclusive character variable $. write $ first.
This command can be used either manually or by writing it in a program.
For manual operation, start the tape recorder in the RECORD position.
Operation:
PUT ("filename") variable 1 [.variable 2] fZS
When performing by writing it in the program, write the PUT command along with the
line number and start the written program.
- 5 9 -
• Data cailout
For use in a program, write it with a line number attached and start the program.
■ Printer
An exclusive mini printer can be connected to the PB-100. By connecting this printer,
program lists or data can be extracted. Also, the output of calculation results during
execution can be printed out.
For printer connection procedures and operating procedures, refer to the mini printer
operation manual.
To print a program list, press ® CZ) and designate the PRT mode.
Program list
S^(S1@(Z)
LIST m or LIST A SS
®(S) (PRT mode release)
After printout is complete, be sure to press ® (g) and release the PRT mode.
Also, to print calculation results or operation contents, printout can be performed
automatically by writing "MODE 7" and "MODE 8" in the program.
Example:
100 MODE 7
1 10 PR INT A
120 MODE 8
When "MODE 7" is written in the program, be sure to write "MODE 8" prior to
program termination and release the PRT mode.
- 6 0 -
• Program cannot be written Clear unnecessary pro
d u e t o i n s u f fi c i e n t n u m b e r o f grams or reduce the num
steps or memory cannot be ber of memories.
expanded. 'Divide and simplify the
• Stack overflow due to a com numerical expression.
plicated calculation formula.
C l a s s i fi c a t h i n
C S R
CSR /I j;} Displays from the designated nth
position.
(0 ^ ^ 11) P. 4 6
G O T O
0/-VT/-. / line number ] Causes control to jump to the
i variable / d e s i g n a t e d l i n e n u m b e r. P. 4 7
Causes control to jump to the line
number following THEN, or exe
IF comparison expression cutes the command following
if-ITHENI " ;". if the result of the compari
1 THEN line number \
» ' \ ; command J son is true.
Causes control to proceed to the
next line number if the result of
t h e c o m p a r i s o n i s f a l s e . P. 4 8
Calls out the subroutine of the
designated line number for execu
tion. After the subroutine is exe
cuted, control returns to the
G O S U B GOSUB 11 variable / GOSUB statement by the RE
TURN statement to proceed to
the command following that
^OYfclcil.lb 3f)l statement. P. 5 1
- 6 2 -
Command
C l a s s i fi c a t i o n
n a m e
m m
Angular unit Designates trigonometric angular
M O D E units as degree (4), radian (5) or
designation
gradient (6). P. K
( E n Designates the number of effec
SET Fn tive positions or number of deci
S E T
N mal positions for the displayed
(0 ^ n^ 9) numerical value. P. 5 6
LEN (character Calculates the size of the charac
L E N
variable) ter variable. P. 5 6
P. 5 8
log X, In X
x»(xty)
- 6 4 -
Specifications
I Type
PB-100
■ Fundamental calculation functions j
Negative numbers, exponentials, parenthetical addition, subtraction, multiplication and'
division (with priority sequence judgement function (true algebraic logic)) j
■ Built-in function ■
■Program functions
K E Y, C S R . L E N . M I D . VA L
■Calculation range
±1 X 10"^ to ±9.999999999 x 10^ and 0 (internal calculation uses 12 mantissa
positions)
■Program system
Stored system
■Program language
BASIC
■Number of steps
Maximum 544 steps (maximum 1.668 steps when optional RAM pack is loaded)
■Program capacity
Maximum 10 programs (P0 through P9) ■
■N u m b e r of memories '
Standard 26, expandable to 94 (maximum 222 memories when optional RAM pack is
loaded) and exclusive character variable ($) ;
■ Number of stacks
Subroutine — 8 levels
FOR-NEXT loop-4 levels
Numerical value — 6 levels
Calculation elements — 12 levels
■Power supply
% 2 lithium batteries (CR2032)
■Power consumption
Maximum 0.02 W
■ Battery life
Mainframe only — approximately 360 hours (Continuous use)
■Auto power-off
Power is turned off automatically approximately 7 minutes after last operation.
■Weight
116 g (4.1 oz) including batteries
GUIDELINES LAID DOWN BY FCC RULES FOR USE OF THE UNIT IN THE U.S.A.
(not applicable to other areas).
This equipment generates and uses radio frequency energy and if not installed and used properly, ttiat is. in
strict accordance with the manufacturer's instructions, may cause interference to radio and television
reception. It has iseen type tested and found to comply with the limits for a Class B computing device in
accordance with the specifications in Subpart J of Part 15 of FCC Rules, which are designed to provide
reasonable protection against such interference in a residential installation. However, there is no guarantee
that interference will not occur in a particular installation. If this equipment does cause interference to
radio or television reception, which can be determined by turning the equipment off and on, the user is
encouraged to try to correct the interference by one or more of the following measures:
... reorient the receiving antenna
... relocaieMie computer with respect to the receiver
... move the computer away from the receiver
... plug the computer into a different outlet so that computer and receiver are on different branch
circuits.
If necessary, the user should consult the dealer or an experienced radio/television technician for additional
suggestions. The user may find the following booklet prepared by the Federal Communications Commission
helpful; "How to Identify and Resolve Radio-TV Interference Problems". This booklet is available from the
US Government Printing Office, Washington, D C., 20402, Stock No. 004-000-00345-4.
- 6 6 -