[Coco] ANDCC

jdaggett at gate.net jdaggett at gate.net
Tue Jun 12 22:12:31 EDT 2007


Robert

if you can create and use a macro with EDTASM then I guess you can call it a 
macro assembler. 

james


On 12 Jun 2007 at 21:06, Robert Gault wrote:

> I don't know if you would consider EDTASM a macro assembler but with
> EDTASM it would be trivial to create the needed macros.
> 
> jdaggett at gate.net wrote:
> > On 12 Jun 2007 at 10:25, Ries, Rich (S&FS) wrote:
> > 
> > 
> >>I always found "ANDCC #nn"/"ORCC #nn" to be a royal pain. Why should
> >>I need to remember where the various bits are positioned in the
> >>micro? Isn't that the type of thing the computer is good at? 
> >>
> > 
> > **************
> > 
> > The 6800 had a set and clear instruction for three of the 6 bits of
> > the CCR. They were:
> > 
> > CLI	SEI
> > CLC	SEC
> > CLV	SEV
> > 
> > To do so with each bit of the 6809 CCR bits would require 8
> > instructions. The designers felt that one instruction for clear
> > "ANDCC" and one for SET "ORCC" would be more flexable than having 8
> > different opcodes. All you have to do is remember to clear you and
> > the appropriate bits with a logic "0". To set you or with a logic
> > "1". 
> >  
> > 
> >>A nice assembler would recognize "SETCC N" or "CLRCC OV" and
> >>translate it into the proper hex codes. Honestly, in all my years of
> >>micro programming, I cannot remember needing to set or clear more
> >>than one bit of the PSW/CC at a time.
> >>
> > 
> > *****************
> > 
> > Yes it would be nice to  have the assembler torecognize psuedo codes
> > for clearing and setting each bit of the CCR.  Then again you are
> > back to what the designers got away with in the first place. Also
> > you face the potential of  having code that can be assembled by only
> > one assembler. 
> > 
> > 
> > 
> >>I guess an "almost nice" assembler would have macros with
> >>parameters, to allow creation of SETCC and CLRCC macros.
> >>
> > 
> > That is why it is nice to use a macro assembler.  That way if your
> > heart desires, you write a macro and have at it. 
> > 
> > james
> > 
> > 
> > 
> > --
> > 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
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date:
> 6/12/2007 6:39 AM
> 





More information about the Coco mailing list