[Coco] CORRECTION: Re: Exec address of disk loaded ml program?
Bob Devries
devries.bob at gmail.com
Wed Apr 11 07:54:36 EDT 2007
Bob,
as someone else mentioned, you can do this on the usual contiguous binary
file format. There is however a file binary format where this doesn't work,
and that is the files produced in some cases by EDTASM+ ( and maybe other
assemblers), which makes its output file in 128 byte chuncks, each with
their own pre- and post-amble of start and length addresses. While not
impossible to get the actual length, the code is certainly not simple.
I shall however, take that as a challenge to see if I can come up with a
generic basic programme to find those addresses from the files in question,
and display them.
*another shameless plug*: Watch for that in a future issue of CocoNutz
eZine.
--
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: "theother_bob" <theother_bob at yahoo.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Wednesday, April 11, 2007 9:00 PM
Subject: Re: [Coco] CORRECTION: Re: Exec address of disk loaded ml program?
> 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
More information about the Coco
mailing list