Solved

Interruption Handling in Assembly

Posted on 2003-10-23
2
1,064 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 125 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now