03-03-2010, 03:12 PM
Aha. I hadn't noticed the end asm label: asm hops.
Incidentally, when including asm code, you have to make sure it doesn't run automatically - one easy way to do that is to include it in a sub or a function:
I've found that includes code in a decent library fashion, but it can't run - it's after the return.
As for how to do it - your way works just fine! I'd show you what I meant, in terms of how I'd put it together, but I'm snowed under with projects right now. Perhaps in a few days. There's nothing wrong with how you did it though - I'm just from the extensible language school of thought :-)
Incidentally, when including asm code, you have to make sure it doesn't run automatically - one easy way to do that is to include it in a sub or a function:
Code:
FUNCTION thingy (a as ubyte)
stuff
stuff
return value
asm
assembly
end asm
end function
I've found that includes code in a decent library fashion, but it can't run - it's after the return.
As for how to do it - your way works just fine! I'd show you what I meant, in terms of how I'd put it together, but I'm snowed under with projects right now. Perhaps in a few days. There's nothing wrong with how you did it though - I'm just from the extensible language school of thought :-)