Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Interruption Handling in Assembly

Posted on 2003-10-23
2
Medium Priority
?
1,076 Views
Last Modified: 2012-06-22
This code paints the border of the Screen. I would like to know how can I make this code become an interruption handler, so I can change the color of the border every time I press "Print Screen" on the keyboard, after the program is executed. I think that I must push the register to a stack, but how do I do that and how can I handle the keyboard interruption?


; CGROUP    GROUP   CODE__SEG,DATA__SEG,STACK__SEG
;;;;;;;;  ASSUME  CS:CGROUP,DS:CGROUP,SS:CGROUP
          ASSUME  CS:CODE__SEG,DS:DATA__SEG,SS:STACK__SEG,ES:DATA__SEG
 
CODE__SEG         SEGMENT PUBLIC
 

CODIGO    PROC  NEAR
 
         
          MOV AH, 0BH
          MOV BH, 00H
          MOV BL, 099
          INT 10H
 
FIM:
          MOV AH,4Ch  ; encerra programa
          INT 21H;
          IRET
 
CODIGO    ENDP
 
CODE__SEG ENDS
 
DATA__SEG         SEGMENT PUBLIC
 
SETOR     DB      512 DUP ("A")
NOME_ARQ  DB      "MBR.DAT",00h
FHANDLE   DW      ?
 

DATA__SEG ENDS
 
STACK__SEG        SEGMENT STACK
          DB      10 DUP("STACK   ")
STACK__SEG ENDS
 
          END     CODIGO
0
Comment
Question by:eduthrash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
rtf earned 250 total points
ID: 9618011
You need to convert your code into a TSR (Terminate and Stay Resident) program.  There is alot of TSR sample code on the net.

0
 

Author Comment

by:eduthrash
ID: 9619227
That was exactly what i needed, but I found out how to do it. Thanks anyway rtf !!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question