[Coco] Assembler Question???
Robert Gault
robert.gault at worldnet.att.net
Wed Sep 2 13:00:00 EDT 2009
jdaggett at gate.net wrote:
> To the list:
>
> I have started looking at two FPGA cores for the 6809 in altering one of them to handle
> 6309 opcodes and stumbled across a potential issue. As far as I can remember the
> Motorola Freeware Assemblers treat subtraction as adding the 2's compliment of the
> subtrahend. Also I seem to remember that is how the internal workings of the MC6809
> is. There is actually no subtractor but the assemly code has the 2's compliment of the
> subtrahend and does addition.
>
> If this is so then, the ALU becomes simpler when doing a FPGA core.
>
> james
>
Can't find anything regarding the guts of the 6809 or 6309 in the data
sheets with respect to how subtraction is accomplished. Assembly code
can use either SUBA #-1 or ADDA #$FF to get the same answer but that
does not indicate what happens in the CPU core.
More information about the Coco
mailing list