[Coco] Coco Digest, Vol 45, Issue 32

Bob Devries devries.bob at gmail.com
Wed Apr 11 08:59:55 EDT 2007


Byte 0 (the first byte of the file) is the preamble flag, which is $00 for a 
binary file and $FF for a Basic file.

Bytes 1 and 2 are the length of the data block.
Bytes 3 and 4 are the load address.

At the end of the file there are another 5 bytes:
$FF, $00, $00, $xx, $yy where xx and yy are the EXEC address. These can be 
accessed by using disk basic's random access file commands, as Carl England 
pointed out.

Please note that the file can *sometimes* be split into a number of blocks 
which do not necessarily lie adjacent to each other in memory. If that is 
the case, a programme would need to step through the file and collate all 
the lengths and load addresses.

--
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 10:36 PM
Subject: Re: [Coco] Coco Digest, Vol 45, Issue 32


> Thanks Carl! But how can one find the start or load address?
>
> Fedor
>
> On 11/04/07, carl j england <mrspock12 at juno.com> wrote:
>>
>> OPEN"D",1,"FILENAME.BIN",1
>> FIELD#1,1ASA$
>> GET#1,LOF(1)-1
>> PRINTHEX$(ASC(A$))
>> GET#1,LOF(1)
>> PRINTHEX$(ASC(A$))
>> CLOSE
>>
>> this will give you the execute address of a disk m/l file
>>
>> the last 5 bytes of a m/l file contain FF 00 00 nn nn.  the last two
>> bytes (nn nn) are the execute address.
>>
>> --
>> 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