[Coco] 6809 example

Roger Taylor rtaylor at bayou.com
Sat Jan 17 23:33:33 EST 2004


At 05:09 PM 1/17/2004 -0500, you wrote:
>It's easy to make FOR-NEXT loops
>
>START   LDX    #$FF
>LOOP    LEAX  -1,X
>                BNE    LOOP
>                END
>
>John Collyer

I think what Neil might be describing rather is a macro such as:
FOR(MOV(0, EAX); EAX<500; INC(EAX)) DO
<somejob>
ENDFOR;

The 1st line would expand into whatever labels and instructions are needed 
to do something similar to the 6809 example above.





>----- Original Message -----
>From: "Neil Morrison" <neilsmorr at hotpop.com>
>To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
>Sent: Saturday, January 17, 2004 4:51 PM
>Subject: Re: [Coco] 6809 example
>
>
> >
> > There were some assembler books, mainly for the 8088, which showed
> > you how to emulate FOR-NEXT loops, DO-WHILE etc in assembly language
> > as macros.
> >
> > NM


----------
Roger Taylor






More information about the Coco mailing list