Searching \ for 'Arithmetic routines' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=arithmetic+routines
Search entire site for: 'Arithmetic routines'.

Truncated match.
PICList Thread
'Arithmetic routines'
1995\11\28@092418 by n/a

flavicon
picon face
Does anyone know where I might be able to download some basic multi-byte
arithmetic routines. For example, code for 16 bit subtraction etc.

   Geoff.

1995\11\28@094800 by Andrew Errington

flavicon
face
You will find many examples of arithmetic routines in the Embedded Contro=
ller Handbook from Microchip.  Most of the 16bit versions can be download=
ed from Microchips WWW site, but they should be tested before use: I have=
tried the 32/16 bit division routine and it goes a bit mad under certain=
conditions (anyone else seen this behaviour?).

In the UK you can buy the Embedded Controller Handbook from Maplin or RS.=


Andy Errington (still hanging head in shame for perpetuating the last SPA=
M)

----------
From:   Geoff Wootton[SMTP:spam_OUTWOOTTONGTakeThisOuTspamvms1.bham.AC.UK]
Sent:   28 November 1995 14:16
To:     Multiple recipients of list PICLIST
Subject:        Arithmetic routines

Does anyone know where I might be able to download some basic multi-byte
arithmetic routines. For example, code for 16 bit subtraction etc.

   Geoff.

1995\11\28@183855 by Andrew Warren

flavicon
face
Geoff Wootton <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> Does anyone know where I might be able to download some basic
> multi-byte arithmetic routines. For example, code for 16 bit
> subtraction etc.

Geoff:

You can (usually, except when the site's under construction) get
code like this from my web page.  Here's a 16-bit subtract for the
16Cxx:

       ;
       ; A = A - B.  Enter with A in "AHI:ALO", B in "BHI:BLO".
       ;             Exits with difference in AHI:ALO.
       ;

       MOVF    BLO,W
       SUBWF   ALO
       MOVF    BHI,W
       SKPC
       ADDLW   1
       SUBWF   AHI

Off the top of my head, it looks as though code for the 16C5x would
be identical, except that you'd want to replace the "ADDLW 1" with
"DECF AHI".

-Andy

Andrew Warren - fastfwdspamKILLspamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geopages.com/SiliconValley/2499

More... (looser matching)
- Last day of these posts
- In 1995 , 1996 only
- Today
- New search...