Basic choice command in Assembly
So this is pretty much like the choice command, not as advanced though. The only arguments you provide is a list of characters that the user can press as a choice. Just like the choice command, during the choice prompt it will keep looping for a character input until the user presses a valid key, that is, a one of the keys that you have specified in the list as the arguments.
(compile with fasm):
mov byte [bx],ch
mov ch,byte [bx]
count db 00
@echo off echo Type a number from 1 to 5 choice 12345 echo You chose %errorlevel%