reimplement asm subcommand as using stdin