Hi everyone,
I would like to know if it's possible to manipulate a macro argument in Sjasm, in order to "split"' it in different arguments. Let's say I have this macro, which adds 'hl' and 'a'
macro add16 add l ; 5 jr nc,$+3 ; 8/13 inc h ; 5 ld l,a ; 5 endmacro
I'd like to be able to test the argument, so that the macro can handle 'bc' and 'de' as well. So far, the only solution I have found is this one :
macro add16 2 add @2 ; 5 jr nc,$+3 ; 8/13 inc @1 ; 5 ld @2,a ; 5 endmacro
But then, in order to use it, I have to write, for example :
add16 d,e
I would like to pass only 1 argument ('de' in this example), have the macro test it, and then split the argument into 'd' and 'e' where applicable. So I would like to be able to write :
add16 de
Do you know a solution ?
Для того, чтобы оставить комментарий, необходимо регистрация или !login