Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8537599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:56:23+00:00 2026-06-11T10:56:23+00:00

the bios interrupt function 21h (ah = 1h) should read a character from the

  • 0

the bios interrupt function 21h (ah = 1h) should read a character from the standart input and echo it.

My read function:

    mov ah, 1h
    int 21h

So, if i press a key it realises that, but it won’t echo a character. Since im using my code to boot it from my floppy and the character echo function int 10h (ah = 0eh), i think i have to store it and then echo it with the “video – teletype output” (int 10h (ah = 0eh)).

Or did i miss something in the aboce code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:56:24+00:00Added an answer on June 11, 2026 at 10:56 am

    Interrupt 0x21 is an ‘interface’ to MSDOS-like OS functions, not the BIOS.

    If you are writing the real-mode bootloader or a small OS kernel, you have to use your own IRQ 1 handler.

    See this answer for the way to capture all the keypresses in your own memory buffer:
    How to check keys status in x86 assembly?

    Then you will have to arrange some sort of a loop. You check for key press (by reading the memory buffer). Once the keypress is detected, to print the “echoed” key you have to write something to the video memory. That’s another story. If you’re using the default text mode, just write to the 0xB800 segment. If you’re using the graphics mode (VGA or VESA), then you have to get raster font from somewhere.

    If you are writing things in assembly at the bootloader level, there is not much available. Definitely not the int 0x21.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the bios video interrupt to display a character on the
As keyboard input as scan codes can be obtained from calling interrupt 09 IRQ1
I have the following asm code (x86). .input: mov ah, 00h ; get key
What's the function of the BIOS in a modern OS? Is it still used
I am trying to print character from boot loader using code [BITS 16] ;Tells
What's the main difference between Basic Input Output System [ BIOS ] and Disk
I'm using BIOS int 0x15 on my Bochs emulator, however this always returns the
From what I've read it's used to fix bugs in the CPU without modifying
Why does bios read at partition's boot record at 0000:7c00 ? What is special
How to get the CPU Temperature info from Bios using c# I gave a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.