Calling a.emit from Assembler is something that just isn't possible at the moment - hence why you need to do the pin joining and setWatch thing.
One issue is that JS functions don't exist as something you can just 'jump' to from Assembler, but also the JS interpreter isn't designed to be reentrant... Even allocating JS vars (for instance the string 'hello') can be a pain.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Calling
a.emit
from Assembler is something that just isn't possible at the moment - hence why you need to do the pin joining andsetWatch
thing.One issue is that JS functions don't exist as something you can just 'jump' to from Assembler, but also the JS interpreter isn't designed to be reentrant... Even allocating JS vars (for instance the string 'hello') can be a pain.