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