Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Interruption Handling in Assembly

Posted on 2003-10-23
2
Medium Priority
?
1,077 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
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

How to fix a SonicWall Gateway Anti-Virus firewall blocking automatic updates to apps like Windows, Adobe, Symantec, etc.
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

885 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