flat assembler
Message board for the users of flat assembler.
Index
> DOS > Help with input |
Author |
|
rugxulo 11 Feb 2007, 20:53
Code: --- jake.asm 2007-02-11 14:50:18 +0000 +++ temp.asm 2007-02-11 14:47:08 +0000 @@ -1,8 +1,16 @@ +org 100h + +Komenco: call getsint + mov ah,9 + mov dx,get + int 21h +Fino: ret + clearget: mov bx, 0 .loop: - mov [get+bx], ' ' + mov [get+bx], '$' inc bl cmp bl, 32 jbe .loop @@ -32,5 +40,5 @@ mov bx, 0 ret -get db ' ' dup 32 +get db '$' dup 32 Quote:
Does this not work like you want? (I don't exactly understand what "returns 259" means.) P.S. moderator, please move this to DOS, por favor! |
|||
11 Feb 2007, 20:53 |
|
Jakevfr 11 Feb 2007, 21:14
I gues I should explain what I'm wanting a little better. It works fine for strings, but I'm wanting to get numbers. I want the user to be able to input the number '65' and 65 be stored in the AX register for later use.
|
|||
11 Feb 2007, 21:14 |
|
rugxulo 11 Feb 2007, 21:34
The number 65 is 41h (base 16), but the string '65' in AX would be 3635h. In other words, it's a bit more complicated.
Please read DOS FAQ or use FASMLIB (Win32, Linux) or read String to number and vice versa ?? |
|||
11 Feb 2007, 21:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.