The GNU compiler can define intrinsic functions. Is there a mechanism in Keil library or whatever, to allow you to create a function in assembly and tag it as intrinsic?
How can you pop a couple bytes off the internal stack?