6 Sep 2018 by OriginalGriff
a) Is simple: test before you push, not after. At the moment, you read the value, poush it, and then decide to repeat. You need to read it, test, it if it's zero exit the loop, otherwise push and go round again. b) I'm not at all familiar with the assembly code: so I can't be precise. But ......