Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Assembly 8086: Check if a key is pressed to exit a program

  • 12-01-2011 4:12pm
    #1
    Registered Users, Registered Users 2 Posts: 9,249 ✭✭✭


    Hi all.

    This is one problem that has literally plagued me and i can't see to get a answer for it.

    In my program i wish to do a simple loop function.

    Draw a box that incerements and decrements up and down the screen.

    However when a button is pressed i want the program to exit.

    My problem is that i don't want the program to hang when i use INT21 Check Keyboard status as the loop won't continue the interrupt requires input to exit.

    How do i get past this? I need to be constantly checking if their is input but do not wish my initial action loop to stop as a result of it.

    Any help would be great.


Comments

  • Registered Users, Registered Users 2 Posts: 2,152 ✭✭✭dazberry


    Check out Int 16h, AFAIR you can poll the keyboard state to see if a character is there...

    mov ah,01
    int 16h
    jz ...

    D.


Advertisement