Author Topic: language program that will take inputs from keyboard  (Read 9640 times)

Offline huzafa009

  • New Member
  • Posts: 1
language program that will take inputs from keyboard
« on: February 15, 2015, 02:23:52 PM »
Write a complete assembly language program that will take inputs from keyboard using keyboard interrupt mechanism and will display the Extended ASCII codes corresponding to each key which has been pressed.
   
Note: You have to use only the Keyboard interrupt mechanism to take input from keyboard using an infinite loop.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: language program that will take inputs from keyboard
« Reply #1 on: February 15, 2015, 04:10:24 PM »
This appears to be more of a command than a question. We're not going to do your homework for you, although we will help. How much of it can you do, so far?

Since Nasm will do many things it is a good idea to tell us "what OS", to start with. I hope it's DOS, as getting at a "keyboard interrupt" in a protected mode OS is going to be much more difficult! I hope by "keyboard interrupt" you mean the BIOS int 16h - the actual hardware interrupt (usually int 9) which is triggered when a key is pressed or released would be more difficult (although it can be done).

If you had the extended ascii codes at hand (fairly easy), would you know how to display them (a common beginner problem)? What part(s) are you having trouble with?

The general rule here is "the more they give us, the more we'll give them" (and vise versa). So far, you haven't given us much. Help us help you! Show us what you've got...

(hint: when posting code, put the word "code" in square brackets at the start of the code, and "/code" in square brackets at the end.)

Best,
Frank


Offline InfinitelyManic

  • Jr. Member
  • *
  • Posts: 6
  • Country: 00
  • x86-64 NASM on Linux
Re: language program that will take inputs from keyboard
« Reply #2 on: February 18, 2015, 05:48:10 PM »
I concur with Frank - we cannot do it all.
What OS do you intend to use?
x86 or 64-bit?
Do you plan on doing "pure" Assembly; that is, no C library stuff; e.g., scanf?