[Coco] Mod10 Suggestions

Arthur Flexser flexser at fiu.edu
Thu Feb 16 22:57:42 EST 2017


A few other things in addition to what Mark mentioned:

I don't believe STB #RESULT is a legal 6809 addressing mode;  it's trying
to store something into a constant, like STB #5.  Should be STB RESULT.  Or
STB RESULT,PC if you want position independence.  Same with STA #STATUS.

You could start with LDX #CCD if you don't need the routine to be position
independent.

Instead of CLRB, STB RESULT you could just CLR RESULT.  You could also CLR
STATUS at the beginning and COM STATUS at the end if needed.

The CMPB #0 at CHK.01 could be omitted since the zero flag in the condition
code register will already cause the appropriate response to the BEQ.

Art

On Thu, Feb 16, 2017 at 8:26 PM, William Mikrut <wmikrut72 at gmail.com> wrote:

> For years I have been an IBM programmer and have done well in that area --
> for 30 years now.
> I started with a CoCo2 back in 84/85 - and ML has always fascinated me --
> yet eluded me to a degree.
>
> With the advent of hardware (FPGAs) -- seems like we could do some pretty
> coll stuff.
> So, I try to enter into the 8 Bit world that is CoCo and get down to some
> programming.
>
> Following is a MOD10 program I have used for years in IBM programs.
> I have translated it the best I can...I am sure it is not the most
> efficient... and I have much to learn.
>
> Attached is the MOD10 code.
> I am hoping for constructive comments so I can learn, and move on to other
> projects!
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
>


More information about the Coco mailing list