flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
Code: somevariable dw ? macro getresult onenumber,secondnumber,totalanswer { ;... do computations mov [totalanswer],ax } getresult 3,4,somevariable |
|||
![]() |
|
janequorzar
revolution wrote:
Sadly, I have tried that ( your code as well ) and it still doesn't pass the parameters. total answer is what i'm trying to obtain, but it needs onenumber and secondnumber to bring the numbers in. It wont for some reason. not sure what the problem is. |
|||
![]() |
|
revolution
Macros replace parameters by text substitution. So looking at your code now I see that you have used mov bx,[onenumber] which is replaced by the macro to mov bx,[3]. If you want to pass numeric values and not variable addresses then use mov bx,onenumber without the square brackets.
|
|||
![]() |
|
janequorzar
revolution wrote: Macros replace parameters by text substitution. So looking at your code now I see that you have used mov bx,[onenumber] which is replaced by the macro to mov bx,[3]. If you want to pass numeric values and not variable addresses then use mov bx,onenumber without the square brackets. That worked PERFECTLY !!! Thank you.. I got rid of the somevariable.. didn't need it. Now I can just use getresult 1,6 or whatever numbers I want and it does what I need it to do.. awesome man.. thank you.. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.