简体   繁体   中英

assembly take in input number without echo(emu8086)

I'm using emu8086 to code

So

str01 db "Enter a number $"

Number db ?

Lea dx,str01
Mov ah,9
Int 21h

Mov ah,1
Int 21h

So how can i take that number without showing it ?

I haven't tested it, but according to Ralph Brown's interrupt list of INT 21h your code

mov ah, 01h
int 21h

calls the
INT 21h/AH=01h function
READ CHARACTER FROM STANDARD INPUT, WITH ECHO .

So, to avoid console output, you probably should call the
INT21h/AH=07h function
DIRECT CHARACTER INPUT, WITHOUT ECHO .

So your code should probably look like this:

mov ah, 07
int 21h

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM