Fix comment handling and improve error messaging in assembler.