; *********************************************************************** ; * * ; * Header File for ELEC2041 Experiment 5, Second Version --- Internal * ; * * ; *********************************************************************** ; Author: John Zaitseff ; Date: 28th May, 2003 ; Version: 1.2 ; This header file contains private (internal) 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 boot code ; and software interrupt handler need to know about; the person writing ; the user mode program does NOT need to even see the contents of this ; file! This header file is used by the files boot-swi-v2.s and swi-v2.s. ; ----------------------------------------------------------------------- ; ARM Processor definitions ; The following lines define some of the bits in the Current Processor ; Status Register and the various Saved Processor Status Registers. .set ARM_PSR_i, 0b10000000 ; I bit in CPSR/SPSR .set ARM_PSR_f, 0b01000000 ; F bit in CPSR/SPSR .set ARM_PSR_t, 0b00100000 ; T bit in CPSR/SPSR ; The bottom five bits of the CPSR/SPSR define the processor mode; the ; following lines define the values that can appear in these five bits. ; The ARM_PSR_mode_mask is used to "mask off" these bits, and is used when ; reading and/or writing to the CPSR/SPSRs. .set ARM_PSR_mode_mask, 0b11111 ; Processor modes mask .set ARM_PSR_mode_usr, 0b10000 ; User mode .set ARM_PSR_mode_fiq, 0b10001 ; Fast Interrupt mode .set ARM_PSR_mode_irq, 0b10010 ; Interrupt mode .set ARM_PSR_mode_svc, 0b10011 ; Supervisor mode .set ARM_PSR_mode_abt, 0b10111 ; Abort mode .set ARM_PSR_mode_und, 0b11011 ; Undefined mode .set ARM_PSR_mode_sys, 0b11111 ; System mode ; ----------------------------------------------------------------------- ; DSLMU Microcontroller Board-specific definitions ; The following lines contain definitions specific to the Komodo ARM ; environment running on the DSLMU Microcontroller Board. Please note ; that this header file defines each of the ports as absolute addresses; ; that is, each port definition is the actual address of that port. Not ; every port available on the DSLMU Microcontroller Board is defined here. .set portA, 0x10000000 ; Microcontroller Port A address .set portB, 0x10000004 ; Microcontroller Port B address .set portB_pbs2, 0b10000000 ; Bit 7 = Push-button switch S2 .set portB_pbs3, 0b01000000 ; Bit 6 = Push-button switch S3 .set portB_lcdbl, 0b00100000 ; Bit 5 = LCD backlight .set portB_leden, 0b00010000 ; Bit 4 = LEDs Enable .set portB_LC_RW, 0b00000100 ; Bit 2 = Port A direction, LC_RW .set portB_LC_RS, 0b00000010 ; Bit 1 = LC_RS signal .set portB_LC_EN, 0b00000001 ; Bit 0 = LC_EN signal ; Please see the file header-v1.s for the reason why the ".end" assembler ; directive must never appear in header files.