[Coco] 6809 example

Robert Gault robert.gault at worldnet.att.net
Sun Jan 18 21:16:12 EST 2004


Theodore (Alex) Evans wrote:
> On Jan 18, 2004, at 11:50 AM, Robert Gault wrote:
> 
>> One thing missing is a point of origin. As written, the code will 
>> start at $0000 and if loaded on a Coco without an offset will crash 
>> the system. I suggest something like
>>     ORG    $7000
> 
> 
> It is position independant.  The CoCo would allow you to load it 
> anywhere in memory your wish, and if you were running it from EDTASM+ 
> internally it would start at a reasonable location other than $0000, the 
> org is unnecessary.  If you look in Barden's book as number of the 
> examples leave out any org statement.
> 
 ><snip>

If you run your program from within EDTASM+, it will crash because you 
ended it with an RTS. Programs running under EDTASM+ DEBUG must end with 
SWI.

Position independant programs can be loaded to any location that won't 
crash the operating system. However, a beginner would need to know this 
and how to perform an offset load. If you are not a beginner, then it 
would be appropriate to mention this and show how an offset load can be 
done. EDTASM+ will assemble your program to disk or tape so that it 
loads at $0000 unless modified. As posted, your program would need to be 
loaded:   LOADM"World",&Hmmnn  where mmnn is a safe location.




More information about the Coco mailing list