Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Please help a beginner in assembly language (small program)

Please help a beginner in assembly language (small program)

Please help a beginner in assembly language (small program)

hi folks,
I'm self studying the assembly language and you can imagine how difficult to study it alone.
I had a question which says : write a program that allows the user to type one letter and if the letter is 'Y', it displays the word "YES" ,followed by a new line ,else it'll display "NO" followed by a new line .then the sequence of events is repeated three more times before returning to DOS.
I found difficulties in repeating the sequence of events and in displaying the correct message for each condition .

thank you for reading,
looking forward to receiving help

RE: Please help a beginner in assembly language (small program)

You would have to look at the keyboard using int 16h (Look at Ralf Brown's interrupt list) and then compare the keybord buffer with the value of Y. Then you would have to make some kind of jmp command if they are equal. and for writing the word's I believe there is a some function in Dos you may use, I think it's int 21h and some subfunction
Hope it gives little help.

Machine code Rocks

RE: Please help a beginner in assembly language (small program)

If you need more help, try mailing me:

Personally I prefer using the Int 21h DOS services for reading the keyboard, because they respond properly to Ctrl-C, which Int16h doesn't do.  At the same time DOS provides a service to ignore Ctrl-C anyway.

You'll have to do a 'loop' structure first, as your basis, and you might want to check that your loop structure executes exactly three times before writing the inner portion (say let it print "Hello" three times first).  Then replace the inner portion of the loop with the 'check keyboard' function and print function.

You have to be more specific as to what your problems are...

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close