flat assembler
Message board for the users of flat assembler.
Index
> DOS > Console input |
Author |
|
daluca 26 Nov 2005, 07:22
you can use the bios interrupt 16h to do that
you just make: Code: ;bla,bla,bla code mov ah,0 ;function 0 of int 16h int 16h ;bla,bla,bla continuation of code... this int 16h waits for a key to be presed after any key(except control keys like alt,ctrl,shift) is presed this int returns the key code in ah and the char in al so you can use it to now what key was pressed. |
|||
26 Nov 2005, 07:22 |
|
tgo 26 Nov 2005, 17:08
Next time you are unsure what function to use or how to load it you can check:
http://www.uv.tietgen.dk/staff/mlha/PC/Prog/ASM/INT/ |
|||
26 Nov 2005, 17:08 |
|
Matrix 26 Nov 2005, 18:52
Lord of Destiny,
there is also standard input, input string, in dos, or you can make yourself own input functions using bios interrupt, or even via keyboard port $60 calling dos functions - input string Input and Output String tgo wrote: Next time you are unsure what function to use or how to load it you can check: nice set of code collections, additionally i whould note the usage of "Ralph Browns List of Interrupt files" |
|||
26 Nov 2005, 18:52 |
|
peter_rk 27 Nov 2005, 08:06
You do not want to input whole string, just one character. This is my personal favorite way to to it, if just once:
Code: push AX ; Store original AX for later mov AH,8 ; Function 8. Input, no echo. int 21h ; call DOS. pop AX ; Return original. Now keep going... Ralf Brown's Interrupt files are at http://www.ctyme.com/rbrown.htm. You should find the Interrupt> 21 list most helpful. READ or CHARACTER INPUT is likely what you search for. |
|||
27 Nov 2005, 08:06 |
|
Lord of Destiny 27 Nov 2005, 13:05
Thank you for your support.
|
|||
27 Nov 2005, 13:05 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.