Hi, Is it possible?
Example:
Data: "string",word,pointer to function .... ..... asm: LPM[Z] ... Call [Z]
Other compilers kill data and functions as not used or not able to place data in code.
Thank You!
P.S.: Sorry for my bad English )
I am not understanding what you are asking. Do not worry about the grammar - mine is dreadful
I want make menu. In ASM it easy.
Menu: <- data in code section (flash memory) DB "menu1",Submenu1,0 DB "menu2",Submenu2,Function .... mov Z,Menu call[Z+10]
MicroBasic example: structure item_t dim name as char[4] dim mm as word dim func as word end structure
const menu as item_t = ("123"+"¿",1,@func1) code const menu1 as item_t = ("234"+"¿",1,@func1) code const menu2 as item_t = ("345"+"¿",1,@func1) code const submenu1 as item_t = ("sub"+"¿",1,@func1) code
BUT const menu123 as item_t[2]=(menu1,menu2) <- compiler error, can't organize array
And MicroBasic eliminate const's without direct access to it (example, var=menu1)
Can't find flexible compiler/lang (as ASM)
Then, I would use asm. See ASM and #RAWASM
Thanks, I'll look
Log in to post a comment.
Hi,
Is it possible?
Example:
Data: "string",word,pointer to function ....
.....
asm:
LPM[Z]
...
Call [Z]
Other compilers kill data and functions as not used or not able to place data in code.
Thank You!
P.S.: Sorry for my bad English )
I am not understanding what you are asking. Do not worry about the grammar - mine is dreadful
I want make menu. In ASM it easy.
Menu: <- data in code section (flash memory)
DB "menu1",Submenu1,0
DB "menu2",Submenu2,Function
....
mov Z,Menu
call[Z+10]
MicroBasic example:
structure item_t
dim name as char[4]
dim mm as word
dim func as word
end structure
const menu as item_t = ("123"+"¿",1,@func1) code
const menu1 as item_t = ("234"+"¿",1,@func1) code
const menu2 as item_t = ("345"+"¿",1,@func1) code
const submenu1 as item_t = ("sub"+"¿",1,@func1) code
BUT
const menu123 as item_t[2]=(menu1,menu2) <- compiler error, can't organize array
And MicroBasic eliminate const's without direct access to it (example, var=menu1)
Can't find flexible compiler/lang (as ASM)
Last edit: Petr 2023-06-14
Then, I would use asm. See ASM and #RAWASM
Thanks, I'll look