How can I use a "C variable" on PB?
Posted: Mon Jan 30, 2023 1:39 pm
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
! int v_found = 11;
Debug "found: " + Str(found)
thanks!STARGÅTE wrote: Mon Jan 30, 2023 1:42 pmCode: Select all
! int v_found = 11; Debug "found: " + Str(found)
- The used variables or pointers must be declared before to use them in an assembler keyword. Their names in assembler are 'v_variablename' and 'p_pointername', and in a procedure their names are 'p.v_variablename' and 'p.p_pointername'.
- Labels: The labels need to be referenced in lowercase when using the in-line ASM. When you reference a label, you must put the prefix 'l_' before the name.
If the label is defined in a procedure, then its prefix is 'll_procedurename_', in lowercase.
When you reference a module item, you must put the prefix 'module_name.l_' all in lowercase before the item.
If the label is defined in a procedure inside a module, then its prefix is 'module_name.ll_procedurename_', in lowercase.