The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

OT Renumber fpr Sharp PC-1500
Message #1 Posted by Karl-Ludwig Butte on 1 May 2007, 1:30 p.m.

Hi All,

I hope you don't mind asking for a hint or link to a Renumber command for the Sharp PC-1500. I looked through all the few links I got with Google but couldn't find one except one commercial offer. Isn't there any Renumber routine out there ? I wonder. Thank you very much in advance.

Kind regards

Karl

      
Re: OT Renumber fpr Sharp PC-1500
Message #2 Posted by Dave Boyd on 1 May 2007, 1:45 p.m.,
in response to message #1 by Karl-Ludwig Butte

Quote:
I hope you don't mind asking for a hint or link to a Renumber command for the Sharp PC-1500. I looked through all the few links I got with Google but couldn't find one except one commercial offer. Isn't there any Renumber routine out there ? I wonder. Thank you very much in advance.

I believe the Radio Shack TRS-80 PC-2 was an OEM version of the Sharp PC-1500 - and that they used the same BASIC. There's a nice resource page for the Pc-1500/PC-2 here, including a link to the PC-2 manual, which you probably already found: http://www.pc1500.com/

If the BASIC was indeed the same, then there isn't a built-in renumber command. My copy of the PC-1500 manual is at home -- I'll check tonight for you.

I loved my PC-2. I still think the tiny 4-pen printer/plotter was pretty darned cool. It's fun to dig it out and show it off every few years. Last time I had to build a new battery pack for the printer...

      
Re: OT Renumber fpr Sharp PC-1500
Message #3 Posted by Bill (Smithville, NJ) on 1 May 2007, 2:37 p.m.,
in response to message #1 by Karl-Ludwig Butte

Hi Karl,

As Dave has already pointed out, there's a great PC-1500 web page.

One way of doing it, would be to write it to the cassette port, save it as wave file on PC and then convert to text file where you could easily use a small program to renumber the source listing. You could also use the PC emulator to test the program out before reversing the Text to Wav and then using the cassette in to get it back into the PC-1500.

A little klutzy, but do-able. I've used this method to dump a listing of a large program from a ROM cartridge to the PC and then print the listing for further study.

Good Luck,

Bill

      
Re: OT Renumber fpr Sharp PC-1500
Message #4 Posted by Peter Geiser on 1 May 2007, 4:04 p.m.,
in response to message #1 by Karl-Ludwig Butte

Hi Karl

There is a RENUMBER in one of the Toolkits there were sold commercially.

It would be possible to write one in Basic, but you need to know how the line numbers are set up.

The number of a line is a 2-Byte binary number in memory, you need to PEEK it, change it, and POKE it back into the memory. A line of BASIC starts with the line number (2 Bytes), 1 Byte for the length of the line, then the BASIC-Tokens and commands, and finally as the end of the line the byte 0Dh (13 dec).

Depending on your RAM modules, the area for BASIC programs starts at 40C5, 38C5, 20C5 or 00C5 (all hex).

Best regards
Peter

            
Re: OT Renumber fpr Sharp PC-1500
Message #5 Posted by Namir on 1 May 2007, 4:54 p.m.,
in response to message #4 by Peter Geiser

Of course the renumbering task has to correctly renumber GOTO and GOSUB statements too. So the utility has to scan each line for the GOTO and GOSUB tokens and alter their parameters.

                  
Re: OT Renumber fpr Sharp PC-1500
Message #6 Posted by Peter Geiser on 4 May 2007, 6:06 p.m.,
in response to message #5 by Namir

Namir

You know everything! I indeed forgot about that bit.

Btw., if the number in the GOTO, GOSUB or THEN (if followed by a line number) statement becomes longer, you will have to adjust the line length byte as well.

Thanks
Peter

            
Re: OT Renumber fpr Sharp PC-1500
Message #7 Posted by Karl-Ludwig Butte on 3 May 2007, 3:06 a.m.,
in response to message #4 by Peter Geiser

Thanks to all of you who responded and your hints about programming a renumber function (I already guessed that I have to do it myself).

Kind regards

Karl


[ Return to Index | Top of Index ]

Go back to the main exhibit hall