For example in basic we can do something like this to add two numbers.

a= add(a1,b1)

Function Add(N1,N2)

Add=N1+N2

End Function

----
Arun
___________________________
This message was ported from CCS's old forum
Original Post ID: 11183

PCM programmer

Joined: 06 Sep 2003Posts: 20477

Re: Functions in MPASM how to implement in MPLAB

Posted: Sat Feb 01, 2003 11:00 pm

:=I would like to implement a function in MPASM , how can I do this ??
:=
:=For example in basic we can do something like this to add two numbers.
:=
:=a= add(a1,b1)
:=
:=Function Add(N1,N2)
:=
:=Add=N1+N2
:=
:=End Function
---------------------------------------------------------------

I'm not sure about your question.

Are you asking for a tutorial on how to write assembly
language programs with MPLAB ? (ie., assembly language
only, with no C code).

Or, are you asking how to use assembly language with CCS C ?
Ie., how to insert assembly language code in a C function,
by using the #asm and #endasm statements.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11191