improved trap handling
This commit is contained in:
		
							parent
							
								
									5891ec12a0
								
							
						
					
					
						commit
						673679e5eb
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		|  | @ -23,6 +23,8 @@ DEFINITION MODULE Traps; | |||
|   PROCEDURE InstallTrapHandler(t: TrapHandler): TrapHandler; | ||||
|   (* Install a new trap handler, and return the previous one. | ||||
|      Parameter of trap handler is the trap number. | ||||
|      When a trap occurs, the default trap handler is re-installed before | ||||
|      calling the new handler. | ||||
|   *) | ||||
| 
 | ||||
|   PROCEDURE Message(str: ARRAY OF CHAR); | ||||
|  |  | |||
|  | @ -92,12 +92,14 @@ mainroutine | |||
|  end | ||||
| 
 | ||||
|  pro $trap_handler,0 | ||||
|  lpi $trap_handler | ||||
|  sig | ||||
|  lol 0	; trap number | ||||
|  lae handler | ||||
|  loi EM_PSIZE | ||||
|  lpi $catch | ||||
|  sti EM_PSIZE | ||||
|  cai | ||||
|  lpi $trap_handler | ||||
|  sig | ||||
|  asp EM_PSIZE+EM_WSIZE | ||||
|  rtt | ||||
|  end 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue