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
|