patricktran
New Member
Hi,
In the high level programming language, it is easy to pass a parameter to a function, just like: function1(1)
How about in assembly? I think we have to make like this:
However, what happen if we have 2,3,4 parameters? We have only one w though.
In the high level programming language, it is easy to pass a parameter to a function, just like: function1(1)
How about in assembly? I think we have to make like this:
Code:
movlw d'1' ; w = 1, this is our vehicle to pass para
call function1
function1 ; assume w now is our para!!!!! :shock:
; we can do whatever with w (parameter) at this point
retfie
However, what happen if we have 2,3,4 parameters? We have only one w though.