Solved

Interruption Handling in Assembly

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IRQL_NOT_LESS_OR_EQUAL for Kernel Timer Thread 7 580
Is it possible to create a dynamic array in MIPS? 9 2,239
How to diplay the real thread ID 21 1,175
recovering cyptowalled files 2 963
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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