; *********************************************************************** ; * * ; * Header File for ELEC2041 Experiment 5, Second Version --- Public * ; * * ; *********************************************************************** ; Author: John Zaitseff ; Date: 28th May, 2003 ; Version: 1.2 ; This header file contains public definitions needed for the second ; version of the Flash program, as used in ELEC2041 Experiment 5. In ; other words, it contains just those definitions that the user program ; needs to know about. This header file is used by the files flash-v2.s ; and swi-v2.s. ; ----------------------------------------------------------------------- ; Software Interrupt Routine function definitions ; The following definitions provide the public interface to the SWI ; handler. In other words, these definitions are all that user-mode ; programs need to be able to use the SWI handler. ; Normally, each function definition would be accompanied by a reference ; manual page explaining what that function does, what parameters are ; expected on input and what the results are on output. .set swi_num_funcs, 2 ; Number of SWI functions .set swi_set_LEDs, 0 ; Function 0: set the LEDs .set swi_delay, 1 ; Function 1: delay the program ; Technically speaking, the swi_num_funcs definition does not need to ; appear in the public header file: only the code that implements the SWI ; handler really needs to know it. However, it is nice to let the user ; know just how many functions are available in the first place. ; ----------------------------------------------------------------------- ; Program-specific values ; The following lines provide definitions needed by the main program. ; These definitions could be placed in their own header file (and in large ; programs, this is often done). In this case, the program is so small ; that it is not worth introducing yet another file for you to examine. .set value1, 0b11111111 ; Value to turn the LEDs on .set value2, 0b00000000 ; Value to turn the LEDs off .set waitval, 10000 ; Number of loops to wait ; Please see the file header-v1.s for the reason why the ".end" assembler ; directive must never appear in header files.