home *** CD-ROM | disk | FTP | other *** search
- *
- * Copyright (c) 1992 Commodore-Amiga, Inc.
- *
- * This example is provided in electronic form by Commodore-Amiga, Inc. for
- * use with the "Amiga ROM Kernel Reference Manual: Devices", 3rd Edition,
- * published by Addison-Wesley (ISBN 0-201-56775-X).
- *
- * The "Amiga ROM Kernel Reference Manual: Devices" contains additional
- * information on the correct usage of the techniques and operating system
- * functions presented in these examples. The source and executable code
- * of these examples may only be distributed in free electronic form, via
- * bulletin board or as part of a fully non-commercial and freely
- * redistributable diskette. Both the source and executable code (including
- * comments) must be included, without modification, in any copy. This
- * example may not be published in printed form or distributed with any
- * commercial product. However, the programming techniques and support
- * routines set forth in these examples may be used in the development
- * of original executable software products for Commodore Amiga computers.
- *
- * All other rights reserved.
- *
- * This example is provided "as-is" and is subject to change; no
- * warranties are made. All use is at your own risk. No liability or
- * responsibility is assumed.
- *
- ****************************************************************************
- *
- * KeyHandler.a
- *
- * Keyboard reset handler that signals the task in the structure...
- *
- *
- * See Key_Reset.c for details on how to compile/assemble/link...
- *
- ************************************************************************
- * Required includes...
- *
- * CSECT KeyHandler ;SAS/Lattice ASM command requires this
- *
- INCDIR "include:"
- INCLUDE "exec/types.i"
- INCLUDE "exec/io.i"
- INCLUDE "devices/keyboard.i"
- *
- xref _AbsExecBase ; We get this from outside...
- xref _LVOSignal ; We get this from outside...
- *
- ************************************************************************
- * Make the entry point external...
- *
- xdef _ResetHandler
- *
- ************************************************************************
- *
- * This is the input handler
- * The is_Data field is passed to you in a1.
- *
- * This is the structure that is passed in A1 in this example...
- *
- STRUCTURE MyData,0
- APTR MyTask
- ULONG MySignal
- *
- ************************************************************************
- * The handler gets called here...
- *
- _ResetHandler: move.l MySignal(a1),d0 ; Get signal to send
- move.l MyTask(a1),a1 ; Get task
- *
- * Now signal the task...
- *
- move.l a6,-(sp) ; Save the stack...
- move.l _AbsExecBase,a6 ; Get ExecBase
- jsr _LVOSignal(a6) ; Send the signal
- move.l (sp)+,a6 ; Restore A6
- *
- * Return to let other handlers execute.
- *
- rts ; return from handler...
- ************************************************************************
- END
-
-