📄 logo.lst
字号:
; USB register mode encoding
0000= DISABLE: equ 00h
0001= NAK_IN_OUT: equ 01h
0002= STATUS_OUT_ONLY: equ 02h
0003= STALL_IN_OUT: equ 03h
0004= IGNORE_IN_OUT: equ 04h
0005= ISOCHRONOUS_OUT: equ 05h
0006= STATUS_IN_ONLY: equ 06h
0007= ISOCHRONOUS_IN: equ 07h
0008= NAK_OUT: equ 08h
0009= ACK_OUT: equ 09h
000A= NAK_OUT_STATUS_IN: equ 0Ah
000B= ACK_OUT_NAK_IN: equ 0Bh
000C= NAK_IN: equ 0Ch
000D= ACK_IN: equ 0Dh
000E= NAK_IN_STATUS_OUT: equ 0Eh
000F= ACK_IN_STATUS_OUT: equ 0Fh
00FF= SET: equ FFh
0000= CLEAR: equ 00h
;**********************************************************
; USB Descriptor and Request constants
; source p172,,175 USB specification
;**********************************************************
; Characterists of bmRequest Value
;
; D7 Data xfer direction
; 0 = Host to device
; 1 = Device to host
;
; D6..5 Type
; 0 = Standard
; 1 = Class
; 2 = Vendor
; 3 = Reserved
;
; D4..0 Recipient
; 0 = Device
; 1 = Interface
; 2 = Endpoint
; 3 = Other
; 4..31 = Reserved
;***** bmRequestType
0000= HOSTTODEVICE: equ 00h
0080= DEVICETOHOST: equ 80h
0000= STANDARD_TYPE: equ 00h
0020= CLASS_TYPE: equ 20h
0040= VENDOR_TYPE: equ 40h
0060= RESERVED_TYPE: equ 60h
0000= DEVICE_RECIPIENT: equ 00h
0001= INTERFACE_RECIPIENT: equ 01h
0002= ENDPOINT_RECIPIENT: equ 02h
0003= OTHER_RECIPIENT: equ 03h
;***** bRequest
0000= GET_STATUS: equ 00h
0001= CLEAR_FEATURE: equ 01h
0003= SET_FEATURE: equ 03h
0005= SET_ADDRESS: equ 05h
0006= GET_DESCRIPTOR: equ 06h
0007= SET_DESCRIPTOR: equ 07h
0008= GET_CONFIGURATION: equ 08h
0009= SET_CONFIGURATION: equ 09h
000A= GET_INTERFACE: equ 0Ah
000B= SET_INTERFACE: equ 0Bh
000C= SYNCH_FRAME: equ 0Ch
;***** Descriptor Types
0001= DEVICE: equ 01h
0002= CONFIGURATION: equ 02h
0003= STRING: equ 03h
0004= INTERFACE: equ 04h
0005= ENDPOINT: equ 05h
;***** Feature Selectors
0001= DEVICE_REMOTE_WAKEUP: equ 01h
0000= ENDPOINT_STALL: equ 00h
;***** HID Class Request Types
0001= GET_REPORT: equ 01h
0002= GET_IDLE: equ 02h
0003= GET_PROTOCOL: equ 03h
0009= SET_REPORT: equ 09h
000A= SET_IDLE: equ 0Ah
000B= SET_PROTOCOL: equ 0Bh
00F0= ep1_dmabuff: equ F0h
00F0= ep1_dmabuff0: equ ep1_dmabuff+0
00F1= ep1_dmabuff1: equ ep1_dmabuff+1
00F2= ep1_dmabuff2: equ ep1_dmabuff+2
00F3= ep1_dmabuff3: equ ep1_dmabuff+3
00F4= ep1_dmabuff4: equ ep1_dmabuff+4
00F5= ep1_dmabuff5: equ ep1_dmabuff+5
00F6= ep1_dmabuff6: equ ep1_dmabuff+6
00F7= ep1_dmabuff7: equ ep1_dmabuff+7
00F8= ep0_dmabuff: equ F8h
00F8= ep0_dmabuff0: equ ep0_dmabuff+0
00F9= ep0_dmabuff1: equ ep0_dmabuff+1
00FA= ep0_dmabuff2: equ ep0_dmabuff+2
00FB= ep0_dmabuff3: equ ep0_dmabuff+3
00FC= ep0_dmabuff4: equ ep0_dmabuff+4
00FD= ep0_dmabuff5: equ ep0_dmabuff+5
00FE= ep0_dmabuff6: equ ep0_dmabuff+6
00FF= ep0_dmabuff7: equ ep0_dmabuff+7
00F8= bmRequestType: equ ep0_dmabuff0
00F9= bRequest: equ ep0_dmabuff1
00FA= wValuelo: equ ep0_dmabuff2
00FB= wValuehi: equ ep0_dmabuff3
00FC= wIndexlo: equ ep0_dmabuff4
00FD= wIndexhi: equ ep0_dmabuff5
00FE= wLengthlo: equ ep0_dmabuff6
00FF= wLengthhi: equ ep0_dmabuff7
; DATA MEMORY VARIABLES
;
0020= suspend_count: equ 20h ; counter for suspend/resume
0021= ep1_data_toggle: equ 21h ; data toggle for INs on endpoint one
0022= ep0_data_toggle: equ 22h ; data toggle for INs on endpoint zero
0023= data_start: equ 23h ; address of request response data, as an offset
0024= data_count: equ 24h ; number of bytes to send back to the host
0025= maximum_data_count: equ 25h ; request response size
0026= ep0_in_machine: equ 26h
0027= ep0_in_flag: equ 27h
0028= configuration: equ 28h
0029= ep1_stall: equ 29h
002A= idle: equ 2Ah
002B= protocol: equ 2Bh
002C= temp: equ 2Ch ; temporary register
002D= event_machine: equ 2Dh
002E= pending_data: equ 2Eh
002F= int_temp: equ 2Fh
0030= idle_timer: equ 30h
0031= idle_prescaler: equ 31h
0032= logo_index: equ 32h
0033= ep0_transtype: equ 33h
; STATE MACHINE CONSTANTS
;EP0 IN TRANSACTIONS
0000= EP0_IN_IDLE: equ 00h
0002= CONTROL_READ_DATA: equ 02h
0004= NO_DATA_STATUS: equ 04h
0006= EP0_IN_STALL: equ 06h
; FLAG CONSTANTS
;EP0 NO-DATA CONTROL FLAGS
0000= ADDRESS_CHANGE_PENDING: equ 00h
0002= NO_CHANGE_PENDING: equ 02h
; RESPONSE SIZES
0002= DEVICE_STATUS_LENGTH: equ 2
0001= DEVICE_CONFIG_LENGTH: equ 1
0002= ENDPOINT_STALL_LENGTH: equ 2
0002= INTERFACE_STATUS_LENGTH: equ 2
0001= INTERFACE_ALTERNATE_LENGTH: equ 1
0001= INTERFACE_PROTOCOL_LENGTH: equ 1
0000= NO_EVENT_PENDING: equ 00h
0002= EVENT_PENDING: equ 02h
;***** TRANSACTION TYPES
0000= TRANS_NONE: equ 00h
0002= TRANS_CONTROL_READ: equ 02h
0004= TRANS_CONTROL_WRITE: equ 04h
0006= TRANS_NO_DATA_CONTROL: equ 06h
;*************** interrupt vector table ****************
0000 ORG 00h
0000 80 1B [05] jmp reset ; reset vector
0002 80 8F [05] jmp bus_reset ; bus reset interrupt
0004 80 1A [05] jmp error ; 128us interrupt
0006 80 A0 [05] jmp 1ms_timer ; 1.024ms interrupt
0008 80 D5 [05] jmp endpoint0 ; endpoint 0 interrupt
000A 83 CC [05] jmp endpoint1 ; endpoint 1 interrupt
000C 80 1A [05] jmp error ; endpoint 2 interrupt
000E 80 1A [05] jmp error ; reserved
0010 80 1A [05] jmp error ; Capture timer A interrupt Vector
0012 80 1A [05] jmp error ; Capture timer B interrupt Vector
0014 80 1A [05] jmp error ; GPIO interrupt vector
0016 80 1A [05] jmp error ; Wake-up interrupt vector
;************** program listing ************************
001A ORG 1Ah
001A 00 [07] error: halt
;*******************************************************
;
; Interrupt handler: reset
; Purpose: The program jumps to this routine when
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -