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 8770661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:36:00+00:00 2026-06-13T17:36:00+00:00

My information is coming from here . The assignment asks for a program that

  • 0

My information is coming from here. The assignment asks for a program that reads in no more than 20 characters, converts those characters to upper case, and then prints the input as capitals.

I have no idea how to access the input from int21/AH=0ah. I really can’t ask a more precise question unless I understand what is linked above. Can someone explain? Also, I’m using TASM if that makes any difference. Also, I’m testing this on freedos.

UPDATE1:

Alright, thanks to your help, I believe I understand how the interrupt needs to be set up and behaves.

Setup:
I have to designate a ds:dx where I want this buffer to exist

I have to set ds:dx to 20 (which sets the max number of characters the buffer can hold)

I have to set ds:dx+1 to 0 (which I think somehow set a min number of characters to read in)

Actually call int21/AH=0ah, which will go to ds:dx and interpret the preset bytes. It will halt the program while it waits for input

int21/AH=0ah will fill from ds:dx+2+n with my input (where n is the number of characters input including ‘\r’)

My question is now, how do I do this. I’ve just looked through the x86 Assembly Language Reference again, but haven’t been able to find anything helpful yet.

Code I’ve got so far

           assume          cs:code,ds:code
code       segment
start:

           mov  ax,code ;moves code segment into reg AX
           mov  ds,ax   ;makes ds point to code segment

           mov  ah,0ah
           int  21h
           mov  ax,1234h  ;breakpoint

           mov  ah,9
           mov  dx,offset message
           int  21h

endNow:
           ;;;;;;;;;;ends program;;;;;;;;;;
           mov  ah,0  ;terminate program
           int  21h   ;program ends

message    db   'Hello world!!!',13,10,'$'
code       ends
           end  start
  • 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-13T17:36:01+00:00Added an answer on June 13, 2026 at 5:36 pm

    That DOS function retrieves a buffer with user input. See this table. It seems that program is using that call to pause execution waiting for the user to resume the program.

    Edit: I just reread the question. I thought you were only asking what the function call did in your given source. If you want to read input of no more than 20 characters, you first need memory to store it. Add something like this:

    bufferSize  db 21  ; 20 char + RETURN
    inputLength db 0   ; number of read characters
    buffer      db 21 DUP(0) ; actual buffer
    

    Then fill the buffer:

    mov ax, cs
    mov ds, ax ; ensure cs == ds
    mov dx, offset bufferSize ; load our pointer to the beginning of the structure
    mov ah, 0Ah ; GetLine function
    int 21h
    

    How to convert to uppercase is left to the reader.

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

Sidebar

Related Questions

I am looking to use Adobe Air to visualize information coming from the Serial
Prior Information: (In case you are wondering where I am coming from) First Question:
Using information from some of the questions here on generic views, I have created
I have a class assignment where I have to write a program that will
I am writing an application to monitor various information coming back from an array
I have to list several elements that are coming from a database source A
Information: I have a site that has a design on index.php, and then you
In order to debug failing requests I would like to print all information coming
Hope you guys can help me out. I have information coming into a serial
The query is basically: SELECT DISTINCT my_table.foo from my_table WHERE... Pretending that I'm 100%

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.