Sequence library code
The compiler / assembler binds inline code (the source of inline methods) right there, where it appears as text in the Luna-code. Before including macros and text replacement to be processed.
The library source code (methods and subroutines) can be integrated together presented in the order as in the Library Editor. This unused sources are hidden.
avr.device = atmega328p avr.clock = 20000000 avr.stack = 64 uart0.baud = 19200 uart0.Recv.enable uart0.Send.enable #library "library/mylib.interface" dim a as byte a = mylib.myconst a = mylib.Hello.Myproperty mylib.Hello.Myproperty = 100 mylib.Hello.myinline(200) mylib.Hello.mymethod(1,2) halt()
The resulting assembly code:
;{12}{ a = mylib.myconst } --------------------------------------------- ldi _HA0,0x64 ; 0b01100100 0x64 100 sts dVarClassAvrA,_HA0 ;{13}{ a = mylib.Hello.Myproperty } ------------------------------------ lds _HA0,_dVarMylibHellomyproperty sts dVarClassAvrA,_HA0 ;{15}{ mylib.Hello.Myproperty = 100 } ---------------------------------- ldi _HA0,0x64 ; 0b01100100 0x64 100 sts _dVarMylibHellomyproperty,_HA0 ;{17}{ mylib.Hello.myinline(200) } ------------------------------------- ldi _HA0,0xC8 ; 0b11001000 0xC8 200 nop nop nop ;{18}{ mylib.Hello.mymethod(1,2) } ------------------------------------- ldi _HA0,0x02 ; 0b00000010 0x02 2 push _HA0 ldi _HA0,0x01 ; 0b00000001 0x01 1 rcall _MylibHelloMymethod ;{22}{ halt() } -------------------------------------------------------- __halt0: rjmp __halt0 [...] _MylibHelloMymethod: pop _LA0 pop _LA1 pop _HB0 push _LA1 push _LA0 ret [...]