Embedding Assembly Routines into C Language Using a Floating Point ...
![]() | Name : Embedding Assembly Routines into C Language Using a Floating Point ... File Type : Size : 137 KB |
M Authors: AN669 EXAMPLE 1: #ASM, #ENDASM CONSTRUCT void fpm32(void) { #asm FPM32 MOVF BTFSS MOVF BTFSC GOTO MOVF XORWF MOVWF MOVF ADDWF MOVLW AEXP,W _Z BEXP,W _Z RES032M AARGB0,W BARGB0,W SIGN BEXP,W EXP, F EXPBIAS-1 ;test for zero ;arguements Embedding Assembly Routines into C Language Using a Floating Point Routine as an Example Rick Evans Richard Fischer Microchip Technology, Inc. INTRODUCTION With the advent of MPLAB-C, the Microchip C-compiler, many PICmicroTM users need to embed existing assembly language routines and/or Microchip application notes into C. This application note explains how to embed an assembly language program into MPLAB-C, version 1.10, and the issues therein. For example, embedding interrupt save and restore must be done using assembly language. Also, critical timing routines may require assembly. The 32-bit floating point multiply routine from AN575 is used to illustrate this process. The remaining 32-bit floating point math routines are embedded into individual C functions and are included in the file accompanying Ebook Relate: assembly ebook language ebook routines ebook point ebook floating ebook floating point ebook assembly language ebook bit floating ebook language using ebook bit floating point ebook assembly routines into ebook embedding assembly routines ebook |
| Server | Status |
| ww1.microchip.com | Alive |





