EasyManua.ls Logo

Sharp PC-1500 - Page 98

Sharp PC-1500
169 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
A
ll
and more about Sharp P
C-
1500 at http://www.PC-1500.info
G. DEBUGGING
No
matter
h
ovv
careful
you
arc, eventually
you
wi
ll
create a program
wh
ich
does
not
do
quite
wha
t
you
expec
t it
to
. In
order
to
iso
la
te
th
e p
ro
ble
m,
SHARP's
designers
ha
ve
provided
a s
pec
ial
method
of
execut
i
ng
pro
grams
known
as
th
e
"T
r
ace"
mode
. In t
he
Tr
ace mode, the PC·
1500
wi
ll
disp
l
ay
the
line-
number
of
ea
ch pr
ogram
line
and
\\lill halt aft
er
the
ex
ecut
ion
of
th
at
li
ne
. This
allov1s
you
to
fo
ll
ow
(or trace) the sequence
of
ins.t
ructions
as
they are actua
lly
pe
·
rformcd.
When
the
program
pauses
aft
er t
he
execu
tion
of
a line. y ou
ma
y i
ns
pect
or
~l t
er
the
values of
va
dable
s.
The
form
of
the i
nstru
cti
on
for
initiating
th
e-
Trace
mod
e is si
mp
l
y:
TRON
. T
he
TRON
in
st
ruc
tion
ma
y
be
issued as a
command
{i
n RUN
mo
d
e)
or
it
may
be
embedded
..
as a
stat
eme
nt,
within a program. Used as a
comma
nd,
TRO
N
info
rms
SHARP
th
at
t
rac
ing is re
qu
ir
ed
during
t
he
ex
·
ec
ut
ion
of
a
ll
subseq
ue
nt
pro
grams.
Th
e
prog
r
ams
to
be
traced
are
th
en
started
in a normal
manner,
wi
th a
GO
TO
or
RUN
com
m
and
.
If
TRO
N is
us
ed
as a
statement,
it
will i
nit
i
ate
the Trace m
ode
only
when
the li
ne
con
taining
it is
exec
ute
d. If, for some reason,
th
at
li
ne
is never r
eached,
t
he
Trace m
od
e
\vi
ii remain i
nac
tive.
On
ce
initiate
d,
the
Trace
mode
of
o
pe
ration
rema
i
ns
in
effect
u
nt
il canceled
by
a
TROFF
i
ns
tr
uctio
n. T
he
TRO
FF instr
uct
i
on
may
also
be
issued as eit
her
a
co
mmand
or
a st
at
eme
nt.
The
Tra
ce
mode
can also be
canc
eled
by
the
key
sequence
:
As an
example
of
...
1s
ing t
he
Tr
a
ce
mode,
en
ter
t
he
fo
llo,ning program
to
co
m pu
te
the
lengt
h
of
the
hypotenuse
of
a triangle given
the
leng
th
of
the
sides:
Pr
ogram
Listing:
10
IN
PUT A. B
2()
A =
A*A:
B =
B*B
30
H =
y(A
+ B)
40
PR
INT
"HY
P
OTE
NUSE =
'"
H
In RUN
mode,
issue
the
T RON c
omman
d,
foll
owed
by
the
RUN
co
mm
and.
Noti
ce
th
at
th
e
INPUT
command
ope
rates
in
t
he
usual
ma
nner by
disp
lay
in
g a
quest
i
on
mark
fo
r
each
i
np
ut
value required.
As
soo
n as
you
have
ent
ered
t
wo
val
ue
s,
the
line n
umber
of
the I
NP
UT
st
atement
ap
pe
ars:
RUN
· 1
1 0
By
pressing the
CD
(Up A
rr
ow)
k
ey
and
ho
ld
ing
it.
you
may r
ev
iew
the
en
ti
re
line :
RUN
;-i
I
1 0
IN
PUT
A,
B
To
con
tinue
t
he
p
:r
ogram, press
the
IT)
(OO\vn Arro
w)
key
o
nc
e. This
cau
ses thie
1)e>:.t
li
ne
to
be
execu
t
ed
and
its line
nu
mber
to
be dis
played.
Again,
you
may revi
ew
the
tine
wit
h the
(U
p
Arro\v)
key
.
You
may
al
so
che
ck
the
con
tents
of
any variable
by
t
yping
its
name
and
pressing
!1!
HJl!Jt) :
96
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals