assemly language - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

assemly language

I am haveing some trouble with a code
what i want to do is input a charater from the keyboard and print it on the next line with a "?" as the input so the user knows a input is required

Comments

  • frizzzfrizzz Posts: 49Member
    : I am haveing some trouble with a code
    : what i want to do is input a charater from the keyboard and print it on the next line with a "?" as the input so the user knows a input is required
    :
    : Look at my homepage and find a lot of examples, how to deal with keyboard and output on screen in the downloadable assembler OS:
    http://www.rcfriz.de
  • mr_orchemr_orche Posts: 12Member
    : I am haveing some trouble with a code
    : what i want to do is input a charater from the keyboard and print it on the next line with a "?" as the input so the user knows a input is required

    ;example for inputting user name:
    org 100h
    jmp begin
    inputmsg db 'Enter your name ?',0 ;asciiz string

    begin:
    mov dx, inputmsg ;this will print on the screen
    mov ah, 9 ;"Enter your name? _"
    int 21h
    ;type your keyboard handler here

  • frizzzfrizzz Posts: 49Member

    : int 21h
    : ;type your keyboard handler here
    :
    I'm sorry!- at least 15 years passed, since I worked with int 21h, and I do not have any information about it (maybe You'll find it using google-search).
    But if You want to know, how to read directly the input from keyboard, reading at the ports of the keyboard-controller, You could find a well commented example in the source of my OS "FDOS1", which You can download from my homepage:
    www.rcfriz.de
    My OS works in protected mode, but interfacing the keybord-controller is the same in real mode (You need to use real-mode-code of course!). You will need Your own interrupt-handler for int #1 in the interrupt-controller (You need to take care for the base- number of this controller!) and then You need to write Your own keyselection including a read-access at the keybord-controller.
    If You want to use Your code under MSDOS You will need some more code after reading the keybord-controller. You need to tell the interrupt-controller the end of interrupt too ("eoi"). In my OS I set "automatically eoi" different to MSDOS...
    :
Sign In or Register to comment.