Re: Changes in the ESL papers
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jul 25, 2005
- 565 views
Christian Cuvier wrote: > How about inline asm code to be call()ed? We may need a guideline to > either avoid it I think we should allow it, e.g. for routines that do bitwise operations. > or standardize how the constants representing routines > poked in memory will be written and commented. Some standardization of > the parm block may be useful too. The most important thing IMHO is that there must be readable asm commands, I mean e.g. it must be
-- SHIFT_LEFT constant SHL_CODE = allocate(13) poke(SHL_CODE, { -- First int argument is at stack offset +4, second int is at +8. -- Returns a *signed* 32-bit number. #8B, #44, #24, #04, -- mov eax, [esp+4] #8A, #4C, #24, #08, -- mov cl, [esp+8] #D3, #E0, -- shl eax, cl #C2, #08, #00 -- ret 8 })
but NOT
-- SHIFT_LEFT constant SHL_CODE = allocate(13) poke(SHL_CODE, { -- First int argument is at stack offset +4, second int is at +8. -- Returns a *signed* 32-bit number. #8B, #44, #24, #04, #8A, #4C, #24, #08, #D3, #E0, #C2, #08, #00 })
Regards, Juergen