home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 178 / JRNOTES.ZIP / JRNOTE13.DOC < prev    next >
Text File  |  1986-12-17  |  4KB  |  54 lines

  1. AH10233 Control-break - example of changing interrupt vector            
  2.                                                                         
  3. 11/11/85                                                                
  4. BASIC Interpreter by Microsoft                     (6025010)            
  5. BASIC Compiler Version 1.0 (DOS)                   (6024003)            
  6. Portable Personal Computer System Unit/Keyboard    (5155068)            
  7. Personal Computer AT System Unit/Keyboard (5170068, 5170099)            
  8. Personal Computer XT System Unit/Keyboard          (5160087)            
  9. PCjr System Unit/Keyboard                 (4860004, 4860067)            
  10. Personal Computer System Unit/Keyboard             (5150114)            
  11. BASIC Compiler Version 2.0 (DOS)                   (6024216)            
  12. PCjr BASIC (Cartridge)                             (6024101)            
  13.                                                                         
  14. KEYWORDS: INFORMATION                                                   
  15. Following   is  a  program  that  demonstrates  changing  an            
  16. interrupt  vector  from  BASIC.  The vector being changed is            
  17. the Control-break interrupt vector (interrupt number 1B, the            
  18. Keyboard  break  interrupt) located at hex address 6C-6F, or            
  19. decimal   108-111.   The  vector  will  be  changed  to  the            
  20. Dummy_Return   vector,  which   effectively   disables   the            
  21. Control-break   key.  Please  see  the  Technical  Reference            
  22. manual  for  your  system  unit  for  more information about            
  23. interrupt vectors.                                                      
  24.                                                                         
  25.     10 CLS:DEFINT A-I                                                   
  26.     20 DIM A(4)                                                         
  27.     30 DEF SEG=0                                                        
  28.     40 FOR I=1 TO 4                                                     
  29.     50 A(I)=PEEK(107+I) 'Save old interrupt vector                      
  30.     60 NEXT I                                                           
  31.     70 LOCATE 10,18                                                     
  32.     80 PRINT "Press any key to inhibit control-break";                  
  33.     90 A$=INKEY$:IF A$="" THEN GOTO 90                                  
  34.     100 POKE 108,83 'Set to dummy_return vector..                       
  35.     110 POKE 109,255                                                    
  36.     120 POKE 110,0                                                      
  37.     130 POKE 111,18                                                     
  38.     140 LOCATE 15,18                                                    
  39.     150 PRINT "Control-break now inhibited - try it";                   
  40.     160 LOCATE 16,27                                                    
  41.     170 PRINT "(Press spacebar to exit)";                               
  42.     180 A$=INKEY$:IF A$=" " THEN 190 ELSE 180                           
  43.     190 FOR I=1 TO 4                                                    
  44.     200 POKE 107+I,A(I) 'Reset old vector                               
  45.     210 NEXT I                                                          
  46.     220 LOCATE 20,20                                                    
  47.     230 PRINT "Control-break is back on - try it";                      
  48.     240 GOTO 240                                                        
  49.               *** END OF DOCUMENT  ***                                  
  50.                                                                         
  51. Note :  This modification or recommendation has not been subjected to   
  52.         exhaustive testing and may not, in all circumstances, provide   
  53.         a complete solution.                                            
  54. sting and may not, in all circumstances, prov