; > ToggleLED
; Source for ToggleLED function
;
; ***********************************
; ***    C h a n g e   L i s t    ***
; ***********************************
;
; Date       Who  Version       Description
; ----       ---  -------       -----------
; 29-May-96  BAR  0.01          Started
; 07 Mar 97  BAR  0.02          Changed to optionally use seperate control
;                               lines for the LED's.
; 11 Jun 97  BAR  0.03          Make sure the IOMD_Base is used.
; 12 Jun 97  BAR  0.04          Don't use entry & exit.
;
; This file will provide support to flash the front pannel LED's
;
IOMD_IOLINES            *       (IOMD_Base+&0C) ; IOMD_CLINES
; IOMD_IOLINES_INPUTS     *       &7B ; IOMD_C_ReadMask
; IOMD_STANDBY_LED_BIT    *       1<<7 ;

; Define IOMD_LED_BITS by oring together the known lables for the LED bits.
; One or more of the following can be 0,
IOMD_LED_BITS   *       IOMD_C_FrontPanelRightLED :OR: IOMD_C_FrontPanelLeftLED :OR: IOMD_C_FrontPanelLED

tl_Toggle_LEDs  ROUT
; Toggle the standby/on LEDs
; On entry ....
;        Nothing.
; Register usage ....
;         r0, general scratch pad
;         r1, addr of IOMD_CLINES
;
;        DLINE   "toggle leds"
	LDR	r1, =IOMD_IOLINES       	; r1 = addr of IOMD_IOLINES
;        LDR     r1, =IOMD_CLINES                        ; r1 = addr of IOMD_CLINES
;        DLINE   "led -1111111"
        LDRB    r0,[r1]                                 ; load r0 with the byte pointed to by r1
;        DLINE   "led -2222222"
        EOR     r0,r0,#IOMD_LED_BITS                    ; Toggle the LED bit(s); ExOR
;        DLINE   "led -3333333"
        ORR     r0,r0,#IOMD_C_ReadMask                  ; OR with the default I/O settings
;        DLINE   "led -4444444"
        STRB    r0,[r1]                                 ; store a byte of r0 in to loc pointed to by r1
;        DLINE   "led -5555555"
        MOV     pc, r14                                 ; Return to caller

        END