asm: Add ability to retrieve last error via AsmGetError()