| | |
inline assembly getting user input.(djgpp)
Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2005
Posts: 18
Reputation:
Solved Threads: 0
How do i get user input in assembly? after getting the input, i'd like for the inputted value to be stored in a char array in c.
i'm new to assembly and i am having a hard time trying to figure this out.
i've tried a code like this and obviously it's wrong. lol
anyway, any help would be great. thanks!
i'm new to assembly and i am having a hard time trying to figure this out.
i've tried a code like this and obviously it's wrong. lol
c Syntax (Toggle Plain Text)
printf("Enter a 16 bit Hexadecimal number:"); __asm__ ("leal edx,%0;" "movl ah, 0ah;" "int 21h;" : "=r" ( val ) );
anyway, any help would be great. thanks!
you can't use interrupts in 32-bit protected-mode programs (e.g. windows or *nix programs). Easiest way is to call os C functions and let them deal with all the dirty stuff in protected mode. If you don't know how to do that there is another thread that will show you how to call ms-windows win32 api functions.
Last edited by Ancient Dragon; Dec 2nd, 2006 at 6:36 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- user input into a string (C++)
- Tutorial: User Input: Strings and Numbers [C] (C)
- Error Checking for user input (Java)
- error checking of user input (C++)
- Creating a GUI that accepts user input help (Java)
- How can i use inline assembly in VC++ editor (C++)
- Need Help With Error Checking User Input (C)
- filtering bad user input (Java)
Other Threads in the Assembly Forum
- Previous Thread: mirroring a value.
- Next Thread: Temperauture Conversion
| Thread Tools | Search this Thread |
Tag cloud for Assembly
3d 68hc11 6811 80386 adress array asm assembler assembly boot bootloader buffer compression cursor debug directory division docs dos draw emulator endtask error exceptions file int10h integer intel interrupt interrupts language loop nohau osdevelopment print program range read remainder shape string text theory tsr x86






