Post Reply 
Interesting Sharp PC-1500 behavior
02-07-2023, 04:42 PM
Post: #1
Interesting Sharp PC-1500 behavior
10 PRINT "LINE 10"
20 PRINT "LINE 20"
30 END
RUN it, and when "LINE 10" is displayed type "PRINT 5+5" (no quotes) and hit ENTER. Then hit ENTER again.

What happens? Does it surprise you?
Find all posts by this user
Quote this message in a reply
02-07-2023, 06:12 PM (This post was last modified: 02-07-2023 06:17 PM by robve.)
Post: #2
RE: Interesting Sharp PC-1500 behavior
(02-07-2023 04:42 PM)Jeff_Birt Wrote:  10 PRINT "LINE 10"
20 PRINT "LINE 20"
30 END
RUN it, and when "LINE 10" is displayed type "PRINT 5+5" (no quotes) and hit ENTER. Then hit ENTER again.

What happens? Does it surprise you?

This is normal and expected:

RUN<ENTER>
LINE 10
PRINT 5+5<ENTER>
10
<ENTER>
LINE 20


The reason is that WAIT is enabled by default and PRINT waits for you to press <ENTER>. But you can enter expressions instead, to see what values the variables have, which is great for debugging. Then press <ENTER> to continue the program. Press <UP> and hold to see the BASIC line executing. Pretty much all SHARP PC work this way. Use WAIT 0 in your program to remove the WAIT state.

Press <CA> (<SHIFT> <CL>) to reset the state back to "normal" RUN MODE. This is why <CA> does a little bit more than <CL>.

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
02-07-2023, 06:35 PM
Post: #3
RE: Interesting Sharp PC-1500 behavior
I expect the pause after PRINT, most pocket computers to that or have a pause statement to accomplish the same thing. I did not expect it to evaluate an expression that was typed in while paused, or let you do something like 'GOTO 100' and it will jump to 100 and keep on running. You can also jump to another part of the program with a DEF key while in PRINT pause. Is this mentioned anywhere in Sharp documentation?

It has a few more quirks:

10 PRINT "Line 10"
20 END
30 PRINT "Line 30"

If while pause after line 10 you do:

CLOAD a

The BUSY annunciator will come on and it will go through the motions of loading a program. The program is memory is not overwritten and when the CLOAD a completes it will skip line 20 and continue at line 30.

This way:
10 PRINT "Line 10":END
30 PRINT "Line 30"

If you enter CLOAD a after line 10 pauses, it will actually load a new program.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)