[Coco] 6809 example

Theodore Evans (Alex) alxevans at concentric.net
Sun Jan 18 19:10:09 EST 2004


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.

>> * Hello, World
>> * Clear screen
>>     ldx #$0400
>>     lda #$20
>
> Colons are not required by EDTASM or any of the assemblers for the 
> Coco that I can think of.
>
>> clrlp:

Most non CoCo assemblers use this type of syntax, and IIRC under OS-9 
asm and rma both require the colon after labels, of course if this were 
under OS-9 I wouldn't have done this kind of raw screen write.  In any 
case if I specifically wrote it for EDTASM I would have included line 
numbers.

> This next line won't go anywhere because regX does not get updated. 
> The routine will work as
> 	sta	,x+
> which increments regX by one on each pass through the loop.

Oops, a typo.

> Not so! First, the Step is 1 not D. Second, if a Step is 1 in Tandy 
> Basic, it is not necessary to include the instruction in the FOR/NEXT 
> loop. Basic will use STEP 1 automatically.

See the message which immediately followed.




More information about the Coco mailing list