[Coco] Errors in Leventhal's 6809 Subroutines book?
Robert Gault
robert.gault at att.net
Fri Jan 28 22:49:14 EST 2022
The instruction mentioned was leax -1,s
that should give an error although I have not yet tried it.
Sent from AT&T Yahoo Mail on Android
On Fri, Jan 28, 2022 at 10:34 PM, Joel Rees<joel.rees at gmail.com> wrote: 2022年1月29日(土) 11:23 Robert Gault <robert.gault at att.net> said:
> A Google search did not find corrections for the book. However, the second
> error would have been quickly found if EDTASM had been used to compile the
> code. It would have been reported as an error.
>
Are you sure?
LEAX -1,X
is valid syntax for a valid op-code.
Sent from AT&T Yahoo Mail on Android
>
> On Fri, Jan 28, 2022 at 8:50 PM, Don Barber<don at dgb3.net> wrote: Hi
> folks, I've been teaching myself 6809 assembly, and quickly ran
> across Leventhal's books which have been invaluable. I have the
> programming book, but have also been referencing the subroutine book
> from online copies available at:
>
>
> https://colorcomputerarchive.com/repo/Documents/Books/6809%20Assembly%20Language%20Subroutines%20(Lance%20Leventhal).pdf
>
> and
>
>
> https://archive.org/details/assembly-language-subroutines-for-the-6809_Leventhal
>
> Both appear identical.
>
> However, I've already run across two bugs:
>
> One is on page 72, in MPBMUL, where a BNE is executed right after a
> "LEAU -1,U". However, the LEAU does NOT set the Z flag, so the BNE is
> actually working off either the preceding INCA or the STA instructions
> (depending upon the STA's Carry result). One can test this does not work
> by trying to multiply 0x0001 times 0x08a6; the result will be an
> incorrect 0x00a6. One has to add a 'CMPU #0' after the LEAU statement to
> get the correct behavior.
>
> The other is on page 78 in MPBDIV, where one will find a "LEAX -1,S"
> that should instead be "LEAX -1,X" as the X register is being used as a
> decrement counter. The original text will result in an infinite loop as
> the S register is not modified in this loop.
>
> So my question is: is there an errata somewhere where known bugs are
> listed? I imagine people ran across these back in the day too. Both of
> these got me stuck for an hour or three each, though in hindsight they
> should have been obvious.
>
>
> Thanks,
>
> Don
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list