📄 lcp.lst
字号:
A51 MACRO ASSEMBLER LCP 25/07/99 18:37:13 PAGE 1
DOS MACRO ASSEMBLER A51 V5.28m
OBJECT MODULE PLACED IN LCP.OBJ
ASSEMBLER INVOKED BY: C:\ANCHOR\KEIL2K\BIN\A51.EXE LCP.A51 RB(0) DB EP
LOC OBJ LINE SOURCE
1 NAME LightingControlPanel
2
3 $INCLUDE(../Declare.A51)
=1 4 ; This module declares the variables and constants used in the examples
=1 5 ; It is common to all of the examples
=1 6 ;
=1 7 ; Declare Special Function Registers used
0088 =1 8 TimerControl DATA 088H
0089 =1 9 TimerMode DATA 089H
008C =1 10 Timer0High DATA 08CH
00A8 =1 11 EI DATA 0A8H
00E8 =1 12 EIE DATA 0E8H ; EZ-USB specific
0091 =1 13 EXIF DATA 091H ; EZ-USB specific
00D8 =1 14 EICON DATA 0D8H ; EZ-USB specific
0092 =1 15 PageReg DATA 092H ; EZ-USB specific, used with MOVX @Ri
0086 =1 16 DPS DATA 086H ; EZ-USB specific, used with dual data pointers
=1 17 ;
=1 18 ; "External" memory locations used, EZ-USB specific
=1 19 ; Note that most of these variables are in Page 7FH
7FE8 =1 20 SETUPDAT EQU 07FE8H
7FD4 =1 21 SUDPTR EQU 07FD4H
7FB4 =1 22 EP0Control EQU 07FB4H
7F00 =1 23 EP0InBuffer EQU 07F00H
7EC0 =1 24 EP0OutBuffer EQU 07EC0H ; Not in Page 7FH
7E80 =1 25 EP1InBuffer EQU 07E80H ; Not in Page 7FH
7FB5 =1 26 IN0ByteCount EQU 07FB5H
7FC5 =1 27 Out0ByteCount EQU 07FC5H
7FB7 =1 28 IN1ByteCount EQU 07FB7H
7FAC =1 29 IN07IEN EQU 07FACH
7FA9 =1 30 IN07IRQ EQU 07FA9H
7FAD =1 31 OUT07IEN EQU 07FADH
7FAA =1 32 OUT07IRQ EQU 07FAAH
7FAE =1 33 USBIEN EQU 07FAEH
7FAB =1 34 USBIRQ EQU 07FABH
7FD6 =1 35 USBControl EQU 07FD6H
7FA6 =1 36 I2CData EQU 07FA6H
7FA5 =1 37 I2CControl EQU 07FA5H
7F93 =1 38 PortA_Config EQU 07F93H
7F94 =1 39 PortB_Config EQU 07F94H
7F95 =1 40 PortC_Config EQU 07F95H
7F96 =1 41 PortA_OUT EQU 07F96H
7F97 =1 42 PortB_OUT EQU 07F97H
7F98 =1 43 PortC_OUT EQU 07F98H
7F99 =1 44 PortA_PINS EQU 07F99H
7F9A =1 45 PortB_PINS EQU 07F9AH
7F9B =1 46 PortC_PINS EQU 07F9BH
7F9C =1 47 PortA_OE EQU 07F9CH
7F9D =1 48 PortB_OE EQU 07F9DH
7F9E =1 49 PortC_OE EQU 07F9EH
=1 50 ;
=1 51 ; Byte Variables
=1 52
---- =1 53 DSEG AT 20H
0020 =1 54 FLAGS: DS 1 ; This register is bit-addressable
=1 55 ; Bit Variables
0000 =1 56 Configured EQU FLAGS.0 ; Is this device configured
0001 =1 57 STALL EQU FLAGS.1 ; Need to STALL endpoint 0
0002 =1 58 SendData EQU FLAGS.2 ; Need to send data to PC Host
A51 MACRO ASSEMBLER LCP 25/07/99 18:37:13 PAGE 2
0003 =1 59 IsDescriptor EQU FLAGS.3 ; Enable a shortcut reply
=1 60 ;
0021 =1 61 MonitorSpace: DS 1FH ; Used by Dscope
0040 =1 62 Temp: DS 1 ; A temporary working register
0041 =1 63 Idle_Time: DS 1 ; The time the PC host wants us to wait
0042 =1 64 Expired_Time: DS 1 ; A downcounter for timed Reports
0043 =1 65 ReplyBuffer: DS 3 ; First byte is Count
0046 =1 66 CurrentConfiguration:
0046 =1 67 DS 1 ; Some examples support > 1 configurations
=1 68 ;
=1 69 ; Declare the specific variables used by each of the examples
0047 =1 70 Overlay EQU $
0047 =1 71 Old_Buttons: DS 1 ; Used by BAL: stores current button position
0048 =1 72 LEDstrobe: DS 1 ; Used by BAL: strobe one LED on at a time
0049 =1 73 LEDvalue: DS 1 ; Used by BAL: stores current LED value
004A =1 74 Msec_Counter: DS 1 ; Used by BAL: counts up to 4 msec
=1 75
0047 =1 76 ORG Overlay ; Overlay the variables (only one set in use at any one tim
e)
0047 =1 77 I2CDataByte: DS 1 ; Used by I2C: keep a local copy of data read from I2C bus
=1 78
0047 =1 79 ORG Overlay
0047 =1 80 LightValues: DS 6 ; Used by LP: local buffer for light brightness
004D =1 81 WorkingValues: DS 6 ; Used by LP: counted down each half cycle
0053 =1 82 Mask: DS 1 ; Used by LP: TurnON mask for Triacs
0004 =1 83 LastCycle EQU FLAGS.4 ; Used by LP: Tracks Positive & Negative Mains half cycles
=1 84
0047 =1 85 ORG Overlay
0047 =1 86 CurrentPosition:DS 1 ; Used by Stepper: motor has 16 stable positions
0048 =1 87 MotorControl: DS 3 ; Used by Stepper: direction, Low(count) and High(count)
=1 88
0047 =1 89 ORG Overlay
0047 =1 90 LimitValues: DS 12 ; Used by Temps: local buffer for limits
=1 91
0047 =1 92 ORG Overlay
0047 =1 93 ButtonsValue: DS 1 ; Used by RB: buttons are read each full scan
0048 =1 94 DisplayPosition:DS 1 ; Used by RB: holds current display position
0049 =1 95 LEDBuffer: DS 42 ; Used by RB: local buffer for reader board
=1 96
=1 97 ;
98 $INCLUDE(Vectors.A51)
=1 99 ; This module is specific to the Lighting Control Panel (since it uses Timer 0)
=1 100 ;.
=1 101 ; It contains all of the interrupt vector declarations and
=1 102 ; the first level interrupt servicing (register save, call subroutine,
=1 103 ; clear interrupt source, restore registers, return)
=1 104 ; Suspend and Resume are handled totally in this module
=1 105 ;
=1 106 ; A Reset sends us to Program space location 0
---- =1 107 CSEG AT 0 ; Code space
=1 108 USING 0 ; Reset forces Register Bank 0
0000 020355 =1 109 LJMP Reset
=1 110 ;
=1 111 ; The interrupt vector table is also located here
=1 112 ; EZ-USB has two levels of USB interrupts:
=1 113 ; 1-the main level is described in this table (at ORG 43H)
=1 114 ; 2-there are 21 sources of USB interrupts and these are described in USB_ISR
=1 115 ; This means that two levels of acknowledgement and clearing will be required
=1 116 ; LJMP INT0_ISR ; Features not used are commented out
000B =1 117 ORG 0BH
000B 020158 =1 118 LJMP Timer0_ISR
=1 119 ; ORG 13H
=1 120 ; LJMP INT1_ISR
=1 121 ; ORG 1BH
=1 122 ; LJMP Timer1_ISR
=1 123 ; ORG 23H
A51 MACRO ASSEMBLER LCP 25/07/99 18:37:13 PAGE 3
=1 124 ; LJMP UART0_ISR
=1 125 ; ORG 2BH
=1 126 ; LJMP Timer2_ISR
=1 127 ; ORG 33H
=1 128 ; LJMP WakeUp_ISR
=1 129 ; ORG 3BH
=1 130 ; LJMP UART1_ISR
0043 =1 131 ORG 43H
0043 020100 =1 132 LJMP USB_ISR ; Auto Vector will replace byte 45H
=1 133 ; ORG 4BH
=1 134 ; LJMP I2C_ISR
=1 135 ; ORG 53H
=1 136 ; LJMP INT4_ISR
=1 137 ; ORG 5BH
=1 138 ; LJMP INT5_ISR
=1 139 ; ORG 63H
=1 140 ; LJMP INT6_ISR
=1 141
00E0 =1 142 ORG 0E0H ; Keep out of the way of dScope monitor
=1 143 ; If you are not using dScope then this memory hole
=1 144 ; may be used for useful routines.
0100 =1 145 ORG 100H
0100 02013C =1 146 USB_ISR:LJMP SUDAV_ISR
0103 00 =1 147 DB 0 ; Pad entries to 4 bytes
0104 020118 =1 148 LJMP SOF_ISR
0107 00 =1 149 DB 0
0108 020118 =1 150 LJMP SUTOK_ISR
010B 00 =1 151 DB 0
010C 020129 =1 152 LJMP Suspend_ISR
010F 00 =1 153 DB 0
0110 020120 =1 154 LJMP USBReset_ISR
0113 00 =1 155 DB 0
0114 020118 =1 156 LJMP Reserved
0117 00 =1 157 DB 0
=1 158 ; LJMP EP0In_ISR ; Endpoint Interrupts are not used in these examples
=1 159 ; DB 0 ; Comment out features not used
=1 160 ; LJMP EP0Out_ISR
=1 161 ; DB 0
=1 162 ; LJMP EP1In_ISR
=1 163 ; DB 0
=1 164 ; LJMP EP1Out_ISR
=1 165 ; DB 0
=1 166 ; LJMP EP2In_ISR
=1 167 ; DB 0
=1 168 ; LJMP EP2Out_ISR
=1 169 ; DB 0
=1 170 ; LJMP EP3In_ISR
=1 171 ; DB 0
=1 172 ; LJMP EP3Out_ISR
=1 173 ; DB 0
=1 174 ; LJMP EP4In_ISR
=1 175 ; DB 0
=1 176 ; LJMP EP4Out_ISR
=1 177 ; DB 0
=1 178 ; LJMP EP5In_ISR
=1 179 ; DB 0
=1 180 ; LJMP EP5Out_ISR
=1 181 ; DB 0
=1 182 ; LJMP EP6In_ISR
=1 183 ; DB 0
=1 184 ; LJMP EP6Out_ISR
=1 185 ; DB 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -