[Coco] CORRECTION: Re: Exec address of disk loaded ml program?

Fedor Steeman petrander at gmail.com
Wed Apr 11 08:34:26 EDT 2007


Hi Bob,

I don't think I misunderstood, because you answered exactly what I was
asking!

The question remains: How to retrieve that part of the file that contains
the start/load address (and the length perhaps). What is the random access
that Arthur talks about? Is it DSKI$?

Cheers,
Fedor


On 11/04/07, Bob Devries <devries.bob at gmail.com> wrote:
>
> Fedor, I think you mis-understand.
>
> The load address and the exec address are written as part of the file in a
> bibary file, and the load address and each line's length is stored as part
> of each Basic file also. Only the data type files don't have this
> information, but the length of any file can be calculated from directory
> and
> granule table information.
>
> *shameless plug* : Please make sure you get the next two CocoNutz
> newsletters, 'cos I have done a tutorial about the disk directory
> structure
> in those.
>
> --
> Regards, Bob Devries, Dalby, Queensland, Australia
>
> Isaiah 50:4 The sovereign Lord has given me
> the capacity to be his spokesman,
> so that I know how to help the weary.
>
> website: http://www.home.gil.com.au/~bdevasl
> my blog: http://bdevries.invigorated.org/
>
> ----- Original Message -----
> From: "Fedor Steeman" <petrander at gmail.com>
> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> Sent: Wednesday, April 11, 2007 9:40 PM
> Subject: Re: [Coco] CORRECTION: Re: Exec address of disk loaded ml
> program?
>
>
> > Can that information otherwise be found on the disk itself? I mean how
> > does
> > DISK BASIC find out where to put it in memory on loading if it is not
> > written somewhere in the file?
> >
> > Cheers,
> > Fedor
> >
> >
> > On 11/04/07, theother_bob <theother_bob at yahoo.com> wrote:
> >>
> >> As I recall, after LOADMing a program from Disk, you could PEEK to find
> >> the Start and EXEC addresses and the length. I don't have the info
> handy
> >> at
> >> the moment, but that was how I did it back in the day. You just add the
> >> length to the start address to get the end address.
> >>
> >> Bob
> >>
> >> ----- Original Message ----
> >> From: Arthur Flexser <flexser at fiu.edu>
> >> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> >> Sent: Wednesday, April 11, 2007 1:09:15 AM
> >> Subject: Re: [Coco] CORRECTION: Re: Exec address of disk loaded ml
> >> program?
> >>
> >>
> >> Carl's program seems to be for finding the exec address, which CAN be
> >> found,
> >> much more easily, by peeking as you stated.  It is only the start and
> end
> >> addresses that require opening the file for random access.
> >>
> >> Art
> >>
> >> On Wed, 11 Apr 2007, Bob Devries wrote:
> >>
> >> > Thanks, Art.
> >> >
> >> > You're quite right of course. I'd overlooked that it was for Disk
> based
> >> > programmes. Indeed, Carl England's answer was better, but requires a
> >> basic
> >> > programme to find it.
> >> >
> >> > --
> >> > Regards, Bob Devries, Dalby, Queensland, Australia
> >> >
> >> > Isaiah 50:4 The sovereign Lord has given me
> >> > the capacity to be his spokesman,
> >> > so that I know how to help the weary.
> >> >
> >> > website: http://www.home.gil.com.au/~bdevasl
> >> > my blog: http://bdevries.invigorated.org/
> >> >
> >> > ----- Original Message -----
> >> > From: "Arthur Flexser" <flexser at fiu.edu>
> >> > To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> >> > Sent: Wednesday, April 11, 2007 12:16 PM
> >> > Subject: Re: [Coco] CORRECTION: Re: Exec address of disk loaded ml
> >> program?
> >> >
> >> >
> >> > >I think the correction needs a correction:  This works only for
> >> cassette
> >> > > files.  The start and end address for disk files, contiguous or
> not,
> >> > > cannot be
> >> > > found by simple peeking.  (It is possible to do it by opening the
> >> > > file
> >> for
> >> > > random access and getting the relevant bytes that way.)
> >> > >
> >> > > Art
> >> > >
> >> > >
> >> > > On Wed, 11 Apr 2007, Bob Devries wrote:
> >> > >
> >> > >> Correction:
> >> > >> I reversed the START and END addresses, sorry.
> >> > >>
> >> > >> START=PEEK(487)*256+PEEK(488)
> >> > >> END=PEEK(126)*256+PEEK(127)-1
> >> > >> EXEC=PEEK(157)*256+PEEK(158)
> >> > >>
> >> > >> Sorry for the error
> >> > >>
> >> > >>
> >> > >> > The start and end addresses of a contiguous BINARY disk file can
> >> > >> > be
> >> > >> > found
> >> > >> > in a similar way, by PEEKing values:
> >> > >> >
> >> > >> > START=PEEK(126)*256+PEEK(127)
> >> > >> > END=PEEK(487)*256+PEEK(488)-1
> >> > >> > EXEC=PEEK(157)*256+PEEK(158)
> >> > >> >
> >> > >> > Hope it helps.
> >> > >> >
> >> > >> > --
> >> > >> > Regards, Bob Devries, Dalby, Queensland, Australia
> >> > >> >
> >> > >> > Isaiah 50:4 The sovereign Lord has given me
> >> > >> > the capacity to be his spokesman,
> >> > >> > so that I know how to help the weary.
> >> > >> >
> >> > >> > website: http://www.home.gil.com.au/~bdevasl
> >> > >> > my blog: http://bdevries.invigorated.org/
> >> > >> >
> >> > >> > ----- Original Message -----
> >> > >> > From: "Fedor Steeman" <petrander at gmail.com>
> >> > >> > To: "CoCoList for Color Computer Enthusiasts"
> >> > >> > <coco at maltedmedia.com
> >> >
> >> > >> > Sent: Wednesday, April 11, 2007 5:09 AM
> >> > >> > Subject: Re: [Coco] Exec address of disk loaded ml program?
> >> > >> >
> >> > >> >
> >> > >> >> Right, thanks! So at least that is the same as on a
> cassette-only
> >> > >> >> system...
> >> > >> >> But I guess on a disk system, there is no easy way of figuring
> >> > >> >> out
> >> the
> >> > >> >> start
> >> > >> >> and end addresses? Unless you use a hex editor to look at the
> >> virtual
> >> > >> >> disk?
> >> > >> >>
> >> > >> >> Cheers,
> >> > >> >> Fedor
> >> > >> >>
> >> > >> >> On 10/04/07, L. Curtis Boyle <curtisboyle at sasktel.net> wrote:
> >> > >> >>>
> >> > >> >>> On Tue, 10 Apr 2007 10:01:00 -0600, Fedor Steeman
> >> > >> >>> <petrander at gmail.com>
> >> > >> >>> wrote:
> >> > >> >>>
> >> > >> >>> > Hi all,
> >> > >> >>> >
> >> > >> >>> > Probably a dumb question, but in Disk Basic how to retrieve
> >> > >> >>> > the
> >> > >> >>> > execute
> >> > >> >>> > address of a ml program loaded from floppy?
> >> > >> >>> >
> >> > >> >>> > I mean, if EXEC can figure out where to find the address, so
> >> can
> >> > >> >>> > I...
> >> > >> >>> >
> >> > >> >>> > Thanks,
> >> > >> >>> > Fedor
> >> > >> >>> >
> >> > >> >>>
> >> > >> >>> You can look at the 2 last 2 bytes of the .BIN file, or, after
> >> > >> >>> LOADMing
> >> > >> >>> it, you can do:
> >> > >> >>> ?PEEK(157)*256+PEEK(158)
> >> > >> >>>
> >> > >> >>> This works with cassette files (that don't autostart) as well.
> >> > >> >>>
> >> > >> >>>
> >> > >> >>> --
> >> > >> >>> L. Curtis Boyle
> >> > >> >>>
> >> > >> >>> --
> >> > >> >>> Coco mailing list
> >> > >> >>> Coco at maltedmedia.com
> >> > >> >>> http://five.pairlist.net/mailman/listinfo/coco
> >> > >> >>>
> >> > >> >>
> >> > >> >> --
> >> > >> >> Coco mailing list
> >> > >> >> Coco at maltedmedia.com
> >> > >> >> http://five.pairlist.net/mailman/listinfo/coco
> >> > >> >
> >> > >>
> >> > >>
> >> > >> --
> >> > >> Coco mailing list
> >> > >> Coco at maltedmedia.com
> >> > >> http://five.pairlist.net/mailman/listinfo/coco
> >> > >>
> >> > >
> >> > >
> >> > > --
> >> > > Coco mailing list
> >> > > Coco at maltedmedia.com
> >> > > http://five.pairlist.net/mailman/listinfo/coco
> >> >
> >> >
> >> > --
> >> > Coco mailing list
> >> > Coco at maltedmedia.com
> >> > http://five.pairlist.net/mailman/listinfo/coco
> >> >
> >>
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> http://five.pairlist.net/mailman/listinfo/coco
> >>
> >>
> >>
> >>
> >>
> ____________________________________________________________________________________
> >> Food fight? Enjoy some healthy debate
> >> in the Yahoo! Answers Food & Drink Q&A.
> >> http://answers.yahoo.com/dir/?link=list&sid=396545367
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> http://five.pairlist.net/mailman/listinfo/coco
> >>
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list