Truncated match.
PICList
Thread
'Arithmetic routines'
1995\11\28@092418
by
n/a
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
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_OUTWOOTTONGTakeThisOuTvms1.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
Geoff Wootton <.....PICLISTKILLspam@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 - fastfwdKILLspamix.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...