[Coco] How to generate BASIC line pointers ?

Johann Klasek johann+coco at klasek.at
Sat Sep 7 09:35:53 EDT 2013


Hi Jens!

On Sat, Sep 07, 2013 at 09:55:56AM +0200, Jens wrote:
> Am 06.09.2013 23:22, schrieb Johann Klasek:
> >On Fri, Sep 06, 2013 at 10:54:23PM +0200, Jens wrote:
> >>>>And what's about "machine code starting address" and "machine code 
> >>>>loading
> >>>>address" ?
> >>>
> >If you translate the starting address and loading address in to ASCII
> >you get the first characters derived from the filename (maybe just
> >the first four) ...
> >E.g.:
> >
> >Examples from the Manual - 39~58 [run].wav
> >Filename is missing in the post (maybe EX39...)
> >machine code starting address: 0x4558
> >machine code loading address: 0x3339
> >-> EX39
> >
> >Filename: 'SUPER-D'
> >machine code starting address: 0x5355
> >machine code loading address: 0x5045
> >
> >-> SUPE
> >
> >Maybe by convention of the save routine in DECB.
> 
> Wow. So simple... So the naming "machine code start/load address" must be 
> wrong, isn't it?

No, at all because this field are used in case the progam is of type
machinecode (type code = 2), where these fields actually carry this purpose. ;)

> 
> But why? Theses information is redundant. What's the deeper meaning behind 
> it?

Just in case of Basic program (or data-only, type code = 1).

The filename block is always the same for all type of save and must fit
all purposes, but not all entries are used. For Basic programs it may be
better to put an address in there which cannot accidently blow the
system if CLOADM it (and placing it in the system area). ASCII-code
ensures this suffently. ;)


Johann




More information about the Coco mailing list