Math Library
Advanced Level Skills: 8051, Assembly, Maths Thu Aug 10 2006, 01:57 am
- Author
- Intel
Description
These assembler files contain various math functions for 8051 and compatible microcontrollers:
The file MATH32.A51 contains code for the following 32-bit math
functions:
The file DIV16BY8.A51 contains code to divide a 16-bit dividend by an 8-bit divisor and produce a 16-bit quotient and an 8-bit remainder.
The file LONGDIV.A51 contains code to divide an N-byte dividend by an N-byte divisor and produce an M-byte quotient.
Tags 32bit math assemblymath div assembly32-bit div assembly16-bit multiply assembly32-bit multiply assemblymath routine assembly
The file MATH32.A51 contains code for the following 32-bit math
functions:
- Add a 16-bit value to the 32-bit 'accumulator'.
- Add a 32-bit value to the 32-bit 'accumulator'.
- Subtract a 16-bit value from the 32-bit 'accumulator'.
- Subtract a 32-bit value from the 32-bit 'accumulator'.
- Multiply the 32-bit 'accumulator' by a 16-bit value.
- Divide the 32-bit 'accumulator' by a 16-bit value.
The file DIV16BY8.A51 contains code to divide a 16-bit dividend by an 8-bit divisor and produce a 16-bit quotient and an 8-bit remainder.
The file LONGDIV.A51 contains code to divide an N-byte dividend by an N-byte divisor and produce an M-byte quotient.
Tags 32bit math assemblymath div assembly32-bit div assembly16-bit multiply assembly32-bit multiply assemblymath routine assembly
Filesize
96.92 kB
Downloads
9952
Rating
Comments
samarnath dev
19 Jun 2015: 20:11 pm
how can subtract 23hex from 78hex for 8051 by asm51 code please help me.
samarnath dev
19 Jun 2015: 20:13 pm
how can subtract 24hex value from 78hex value for 8051 by asm51 , so please help me.
23 Jun 2015: 19:04 pm
@samarnath dev, both 0x23 and 0x78 are 8-bit values, use simple "SUBB" instruction to subtract them. Move one value in A and other in R0 or you can give direct data. Post in forum for help.