                              1 	.module main
                              2 	
                              3 	;; same as audiofirmware, but do not announce as
                              4 	;; audio class compliant
                              5 	
                              6 	;; ENDPOINTS
                              7 	;; EP0 in/out   Control
                              8 	;; EP1 in       Interrupt:  Status
                              9 	;;              Byte 0: Modem Status
                             10 	;;                Bit 0-1: Transmitter status
                             11 	;;                         0: idle (off)
                             12 	;;                         1: keyup
                             13 	;;                         2: transmitting packets
                             14 	;;                         3: tail
                             15 	;;                Bit 2:   PTT status (1=on)
                             16 	;;                Bit 3:   DCD
                             17 	;;                Bit 5:   UART transmitter empty
                             18 	;;                Bit 6-7: unused
                             19 	;;              Byte 1: Number of empty 64 byte chunks in TX fifo (sofcount)
                             20 	;;              Byte 2: Number of full 64 byte chunks in RX fifo (INISOVAL)
                             21 	;;              Byte 3: RSSI value
                             22 	;;              Byte 4:	IRQ count
                             23 	;;              Byte 5-20: (as needed) UART receiver chars
                             24 	;; EP8 out      audio output
                             25 	;; EP8 in       audio input
                             26 
                             27 	;; COMMAND LIST
                             28 	;; C0 C0  read status (max. 23 bytes, first 6 same as EP1 in)
                             29 	;; C0 C8  read mode
                             30 	;;          Return:
                             31 	;;            Byte 0: 4 (MODE_AUDIO)
                             32 	;; C0 C9  return serial number string
                             33 	;; C0 D0  get/set PTT/DCD/RSSI
                             34 	;;          wIndex = 1:	set forced ptt to wValue
                             35 	;;          Return:
                             36 	;;            Byte 0: PTT status
                             37 	;;            Byte 1: DCD status
                             38 	;;            Byte 2: RSSI status
                             39 	;; 40 D2  set CON/STA led
                             40 	;;          Bits 0-1 of wValue
                             41 	;; 40 D3  send byte to UART
                             42 	;;          Byte in wValue
                             43 	;; C0 D4  get/set modem disconnect port (only if internal modem used, stalls otherwise)
                             44 	;;          wIndex = 1:	write wValue to output register
                             45 	;;          wIndex = 2:	write wValue to tristate mask register (1 = input, 0 = output)
                             46 	;;          Return:
                             47 	;;            Byte 0: Modem Disconnect Input
                             48 	;;            Byte 1: Modem Disconnect Output register
                             49 	;;            Byte 2: Modem Disconnect Tristate register
                             50 	;; C0 D5  get/set T7F port
                             51 	;;          wIndex = 1:	write wValue to T7F output register
                             52 	;;          Return:
                             53 	;;            Byte 0: T7F Input
                             54 	;;            Byte 1: T7F Output register
                             55 	;; C0 E0  get/set control register/counter values
                             56 	;;          wIndex = 1:	write wValue to control register
                             57 	;;          Return:
                             58 	;;            Byte 0: control register value
                             59 	;;            Byte 1-3: counter0 register
                             60 	;;            Byte 4-6: counter1 register
                             61 	;; C0 E1  get debug status
                             62 	;;          Return:
                             63 	;;            Byte 0: SOF count
                             64 	;;            Byte 1: framesize
                             65 	;;            Byte 2-3: divider
                             66 	;;            Byte 4: divrel
                             67 	;;            Byte 5: pllcorrvar
                             68 	;;            Byte 6: txfifocount
                             69 	;; C0 E2  xxdebug stuff
                             70 	
                             71 	;; define code segments link order
                             72 	.area CODE (CODE)
                             73 	.area CSEG (CODE)
                             74 	.area GSINIT (CODE)
                             75 	.area GSINIT2 (CODE)
                             76 
                             77 	;; -----------------------------------------------------
                             78 
                             79 	;; special function registers (which are not predefined)
                    0082     80 	dpl0    = 0x82
                    0083     81 	dph0    = 0x83
                    0084     82 	dpl1    = 0x84
                    0085     83 	dph1    = 0x85
                    0086     84 	dps     = 0x86
                    008E     85 	ckcon   = 0x8E
                    008F     86 	spc_fnc = 0x8F
                    0091     87 	exif    = 0x91
                    0092     88 	mpage   = 0x92
                    0098     89 	scon0   = 0x98
                    0099     90 	sbuf0   = 0x99
                    00C0     91 	scon1   = 0xC0
                    00C1     92 	sbuf1   = 0xC1
                    00D8     93 	eicon   = 0xD8
                    00E8     94 	eie     = 0xE8
                    00F8     95 	eip     = 0xF8
                             96 
                             97 	;; anchor xdata registers
                    7F00     98 	IN0BUF		= 0x7F00
                    7EC0     99 	OUT0BUF		= 0x7EC0
                    7E80    100 	IN1BUF		= 0x7E80
                    7E40    101 	OUT1BUF		= 0x7E40
                    7E00    102 	IN2BUF		= 0x7E00
                    7DC0    103 	OUT2BUF		= 0x7DC0
                    7D80    104 	IN3BUF		= 0x7D80
                    7D40    105 	OUT3BUF		= 0x7D40
                    7D00    106 	IN4BUF		= 0x7D00
                    7CC0    107 	OUT4BUF		= 0x7CC0
                    7C80    108 	IN5BUF		= 0x7C80
                    7C40    109 	OUT5BUF		= 0x7C40
                    7C00    110 	IN6BUF		= 0x7C00
                    7BC0    111 	OUT6BUF		= 0x7BC0
                    7B80    112 	IN7BUF		= 0x7B80
                    7B40    113 	OUT7BUF		= 0x7B40
                    7FE8    114 	SETUPBUF	= 0x7FE8
                    7FE8    115 	SETUPDAT	= 0x7FE8
                            116 
                    7FB4    117 	EP0CS		= 0x7FB4
                    7FB5    118 	IN0BC		= 0x7FB5
                    7FB6    119 	IN1CS		= 0x7FB6
                    7FB7    120 	IN1BC		= 0x7FB7
                    7FB8    121 	IN2CS		= 0x7FB8
                    7FB9    122 	IN2BC		= 0x7FB9
                    7FBA    123 	IN3CS		= 0x7FBA
                    7FBB    124 	IN3BC		= 0x7FBB
                    7FBC    125 	IN4CS		= 0x7FBC
                    7FBD    126 	IN4BC		= 0x7FBD
                    7FBE    127 	IN5CS		= 0x7FBE
                    7FBF    128 	IN5BC		= 0x7FBF
                    7FC0    129 	IN6CS		= 0x7FC0
                    7FC1    130 	IN6BC		= 0x7FC1
                    7FC2    131 	IN7CS		= 0x7FC2
                    7FC3    132 	IN7BC		= 0x7FC3
                    7FC5    133 	OUT0BC		= 0x7FC5
                    7FC6    134 	OUT1CS		= 0x7FC6
                    7FC7    135 	OUT1BC		= 0x7FC7
                    7FC8    136 	OUT2CS		= 0x7FC8
                    7FC9    137 	OUT2BC		= 0x7FC9
                    7FCA    138 	OUT3CS		= 0x7FCA
                    7FCB    139 	OUT3BC		= 0x7FCB
                    7FCC    140 	OUT4CS		= 0x7FCC
                    7FCD    141 	OUT4BC		= 0x7FCD
                    7FCE    142 	OUT5CS		= 0x7FCE
                    7FCF    143 	OUT5BC		= 0x7FCF
                    7FD0    144 	OUT6CS		= 0x7FD0
                    7FD1    145 	OUT6BC		= 0x7FD1
                    7FD2    146 	OUT7CS		= 0x7FD2
                    7FD3    147 	OUT7BC		= 0x7FD3
                            148 
                    7FA8    149 	IVEC		= 0x7FA8
                    7FA9    150 	IN07IRQ		= 0x7FA9
                    7FAA    151 	OUT07IRQ	= 0x7FAA
                    7FAB    152 	USBIRQ		= 0x7FAB
                    7FAC    153 	IN07IEN		= 0x7FAC
                    7FAD    154 	OUT07IEN	= 0x7FAD
                    7FAE    155 	USBIEN		= 0x7FAE
                    7FAF    156 	USBBAV		= 0x7FAF
                    7FB2    157 	BPADDRH		= 0x7FB2
                    7FB3    158 	BPADDRL		= 0x7FB3
                            159 
                    7FD4    160 	SUDPTRH		= 0x7FD4
                    7FD5    161 	SUDPTRL		= 0x7FD5
                    7FD6    162 	USBCS		= 0x7FD6
                    7FD7    163 	TOGCTL		= 0x7FD7
                    7FD8    164 	USBFRAMEL	= 0x7FD8
                    7FD9    165 	USBFRAMEH	= 0x7FD9
                    7FDB    166 	FNADDR		= 0x7FDB
                    7FDD    167 	USBPAIR		= 0x7FDD
                    7FDE    168 	IN07VAL		= 0x7FDE
                    7FDF    169 	OUT07VAL	= 0x7FDF
                    7FE3    170 	AUTOPTRH	= 0x7FE3
                    7FE4    171 	AUTOPTRL	= 0x7FE4
                    7FE5    172 	AUTODATA	= 0x7FE5
                            173 
                            174 	;; isochronous endpoints. only available if ISODISAB=0
                            175 
                    7F60    176 	OUT8DATA	= 0x7F60
                    7F61    177 	OUT9DATA	= 0x7F61
                    7F62    178 	OUT10DATA	= 0x7F62
                    7F63    179 	OUT11DATA	= 0x7F63
                    7F64    180 	OUT12DATA	= 0x7F64
                    7F65    181 	OUT13DATA	= 0x7F65
                    7F66    182 	OUT14DATA	= 0x7F66
                    7F67    183 	OUT15DATA	= 0x7F67
                            184 
                    7F68    185 	IN8DATA		= 0x7F68
                    7F69    186 	IN9DATA		= 0x7F69
                    7F6A    187 	IN10DATA	= 0x7F6A
                    7F6B    188 	IN11DATA	= 0x7F6B
                    7F6C    189 	IN12DATA	= 0x7F6C
                    7F6D    190 	IN13DATA	= 0x7F6D
                    7F6E    191 	IN14DATA	= 0x7F6E
                    7F6F    192 	IN15DATA	= 0x7F6F
                            193 
                    7F70    194 	OUT8BCH		= 0x7F70
                    7F71    195 	OUT8BCL		= 0x7F71
                    7F72    196 	OUT9BCH		= 0x7F72
                    7F73    197 	OUT9BCL		= 0x7F73
                    7F74    198 	OUT10BCH	= 0x7F74
                    7F75    199 	OUT10BCL	= 0x7F75
                    7F76    200 	OUT11BCH	= 0x7F76
                    7F77    201 	OUT11BCL	= 0x7F77
                    7F78    202 	OUT12BCH	= 0x7F78
                    7F79    203 	OUT12BCL	= 0x7F79
                    7F7A    204 	OUT13BCH	= 0x7F7A
                    7F7B    205 	OUT13BCL	= 0x7F7B
                    7F7C    206 	OUT14BCH	= 0x7F7C
                    7F7D    207 	OUT14BCL	= 0x7F7D
                    7F7E    208 	OUT15BCH	= 0x7F7E
                    7F7F    209 	OUT15BCL	= 0x7F7F
                            210 
                    7FF0    211 	OUT8ADDR	= 0x7FF0
                    7FF1    212 	OUT9ADDR	= 0x7FF1
                    7FF2    213 	OUT10ADDR	= 0x7FF2
                    7FF3    214 	OUT11ADDR	= 0x7FF3
                    7FF4    215 	OUT12ADDR	= 0x7FF4
                    7FF5    216 	OUT13ADDR	= 0x7FF5
                    7FF6    217 	OUT14ADDR	= 0x7FF6
                    7FF7    218 	OUT15ADDR	= 0x7FF7
                    7FF8    219 	IN8ADDR		= 0x7FF8
                    7FF9    220 	IN9ADDR		= 0x7FF9
                    7FFA    221 	IN10ADDR	= 0x7FFA
                    7FFB    222 	IN11ADDR	= 0x7FFB
                    7FFC    223 	IN12ADDR	= 0x7FFC
                    7FFD    224 	IN13ADDR	= 0x7FFD
                    7FFE    225 	IN14ADDR	= 0x7FFE
                    7FFF    226 	IN15ADDR	= 0x7FFF
                            227 
                    7FA0    228 	ISOERR		= 0x7FA0
                    7FA1    229 	ISOCTL		= 0x7FA1
                    7FA2    230 	ZBCOUNT		= 0x7FA2
                    7FE0    231 	INISOVAL	= 0x7FE0
                    7FE1    232 	OUTISOVAL	= 0x7FE1
                    7FE2    233 	FASTXFR		= 0x7FE2
                            234 
                            235 	;; CPU control registers
                            236 
                    7F92    237 	CPUCS		= 0x7F92
                            238 
                            239 	;; IO port control registers
                            240 
                    7F93    241 	PORTACFG	= 0x7F93
                    7F94    242 	PORTBCFG	= 0x7F94
                    7F95    243 	PORTCCFG	= 0x7F95
                    7F96    244 	OUTA		= 0x7F96
                    7F97    245 	OUTB		= 0x7F97
                    7F98    246 	OUTC		= 0x7F98
                    7F99    247 	PINSA		= 0x7F99
                    7F9A    248 	PINSB		= 0x7F9A
                    7F9B    249 	PINSC		= 0x7F9B
                    7F9C    250 	OEA		= 0x7F9C
                    7F9D    251 	OEB		= 0x7F9D
                    7F9E    252 	OEC		= 0x7F9E
                            253 
                            254 	;; I2C controller registers
                            255 
                    7FA5    256 	I2CS		= 0x7FA5
                    7FA6    257 	I2DAT		= 0x7FA6
                            258 
                            259 	;; Xilinx FPGA registers
                    C000    260 	AUDIORXFIFO	= 0xc000
                    C000    261 	AUDIOTXFIFO	= 0xc000
                    C001    262 	AUDIORXFIFOCNT	= 0xc001
                    C002    263 	AUDIOTXFIFOCNT	= 0xc002
                    C001    264 	AUDIODIVIDERLO	= 0xc001
                    C002    265 	AUDIODIVIDERHI	= 0xc002
                    C004    266 	AUDIORSSI	= 0xc004
                    C005    267 	AUDIOCNTLOW	= 0xc005
                    C006    268 	AUDIOCNTMID	= 0xc006
                    C007    269 	AUDIOCNTHIGH	= 0xc007
                    C008    270 	AUDIOCTRL	= 0xc008
                    C009    271 	AUDIOSTAT	= 0xc009
                    C00A    272 	AUDIOT7FOUT	= 0xc00a
                    C00B    273 	AUDIOT7FIN	= 0xc00b
                    C00C    274 	AUDIOMDISCTRIS	= 0xc00c
                    C00D    275 	AUDIOMDISCOUT	= 0xc00d
                    C00E    276 	AUDIOMDISCIN	= 0xc00e
                            277 
                    0001    278 	AUDIOCTRLPTT	= 0x01
                    0002    279 	AUDIOCTRLMUTE	= 0x02
                    0004    280 	AUDIOCTRLLEDPTT	= 0x04
                    0008    281 	AUDIOCTRLLEDDCD	= 0x08
                    0000    282 	AUDIOCTRLCNTRES	= 0x00
                    0010    283 	AUDIOCTRLCNTDIS	= 0x10
                    0040    284 	AUDIOCTRLCNTCK0	= 0x40
                    0050    285 	AUDIOCTRLCNTCK1	= 0x50
                    0060    286 	AUDIOCTRLCNTCK2	= 0x60
                    0070    287 	AUDIOCTRLCNTCK3	= 0x70
                    0080    288 	AUDIOCTRLCNTRD1	= 0x80
                            289 
                            290 	;; -----------------------------------------------------
                            291 
                            292 	.area CODE (CODE)
   0000 02s00r00            293 	ljmp	startup
   0003 02s00r16            294 	ljmp	int0_isr
   0006                     295 	.ds	5
   000B 02s00r37            296 	ljmp	timer0_isr
   000E                     297 	.ds	5
   0013 02s00r58            298 	ljmp	int1_isr
   0016                     299 	.ds	5
   001B 02s00r79            300 	ljmp	timer1_isr
   001E                     301 	.ds	5
   0023 02s00r9A            302 	ljmp	ser0_isr
   0026                     303 	.ds	5
   002B 02s00rD8            304 	ljmp	timer2_isr
   002E                     305 	.ds	5
   0033 02s00rF9            306 	ljmp	resume_isr
   0036                     307 	.ds	5
   003B 02s01r1A            308 	ljmp	ser1_isr
   003E                     309 	.ds	5
   0043 02s01r00            310 	ljmp	usb_isr
   0046                     311 	.ds	5
   004B 02s01r3D            312 	ljmp	i2c_isr
   004E                     313 	.ds	5
   0053 02s01r62            314 	ljmp	int4_isr
   0056                     315 	.ds	5
   005B 02s01r87            316 	ljmp	int5_isr
   005E                     317 	.ds	5
   0063 02s01rAC            318 	ljmp	int6_isr
                            319 	
                            320 	;; Parameter block at 0xe0
   0066                     321 	.ds	0x7a
   00E0 08                  322 parframesize:	.db	8
   00E1 01                  323 parpttmute:	.db	1
                            324 
                            325 	;; Serial# string at 0xf0
   00E2                     326 	.ds	14
   00F0                     327 parserial:
   00F0 30 30 30 30 30 30   328 	.db	'0,'0,'0,'0,'0,'0,'0,'0,0
        30 30 00
   00F9                     329 	.ds	7
                            330 
   0100                     331 usb_isr:
   0100 02s01rCD            332 	ljmp	usb_sudav_isr
   0103                     333 	.ds	1
   0104 02s06r7B            334 	ljmp	usb_sof_isr
   0107                     335 	.ds	1
   0108 02s07rC5            336 	ljmp	usb_sutok_isr
   010B                     337 	.ds	1
   010C 02s07rF0            338 	ljmp	usb_suspend_isr
   010F                     339 	.ds	1
   0110 02s08r1B            340 	ljmp	usb_usbreset_isr
   0113                     341 	.ds	1
   0114 32                  342 	reti
   0115                     343 	.ds	3
   0118 02s08r46            344 	ljmp	usb_ep0in_isr
   011B                     345 	.ds	1
   011C 02s08r81            346 	ljmp	usb_ep0out_isr
   011F                     347 	.ds	1
   0120 02s09r17            348 	ljmp	usb_ep1in_isr
   0123                     349 	.ds	1
   0124 02s09r45            350 	ljmp	usb_ep1out_isr
   0127                     351 	.ds	1
   0128 02s09r70            352 	ljmp	usb_ep2in_isr
   012B                     353 	.ds	1
   012C 02s09r9B            354 	ljmp	usb_ep2out_isr
   012F                     355 	.ds	1
   0130 02s09rC6            356 	ljmp	usb_ep3in_isr
   0133                     357 	.ds	1
   0134 02s09rF1            358 	ljmp	usb_ep3out_isr
   0137                     359 	.ds	1
   0138 02s0Ar1C            360 	ljmp	usb_ep4in_isr
   013B                     361 	.ds	1
   013C 02s0Ar47            362 	ljmp	usb_ep4out_isr
   013F                     363 	.ds	1
   0140 02s0Ar72            364 	ljmp	usb_ep5in_isr
   0143                     365 	.ds	1
   0144 02s0Ar9D            366 	ljmp	usb_ep5out_isr
   0147                     367 	.ds	1
   0148 02s0ArC8            368 	ljmp	usb_ep6in_isr
   014B                     369 	.ds	1
   014C 02s0ArF3            370 	ljmp	usb_ep6out_isr
   014F                     371 	.ds	1
   0150 02s0Br1E            372 	ljmp	usb_ep7in_isr
   0153                     373 	.ds	1
   0154 02s0Br49            374 	ljmp	usb_ep7out_isr
                            375 
                            376 	;; -----------------------------------------------------
                            377 
                    0004    378 	NUMINTERFACES = 4
                            379 	
                            380 	.area	OSEG (OVR,DATA)
                            381 	.area	BSEG (BIT)
   0000                     382 ctrl_ptt:	.ds	1
   0001                     383 ctrl_pttmute:	.ds	1
   0002                     384 ctrl_ledptt:	.ds	1
   0003                     385 ctrl_leddcd:	.ds	1	
   0004                     386 ctrl_cntmode0:	.ds	1
   0005                     387 ctrl_cntmode1:	.ds	1
   0006                     388 ctrl_cntmode2:	.ds	1
   0007                     389 ctrl_cntsel:	.ds	1
                    0020    390 ctrlreg		=	0x20	; ((ctrl_ptt/8)+0x20)
                            391 
   0008                     392 pttmute:	.ds	1
   0009                     393 uartempty:	.ds	1
                            394 
                            395 
                            396 	.area	ISEG (DATA)
   0000                     397 txsamples:	.ds	0x40
   0040                     398 stack:		.ds	0x80-0x40
                            399 
                            400 	.area	DSEG (DATA)
   0000                     401 ctrlcode:	.ds	1
   0001                     402 ctrlcount:	.ds	2
   0003                     403 leddiv:		.ds	1
   0004                     404 irqcount:	.ds	1
   0005                     405 sofcount:	.ds	1
   0006                     406 divider:	.ds	2
   0008                     407 divrel:		.ds	1
   0009                     408 framesize:	.ds	1
   000A                     409 pllcorrvar:	.ds	1
   000B                     410 txfifocount:	.ds	1
   000C                     411 pttforce:	.ds	1
                            412 
                            413 	;; UART receiver
   000D                     414 uartbuf:	.ds	16
   001D                     415 uartwr:		.ds	1
   001E                     416 uartrd:		.ds	1
                            417 
                            418 	;; Port state
   001F                     419 t7fout:		.ds	1
   0020                     420 mdisctris:	.ds	1
   0021                     421 mdiscout:	.ds	1
                            422 	
                            423 	;; USB state
   0022                     424 numconfig:	.ds	1
   0023                     425 altsetting:	.ds	NUMINTERFACES
                            426 
                            427 	.area	XSEG (DATA)
   0000                     428 blah:	.ds	1
                            429 
                            430 
                            431 	.area	GSINIT (CODE)
                    0002    432 	ar2 = 0x02
                    0003    433 	ar3 = 0x03
                    0004    434 	ar4 = 0x04
                    0005    435 	ar5 = 0x05
                    0006    436 	ar6 = 0x06
                    0007    437 	ar7 = 0x07
                    0000    438 	ar0 = 0x00
                    0001    439 	ar1 = 0x01
                            440 
   0000                     441 startup:
   0000 75 81r40            442 	mov	sp,#stack	; -1
   0003 E4                  443 	clr	a
   0004 F5 D0               444 	mov	psw,a
   0006 F5 86               445 	mov	dps,a
                            446 	;lcall	__sdcc_external_startup
                            447 	;mov	a,dpl0
                            448 	;jz	__sdcc_init_data
                            449 	;ljmp	__sdcc_program_startup
   0008                     450 __sdcc_init_data:
                            451 
                            452 	.area	GSINIT2 (CODE)
   0000                     453 __sdcc_program_startup:
                            454 	;; assembler code startup
   0000 E4                  455 	clr	a
   0001 F5*04               456  	mov	irqcount,a
   0003 F5*05               457 	mov	sofcount,a
   0005 F5*0C               458 	mov	pttforce,a
   0007 F5*1E               459 	mov	uartrd,a
   0009 F5*1D               460 	mov	uartwr,a
   000B F5 86               461 	mov	dps,a
   000D D2*09               462 	setb	uartempty
                            463 	;; some indirect register setup
   000F 75 8E 30            464 	mov	ckcon,#0x30	; zero external wait states, to avoid chip bugs
                            465 	;; Timer setup:
                            466 	;; timer 0: LED blink    : T0M=0, CT0=0, MODE0=1
                            467 	;; timer 1: Baudrate gen : T1M=1, CT1=0, MODE1=2
   0012 75 89 21            468 	mov	tmod,#0x21
   0015 75 88 55            469 	mov	tcon,#0x55	; INT0/INT1 edge
   0018 75 8D 64            470 	mov	th1,#256-156	; 1200 bauds
   001B 75 87 00            471 	mov	pcon,#0		; SMOD0=0
                            472 	;; init USB subsystem
   001E 74 00               473 	mov	a,#0x00		; IN8 FIFO at address 0x0000
   0020 90 7F F8            474 	mov	dptr,#IN8ADDR
   0023 F0                  475 	movx	@dptr,a
   0024 74 04               476 	mov	a,#0x04		; OUT8 FIFO at address 0x0010
   0026 90 7F F0            477 	mov	dptr,#OUT8ADDR
   0029 F0                  478 	movx	@dptr,a
   002A 90 7F A1            479 	mov	dptr,#ISOCTL
   002D E4                  480 	clr	a		; enable ISO endpoints
   002E F0                  481 	movx	@dptr,a
   002F 90 7F AF            482 	mov	dptr,#USBBAV
   0032 74 01               483 	mov	a,#1		; enable autovector, disable breakpoint logic
   0034 F0                  484 	movx	@dptr,a
   0035 74 01               485 	mov	a,#0x01		; enable ISO endpoint 8 for input/output
   0037 90 7F E0            486 	mov	dptr,#INISOVAL
   003A F0                  487 	movx	@dptr,a
   003B 90 7F E1            488 	mov	dptr,#OUTISOVAL
   003E F0                  489 	movx	@dptr,a
   003F 90 7F DD            490 	mov	dptr,#USBPAIR
   0042 74 89               491 	mov	a,#0x89		; pair EP 2&3 for input & output, ISOSEND0
   0044 F0                  492 	movx	@dptr,a
   0045 90 7F DE            493 	mov	dptr,#IN07VAL
   0048 74 03               494 	mov	a,#0x3		; enable EP0+EP1
   004A F0                  495 	movx	@dptr,a
   004B 90 7F DF            496 	mov	dptr,#OUT07VAL
   004E 74 01               497 	mov	a,#0x1		; enable EP0
   0050 F0                  498 	movx	@dptr,a
                            499 	;; USB:	init endpoint toggles
   0051 90 7F D7            500 	mov	dptr,#TOGCTL
   0054 74 12               501 	mov	a,#0x12
   0056 F0                  502 	movx	@dptr,a
   0057 74 32               503 	mov	a,#0x32		; clear EP 2 in toggle
   0059 F0                  504 	movx	@dptr,a
   005A 74 02               505 	mov	a,#0x02
   005C F0                  506 	movx	@dptr,a
   005D 74 22               507 	mov	a,#0x22		; clear EP 2 out toggle
   005F F0                  508 	movx	@dptr,a
                            509 	;; configure IO ports
   0060 90 7F 93            510 	mov	dptr,#PORTACFG
   0063 74 00               511 	mov	a,#0
   0065 F0                  512 	movx	@dptr,a
   0066 90 7F 96            513 	mov	dptr,#OUTA
   0069 74 82               514 	mov	a,#0x82		; set PROG hi
   006B F0                  515 	movx	@dptr,a
   006C 90 7F 9C            516 	mov	dptr,#OEA
   006F 74 C2               517 	mov	a,#0xc2		; out: TMS,TDI,PROG  in: DONE
   0071 F0                  518 	movx	@dptr,a
   0072 90 7F 94            519 	mov	dptr,#PORTBCFG
   0075 74 00               520 	mov	a,#0
   0077 F0                  521 	movx	@dptr,a
   0078 90 7F 9D            522 	mov	dptr,#OEB
   007B 74 00               523 	mov	a,#0
   007D F0                  524 	movx	@dptr,a
   007E 90 7F 95            525 	mov	dptr,#PORTCCFG
   0081 74 C3               526 	mov	a,#0xc3		; RD/WR/TXD0/RXD0 are special function pins
   0083 F0                  527 	movx	@dptr,a
   0084 90 7F 98            528 	mov	dptr,#OUTC
   0087 74 28               529 	mov	a,#0x28
   0089 F0                  530 	movx	@dptr,a
   008A 90 7F 9E            531 	mov	dptr,#OEC
   008D 74 2A               532 	mov	a,#0x2a		; out: LEDCON,LEDSTA,TCK  in: TDO,INIT
   008F F0                  533 	movx	@dptr,a
                            534 	;; enable interrupts
   0090 75 A8 92            535 	mov	ie,#0x92	; enable timer 0 and ser 0 int
   0093 75 E8 01            536 	mov	eie,#0x01	; enable USB interrupts
   0096 90 7F AE            537 	mov	dptr,#USBIEN
   0099 74 01               538 	mov	a,#1		; enable SUDAV interrupt
   009B F0                  539 	movx	@dptr,a
   009C 90 7F AC            540 	mov	dptr,#IN07IEN
   009F 74 03               541 	mov	a,#3		; enable EP0+EP1 interrupt
   00A1 F0                  542 	movx	@dptr,a
   00A2 90 7F AD            543 	mov	dptr,#OUT07IEN
   00A5 74 01               544 	mov	a,#1		; enable EP0 interrupt
   00A7 F0                  545 	movx	@dptr,a
                            546 	;; initialize UART 0 for T7F communication
   00A8 75 98 52            547 	mov	scon0,#0x52	; Mode 1, Timer 1, Receiver enable
                            548         ;; copy configuration to bit addressable variables
   00AB 75 20 00            549         mov     ctrlreg,#AUDIOCTRLCNTRES
   00AE 78rE1               550         mov     r0,#parpttmute
   00B0 E2                  551         movx    a,@r0
   00B1 A2 E0               552         mov     c,acc.0
   00B3 92*08               553         mov     pttmute,c
   00B5 92*01               554         mov     ctrl_pttmute,c
                            555 	;; turn off transmitter
   00B7 90 C0 08            556 	mov	dptr,#AUDIOCTRL
   00BA E5 20               557 	mov	a,ctrlreg
   00BC F0                  558 	movx	@dptr,a
                            559 	;; Initialize modem disc port / t7f port
   00BD 90 C0 0C            560 	mov	dptr,#AUDIOMDISCTRIS
   00C0 74 FF               561 	mov	a,#0xff
   00C2 F0                  562 	movx	@dptr,a
   00C3 F5*20               563 	mov	mdisctris,a
   00C5 90 C0 0D            564 	mov	dptr,#AUDIOMDISCOUT
   00C8 E4                  565 	clr	a
   00C9 F0                  566 	movx	@dptr,a
   00CA F5*21               567 	mov	mdiscout,a
   00CC 90 C0 0A            568 	mov	dptr,#AUDIOT7FOUT
   00CF 74 1F               569 	mov	a,#0x1f
   00D1 F0                  570 	movx	@dptr,a
   00D2 F5*1F               571 	mov	t7fout,a
                            572 	;; Copy serial number
   00D4 78rF0               573 	mov	r0,#parserial
   00D6 90s0BrFD            574 	mov	dptr,#stringserial+2
   00D9 E2                  575 1$:	movx	a,@r0
   00DA 60 06               576 	jz	2$
   00DC F0                  577 	movx	@dptr,a
   00DD A3                  578 	inc	dptr
   00DE A3                  579 	inc	dptr
   00DF 08                  580 	inc	r0
   00E0 80 F7               581 	sjmp	1$
   00E2 E8                  582 2$:	mov	a,r0
   00E3 24 11               583 	add	a,#1-0xf0	; 1-parserial
   00E5 25 E0               584 	add	a,acc
   00E7 90s0BrFB            585 	mov	dptr,#stringserial
   00EA F0                  586 	movx	@dptr,a
                            587 	;; check parameters
   00EB                     588 chkparam:
   00EB 75*08 80            589 	mov	divrel,#0x80
   00EE 78rE0               590 	mov	r0,#parframesize
   00F0 E2                  591 	movx	a,@r0
   00F1 B4 02 02            592 	cjne	a,#02,11$
   00F4 80 4E               593 	sjmp	2$
   00F6 B4 03 02            594 11$:	cjne	a,#03,1$
   00F9 80 49               595 	sjmp	2$
   00FB 24 F8               596 1$:	add	a,#-8
   00FD 50 0B               597 	jnc	3$
   00FF 24 F0               598 	add	a,#-16
   0101 40 03               599 	jc	4$
   0103 E2                  600 	movx	a,@r0
   0104 80 06               601 	sjmp	5$
                            602 	;; sampling rate is: 24000000Hz/(divider+2)
   0106 74 18               603 4$:	mov	a,#24
   0108 80 02               604 	sjmp	5$
   010A 74 08               605 3$:	mov	a,#8
                            606 	;; 16 bit by 8 bit divide
                            607 	;; r2:	divisor
                            608 	;; r3:	loop counter
                            609 	;; r4:	dividend/result low
                            610 	;; r5:	dividend/result mid
                            611 	;; r6:	dividend/result high
   010C FA                  612 5$:	mov	r2,a
   010D 7B 11               613 	mov	r3,#17
   010F 7C C0               614 	mov	r4,#24000
   0111 7D 5D               615 	mov	r5,#24000>>8
   0113 7E 00               616 	mov	r6,#0
   0115 C3                  617 6$:	clr	c
   0116 EE                  618 	mov	a,r6
   0117 9A                  619 	subb	a,r2
   0118 40 01               620 	jc	7$
   011A FE                  621 	mov	r6,a
   011B B3                  622 7$:	cpl	c
   011C EC                  623 	mov	a,r4
   011D 33                  624 	rlc	a
   011E FC                  625 	mov	r4,a
   011F ED                  626 	mov	a,r5
   0120 33                  627 	rlc	a
   0121 FD                  628 	mov	r5,a
   0122 EE                  629 	mov	a,r6
   0123 33                  630 	rlc	a
   0124 FE                  631 	mov	r6,a
   0125 DB EE               632 	djnz	r3,6$
                            633 	;; subtract two
   0127 EC                  634 	mov	a,r4
   0128 C3                  635 	clr	c
   0129 94 02               636 	subb	a,#2
   012B FC                  637 	mov	r4,a
   012C ED                  638 	mov	a,r5
   012D 94 00               639 	subb	a,#0
   012F FD                  640 	mov	r5,a
                            641 	;; store result into audio divider
   0130 90 C0 02            642 	mov	dptr,#AUDIODIVIDERHI
   0133 F0                  643 	movx	@dptr,a
   0134 EC                  644 	mov	a,r4
   0135 90 C0 01            645 	mov	dptr,#AUDIODIVIDERLO
   0138 F0                  646 	movx	@dptr,a
   0139 C3                  647 	clr	c
   013A 94 08               648 	subb	a,#0x08
   013C F5*06               649 	mov	divider,a
   013E ED                  650 	mov	a,r5
   013F 94 00               651 	subb	a,#0
   0141 F5*07               652 	mov	divider+1,a
                            653 	;; reload divider into accu
   0143 EA                  654 	mov	a,r2
   0144 F5*09               655 2$:	mov	framesize,a
   0146 90s0BrB3            656 	mov	dptr,#descinframesize
   0149 F0                  657 	movx	@dptr,a
   014A 90s0BrBC            658 	mov	dptr,#descoutframesize
   014D F0                  659 	movx	@dptr,a
                            660 	;; set sampling rate in descriptor
                    0000    661 	.if 0
                            662 	mov	b,#1000
                            663 	mul	ab
                            664 	mov	dptr,#descinsrate
                            665 	movx	@dptr,a
                            666 	mov	dptr,#descoutsrate
                            667 	movx	@dptr,a
                            668 	mov	r3,b
                            669 	mov	a,framesize
                            670 	mov	b,#1000>>8
                            671 	mul	ab
                            672 	add	a,r3
                            673 	mov	dptr,#descinsrate+1
                            674 	movx	@dptr,a
                            675 	mov	dptr,#descoutsrate+1
                            676 	movx	@dptr,a
                            677 	clr	a
                            678 	addc	a,b
                            679 	mov	dptr,#descinsrate+2
                            680 	movx	@dptr,a
                            681 	mov	dptr,#descoutsrate+2
                            682 	movx	@dptr,a
                            683 	.endif
                            684 	;; initialize USB state
   014E                     685 usbinit:
                            686 
                    0000    687 	.if	0
                            688 	;;  XXXXX
                            689 	;; check if windows needs 11025Hz
                            690 	mov	a,#12
                            691 	mov	dptr,#descinframesize
                            692 	movx	@dptr,a
                            693 	mov	dptr,#descoutframesize
                            694 	movx	@dptr,a
                            695 	mov	a,#0x11
                            696 	mov	dptr,#descinsrate
                            697 	movx	@dptr,a
                            698 	mov	dptr,#descoutsrate
                            699 	movx	@dptr,a
                            700 	mov	a,#0x2b
                            701 	mov	dptr,#descinsrate+1
                            702 	movx	@dptr,a
                            703 	mov	dptr,#descoutsrate+1
                            704 	movx	@dptr,a
                            705 	mov	a,#0
                            706 	mov	dptr,#descinsrate+2
                            707 	movx	@dptr,a
                            708 	mov	dptr,#descoutsrate+2
                            709 	movx	@dptr,a
                            710 	;;  XXXXX
                            711 	.endif
                            712 	
   014E E4                  713 	clr	a
   014F F5*22               714 	mov	numconfig,a
   0151 78r23               715 	mov	r0,#altsetting
   0153 7A 04               716 	mov	r2,#NUMINTERFACES
   0155 F6                  717 3$:	mov	@r0,a
   0156 08                  718 	inc	r0
   0157 DA FC               719 	djnz	r2,3$
                            720 	;; give Windows a chance to finish the writecpucs control transfer
                            721 	;; 20ms delay loop
   0159 90 D1 20            722 	mov	dptr,#(-12000)&0xffff
   015C A3                  723 2$:	inc	dptr		; 3 cycles
   015D E5 82               724 	mov	a,dpl0		; 2 cycles
   015F 45 83               725 	orl	a,dph0		; 2 cycles
   0161 70 F9               726 	jnz	2$		; 3 cycles
                    0001    727 	.if	1
                            728 	;; disconnect from USB bus
   0163 90 7F D6            729 	mov	dptr,#USBCS
   0166 74 0A               730 	mov	a,#10
   0168 F0                  731 	movx	@dptr,a
                            732 	;; wait 0.3 sec
   0169 7A 1E               733 	mov	r2,#30
                            734 	;; 10ms delay loop
   016B 90 E8 90            735 0$:	mov	dptr,#(-6000)&0xffff
   016E A3                  736 1$:	inc	dptr            ; 3 cycles
   016F E5 82               737 	mov	a,dpl0          ; 2 cycles
   0171 45 83               738 	orl	a,dph0          ; 2 cycles
   0173 70 F9               739 	jnz	1$              ; 3 cycles
   0175 DA F4               740 	djnz	r2,0$
                            741 	;; reconnect to USB bus
   0177 90 7F D6            742 	mov	dptr,#USBCS
                            743 	;mov	a,#2		; 8051 handles control
                            744 	;movx	@dptr,a
   017A 74 06               745 	mov	a,#6		; reconnect, 8051 handles control
   017C F0                  746 	movx	@dptr,a
                            747 	.endif
                            748 
                            749 	;; final
   017D 12s08rBC            750 	lcall	fillusbintr
   0180                     751 fifoinit:
                            752 	;; first wait for a new frame
   0180 90 7F D8            753 	mov	dptr,#USBFRAMEL
   0183 E0                  754 	movx	a,@dptr
   0184 FA                  755 	mov	r2,a
   0185 E0                  756 1$:	movx	a,@dptr
   0186 B5 02 02            757 	cjne	a,ar2,2$
   0189 80 FA               758 	sjmp	1$
   018B 90 C0 01            759 2$:	mov	dptr,#AUDIORXFIFOCNT
   018E E0                  760 	movx	a,@dptr
   018F 24 FC               761 	add	a,#-4
   0191 54 3F               762 	anl	a,#0x3f
   0193 60 07               763 	jz	4$
   0195 FA                  764 	mov	r2,a
   0196 90 C0 00            765 	mov	dptr,#AUDIORXFIFO
   0199 E0                  766 3$:	movx	a,@dptr
   019A DA FD               767 	djnz	r2,3$
   019C 90 C0 02            768 4$:	mov	dptr,#AUDIOTXFIFOCNT
   019F E0                  769 	movx	a,@dptr
   01A0 24 FC               770 	add	a,#-4
   01A2 54 3F               771 	anl	a,#0x3f
   01A4 60 F6               772 	jz	4$
   01A6 FA                  773 	mov	r2,a
   01A7 90 C0 00            774 	mov	dptr,#AUDIOTXFIFO
   01AA E4                  775 	clr	a
   01AB F0                  776 5$:	movx	@dptr,a
   01AC DA FD               777 	djnz	r2,5$
   01AE                     778 6$:	;; clear SOFIR interrupt
   01AE 90 7F AB            779 	mov	dptr,#USBIRQ
   01B1 74 02               780 	mov	a,#0x02
   01B3 F0                  781 	movx	@dptr,a
                            782 	;; finally enable SOFIR interrupt
   01B4 90 7F AE            783 	mov	dptr,#USBIEN
   01B7 74 03               784 	mov	a,#3		; enable SUDAV+SOFIR interrupt
   01B9 F0                  785 	movx	@dptr,a	
   01BA 12s08rBC            786 	lcall	fillusbintr
   01BD 02s00r00            787 	ljmp	mainloop
                            788 
                            789 
                            790 	.area	CSEG (CODE)
                    0002    791 	ar2 = 0x02
                    0003    792 	ar3 = 0x03
                    0004    793 	ar4 = 0x04
                    0005    794 	ar5 = 0x05
                    0006    795 	ar6 = 0x06
                    0007    796 	ar7 = 0x07
                    0000    797 	ar0 = 0x00
                    0001    798 	ar1 = 0x01
                            799 
                            800 	;; WARNING!  The assembler doesn't check for
                            801 	;; out of range short jump labels!! Double check
                            802 	;; that the jump labels are within the range!
   0000                     803 mainloop:
   0000 E5*0C               804 	mov	a,pttforce
   0002 A2 E0               805 	mov	c,acc.0
   0004 92*00               806 	mov	ctrl_ptt,c
   0006 92*02               807 	mov	ctrl_ledptt,c
   0008 B3                  808 	cpl	c
   0009 82*08               809 	anl	c,pttmute
   000B 92*01               810 	mov	ctrl_pttmute,c
   000D 90 C0 08            811 	mov	dptr,#AUDIOCTRL
   0010 E5 20               812 	mov	a,ctrlreg
   0012 F0                  813 	movx	@dptr,a
   0013 02s00r00            814 	ljmp	mainloop
                            815 
                            816 	;; ------------------ interrupt handlers ------------------------
                            817 
   0016                     818 int0_isr:
   0016 C0 E0               819 	push	acc
   0018 C0 F0               820 	push	b
   001A C0 82               821 	push	dpl0
   001C C0 83               822 	push	dph0
   001E C0 D0               823 	push	psw
   0020 75 D0 00            824 	mov	psw,#0x00
   0023 C0 86               825 	push	dps
   0025 75 86 00            826 	mov	dps,#0
                            827 	;; clear interrupt
   0028 C2 89               828 	clr	tcon+1
                            829 	;; handle interrupt
                            830 	;; epilogue
   002A D0 86               831 	pop	dps
   002C D0 D0               832 	pop	psw
   002E D0 83               833 	pop	dph0
   0030 D0 82               834 	pop	dpl0
   0032 D0 F0               835 	pop	b
   0034 D0 E0               836 	pop	acc
   0036 32                  837 	reti
                            838 
   0037                     839 timer0_isr:
   0037 C0 E0               840 	push	acc
   0039 C0 F0               841 	push	b
   003B C0 82               842 	push	dpl0
   003D C0 83               843 	push	dph0
   003F C0 D0               844 	push	psw
   0041 75 D0 00            845 	mov	psw,#0x00
   0044 C0 86               846 	push	dps
   0046 75 86 00            847 	mov	dps,#0
                            848 	;; clear interrupt
   0049 C2 8D               849 	clr	tcon+5
                            850 	;; handle interrupt
                    0000    851 	.if	0
                            852 	inc	leddiv
                            853 	mov	a,leddiv
                            854 	anl	a,#7
                            855 	jnz	0$
                            856 	mov	dptr,#OUTC
                            857 	movx	a,@dptr
                            858 	xrl	a,#0x08
                            859 	movx	@dptr,a
                            860 0$:
                            861 	.endif
                            862 	;; epilogue
   004B D0 86               863 	pop	dps
   004D D0 D0               864 	pop	psw
   004F D0 83               865 	pop	dph0
   0051 D0 82               866 	pop	dpl0
   0053 D0 F0               867 	pop	b
   0055 D0 E0               868 	pop	acc
   0057 32                  869 	reti
                            870 
   0058                     871 int1_isr:
   0058 C0 E0               872 	push	acc
   005A C0 F0               873 	push	b
   005C C0 82               874 	push	dpl0
   005E C0 83               875 	push	dph0
   0060 C0 D0               876 	push	psw
   0062 75 D0 00            877 	mov	psw,#0x00
   0065 C0 86               878 	push	dps
   0067 75 86 00            879 	mov	dps,#0
                            880 	;; clear interrupt
   006A C2 8B               881 	clr	tcon+3
                            882 	;; handle interrupt
                            883 	;; epilogue
   006C D0 86               884 	pop	dps
   006E D0 D0               885 	pop	psw
   0070 D0 83               886 	pop	dph0
   0072 D0 82               887 	pop	dpl0
   0074 D0 F0               888 	pop	b
   0076 D0 E0               889 	pop	acc
   0078 32                  890 	reti
                            891 
   0079                     892 timer1_isr:
   0079 C0 E0               893 	push	acc
   007B C0 F0               894 	push	b
   007D C0 82               895 	push	dpl0
   007F C0 83               896 	push	dph0
   0081 C0 D0               897 	push	psw
   0083 75 D0 00            898 	mov	psw,#0x00
   0086 C0 86               899 	push	dps
   0088 75 86 00            900 	mov	dps,#0
                            901 	;; clear interrupt
   008B C2 8F               902 	clr	tcon+7
                            903 	;; handle interrupt
                            904 	;; epilogue
   008D D0 86               905 	pop	dps
   008F D0 D0               906 	pop	psw
   0091 D0 83               907 	pop	dph0
   0093 D0 82               908 	pop	dpl0
   0095 D0 F0               909 	pop	b
   0097 D0 E0               910 	pop	acc
   0099 32                  911 	reti
                            912 
   009A                     913 ser0_isr:
   009A C0 E0               914 	push	acc
   009C C0 F0               915 	push	b
   009E C0 82               916 	push	dpl0
   00A0 C0 83               917 	push	dph0
   00A2 C0 D0               918 	push	psw
   00A4 75 D0 00            919 	mov	psw,#0x00
   00A7 C0 86               920 	push	dps
   00A9 75 86 00            921 	mov	dps,#0
   00AC C0 00               922 	push	ar0
                            923 	;; clear interrupt
   00AE 10 98 16            924 	jbc	scon0+0,1$	; RI
   00B1 10 99 0F            925 0$:	jbc	scon0+1,2$	; TI
                            926 	;; handle interrupt
                            927 	;; epilogue
   00B4 D0 00               928 3$:	pop	ar0
   00B6 D0 86               929 	pop	dps
   00B8 D0 D0               930 	pop	psw
   00BA D0 83               931 	pop	dph0
   00BC D0 82               932 	pop	dpl0
   00BE D0 F0               933 	pop	b
   00C0 D0 E0               934 	pop	acc
   00C2 32                  935 	reti
                            936 
   00C3 D2*09               937 2$:	setb	uartempty
   00C5 80 EA               938 	sjmp	0$
                            939 
   00C7 E5*1D               940 1$:	mov	a,uartwr
   00C9 24r0D               941 	add	a,#uartbuf
   00CB F8                  942 	mov	r0,a
   00CC E5 99               943 	mov	a,sbuf0
   00CE F6                  944 	mov	@r0,a
   00CF E5*1D               945 	mov	a,uartwr
   00D1 04                  946 	inc	a
   00D2 54 0F               947 	anl	a,#0xf
   00D4 F5*1D               948 	mov	uartwr,a
   00D6 80 DC               949 	sjmp	3$
                            950 
   00D8                     951 timer2_isr:
   00D8 C0 E0               952 	push	acc
   00DA C0 F0               953 	push	b
   00DC C0 82               954 	push	dpl0
   00DE C0 83               955 	push	dph0
   00E0 C0 D0               956 	push	psw
   00E2 75 D0 00            957 	mov	psw,#0x00
   00E5 C0 86               958 	push	dps
   00E7 75 86 00            959 	mov	dps,#0
                            960 	;; clear interrupt
   00EA C2 CF               961 	clr	t2con+7
                            962 	;; handle interrupt
                            963 	;; epilogue
   00EC D0 86               964 	pop	dps
   00EE D0 D0               965 	pop	psw
   00F0 D0 83               966 	pop	dph0
   00F2 D0 82               967 	pop	dpl0
   00F4 D0 F0               968 	pop	b
   00F6 D0 E0               969 	pop	acc
   00F8 32                  970 	reti
                            971 
   00F9                     972 resume_isr:
   00F9 C0 E0               973 	push	acc
   00FB C0 F0               974 	push	b
   00FD C0 82               975 	push	dpl0
   00FF C0 83               976 	push	dph0
   0101 C0 D0               977 	push	psw
   0103 75 D0 00            978 	mov	psw,#0x00
   0106 C0 86               979 	push	dps
   0108 75 86 00            980 	mov	dps,#0
                            981 	;; clear interrupt
   010B C2 DC               982 	clr	eicon+4
                            983 	;; handle interrupt
                            984 	;; epilogue
   010D D0 86               985 	pop	dps
   010F D0 D0               986 	pop	psw
   0111 D0 83               987 	pop	dph0
   0113 D0 82               988 	pop	dpl0
   0115 D0 F0               989 	pop	b
   0117 D0 E0               990 	pop	acc
   0119 32                  991 	reti
                            992 
   011A                     993 ser1_isr:
   011A C0 E0               994 	push	acc
   011C C0 F0               995 	push	b
   011E C0 82               996 	push	dpl0
   0120 C0 83               997 	push	dph0
   0122 C0 D0               998 	push	psw
   0124 75 D0 00            999 	mov	psw,#0x00
   0127 C0 86              1000 	push	dps
   0129 75 86 00           1001 	mov	dps,#0
                           1002 	;; clear interrupt
   012C C2 C0              1003 	clr	scon1+0
   012E C2 C1              1004 	clr	scon1+1
                           1005 	;; handle interrupt
                           1006 	;; epilogue
   0130 D0 86              1007 	pop	dps
   0132 D0 D0              1008 	pop	psw
   0134 D0 83              1009 	pop	dph0
   0136 D0 82              1010 	pop	dpl0
   0138 D0 F0              1011 	pop	b
   013A D0 E0              1012 	pop	acc
   013C 32                 1013 	reti
                           1014 
   013D                    1015 i2c_isr:
   013D C0 E0              1016 	push	acc
   013F C0 F0              1017 	push	b
   0141 C0 82              1018 	push	dpl0
   0143 C0 83              1019 	push	dph0
   0145 C0 D0              1020 	push	psw
   0147 75 D0 00           1021 	mov	psw,#0x00
   014A C0 86              1022 	push	dps
   014C 75 86 00           1023 	mov	dps,#0
                           1024 	;; clear interrupt
   014F E5 91              1025 	mov	a,exif
   0151 C2 E5              1026 	clr	acc.5
   0153 F5 91              1027 	mov	exif,a
                           1028 	;; handle interrupt
                           1029 	;; epilogue
   0155 D0 86              1030 	pop	dps
   0157 D0 D0              1031 	pop	psw
   0159 D0 83              1032 	pop	dph0
   015B D0 82              1033 	pop	dpl0
   015D D0 F0              1034 	pop	b
   015F D0 E0              1035 	pop	acc
   0161 32                 1036 	reti
                           1037 
   0162                    1038 int4_isr:
   0162 C0 E0              1039 	push	acc
   0164 C0 F0              1040 	push	b
   0166 C0 82              1041 	push	dpl0
   0168 C0 83              1042 	push	dph0
   016A C0 D0              1043 	push	psw
   016C 75 D0 00           1044 	mov	psw,#0x00
   016F C0 86              1045 	push	dps
   0171 75 86 00           1046 	mov	dps,#0
                           1047 	;; clear interrupt
   0174 E5 91              1048 	mov	a,exif
   0176 C2 E6              1049 	clr	acc.6
   0178 F5 91              1050 	mov	exif,a
                           1051 	;; handle interrupt
                           1052 	;; epilogue
   017A D0 86              1053 	pop	dps
   017C D0 D0              1054 	pop	psw
   017E D0 83              1055 	pop	dph0
   0180 D0 82              1056 	pop	dpl0
   0182 D0 F0              1057 	pop	b
   0184 D0 E0              1058 	pop	acc
   0186 32                 1059 	reti
                           1060 
   0187                    1061 int5_isr:
   0187 C0 E0              1062 	push	acc
   0189 C0 F0              1063 	push	b
   018B C0 82              1064 	push	dpl0
   018D C0 83              1065 	push	dph0
   018F C0 D0              1066 	push	psw
   0191 75 D0 00           1067 	mov	psw,#0x00
   0194 C0 86              1068 	push	dps
   0196 75 86 00           1069 	mov	dps,#0
                           1070 	;; clear interrupt
   0199 E5 91              1071 	mov	a,exif
   019B C2 E7              1072 	clr	acc.7
   019D F5 91              1073 	mov	exif,a
                           1074 	;; handle interrupt
                           1075 	;; epilogue
   019F D0 86              1076 	pop	dps
   01A1 D0 D0              1077 	pop	psw
   01A3 D0 83              1078 	pop	dph0
   01A5 D0 82              1079 	pop	dpl0
   01A7 D0 F0              1080 	pop	b
   01A9 D0 E0              1081 	pop	acc
   01AB 32                 1082 	reti
                           1083 
   01AC                    1084 int6_isr:
   01AC C0 E0              1085 	push	acc
   01AE C0 F0              1086 	push	b
   01B0 C0 82              1087 	push	dpl0
   01B2 C0 83              1088 	push	dph0
   01B4 C0 D0              1089 	push	psw
   01B6 75 D0 00           1090 	mov	psw,#0x00
   01B9 C0 86              1091 	push	dps
   01BB 75 86 00           1092 	mov	dps,#0
                           1093 	;; clear interrupt
   01BE C2 DB              1094 	clr	eicon+3
                           1095 	;; handle interrupt
                           1096 	;; epilogue
   01C0 D0 86              1097 	pop	dps
   01C2 D0 D0              1098 	pop	psw
   01C4 D0 83              1099 	pop	dph0
   01C6 D0 82              1100 	pop	dpl0
   01C8 D0 F0              1101 	pop	b
   01CA D0 E0              1102 	pop	acc
   01CC 32                 1103 	reti
                           1104 
   01CD                    1105 usb_sudav_isr:
   01CD C0 E0              1106 	push	acc
   01CF C0 F0              1107 	push	b
   01D1 C0 82              1108 	push	dpl0
   01D3 C0 83              1109 	push	dph0
   01D5 C0 84              1110 	push	dpl1
   01D7 C0 85              1111 	push	dph1
   01D9 C0 D0              1112 	push	psw
   01DB 75 D0 00           1113 	mov	psw,#0x00
   01DE C0 86              1114 	push	dps
   01E0 75 86 00           1115 	mov	dps,#0
   01E3 C0 00              1116 	push	ar0
   01E5 C0 07              1117 	push	ar7
                           1118 	;; clear interrupt
   01E7 E5 91              1119 	mov	a,exif
   01E9 C2 E4              1120 	clr	acc.4
   01EB F5 91              1121 	mov	exif,a
   01ED 90 7F AB           1122 	mov	dptr,#USBIRQ
   01F0 74 01              1123 	mov	a,#0x01
   01F2 F0                 1124 	movx	@dptr,a
                           1125 	;; handle interrupt
   01F3 75*00 00           1126 	mov	ctrlcode,#0		; reset control out code
   01F6 90 7F E9           1127 	mov	dptr,#SETUPDAT+1
   01F9 E0                 1128 	movx	a,@dptr			; bRequest field
                           1129 	;; standard commands
                           1130 	;; USB_REQ_GET_DESCRIPTOR
   01FA B4 06 59           1131 	cjne	a,#USB_REQ_GET_DESCRIPTOR,cmdnotgetdesc
   01FD 90 7F E8           1132 	mov	dptr,#SETUPDAT		; bRequestType == 0x80
   0200 E0                 1133 	movx	a,@dptr
   0201 B4 80 4F           1134 	cjne	a,#USB_DIR_IN,setupstallstd
   0204 90 7F EB           1135 	mov	dptr,#SETUPDAT+3
   0207 E0                 1136 	movx	a,@dptr
   0208 B4 01 0C           1137 	cjne	a,#USB_DT_DEVICE,cmdnotgetdescdev
   020B 90 7F D4           1138 	mov	dptr,#SUDPTRH
   020E 74s0B              1139 	mov	a,#>devicedescr
   0210 F0                 1140 	movx	@dptr,a
   0211 A3                 1141 	inc	dptr
   0212 74r74              1142 	mov	a,#<devicedescr
   0214 F0                 1143 	movx	@dptr,a
   0215 80 39              1144 	sjmp	setupackstd
   0217                    1145 cmdnotgetdescdev:
   0217 B4 02 12           1146 	cjne	a,#USB_DT_CONFIG,cmdnotgetdesccfg
   021A 90 7F EA           1147 	mov	dptr,#SETUPDAT+2
   021D E0                 1148 	movx	a,@dptr
   021E 70 33              1149 	jnz	setupstallstd
   0220 90 7F D4           1150 	mov	dptr,#SUDPTRH
   0223 74s0B              1151 	mov	a,#>config0descr
   0225 F0                 1152 	movx	@dptr,a
   0226 A3                 1153 	inc	dptr
   0227 74r86              1154 	mov	a,#<config0descr
   0229 F0                 1155 	movx	@dptr,a
   022A 80 24              1156 	sjmp	setupackstd
   022C                    1157 cmdnotgetdesccfg:
   022C B4 03 24           1158 	cjne	a,#USB_DT_STRING,setupstallstd
   022F 90 7F EA           1159 	mov	dptr,#SETUPDAT+2
   0232 E0                 1160 	movx	a,@dptr
   0233 24 FC              1161 	add	a,#-numstrings
   0235 40 1C              1162 	jc	setupstallstd
   0237 E0                 1163 	movx	a,@dptr
   0238 25 E0              1164 	add	a,acc
   023A 24rC1              1165 	add	a,#<stringdescr
   023C F5 82              1166 	mov	dpl0,a
   023E E4                 1167 	clr	a
   023F 34s0B              1168 	addc	a,#>stringdescr
   0241 F5 83              1169 	mov	dph0,a
   0243 E0                 1170 	movx	a,@dptr
   0244 F5 F0              1171 	mov	b,a
   0246 A3                 1172 	inc	dptr
   0247 E0                 1173 	movx	a,@dptr
   0248 90 7F D4           1174 	mov	dptr,#SUDPTRH
   024B F0                 1175 	movx	@dptr,a
   024C A3                 1176 	inc	dptr
   024D E5 F0              1177 	mov	a,b
   024F F0                 1178 	movx	@dptr,a
                           1179 	; sjmp	setupackstd	
   0250                    1180 setupackstd:
   0250 02s06r60           1181 	ljmp	setupack
   0253                    1182 setupstallstd:
   0253 02s06r5C           1183 	ljmp	setupstall
   0256                    1184 cmdnotgetdesc:
                           1185 	;; USB_REQ_SET_CONFIGURATION
   0256 B4 09 41           1186 	cjne	a,#USB_REQ_SET_CONFIGURATION,cmdnotsetconf
   0259 90 7F E8           1187 	mov	dptr,#SETUPDAT
   025C E0                 1188 	movx	a,@dptr
   025D 70 F4              1189 	jnz	setupstallstd
   025F 90 7F EA           1190 	mov	dptr,#SETUPDAT+2
   0262 E0                 1191 	movx	a,@dptr
   0263 24 FE              1192 	add	a,#-2
   0265 40 EC              1193 	jc	setupstallstd
   0267 E0                 1194 	movx	a,@dptr
   0268 F5*22              1195 	mov	numconfig,a
   026A                    1196 cmdresettoggleshalt:
   026A 90 7F D7           1197 	mov	dptr,#TOGCTL
   026D 78 07              1198 	mov	r0,#7
   026F E8                 1199 0$:	mov	a,r0
   0270 44 10              1200 	orl	a,#0x10
   0272 F0                 1201 	movx	@dptr,a
   0273 44 30              1202 	orl	a,#0x30
   0275 F0                 1203 	movx	@dptr,a
   0276 E8                 1204 	mov	a,r0
   0277 F0                 1205 	movx	@dptr,a
   0278 44 20              1206 	orl	a,#0x20
   027A F0                 1207 	movx	@dptr,a
   027B D8 F2              1208 	djnz	r0,0$
   027D E4                 1209 	clr	a
   027E F0                 1210 	movx	@dptr,a
   027F 74 02              1211 	mov	a,#2
   0281 90 7F B6           1212 	mov	dptr,#IN1CS
   0284 78 07              1213 	mov	r0,#7
   0286 F0                 1214 1$:	movx	@dptr,a
   0287 A3                 1215 	inc	dptr
   0288 A3                 1216 	inc	dptr
   0289 D8 FB              1217 	djnz	r0,1$
   028B 90 7F C6           1218 	mov	dptr,#OUT1CS
   028E 78 07              1219 	mov	r0,#7
   0290 F0                 1220 2$:	movx	@dptr,a
   0291 A3                 1221 	inc	dptr
   0292 A3                 1222 	inc	dptr
   0293 D8 FB              1223 	djnz	r0,2$
   0295 12s08rBC           1224 	lcall	fillusbintr
   0298 80 B6              1225 	sjmp	setupackstd
   029A                    1226 cmdnotsetconf:
                           1227 	;; USB_REQ_SET_INTERFACE
   029A B4 0B 1E           1228 	cjne	a,#USB_REQ_SET_INTERFACE,cmdnotsetint
   029D 90 7F E8           1229 	mov	dptr,#SETUPDAT
   02A0 E0                 1230 	movx	a,@dptr
   02A1 B4 01 AF           1231 	cjne	a,#USB_RECIP_INTERFACE|USB_DIR_OUT,setupstallstd
   02A4 E5*22              1232 	mov	a,numconfig
   02A6 B4 01 AA           1233 	cjne	a,#1,setupstallstd
   02A9 90 7F EC           1234 	mov	dptr,#SETUPDAT+4
   02AC E0                 1235 	movx	a,@dptr
   02AD 24 FC              1236 	add	a,#-NUMINTERFACES
   02AF 40 A2              1237 	jc	setupstallstd
   02B1 24r27              1238 	add	a,#NUMINTERFACES+altsetting
   02B3 F8                 1239 	mov	r0,a
   02B4 90 7F EA           1240 	mov	dptr,#SETUPDAT+2
   02B7 E0                 1241 	movx	a,@dptr
   02B8 F6                 1242 	mov	@r0,a
   02B9 80 AF              1243 	sjmp	cmdresettoggleshalt
   02BB                    1244 cmdnotsetint:
                           1245 	;; USB_REQ_GET_INTERFACE
   02BB B4 0A 24           1246 	cjne	a,#USB_REQ_GET_INTERFACE,cmdnotgetint
   02BE 90 7F E8           1247 	mov	dptr,#SETUPDAT
   02C1 E0                 1248 	movx	a,@dptr
   02C2 B4 81 8E           1249 	cjne	a,#USB_RECIP_INTERFACE|USB_DIR_IN,setupstallstd
   02C5 E5*22              1250 	mov	a,numconfig
   02C7 B4 01 89           1251 	cjne	a,#1,setupstallstd
   02CA 90 7F EC           1252 	mov	dptr,#SETUPDAT+4
   02CD E0                 1253 	movx	a,@dptr
   02CE 24 FC              1254 	add	a,#-NUMINTERFACES
   02D0 40 81              1255 	jc	setupstallstd
   02D2 24r27              1256 	add	a,#NUMINTERFACES+altsetting
   02D4 F8                 1257 	mov	r0,a
   02D5 E6                 1258 	mov	a,@r0
   02D6                    1259 cmdrespondonebyte:
   02D6 90 7F 00           1260 	mov	dptr,#IN0BUF
   02D9 F0                 1261 	movx	@dptr,a
   02DA 90 7F B5           1262 	mov	dptr,#IN0BC
   02DD 74 01              1263 	mov	a,#1
   02DF F0                 1264 	movx	@dptr,a	
   02E0 80 4E              1265 	sjmp	setupackstd2
   02E2                    1266 cmdnotgetint:
                           1267 	;; USB_REQ_GET_CONFIGURATION
   02E2 B4 08 0B           1268 	cjne	a,#USB_REQ_GET_CONFIGURATION,cmdnotgetconf
   02E5 90 7F E8           1269 	mov	dptr,#SETUPDAT
   02E8 E0                 1270 	movx	a,@dptr
   02E9 B4 80 47           1271 	cjne	a,#USB_RECIP_DEVICE|USB_DIR_IN,setupstallstd2
   02EC E5*22              1272 	mov	a,numconfig
   02EE 80 E6              1273 	sjmp	cmdrespondonebyte	
   02F0                    1274 cmdnotgetconf:
                           1275 	;; USB_REQ_GET_STATUS (0)
   02F0 70 44              1276 	jnz	cmdnotgetstat
   02F2 90 7F E8           1277 	mov	dptr,#SETUPDAT
   02F5 E0                 1278 	movx	a,@dptr
   02F6 B4 80 11           1279 	cjne	a,#USB_RECIP_DEVICE|USB_DIR_IN,cmdnotgetstatdev
   02F9 74 01              1280 	mov	a,#1
   02FB                    1281 cmdrespondstat:
   02FB 90 7F 00           1282 	mov	dptr,#IN0BUF
   02FE F0                 1283 	movx	@dptr,a
   02FF A3                 1284 	inc	dptr
   0300 E4                 1285 	clr	a
   0301 F0                 1286 	movx	@dptr,a
   0302 90 7F B5           1287 	mov	dptr,#IN0BC
   0305 74 02              1288 	mov	a,#2
   0307 F0                 1289 	movx	@dptr,a	
   0308 80 26              1290 	sjmp	setupackstd2
   030A                    1291 cmdnotgetstatdev:
   030A B4 81 03           1292 	cjne	a,#USB_RECIP_INTERFACE|USB_DIR_IN,cmdnotgetstatintf
   030D E4                 1293 	clr	a
   030E 80 EB              1294 	sjmp	cmdrespondstat
   0310                    1295 cmdnotgetstatintf:
   0310 B4 82 20           1296 	cjne	a,#USB_RECIP_ENDPOINT|USB_DIR_IN,setupstallstd2
   0313 90 7F EC           1297 	mov	dptr,#SETUPDAT+4
   0316 E0                 1298 	movx	a,@dptr
   0317 90 7F C4           1299 	mov	dptr,#OUT1CS-2
   031A 30 E7 03           1300 	jnb	acc.7,0$
   031D 90 7F B4           1301 	mov	dptr,#IN1CS-2
   0320 54 0F              1302 0$:	anl	a,#15
   0322 60 0F              1303 	jz	setupstallstd2
   0324 20 E3 0C           1304 	jb	acc.3,setupstallstd2
   0327 25 E0              1305 	add	a,acc
   0329 25 82              1306 	add	a,dpl0
   032B F5 82              1307 	mov	dpl0,a
   032D E0                 1308 	movx	a,@dptr
   032E 80 CB              1309 	sjmp	cmdrespondstat
   0330                    1310 setupackstd2:
   0330 02s06r60           1311 	ljmp	setupack
   0333                    1312 setupstallstd2:
   0333 02s06r5C           1313 	ljmp	setupstall
   0336                    1314 cmdnotgetstat:
                           1315 	;; USB_REQ_SET_FEATURE
   0336 B4 03 05           1316 	cjne	a,#USB_REQ_SET_FEATURE,cmdnotsetftr
   0339 75 F0 01           1317 	mov	b,#1
   033C 80 06              1318 	sjmp	handleftr
   033E                    1319 cmdnotsetftr:
                           1320 	;; USB_REQ_CLEAR_FEATURE
   033E B4 01 44           1321 	cjne	a,#USB_REQ_CLEAR_FEATURE,cmdnotclrftr
   0341 75 F0 00           1322 	mov	b,#0
   0344                    1323 handleftr:
   0344 90 7F E8           1324 	mov	dptr,#SETUPDAT
   0347 E0                 1325 	movx	a,@dptr
   0348 B4 02 E8           1326 	cjne	a,#USB_RECIP_ENDPOINT|USB_DIR_OUT,setupstallstd2
   034B A3                 1327 	inc	dptr
   034C A3                 1328 	inc	dptr
   034D E0                 1329 	movx	a,@dptr
   034E 70 E3              1330 	jnz	setupstallstd2	; not ENDPOINT_HALT feature
   0350 A3                 1331 	inc	dptr
   0351 E0                 1332 	movx	a,@dptr
   0352 70 DF              1333 	jnz	setupstallstd2
   0354 A3                 1334 	inc	dptr
   0355 E0                 1335 	movx	a,@dptr
   0356 90 7F C4           1336 	mov	dptr,#OUT1CS-2
   0359 30 E7 05           1337 	jnb	acc.7,0$
   035C 90 7F B4           1338 	mov	dptr,#IN1CS-2
   035F 44 10              1339 	orl	a,#0x10
   0361 20 E3 CF           1340 0$:	jb	acc.3,setupstallstd2
                           1341 	;; clear data toggle
   0364 54 1F              1342 	anl	a,#0x1f
   0366 05 86              1343 	inc	dps
   0368 90 7F D7           1344 	mov	dptr,#TOGCTL
   036B F0                 1345 	movx	@dptr,a
   036C 44 20              1346 	orl	a,#0x20
   036E F0                 1347 	movx	@dptr,a
   036F 54 0F              1348 	anl	a,#15
   0371 F0                 1349 	movx	@dptr,a
   0372 15 86              1350 	dec	dps	
                           1351 	;; clear/set ep halt feature
   0374 25 E0              1352 	add	a,acc
   0376 25 82              1353 	add	a,dpl0
   0378 F5 82              1354 	mov	dpl0,a
   037A E5 F0              1355 	mov	a,b
   037C F0                 1356 	movx	@dptr,a
   037D 80 B1              1357 	sjmp	setupackstd2
                           1358 
   037F                    1359 cmdnotc0_1:
   037F 02s04r17           1360 	ljmp	cmdnotc0
   0382                    1361 setupstallc0_1:
   0382 02s06r5C           1362 	ljmp	setupstall
                           1363 	
   0385                    1364 cmdnotclrftr:
                           1365 	;; vendor specific commands
                           1366 	;; 0xc0
   0385 B4 C0 F7           1367 	cjne	a,#0xc0,cmdnotc0_1
   0388 90 7F E8           1368 	mov	dptr,#SETUPDAT		; bRequestType == 0xc0
   038B E0                 1369 	movx	a,@dptr
   038C B4 C0 F3           1370 	cjne	a,#0xc0,setupstallc0_1
                           1371 	;; fill status buffer
   038F E5*0C              1372 	mov	a,pttforce
   0391 F5 F0              1373 	mov	b,a
   0393 A2 E0              1374 	mov	c,acc.0
   0395 92 F2              1375 	mov	b.2,c
   0397 90 C0 09           1376 	mov	dptr,#AUDIOSTAT
   039A E0                 1377 	movx	a,@dptr
   039B A2 E0              1378 	mov	c,acc.0
   039D B3                 1379 	cpl	c
   039E 92 F3              1380 	mov	b.3,c
   03A0 A2*09              1381 	mov	c,uartempty
   03A2 92 F5              1382 	mov	b.5,c
   03A4 E4                 1383 	clr	a
   03A5 90 7F 04           1384 	mov	dptr,#(IN0BUF+4)
   03A8 F0                 1385 	movx	@dptr,a
                           1386 	;; bytewide elements
   03A9 90 7F 00           1387 	mov	dptr,#(IN0BUF)
   03AC E5 F0              1388 	mov	a,b
   03AE F0                 1389 	movx	@dptr,a
   03AF E4                 1390 	clr	a
   03B0 90 7F 01           1391 	mov	dptr,#(IN0BUF+1)
   03B3 F0                 1392 	movx	@dptr,a
   03B4 90 7F 02           1393 	mov	dptr,#(IN0BUF+2)
   03B7 F0                 1394 	movx	@dptr,a
   03B8 90 C0 04           1395 	mov	dptr,#AUDIORSSI
   03BB E0                 1396 	movx	a,@dptr
   03BC 90 7F 03           1397 	mov	dptr,#(IN0BUF+3)
   03BF F0                 1398 	movx	@dptr,a
                           1399 	;; counter
   03C0 05*04              1400 	inc	irqcount
   03C2 E5*04              1401 	mov	a,irqcount
   03C4 90 7F 05           1402 	mov	dptr,#(IN0BUF+5)
   03C7 F0                 1403 	movx	@dptr,a
                           1404 	;; additional fields (HDLC state mach)
   03C8 E4                 1405 	clr	a
   03C9 A3                 1406 	inc	dptr
   03CA F0                 1407 	movx	@dptr,a
   03CB A3                 1408 	inc	dptr
   03CC F0                 1409 	movx	@dptr,a
   03CD A3                 1410 	inc	dptr
   03CE F0                 1411 	movx	@dptr,a
   03CF A3                 1412 	inc	dptr
   03D0 F0                 1413 	movx	@dptr,a
   03D1 A3                 1414 	inc	dptr
   03D2 F0                 1415 	movx	@dptr,a
   03D3 A3                 1416 	inc	dptr
   03D4 F0                 1417 	movx	@dptr,a
   03D5 A3                 1418 	inc	dptr
   03D6 F0                 1419 	movx	@dptr,a
   03D7 A3                 1420 	inc	dptr
   03D8 F0                 1421 	movx	@dptr,a
   03D9 A3                 1422 	inc	dptr
   03DA F0                 1423 	movx	@dptr,a
   03DB A3                 1424 	inc	dptr
   03DC F0                 1425 	movx	@dptr,a
   03DD A3                 1426 	inc	dptr
   03DE F0                 1427 	movx	@dptr,a
   03DF A3                 1428 	inc	dptr
   03E0 F0                 1429 	movx	@dptr,a
                           1430 	;; FPGA registers
   03E1 90 C0 01           1431 	mov	dptr,#AUDIORXFIFOCNT
   03E4 E0                 1432 	movx	a,@dptr
   03E5 90 7F 12           1433 	mov	dptr,#(IN0BUF+18)
   03E8 F0                 1434 	movx	@dptr,a
   03E9 90 C0 02           1435 	mov	dptr,#AUDIOTXFIFOCNT
   03EC E0                 1436 	movx	a,@dptr
   03ED 90 7F 13           1437 	mov	dptr,#(IN0BUF+19)
   03F0 F0                 1438 	movx	@dptr,a
   03F1 E5 20              1439 	mov	a,ctrlreg
   03F3 A3                 1440 	inc	dptr
   03F4 F0                 1441 	movx	@dptr,a
   03F5 90 C0 09           1442 	mov	dptr,#AUDIOSTAT
   03F8 E0                 1443 	movx	a,@dptr
   03F9 90 7F 15           1444 	mov	dptr,#(IN0BUF+21)
   03FC F0                 1445 	movx	@dptr,a
                           1446 	;; Anchor Registers
   03FD 90 7F C8           1447 	mov	dptr,#OUT2CS
   0400 E0                 1448 	movx	a,@dptr
   0401 90 7F 16           1449 	mov	dptr,#(IN0BUF+22)
   0404 F0                 1450 	movx	@dptr,a
                           1451 	;; set length
   0405 90 7F EE           1452 	mov	dptr,#SETUPDAT+6	; wLength
   0408 E0                 1453 	movx	a,@dptr
   0409 24 E9              1454 	add	a,#-(6+12+4+1)
   040B 50 01              1455 	jnc	4$
   040D E4                 1456 	clr	a
   040E 24 17              1457 4$:	add	a,#(6+12+4+1)
   0410 90 7F B5           1458 	mov	dptr,#IN0BC
   0413 F0                 1459 	movx	@dptr,a
   0414 02s06r60           1460 	ljmp	setupack
   0417                    1461 cmdnotc0:
                           1462 	;; 0xc8
   0417 B4 C8 19           1463 	cjne	a,#0xc8,cmdnotc8
   041A 90 7F E8           1464 	mov	dptr,#SETUPDAT	; bRequestType == 0xc0
   041D E0                 1465 	movx	a,@dptr
   041E B4 C0 0F           1466 	cjne	a,#0xc0,setupstallc8
   0421 74 04              1467 	mov	a,#4
   0423 90 7F 00           1468 	mov	dptr,#IN0BUF
   0426 F0                 1469 	movx	@dptr,a
   0427 90 7F B5           1470 	mov	dptr,#IN0BC
   042A 74 01              1471 	mov	a,#1
   042C F0                 1472 	movx	@dptr,a
   042D 02s06r60           1473 	ljmp	setupack
   0430                    1474 setupstallc8:
   0430 02s06r5C           1475 	ljmp	setupstall
   0433                    1476 cmdnotc8:
                           1477 	;; 0xc9
   0433 B4 C9 21           1478 	cjne	a,#0xc9,cmdnotc9
   0436 90 7F E8           1479 	mov	dptr,#SETUPDAT	; bRequestType == 0xc0
   0439 E0                 1480 	movx	a,@dptr
   043A B4 C0 17           1481 	cjne	a,#0xc0,setupstallc9
   043D 90 7F 00           1482 	mov	dptr,#IN0BUF
   0440 78rF0              1483 	mov	r0,#parserial
   0442 E2                 1484 0$:	movx	a,@r0
   0443 60 05              1485 	jz	1$
   0445 F0                 1486 	movx	@dptr,a
   0446 08                 1487 	inc	r0
   0447 A3                 1488 	inc	dptr
   0448 80 F8              1489 	sjmp	0$
   044A E8                 1490 1$:	mov	a,r0
   044B 24 10              1491 	add	a,#-0xf0	; -parserial
   044D 90 7F B5           1492 	mov	dptr,#IN0BC
   0450 F0                 1493 	movx	@dptr,a
   0451 02s06r60           1494 	ljmp	setupack
   0454                    1495 setupstallc9:
   0454 02s06r5C           1496 	ljmp	setupstall
   0457                    1497 cmdnotc9:
                           1498 	;; 0xd0
   0457 B4 D0 45           1499 	cjne	a,#0xd0,cmdnotd0
   045A 90 7F E8           1500 	mov	dptr,#SETUPDAT	; bRequestType == 0xc0
   045D E0                 1501 	movx	a,@dptr
   045E B4 C0 3B           1502 	cjne	a,#0xc0,setupstalld0
   0461 90 7F EC           1503 	mov	dptr,#SETUPDAT+4	; wIndex
   0464 E0                 1504 	movx	a,@dptr
   0465 B4 01 08           1505 	cjne	a,#1,0$
   0468 90 7F EA           1506 	mov	dptr,#SETUPDAT+2	; wValue
   046B E0                 1507 	movx	a,@dptr
   046C 54 01              1508 	anl	a,#1
   046E F5*0C              1509 	mov	pttforce,a
   0470                    1510 0$:	;; PTT status
   0470 90 7F 00           1511 	mov	dptr,#IN0BUF
   0473 E5*0C              1512 	mov	a,pttforce
   0475 F0                 1513 	movx	@dptr,a
                           1514 	;; DCD status
   0476 90 C0 09           1515 	mov	dptr,#AUDIOSTAT
   0479 E0                 1516 	movx	a,@dptr
   047A 54 01              1517 	anl	a,#1
   047C 64 01              1518 	xrl	a,#1
   047E 90 7F 01           1519 	mov	dptr,#IN0BUF+1
   0481 F0                 1520 	movx	@dptr,a
                           1521 	;; RSSI
   0482 90 C0 04           1522 	mov	dptr,#AUDIORSSI
   0485 E0                 1523 	movx	a,@dptr
   0486 90 7F 02           1524 	mov	dptr,#IN0BUF+2
   0489 F0                 1525 	movx	@dptr,a
                           1526 	;; length
   048A 90 7F EE           1527 	mov	dptr,#SETUPDAT+6	; wLength
   048D E0                 1528 	movx	a,@dptr
   048E 24 FD              1529 	add	a,#-3
   0490 50 01              1530 	jnc	2$
   0492 E4                 1531 	clr	a
   0493 24 03              1532 2$:	add	a,#3
   0495 90 7F B5           1533 	mov	dptr,#IN0BC
   0498 F0                 1534 	movx	@dptr,a
   0499 02s06r60           1535 	ljmp	setupack
   049C                    1536 setupstalld0:
   049C 02s06r5C           1537 	ljmp	setupstall
   049F                    1538 cmdnotd0:
                           1539 	;; 0xd2
   049F B4 D2 20           1540 	cjne	a,#0xd2,cmdnotd2
   04A2 90 7F E8           1541 	mov	dptr,#SETUPDAT	; bRequestType == 0x40
   04A5 E0                 1542 	movx	a,@dptr
   04A6 B4 40 16           1543 	cjne	a,#0x40,setupstalld2
   04A9 90 7F EA           1544 	mov	dptr,#SETUPDAT+2	; wValue
   04AC E0                 1545 	movx	a,@dptr
   04AD F5 F0              1546 	mov	b,a
   04AF 90 7F 98           1547 	mov	dptr,#OUTC
   04B2 E0                 1548 	movx	a,@dptr
   04B3 A2 F0              1549 	mov	c,b.0
   04B5 92 E3              1550 	mov	acc.3,c
   04B7 A2 F1              1551 	mov	c,b.1
   04B9 92 E5              1552 	mov	acc.5,c
   04BB F0                 1553 	movx	@dptr,a
   04BC 02s06r60           1554 	ljmp	setupack
   04BF                    1555 setupstalld2:
   04BF 02s06r5C           1556 	ljmp	setupstall
   04C2                    1557 cmdnotd2:
                           1558 	;; 0xd3
   04C2 B4 D3 16           1559 	cjne	a,#0xd3,cmdnotd3
   04C5 90 7F E8           1560 	mov	dptr,#SETUPDAT	; bRequestType == 0x40
   04C8 E0                 1561 	movx	a,@dptr
   04C9 B4 40 07           1562 	cjne	a,#0x40,setupstalld3
   04CC 90 7F EA           1563 	mov	dptr,#SETUPDAT+2	; wValue
   04CF E0                 1564 	movx	a,@dptr
   04D0 10*09 03           1565 	jbc	uartempty,cmdd2cont
   04D3                    1566 setupstalld3:
   04D3 02s06r5C           1567 	ljmp	setupstall
   04D6                    1568 cmdd2cont:
   04D6 F5 99              1569 	mov	sbuf0,a
   04D8 02s06r60           1570 	ljmp	setupack
   04DB                    1571 cmdnotd3:
                           1572 	;; 0xd4
   04DB B4 D4 49           1573 	cjne	a,#0xd4,cmdnotd4
   04DE 90 7F E8           1574 	mov	dptr,#SETUPDAT	; bRequestType == 0xc0
   04E1 E0                 1575 	movx	a,@dptr
   04E2 B4 C0 3F           1576 	cjne	a,#0xc0,setupstalld4
   04E5 90 7F EC           1577 	mov	dptr,#SETUPDAT+4	; wIndex
   04E8 E0                 1578 	movx	a,@dptr
   04E9 90 7F EA           1579 	mov	dptr,#SETUPDAT+2	; wValue
   04EC B4 01 09           1580 	cjne	a,#1,0$
   04EF E0                 1581 	movx	a,@dptr
   04F0 90 C0 0D           1582 	mov	dptr,#AUDIOMDISCOUT
   04F3 F0                 1583 	movx	@dptr,a
   04F4 F5*21              1584 	mov	mdiscout,a
   04F6 80 0A              1585 	sjmp	1$
   04F8 B4 02 07           1586 0$:	cjne	a,#2,1$
   04FB E0                 1587 	movx	a,@dptr
   04FC 90 C0 0C           1588 	mov	dptr,#AUDIOMDISCTRIS
   04FF F0                 1589 	movx	@dptr,a
   0500 F5*20              1590 	mov	mdisctris,a
   0502 90 C0 0E           1591 1$:	mov	dptr,#AUDIOMDISCIN
   0505 E0                 1592 	movx	a,@dptr
   0506 90 7F 00           1593 	mov	dptr,#IN0BUF+0
   0509 F0                 1594 	movx	@dptr,a
   050A E5*21              1595 	mov	a,mdiscout
   050C A3                 1596 	inc	dptr
   050D F0                 1597 	movx	@dptr,a
   050E E5*20              1598 	mov	a,mdisctris
   0510 A3                 1599 	inc	dptr
   0511 F0                 1600 	movx	@dptr,a
                           1601 	;; length
   0512 90 7F EE           1602 	mov	dptr,#SETUPDAT+6	; wLength
   0515 E0                 1603 	movx	a,@dptr
   0516 24 FD              1604 	add	a,#-3
   0518 50 01              1605 	jnc	2$
   051A E4                 1606 	clr	a
   051B 24 03              1607 2$:	add	a,#3
   051D 90 7F B5           1608 	mov	dptr,#IN0BC
   0520 F0                 1609 	movx	@dptr,a
   0521 02s06r60           1610 	ljmp	setupack
   0524                    1611 setupstalld4:
   0524 02s06r5C           1612 	ljmp	setupstall
   0527                    1613 cmdnotd4:
                           1614 	;; 0xd5
   0527 B4 D5 3F           1615 	cjne	a,#0xd5,cmdnotd5
   052A 90 7F E8           1616 	mov	dptr,#SETUPDAT	; bRequestType == 0xc0
   052D E0                 1617 	movx	a,@dptr
   052E B4 C0 32           1618 	cjne	a,#0xc0,setupstalld5
   0531 90 7F EC           1619 	mov	dptr,#SETUPDAT+4	; wIndex
   0534 E0                 1620 	movx	a,@dptr
   0535 B4 01 0A           1621 	cjne	a,#1,0$
   0538 90 7F EA           1622 	mov	dptr,#SETUPDAT+2	; wValue
   053B E0                 1623 	movx	a,@dptr
   053C 90 C0 0A           1624 	mov	dptr,#AUDIOT7FOUT
   053F F0                 1625 	movx	@dptr,a
   0540 F5*1F              1626 	mov	t7fout,a
   0542 90 C0 0B           1627 0$:	mov	dptr,#AUDIOT7FIN
   0545 E0                 1628 	movx	a,@dptr
   0546 90 7F 00           1629 	mov	dptr,#IN0BUF+0
   0549 F0                 1630 	movx	@dptr,a
   054A E5*1F              1631 	mov	a,t7fout
   054C A3                 1632 	inc	dptr
   054D 90 7F 01           1633 	mov	dptr,#IN0BUF+1
   0550 F0                 1634 	movx	@dptr,a
                           1635 	;; length
   0551 90 7F EE           1636 	mov	dptr,#SETUPDAT+6	; wLength
   0554 E0                 1637 	movx	a,@dptr
   0555 24 FE              1638 	add	a,#-2
   0557 50 01              1639 	jnc	2$
   0559 E4                 1640 	clr	a
   055A 24 02              1641 2$:	add	a,#2
   055C 90 7F B5           1642 	mov	dptr,#IN0BC
   055F F0                 1643 	movx	@dptr,a
   0560 02s06r60           1644 	ljmp	setupack
   0563                    1645 setupstalld5:
   0563                    1646 setupstalle0:
   0563 02s06r5C           1647 	ljmp	setupstall
   0566                    1648 cmdnote0_0:
   0566 02s05rFC           1649 	ljmp    cmdnote0
   0569                    1650 cmdnotd5:
                           1651 	;; 0xe0
   0569 B4 E0 FA           1652 	cjne	a,#0xe0,cmdnote0_0
   056C 90 7F E8           1653 	mov	dptr,#SETUPDAT		; bRequestType == 0xc0
   056F E0                 1654 	movx	a,@dptr
   0570 B4 C0 F0           1655 	cjne	a,#0xc0,setupstalle0
                           1656 	;; set PTT, LED's and counter mode
   0573 90 7F EC           1657 	mov	dptr,#SETUPDAT+4	; wIndex
   0576 E0                 1658 	movx	a,@dptr
   0577 B4 01 12           1659 	cjne	a,#1,1$
   057A 90 7F EA           1660 	mov	dptr,#SETUPDAT+2	; wValue
   057D E0                 1661 	movx	a,@dptr
   057E 54 78              1662 	anl	a,#0x78
   0580 C5 20              1663 	xch	a,ctrlreg
   0582 54 07              1664 	anl	a,#0x07
   0584 45 20              1665 	orl	a,ctrlreg
   0586 F5 20              1666 	mov	ctrlreg,a
   0588 90 C0 08           1667 	mov	dptr,#AUDIOCTRL
   058B F0                 1668 	movx	@dptr,a
   058C 90 7F EE           1669 1$:	mov	dptr,#SETUPDAT+6	; wLength
   058F E0                 1670 	movx	a,@dptr
   0590 60 0D              1671 	jz	3$
   0592 B4 01 11           1672 	cjne	a,#1,2$
   0595 E5 20              1673 	mov	a,ctrlreg
   0597 90 7F 00           1674 	mov	dptr,#IN0BUF
   059A 54 7F              1675 	anl	a,#0x7f
   059C F0                 1676 	movx	@dptr,a
   059D 74 01              1677 	mov	a,#1
   059F 90 7F B5           1678 3$:	mov	dptr,#IN0BC
   05A2 F0                 1679 	movx	@dptr,a
   05A3 02s06r60           1680 	ljmp	setupack
   05A6 90 C0 08           1681 2$:	mov	dptr,#AUDIOCTRL
   05A9 D2*07              1682 	setb	ctrl_cntsel
   05AB E5 20              1683 	mov	a,ctrlreg
   05AD F0                 1684 	movx	@dptr,a
   05AE 90 C0 05           1685 	mov	dptr,#AUDIOCNTLOW
   05B1 E0                 1686 	movx	a,@dptr
   05B2 90 7F 04           1687 	mov	dptr,#IN0BUF+4
   05B5 F0                 1688 	movx	@dptr,a
   05B6 90 C0 06           1689 	mov	dptr,#AUDIOCNTMID
   05B9 E0                 1690 	movx	a,@dptr
   05BA 90 7F 05           1691 	mov	dptr,#IN0BUF+5
   05BD F0                 1692 	movx	@dptr,a
   05BE 90 C0 07           1693 	mov	dptr,#AUDIOCNTHIGH
   05C1 E0                 1694 	movx	a,@dptr
   05C2 90 7F 06           1695 	mov	dptr,#IN0BUF+6
   05C5 F0                 1696 	movx	@dptr,a
   05C6 90 C0 08           1697 	mov	dptr,#AUDIOCTRL
   05C9 C2*07              1698 	clr	ctrl_cntsel
   05CB E5 20              1699 	mov	a,ctrlreg
   05CD F0                 1700 	movx	@dptr,a
   05CE 90 7F 00           1701 	mov	dptr,#IN0BUF
   05D1 F0                 1702 	movx	@dptr,a
   05D2 90 C0 05           1703 	mov	dptr,#AUDIOCNTLOW
   05D5 E0                 1704 	movx	a,@dptr
   05D6 90 7F 01           1705 	mov	dptr,#IN0BUF+1
   05D9 F0                 1706 	movx	@dptr,a
   05DA 90 C0 06           1707 	mov	dptr,#AUDIOCNTMID
   05DD E0                 1708 	movx	a,@dptr
   05DE 90 7F 02           1709 	mov	dptr,#IN0BUF+2
   05E1 F0                 1710 	movx	@dptr,a
   05E2 90 C0 07           1711 	mov	dptr,#AUDIOCNTHIGH
   05E5 E0                 1712 	movx	a,@dptr
   05E6 90 7F 03           1713 	mov	dptr,#IN0BUF+3
   05E9 F0                 1714 	movx	@dptr,a
                           1715 	;; length
   05EA 90 7F EE           1716 	mov	dptr,#SETUPDAT+6	; wLength
   05ED E0                 1717 	movx	a,@dptr
   05EE 24 F9              1718 	add	a,#-7
   05F0 50 01              1719 	jnc	4$
   05F2 E4                 1720 	clr	a
   05F3 24 07              1721 4$:	add	a,#7
   05F5 90 7F B5           1722 	mov	dptr,#IN0BC
   05F8 F0                 1723 	movx	@dptr,a
   05F9 02s06r60           1724 	ljmp	setupack
   05FC                    1725 cmdnote0:
                           1726 	;; 0xe1
   05FC B4 E1 3A           1727 	cjne	a,#0xe1,cmdnote1
   05FF 90 7F E8           1728 	mov	dptr,#SETUPDAT		; bRequestType == 0xc0
   0602 E0                 1729 	movx	a,@dptr
   0603 B4 C0 30           1730 	cjne	a,#0xc0,setupstalle1
   0606 90 7F 00           1731 	mov	dptr,#IN0BUF
   0609 E5*05              1732 	mov	a,sofcount
   060B F0                 1733 	movx	@dptr,a
   060C A3                 1734 	inc	dptr
   060D E5*09              1735 	mov	a,framesize
   060F F0                 1736 	movx	@dptr,a
   0610 A3                 1737 	inc	dptr
   0611 E5*06              1738 	mov	a,divider
   0613 F0                 1739 	movx	@dptr,a
   0614 A3                 1740 	inc	dptr
   0615 E5*07              1741 	mov	a,divider+1
   0617 F0                 1742 	movx	@dptr,a
   0618 A3                 1743 	inc	dptr
   0619 E5*08              1744 	mov	a,divrel
   061B F0                 1745 	movx	@dptr,a
   061C A3                 1746 	inc	dptr
   061D E5*0A              1747 	mov	a,pllcorrvar
   061F F0                 1748 	movx	@dptr,a
   0620 A3                 1749 	inc	dptr
   0621 E5*0B              1750 	mov	a,txfifocount
   0623 F0                 1751 	movx	@dptr,a
                           1752 
                           1753 	;mov	dptr,#AUDIOTXFIFOCNT
                           1754 	;movx	a,@dptr
                           1755 	;mov	dptr,#IN0BUF+6
                           1756 	;movx	@dptr,a
                           1757 
                           1758 	;; length
   0624 90 7F EE           1759 	mov	dptr,#SETUPDAT+6	; wLength
   0627 E0                 1760 	movx	a,@dptr
   0628 24 F9              1761 	add	a,#-7
   062A 50 01              1762 	jnc	1$
   062C E4                 1763 	clr	a
   062D 24 07              1764 1$:	add	a,#7
   062F 90 7F B5           1765 	mov	dptr,#IN0BC
   0632 F0                 1766 	movx	@dptr,a
   0633 02s06r60           1767 	ljmp	setupack
   0636                    1768 setupstalle1:
   0636 02s06r5C           1769 	ljmp	setupstall
   0639                    1770 cmdnote1:
                           1771 	;; 0xe2
   0639 B4 E2 20           1772 	cjne	a,#0xe2,cmdnote2
   063C 90 7F E8           1773 	mov	dptr,#SETUPDAT		; bRequestType == 0xc0
   063F E0                 1774 	movx	a,@dptr
   0640 B4 C0 16           1775 	cjne	a,#0xc0,setupstalle2
   0643 90 7F 00           1776 	mov	dptr,#IN0BUF
   0646 78r00              1777 	mov	r0,#txsamples
   0648 AF*09              1778 	mov	r7,framesize
   064A E6                 1779 1$:	mov	a,@r0
   064B F0                 1780 	movx	@dptr,a
   064C 08                 1781 	inc	r0
   064D A3                 1782 	inc	dptr
   064E DF FA              1783 	djnz	r7,1$
   0650 90 7F B5           1784 	mov	dptr,#IN0BC
   0653 E5*09              1785 	mov	a,framesize
   0655 F0                 1786 	movx	@dptr,a
   0656 02s06r60           1787 	ljmp	setupack
   0659                    1788 setupstalle2:
   0659 02s06r5C           1789 	ljmp	setupstall
   065C                    1790 cmdnote2:
                           1791 
                           1792 	;; unknown commands fall through to setupstall
                           1793 
   065C                    1794 setupstall:
   065C 74 03              1795 	mov	a,#3
   065E 80 02              1796 	sjmp	endsetup
   0660                    1797 setupack:
   0660 74 02              1798 	mov	a,#2
   0662                    1799 endsetup:
   0662 90 7F B4           1800 	mov	dptr,#EP0CS
   0665 F0                 1801 	movx	@dptr,a
   0666                    1802 endusbisr:
                           1803 	;; epilogue
   0666 D0 07              1804 	pop	ar7
   0668 D0 00              1805 	pop	ar0
   066A D0 86              1806 	pop	dps
   066C D0 D0              1807 	pop	psw
   066E D0 85              1808 	pop	dph1
   0670 D0 84              1809 	pop	dpl1
   0672 D0 83              1810 	pop	dph0
   0674 D0 82              1811 	pop	dpl0
   0676 D0 F0              1812 	pop	b
   0678 D0 E0              1813 	pop	acc
   067A 32                 1814 	reti
                           1815 
   067B                    1816 usb_sof_isr:
   067B C0 E0              1817 	push	acc
   067D C0 F0              1818 	push	b
   067F C0 82              1819 	push	dpl0
   0681 C0 83              1820 	push	dph0
   0683 C0 84              1821 	push	dpl1
   0685 C0 85              1822 	push	dph1
   0687 C0 D0              1823 	push	psw
   0689 75 D0 00           1824 	mov	psw,#0x00
   068C C0 86              1825 	push	dps
   068E 75 86 00           1826 	mov	dps,#0
   0691 C0 02              1827 	push	ar2
   0693 C0 03              1828 	push	ar3
   0695 C0 00              1829 	push	ar0
                           1830 	;; clear interrupt
   0697 E5 91              1831 	mov	a,exif
   0699 C2 E4              1832 	clr	acc.4
   069B F5 91              1833 	mov	exif,a
   069D 90 7F AB           1834 	mov	dptr,#USBIRQ
   06A0 74 02              1835 	mov	a,#0x02
   06A2 F0                 1836 	movx	@dptr,a
                           1837 	;; handle interrupt
   06A3 05*05              1838 	inc	sofcount
                           1839 	;; debugging: we have two cases
                           1840 	;; if the ISO frame size is just 2 bytes,
                           1841 	;; we return the frame number, otherwise
                           1842 	;; the required numbers of samples
   06A5 E5*09              1843 	mov	a,framesize
   06A7 B4 02 14           1844 	cjne	a,#2,1$
                           1845 	;; copy the frame number
   06AA 90 7F D8           1846 	mov	dptr,#USBFRAMEL
   06AD E0                 1847 	movx	a,@dptr
   06AE A3                 1848 	inc	dptr
   06AF 05 86              1849 	inc	dps
   06B1 90 7F 68           1850 	mov	dptr,#IN8DATA
   06B4 F0                 1851 	movx	@dptr,a
   06B5 15 86              1852 	dec	dps
   06B7 E0                 1853 	movx	a,@dptr
   06B8 05 86              1854 	inc	dps
   06BA F0                 1855 	movx	@dptr,a
   06BB 02s07rAE           1856 	ljmp	sofendisr
   06BE B4 03 36           1857 1$:	cjne	a,#3,sofsampleisr
   06C1 90 7F A0           1858 	mov	dptr,#ISOERR
   06C4 E0                 1859 	movx	a,@dptr
   06C5 20 E0 23           1860 	jb	acc.0,3$
   06C8 90 7F 70           1861 	mov	dptr,#OUT8BCH
   06CB E0                 1862 	movx	a,@dptr
   06CC 70 1D              1863 	jnz	3$
   06CE 90 7F 71           1864 	mov	dptr,#OUT8BCL
   06D1 E0                 1865 	movx	a,@dptr
   06D2 B4 03 16           1866 	cjne	a,#3,3$
   06D5 FA                 1867 	mov	r2,a
   06D6 90 7F 60           1868 	mov	dptr,#OUT8DATA
   06D9 05 86              1869 	inc	dps
   06DB 90 7F 68           1870 	mov	dptr,#IN8DATA
   06DE 15 86              1871 	dec	dps
   06E0 E0                 1872 2$:	movx	a,@dptr
   06E1 05 86              1873 	inc	dps
   06E3 F0                 1874 	movx	@dptr,a
   06E4 15 86              1875 	dec	dps
   06E6 DA F8              1876 	djnz	r2,2$
   06E8 02s07rAE           1877 	ljmp	sofendisr
   06EB 7A 03              1878 3$:	mov	r2,#3
   06ED 90 7F 68           1879 	mov	dptr,#IN8DATA
   06F0 E4                 1880 	clr	a
   06F1 F0                 1881 4$:	movx	@dptr,a
   06F2 DA FD              1882 	djnz	r2,4$
   06F4 02s07rAE           1883 	ljmp	sofendisr
   06F7                    1884 sofsampleisr:
   06F7 90 C0 01           1885 	mov	dptr,#AUDIORXFIFOCNT
   06FA E0                 1886 	movx	a,@dptr
   06FB C3                 1887 	clr	c
   06FC 95*09              1888 	subb	a,framesize
   06FE E0                 1889 	movx	a,@dptr
   06FF 40 02              1890 	jc	1$
   0701 E5*09              1891 	mov	a,framesize
   0703 FA                 1892 1$:	mov	r2,a
   0704 FB                 1893 	mov	r3,a
   0705 60 12              1894 	jz	2$
   0707 90 C0 00           1895 	mov	dptr,#AUDIORXFIFO
   070A 05 86              1896 	inc	dps
   070C 90 7F 68           1897 	mov	dptr,#IN8DATA
   070F 15 86              1898 	dec	dps
   0711 E0                 1899 3$:	movx	a,@dptr
   0712 05 86              1900 	inc	dps
   0714 F0                 1901 	movx	@dptr,a
   0715 15 86              1902 	dec	dps
   0717 DA F8              1903 	djnz	r2,3$
   0719 E5*09              1904 2$:	mov	a,framesize
   071B C3                 1905 	clr	c
   071C 9B                 1906 	subb	a,r3
   071D 60 08              1907 	jz	4$
   071F FA                 1908 	mov	r2,a
   0720 90 7F 68           1909 	mov	dptr,#IN8DATA
   0723 E4                 1910 	clr	a
   0724 F0                 1911 5$:	movx	@dptr,a
   0725 DA FD              1912 	djnz	r2,5$
                           1913 	;; sample rate adjustment
   0727 90 C0 01           1914 4$:	mov	dptr,#AUDIORXFIFOCNT
   072A E0                 1915 	movx	a,@dptr
   072B F5*0A              1916 	mov	pllcorrvar,a
   072D 24 FC              1917 	add	a,#-4
   072F 60 05              1918 	jz	10$		; no adjustment
   0731 33                 1919 	rlc	a
   0732 95 E0              1920 	subb	a,acc
   0734 D2 E0              1921 	setb	acc.0
   0736 FB                 1922 10$:	mov	r3,a		; r3 & acc contain the adjust value
   0737 25*08              1923 	add	a,divrel
                           1924 	;; zero is the guard value
   0739 60 02              1925 	jz	11$
   073B F5*08              1926 	mov	divrel,a
   073D E5*08              1927 11$:	mov	a,divrel
   073F 03                 1928 	rr	a
   0740 03                 1929 	rr	a
   0741 03                 1930 	rr	a
   0742 03                 1931 	rr	a
   0743 54 0F              1932 	anl	a,#0xf
   0745 2B                 1933 	add	a,r3		; momentary correction
   0746 25*06              1934 	add	a,divider
   0748 FA                 1935 	mov	r2,a
   0749 E5*07              1936 	mov	a,divider+1
   074B 34 00              1937 	addc	a,#0
   074D 90 C0 02           1938 	mov	dptr,#AUDIODIVIDERHI
   0750 F0                 1939 	movx	@dptr,a
   0751 EA                 1940 	mov	a,r2
   0752 90 C0 01           1941 	mov	dptr,#AUDIODIVIDERLO
   0755 F0                 1942 	movx	@dptr,a
                           1943 	;; OUT data
   0756 90 7F A0           1944 	mov	dptr,#ISOERR
   0759 E0                 1945 	movx	a,@dptr
   075A 20 E0 39           1946 	jb	acc.0,20$
   075D 90 7F 70           1947 	mov	dptr,#OUT8BCH
   0760 E0                 1948 	movx	a,@dptr
   0761 70 33              1949 	jnz	20$
   0763 90 7F 71           1950 	mov	dptr,#OUT8BCL
   0766 E0                 1951 	movx	a,@dptr
   0767 C3                 1952 	clr	c
   0768 95*09              1953 	subb	a,framesize
   076A 70 2A              1954 	jnz	20$
   076C 90 C0 02           1955 	mov	dptr,#AUDIOTXFIFOCNT
   076F E0                 1956 	movx	a,@dptr
   0770 F5*0B              1957 	mov	txfifocount,a
   0772 C3                 1958 	clr	c
   0773 95*09              1959 	subb	a,framesize
   0775 E5*0B              1960 	mov	a,txfifocount
   0777 40 02              1961 	jc	14$
   0779 E5*09              1962 	mov	a,framesize
   077B 60 17              1963 14$:	jz	13$
   077D FA                 1964 	mov	r2,a
   077E 90 7F 60           1965 	mov	dptr,#OUT8DATA
   0781 05 86              1966 	inc	dps
   0783 90 C0 00           1967 	mov	dptr,#AUDIOTXFIFO
   0786 15 86              1968 	dec	dps
   0788 78r00              1969 	mov	r0,#txsamples
   078A E0                 1970 12$:	movx	a,@dptr
   078B 05 86              1971 	inc	dps
   078D F0                 1972 	movx	@dptr,a
   078E 15 86              1973 	dec	dps
   0790 F6                 1974 	mov	@r0,a
   0791 08                 1975 	inc	r0
   0792 DA F6              1976 	djnz	r2,12$
   0794 80 18              1977 13$:	sjmp	sofendisr
                           1978 	;; initialize TX if invalid packet
   0796 90 C0 02           1979 20$:	mov	dptr,#AUDIOTXFIFOCNT
   0799 E0                 1980 	movx	a,@dptr
   079A F5*0B              1981 	mov	txfifocount,a
   079C 24 FC              1982 	add	a,#-4
   079E 54 3F              1983 	anl	a,#0x3f
   07A0 60 0C              1984 	jz	sofendisr
   07A2 FA                 1985 	mov	r2,a
   07A3 90 C0 00           1986 	mov	dptr,#AUDIOTXFIFO
   07A6 E4                 1987 	clr	a
   07A7 78r00              1988 	mov	r0,#txsamples
   07A9 F0                 1989 21$:	movx	@dptr,a
   07AA F6                 1990 	mov	@r0,a
   07AB 08                 1991 	inc	r0
   07AC DA FB              1992 	djnz	r2,21$
                           1993 	
   07AE                    1994 sofendisr:
                           1995 	;; epilogue
   07AE D0 00              1996 	pop	ar0
   07B0 D0 03              1997 	pop	ar3
   07B2 D0 02              1998 	pop	ar2
   07B4 D0 86              1999 	pop	dps
   07B6 D0 D0              2000 	pop	psw
   07B8 D0 85              2001 	pop	dph1
   07BA D0 84              2002 	pop	dpl1
   07BC D0 83              2003 	pop	dph0
   07BE D0 82              2004 	pop	dpl0
   07C0 D0 F0              2005 	pop	b
   07C2 D0 E0              2006 	pop	acc
   07C4 32                 2007 	reti
                           2008 
                           2009 
   07C5                    2010 usb_sutok_isr:
   07C5 C0 E0              2011 	push	acc
   07C7 C0 F0              2012 	push	b
   07C9 C0 82              2013 	push	dpl0
   07CB C0 83              2014 	push	dph0
   07CD C0 D0              2015 	push	psw
   07CF 75 D0 00           2016 	mov	psw,#0x00
   07D2 C0 86              2017 	push	dps
   07D4 75 86 00           2018 	mov	dps,#0
                           2019 	;; clear interrupt
   07D7 E5 91              2020 	mov	a,exif
   07D9 C2 E4              2021 	clr	acc.4
   07DB F5 91              2022 	mov	exif,a
   07DD 90 7F AB           2023 	mov	dptr,#USBIRQ
   07E0 74 04              2024 	mov	a,#0x04
   07E2 F0                 2025 	movx	@dptr,a
                           2026 	;; handle interrupt
                           2027 	;; epilogue
   07E3 D0 86              2028 	pop	dps
   07E5 D0 D0              2029 	pop	psw
   07E7 D0 83              2030 	pop	dph0
   07E9 D0 82              2031 	pop	dpl0
   07EB D0 F0              2032 	pop	b
   07ED D0 E0              2033 	pop	acc
   07EF 32                 2034 	reti
                           2035 
   07F0                    2036 usb_suspend_isr:
   07F0 C0 E0              2037 	push	acc
   07F2 C0 F0              2038 	push	b
   07F4 C0 82              2039 	push	dpl0
   07F6 C0 83              2040 	push	dph0
   07F8 C0 D0              2041 	push	psw
   07FA 75 D0 00           2042 	mov	psw,#0x00
   07FD C0 86              2043 	push	dps
   07FF 75 86 00           2044 	mov	dps,#0
                           2045 	;; clear interrupt
   0802 E5 91              2046 	mov	a,exif
   0804 C2 E4              2047 	clr	acc.4
   0806 F5 91              2048 	mov	exif,a
   0808 90 7F AB           2049 	mov	dptr,#USBIRQ
   080B 74 08              2050 	mov	a,#0x08
   080D F0                 2051 	movx	@dptr,a
                           2052 	;; handle interrupt
                           2053 	;; epilogue
   080E D0 86              2054 	pop	dps
   0810 D0 D0              2055 	pop	psw
   0812 D0 83              2056 	pop	dph0
   0814 D0 82              2057 	pop	dpl0
   0816 D0 F0              2058 	pop	b
   0818 D0 E0              2059 	pop	acc
   081A 32                 2060 	reti
                           2061 
   081B                    2062 usb_usbreset_isr:
   081B C0 E0              2063 	push	acc
   081D C0 F0              2064 	push	b
   081F C0 82              2065 	push	dpl0
   0821 C0 83              2066 	push	dph0
   0823 C0 D0              2067 	push	psw
   0825 75 D0 00           2068 	mov	psw,#0x00
   0828 C0 86              2069 	push	dps
   082A 75 86 00           2070 	mov	dps,#0
                           2071 	;; clear interrupt
   082D E5 91              2072 	mov	a,exif
   082F C2 E4              2073 	clr	acc.4
   0831 F5 91              2074 	mov	exif,a
   0833 90 7F AB           2075 	mov	dptr,#USBIRQ
   0836 74 10              2076 	mov	a,#0x10
   0838 F0                 2077 	movx	@dptr,a
                           2078 	;; handle interrupt
                           2079 	;; epilogue
   0839 D0 86              2080 	pop	dps
   083B D0 D0              2081 	pop	psw
   083D D0 83              2082 	pop	dph0
   083F D0 82              2083 	pop	dpl0
   0841 D0 F0              2084 	pop	b
   0843 D0 E0              2085 	pop	acc
   0845 32                 2086 	reti
                           2087 
   0846                    2088 usb_ep0in_isr:
   0846 C0 E0              2089 	push	acc
   0848 C0 F0              2090 	push	b
   084A C0 82              2091 	push	dpl0
   084C C0 83              2092 	push	dph0
   084E C0 84              2093 	push	dpl1
   0850 C0 85              2094 	push	dph1
   0852 C0 D0              2095 	push	psw
   0854 75 D0 00           2096 	mov	psw,#0x00
   0857 C0 86              2097 	push	dps
   0859 75 86 00           2098 	mov	dps,#0
   085C C0 00              2099 	push	ar0
   085E C0 07              2100 	push	ar7
                           2101 	;; clear interrupt
   0860 E5 91              2102 	mov	a,exif
   0862 C2 E4              2103 	clr	acc.4
   0864 F5 91              2104 	mov	exif,a
   0866 90 7F A9           2105 	mov	dptr,#IN07IRQ
   0869 74 01              2106 	mov	a,#0x01
   086B F0                 2107 	movx	@dptr,a
                           2108 	;; handle interrupt
                           2109 	;; epilogue
   086C D0 07              2110 	pop	ar7
   086E D0 00              2111 	pop	ar0
   0870 D0 86              2112 	pop	dps
   0872 D0 D0              2113 	pop	psw
   0874 D0 85              2114 	pop	dph1
   0876 D0 84              2115 	pop	dpl1
   0878 D0 83              2116 	pop	dph0
   087A D0 82              2117 	pop	dpl0
   087C D0 F0              2118 	pop	b
   087E D0 E0              2119 	pop	acc
   0880 32                 2120 	reti
                           2121 
   0881                    2122 usb_ep0out_isr:
   0881 C0 E0              2123 	push	acc
   0883 C0 F0              2124 	push	b
   0885 C0 82              2125 	push	dpl0
   0887 C0 83              2126 	push	dph0
   0889 C0 84              2127 	push	dpl1
   088B C0 85              2128 	push	dph1
   088D C0 D0              2129 	push	psw
   088F 75 D0 00           2130 	mov	psw,#0x00
   0892 C0 86              2131 	push	dps
   0894 75 86 00           2132 	mov	dps,#0
   0897 C0 00              2133 	push	ar0
   0899 C0 06              2134 	push	ar6
                           2135 	;; clear interrupt
   089B E5 91              2136 	mov	a,exif
   089D C2 E4              2137 	clr	acc.4
   089F F5 91              2138 	mov	exif,a
   08A1 90 7F AA           2139 	mov	dptr,#OUT07IRQ
   08A4 74 01              2140 	mov	a,#0x01
   08A6 F0                 2141 	movx	@dptr,a
                           2142 	;; handle interrupt
                           2143 	;; epilogue
   08A7 D0 06              2144 	pop	ar6
   08A9 D0 00              2145 	pop	ar0
   08AB D0 86              2146 	pop	dps
   08AD D0 D0              2147 	pop	psw
   08AF D0 85              2148 	pop	dph1
   08B1 D0 84              2149 	pop	dpl1
   08B3 D0 83              2150 	pop	dph0
   08B5 D0 82              2151 	pop	dpl0
   08B7 D0 F0              2152 	pop	b
   08B9 D0 E0              2153 	pop	acc
   08BB 32                 2154 	reti
                           2155 
   08BC                    2156 fillusbintr::
   08BC E5*0C              2157 	mov	a,pttforce
   08BE F5 F0              2158 	mov	b,a
   08C0 A2 E0              2159 	mov	c,acc.0
   08C2 92 F2              2160 	mov	b.2,c
   08C4 90 C0 09           2161 	mov	dptr,#AUDIOSTAT
   08C7 E0                 2162 	movx	a,@dptr
   08C8 A2 E0              2163 	mov	c,acc.0
   08CA 92 F3              2164 	mov	b.3,c
   08CC A2*09              2165 	mov	c,uartempty
   08CE 92 F5              2166 	mov	b.5,c
                           2167 	;; bytewide elements
   08D0 90 7E 80           2168 	mov	dptr,#(IN1BUF)
   08D3 E5 F0              2169 	mov	a,b
   08D5 F0                 2170 	movx	@dptr,a
   08D6 E5*05              2171 	mov	a,sofcount
   08D8 90 7E 81           2172 	mov	dptr,#(IN1BUF+1)
   08DB F0                 2173 	movx	@dptr,a
   08DC 90 7F E0           2174 	mov	dptr,#INISOVAL
   08DF E0                 2175 	movx	a,@dptr
   08E0 90 7E 82           2176 	mov	dptr,#(IN1BUF+2)
   08E3 F0                 2177 	movx	@dptr,a
   08E4 90 C0 04           2178 	mov	dptr,#AUDIORSSI
   08E7 E0                 2179 	movx	a,@dptr
   08E8 90 7E 83           2180 	mov	dptr,#(IN1BUF+3)
   08EB F0                 2181 	movx	@dptr,a
                           2182 	; counter
   08EC 05*04              2183 	inc	irqcount
   08EE E5*04              2184 	mov	a,irqcount
   08F0 90 7E 84           2185 	mov	dptr,#(IN1BUF+4)
   08F3 F0                 2186 	movx	@dptr,a
                           2187 	; UART buffer
   08F4 75 F0 05           2188 	mov	b,#5
   08F7 90 7E 85           2189 	mov	dptr,#(IN1BUF+5)
   08FA E5*1E              2190 2$:	mov	a,uartrd
   08FC B5*1D 07           2191 	cjne	a,uartwr,3$
                           2192 	; set length
   08FF 90 7F B7           2193 	mov	dptr,#IN1BC
   0902 E5 F0              2194 	mov	a,b
   0904 F0                 2195 	movx	@dptr,a
   0905 22                 2196 	ret
                           2197 	
   0906 24r0D              2198 3$:	add	a,#uartbuf
   0908 F8                 2199 	mov	r0,a
   0909 E6                 2200 	mov	a,@r0
   090A F0                 2201 	movx	@dptr,a
   090B A3                 2202 	inc	dptr
   090C 05 F0              2203 	inc	b
   090E E5*1E              2204 	mov	a,uartrd
   0910 04                 2205 	inc	a
   0911 54 0F              2206 	anl	a,#0xf
   0913 F5*1E              2207 	mov	uartrd,a
   0915 80 E3              2208 	sjmp	2$
                           2209 
                           2210 	
   0917                    2211 usb_ep1in_isr:
   0917 C0 E0              2212 	push	acc
   0919 C0 F0              2213 	push	b
   091B C0 82              2214 	push	dpl0
   091D C0 83              2215 	push	dph0
   091F C0 D0              2216 	push	psw
   0921 75 D0 00           2217 	mov	psw,#0x00
   0924 C0 86              2218 	push	dps
   0926 75 86 00           2219 	mov	dps,#0
                           2220 	;; clear interrupt
   0929 E5 91              2221 	mov	a,exif
   092B C2 E4              2222 	clr	acc.4
   092D F5 91              2223 	mov	exif,a
   092F 90 7F A9           2224 	mov	dptr,#IN07IRQ
   0932 74 02              2225 	mov	a,#0x02
   0934 F0                 2226 	movx	@dptr,a
                           2227 	;; handle interrupt
   0935 12s08rBC           2228 	lcall	fillusbintr
                           2229 	;; epilogue
   0938 D0 86              2230 	pop	dps
   093A D0 D0              2231 	pop	psw
   093C D0 83              2232 	pop	dph0
   093E D0 82              2233 	pop	dpl0
   0940 D0 F0              2234 	pop	b
   0942 D0 E0              2235 	pop	acc
   0944 32                 2236 	reti
                           2237 
   0945                    2238 usb_ep1out_isr:
   0945 C0 E0              2239 	push	acc
   0947 C0 F0              2240 	push	b
   0949 C0 82              2241 	push	dpl0
   094B C0 83              2242 	push	dph0
   094D C0 D0              2243 	push	psw
   094F 75 D0 00           2244 	mov	psw,#0x00
   0952 C0 86              2245 	push	dps
   0954 75 86 00           2246 	mov	dps,#0
                           2247 	;; clear interrupt
   0957 E5 91              2248 	mov	a,exif
   0959 C2 E4              2249 	clr	acc.4
   095B F5 91              2250 	mov	exif,a
   095D 90 7F AA           2251 	mov	dptr,#OUT07IRQ
   0960 74 02              2252 	mov	a,#0x02
   0962 F0                 2253 	movx	@dptr,a
                           2254 	;; handle interrupt
                           2255 	;; epilogue
   0963 D0 86              2256 	pop	dps
   0965 D0 D0              2257 	pop	psw
   0967 D0 83              2258 	pop	dph0
   0969 D0 82              2259 	pop	dpl0
   096B D0 F0              2260 	pop	b
   096D D0 E0              2261 	pop	acc
   096F 32                 2262 	reti
                           2263 
   0970                    2264 usb_ep2in_isr:
   0970 C0 E0              2265 	push	acc
   0972 C0 F0              2266 	push	b
   0974 C0 82              2267 	push	dpl0
   0976 C0 83              2268 	push	dph0
   0978 C0 D0              2269 	push	psw
   097A 75 D0 00           2270 	mov	psw,#0x00
   097D C0 86              2271 	push	dps
   097F 75 86 00           2272 	mov	dps,#0
                           2273 	;; clear interrupt
   0982 E5 91              2274 	mov	a,exif
   0984 C2 E4              2275 	clr	acc.4
   0986 F5 91              2276 	mov	exif,a
   0988 90 7F A9           2277 	mov	dptr,#IN07IRQ
   098B 74 04              2278 	mov	a,#0x04
   098D F0                 2279 	movx	@dptr,a
                           2280 	;; handle interrupt
                           2281 	;; epilogue
   098E D0 86              2282 	pop	dps
   0990 D0 D0              2283 	pop	psw
   0992 D0 83              2284 	pop	dph0
   0994 D0 82              2285 	pop	dpl0
   0996 D0 F0              2286 	pop	b
   0998 D0 E0              2287 	pop	acc
   099A 32                 2288 	reti
                           2289 
   099B                    2290 usb_ep2out_isr:
   099B C0 E0              2291 	push	acc
   099D C0 F0              2292 	push	b
   099F C0 82              2293 	push	dpl0
   09A1 C0 83              2294 	push	dph0
   09A3 C0 D0              2295 	push	psw
   09A5 75 D0 00           2296 	mov	psw,#0x00
   09A8 C0 86              2297 	push	dps
   09AA 75 86 00           2298 	mov	dps,#0
                           2299 	;; clear interrupt
   09AD E5 91              2300 	mov	a,exif
   09AF C2 E4              2301 	clr	acc.4
   09B1 F5 91              2302 	mov	exif,a
   09B3 90 7F AA           2303 	mov	dptr,#OUT07IRQ
   09B6 74 04              2304 	mov	a,#0x04
   09B8 F0                 2305 	movx	@dptr,a
                           2306 	;; handle interrupt
                           2307 	;; epilogue
   09B9 D0 86              2308 	pop	dps
   09BB D0 D0              2309 	pop	psw
   09BD D0 83              2310 	pop	dph0
   09BF D0 82              2311 	pop	dpl0
   09C1 D0 F0              2312 	pop	b
   09C3 D0 E0              2313 	pop	acc
   09C5 32                 2314 	reti
                           2315 
   09C6                    2316 usb_ep3in_isr:
   09C6 C0 E0              2317 	push	acc
   09C8 C0 F0              2318 	push	b
   09CA C0 82              2319 	push	dpl0
   09CC C0 83              2320 	push	dph0
   09CE C0 D0              2321 	push	psw
   09D0 75 D0 00           2322 	mov	psw,#0x00
   09D3 C0 86              2323 	push	dps
   09D5 75 86 00           2324 	mov	dps,#0
                           2325 	;; clear interrupt
   09D8 E5 91              2326 	mov	a,exif
   09DA C2 E4              2327 	clr	acc.4
   09DC F5 91              2328 	mov	exif,a
   09DE 90 7F A9           2329 	mov	dptr,#IN07IRQ
   09E1 74 08              2330 	mov	a,#0x08
   09E3 F0                 2331 	movx	@dptr,a
                           2332 	;; handle interrupt
                           2333 	;; epilogue
   09E4 D0 86              2334 	pop	dps
   09E6 D0 D0              2335 	pop	psw
   09E8 D0 83              2336 	pop	dph0
   09EA D0 82              2337 	pop	dpl0
   09EC D0 F0              2338 	pop	b
   09EE D0 E0              2339 	pop	acc
   09F0 32                 2340 	reti
                           2341 
   09F1                    2342 usb_ep3out_isr:
   09F1 C0 E0              2343 	push	acc
   09F3 C0 F0              2344 	push	b
   09F5 C0 82              2345 	push	dpl0
   09F7 C0 83              2346 	push	dph0
   09F9 C0 D0              2347 	push	psw
   09FB 75 D0 00           2348 	mov	psw,#0x00
   09FE C0 86              2349 	push	dps
   0A00 75 86 00           2350 	mov	dps,#0
                           2351 	;; clear interrupt
   0A03 E5 91              2352 	mov	a,exif
   0A05 C2 E4              2353 	clr	acc.4
   0A07 F5 91              2354 	mov	exif,a
   0A09 90 7F AA           2355 	mov	dptr,#OUT07IRQ
   0A0C 74 08              2356 	mov	a,#0x08
   0A0E F0                 2357 	movx	@dptr,a
                           2358 	;; handle interrupt
                           2359 	;; epilogue
   0A0F D0 86              2360 	pop	dps
   0A11 D0 D0              2361 	pop	psw
   0A13 D0 83              2362 	pop	dph0
   0A15 D0 82              2363 	pop	dpl0
   0A17 D0 F0              2364 	pop	b
   0A19 D0 E0              2365 	pop	acc
   0A1B 32                 2366 	reti
                           2367 
   0A1C                    2368 usb_ep4in_isr:
   0A1C C0 E0              2369 	push	acc
   0A1E C0 F0              2370 	push	b
   0A20 C0 82              2371 	push	dpl0
   0A22 C0 83              2372 	push	dph0
   0A24 C0 D0              2373 	push	psw
   0A26 75 D0 00           2374 	mov	psw,#0x00
   0A29 C0 86              2375 	push	dps
   0A2B 75 86 00           2376 	mov	dps,#0
                           2377 	;; clear interrupt
   0A2E E5 91              2378 	mov	a,exif
   0A30 C2 E4              2379 	clr	acc.4
   0A32 F5 91              2380 	mov	exif,a
   0A34 90 7F A9           2381 	mov	dptr,#IN07IRQ
   0A37 74 10              2382 	mov	a,#0x10
   0A39 F0                 2383 	movx	@dptr,a
                           2384 	;; handle interrupt
                           2385 	;; epilogue
   0A3A D0 86              2386 	pop	dps
   0A3C D0 D0              2387 	pop	psw
   0A3E D0 83              2388 	pop	dph0
   0A40 D0 82              2389 	pop	dpl0
   0A42 D0 F0              2390 	pop	b
   0A44 D0 E0              2391 	pop	acc
   0A46 32                 2392 	reti
                           2393 
   0A47                    2394 usb_ep4out_isr:
   0A47 C0 E0              2395 	push	acc
   0A49 C0 F0              2396 	push	b
   0A4B C0 82              2397 	push	dpl0
   0A4D C0 83              2398 	push	dph0
   0A4F C0 D0              2399 	push	psw
   0A51 75 D0 00           2400 	mov	psw,#0x00
   0A54 C0 86              2401 	push	dps
   0A56 75 86 00           2402 	mov	dps,#0
                           2403 	;; clear interrupt
   0A59 E5 91              2404 	mov	a,exif
   0A5B C2 E4              2405 	clr	acc.4
   0A5D F5 91              2406 	mov	exif,a
   0A5F 90 7F AA           2407 	mov	dptr,#OUT07IRQ
   0A62 74 10              2408 	mov	a,#0x10
   0A64 F0                 2409 	movx	@dptr,a
                           2410 	;; handle interrupt
                           2411 	;; epilogue
   0A65 D0 86              2412 	pop	dps
   0A67 D0 D0              2413 	pop	psw
   0A69 D0 83              2414 	pop	dph0
   0A6B D0 82              2415 	pop	dpl0
   0A6D D0 F0              2416 	pop	b
   0A6F D0 E0              2417 	pop	acc
   0A71 32                 2418 	reti
                           2419 
   0A72                    2420 usb_ep5in_isr:
   0A72 C0 E0              2421 	push	acc
   0A74 C0 F0              2422 	push	b
   0A76 C0 82              2423 	push	dpl0
   0A78 C0 83              2424 	push	dph0
   0A7A C0 D0              2425 	push	psw
   0A7C 75 D0 00           2426 	mov	psw,#0x00
   0A7F C0 86              2427 	push	dps
   0A81 75 86 00           2428 	mov	dps,#0
                           2429 	;; clear interrupt
   0A84 E5 91              2430 	mov	a,exif
   0A86 C2 E4              2431 	clr	acc.4
   0A88 F5 91              2432 	mov	exif,a
   0A8A 90 7F A9           2433 	mov	dptr,#IN07IRQ
   0A8D 74 20              2434 	mov	a,#0x20
   0A8F F0                 2435 	movx	@dptr,a
                           2436 	;; handle interrupt
                           2437 	;; epilogue
   0A90 D0 86              2438 	pop	dps
   0A92 D0 D0              2439 	pop	psw
   0A94 D0 83              2440 	pop	dph0
   0A96 D0 82              2441 	pop	dpl0
   0A98 D0 F0              2442 	pop	b
   0A9A D0 E0              2443 	pop	acc
   0A9C 32                 2444 	reti
                           2445 
   0A9D                    2446 usb_ep5out_isr:
   0A9D C0 E0              2447 	push	acc
   0A9F C0 F0              2448 	push	b
   0AA1 C0 82              2449 	push	dpl0
   0AA3 C0 83              2450 	push	dph0
   0AA5 C0 D0              2451 	push	psw
   0AA7 75 D0 00           2452 	mov	psw,#0x00
   0AAA C0 86              2453 	push	dps
   0AAC 75 86 00           2454 	mov	dps,#0
                           2455 	;; clear interrupt
   0AAF E5 91              2456 	mov	a,exif
   0AB1 C2 E4              2457 	clr	acc.4
   0AB3 F5 91              2458 	mov	exif,a
   0AB5 90 7F AA           2459 	mov	dptr,#OUT07IRQ
   0AB8 74 20              2460 	mov	a,#0x20
   0ABA F0                 2461 	movx	@dptr,a
                           2462 	;; handle interrupt
                           2463 	;; epilogue
   0ABB D0 86              2464 	pop	dps
   0ABD D0 D0              2465 	pop	psw
   0ABF D0 83              2466 	pop	dph0
   0AC1 D0 82              2467 	pop	dpl0
   0AC3 D0 F0              2468 	pop	b
   0AC5 D0 E0              2469 	pop	acc
   0AC7 32                 2470 	reti
                           2471 
   0AC8                    2472 usb_ep6in_isr:
   0AC8 C0 E0              2473 	push	acc
   0ACA C0 F0              2474 	push	b
   0ACC C0 82              2475 	push	dpl0
   0ACE C0 83              2476 	push	dph0
   0AD0 C0 D0              2477 	push	psw
   0AD2 75 D0 00           2478 	mov	psw,#0x00
   0AD5 C0 86              2479 	push	dps
   0AD7 75 86 00           2480 	mov	dps,#0
                           2481 	;; clear interrupt
   0ADA E5 91              2482 	mov	a,exif
   0ADC C2 E4              2483 	clr	acc.4
   0ADE F5 91              2484 	mov	exif,a
   0AE0 90 7F A9           2485 	mov	dptr,#IN07IRQ
   0AE3 74 40              2486 	mov	a,#0x40
   0AE5 F0                 2487 	movx	@dptr,a
                           2488 	;; handle interrupt
                           2489 	;; epilogue
   0AE6 D0 86              2490 	pop	dps
   0AE8 D0 D0              2491 	pop	psw
   0AEA D0 83              2492 	pop	dph0
   0AEC D0 82              2493 	pop	dpl0
   0AEE D0 F0              2494 	pop	b
   0AF0 D0 E0              2495 	pop	acc
   0AF2 32                 2496 	reti
                           2497 
   0AF3                    2498 usb_ep6out_isr:
   0AF3 C0 E0              2499 	push	acc
   0AF5 C0 F0              2500 	push	b
   0AF7 C0 82              2501 	push	dpl0
   0AF9 C0 83              2502 	push	dph0
   0AFB C0 D0              2503 	push	psw
   0AFD 75 D0 00           2504 	mov	psw,#0x00
   0B00 C0 86              2505 	push	dps
   0B02 75 86 00           2506 	mov	dps,#0
                           2507 	;; clear interrupt
   0B05 E5 91              2508 	mov	a,exif
   0B07 C2 E4              2509 	clr	acc.4
   0B09 F5 91              2510 	mov	exif,a
   0B0B 90 7F AA           2511 	mov	dptr,#OUT07IRQ
   0B0E 74 40              2512 	mov	a,#0x40
   0B10 F0                 2513 	movx	@dptr,a
                           2514 	;; handle interrupt
                           2515 	;; epilogue
   0B11 D0 86              2516 	pop	dps
   0B13 D0 D0              2517 	pop	psw
   0B15 D0 83              2518 	pop	dph0
   0B17 D0 82              2519 	pop	dpl0
   0B19 D0 F0              2520 	pop	b
   0B1B D0 E0              2521 	pop	acc
   0B1D 32                 2522 	reti
                           2523 
   0B1E                    2524 usb_ep7in_isr:
   0B1E C0 E0              2525 	push	acc
   0B20 C0 F0              2526 	push	b
   0B22 C0 82              2527 	push	dpl0
   0B24 C0 83              2528 	push	dph0
   0B26 C0 D0              2529 	push	psw
   0B28 75 D0 00           2530 	mov	psw,#0x00
   0B2B C0 86              2531 	push	dps
   0B2D 75 86 00           2532 	mov	dps,#0
                           2533 	;; clear interrupt
   0B30 E5 91              2534 	mov	a,exif
   0B32 C2 E4              2535 	clr	acc.4
   0B34 F5 91              2536 	mov	exif,a
   0B36 90 7F A9           2537 	mov	dptr,#IN07IRQ
   0B39 74 80              2538 	mov	a,#0x80
   0B3B F0                 2539 	movx	@dptr,a
                           2540 	;; handle interrupt
                           2541 	;; epilogue
   0B3C D0 86              2542 	pop	dps
   0B3E D0 D0              2543 	pop	psw
   0B40 D0 83              2544 	pop	dph0
   0B42 D0 82              2545 	pop	dpl0
   0B44 D0 F0              2546 	pop	b
   0B46 D0 E0              2547 	pop	acc
   0B48 32                 2548 	reti
                           2549 
   0B49                    2550 usb_ep7out_isr:
   0B49 C0 E0              2551 	push	acc
   0B4B C0 F0              2552 	push	b
   0B4D C0 82              2553 	push	dpl0
   0B4F C0 83              2554 	push	dph0
   0B51 C0 D0              2555 	push	psw
   0B53 75 D0 00           2556 	mov	psw,#0x00
   0B56 C0 86              2557 	push	dps
   0B58 75 86 00           2558 	mov	dps,#0
                           2559 	;; clear interrupt
   0B5B E5 91              2560 	mov	a,exif
   0B5D C2 E4              2561 	clr	acc.4
   0B5F F5 91              2562 	mov	exif,a
   0B61 90 7F AA           2563 	mov	dptr,#OUT07IRQ
   0B64 74 80              2564 	mov	a,#0x80
   0B66 F0                 2565 	movx	@dptr,a
                           2566 	;; handle interrupt
                           2567 	;; epilogue
   0B67 D0 86              2568 	pop	dps
   0B69 D0 D0              2569 	pop	psw
   0B6B D0 83              2570 	pop	dph0
   0B6D D0 82              2571 	pop	dpl0
   0B6F D0 F0              2572 	pop	b
   0B71 D0 E0              2573 	pop	acc
   0B73 32                 2574 	reti
                           2575 	
                           2576 	;; -----------------------------------------------------
                           2577 	;; USB descriptors
                           2578 	;; -----------------------------------------------------
                           2579 
                           2580 	;; Device and/or Interface Class codes
                    0000   2581 	USB_CLASS_PER_INTERFACE         = 0
                    0001   2582 	USB_CLASS_AUDIO                 = 1
                    0002   2583 	USB_CLASS_COMM                  = 2
                    0003   2584 	USB_CLASS_HID                   = 3
                    0007   2585 	USB_CLASS_PRINTER               = 7
                    0008   2586 	USB_CLASS_MASS_STORAGE          = 8
                    0009   2587 	USB_CLASS_HUB                   = 9
                    00FF   2588 	USB_CLASS_VENDOR_SPEC           = 0xff
                           2589 
                    0001   2590 	USB_SUBCLASS_AUDIOCONTROL	= 1
                    0002   2591 	USB_SUBCLASS_AUDIOSTREAMING	= 2
                           2592 	
                           2593 	;; Descriptor types
                    0001   2594 	USB_DT_DEVICE                   = 0x01
                    0002   2595 	USB_DT_CONFIG                   = 0x02
                    0003   2596 	USB_DT_STRING                   = 0x03
                    0004   2597 	USB_DT_INTERFACE                = 0x04
                    0005   2598 	USB_DT_ENDPOINT                 = 0x05
                           2599 
                           2600 	;; Audio Class descriptor types
                    0020   2601 	USB_DT_AUDIO_UNDEFINED		= 0x20
                    0021   2602 	USB_DT_AUDIO_DEVICE		= 0x21
                    0022   2603 	USB_DT_AUDIO_CONFIG		= 0x22
                    0023   2604 	USB_DT_AUDIO_STRING		= 0x23
                    0024   2605 	USB_DT_AUDIO_INTERFACE		= 0x24
                    0025   2606 	USB_DT_AUDIO_ENDPOINT		= 0x25
                           2607 
                    0000   2608 	USB_SDT_AUDIO_UNDEFINED		= 0x00
                    0001   2609 	USB_SDT_AUDIO_HEADER		= 0x01
                    0002   2610 	USB_SDT_AUDIO_INPUT_TERMINAL	= 0x02
                    0003   2611 	USB_SDT_AUDIO_OUTPUT_TERMINAL	= 0x03
                    0004   2612 	USB_SDT_AUDIO_MIXER_UNIT	= 0x04
                    0005   2613 	USB_SDT_AUDIO_SELECTOR_UNIT	= 0x05
                    0006   2614 	USB_SDT_AUDIO_FEATURE_UNIT	= 0x06
                    0007   2615 	USB_SDT_AUDIO_PROCESSING_UNIT	= 0x07
                    0008   2616 	USB_SDT_AUDIO_EXTENSION_UNIT	= 0x08
                           2617 	
                           2618 	;; Standard requests
                    0000   2619 	USB_REQ_GET_STATUS              = 0x00
                    0001   2620 	USB_REQ_CLEAR_FEATURE           = 0x01
                    0003   2621 	USB_REQ_SET_FEATURE             = 0x03
                    0005   2622 	USB_REQ_SET_ADDRESS             = 0x05
                    0006   2623 	USB_REQ_GET_DESCRIPTOR          = 0x06
                    0007   2624 	USB_REQ_SET_DESCRIPTOR          = 0x07
                    0008   2625 	USB_REQ_GET_CONFIGURATION       = 0x08
                    0009   2626 	USB_REQ_SET_CONFIGURATION       = 0x09
                    000A   2627 	USB_REQ_GET_INTERFACE           = 0x0A
                    000B   2628 	USB_REQ_SET_INTERFACE           = 0x0B
                    000C   2629 	USB_REQ_SYNCH_FRAME             = 0x0C
                           2630 
                           2631 	;; Audio Class Requests
                    0001   2632 	USB_REQ_AUDIO_SET_CUR		= 0x01
                    0081   2633 	USB_REQ_AUDIO_GET_CUR		= 0x81
                    0002   2634 	USB_REQ_AUDIO_SET_MIN		= 0x02
                    0082   2635 	USB_REQ_AUDIO_GET_MIN		= 0x82
                    0003   2636 	USB_REQ_AUDIO_SET_MAX		= 0x03
                    0083   2637 	USB_REQ_AUDIO_GET_MAX		= 0x83
                    0004   2638 	USB_REQ_AUDIO_SET_RES		= 0x04
                    0084   2639 	USB_REQ_AUDIO_GET_RES		= 0x84
                    0005   2640 	USB_REQ_AUDIO_SET_MEM		= 0x05
                    0085   2641 	USB_REQ_AUDIO_GET_MEM		= 0x85
                    00FF   2642 	USB_REQ_AUDIO_GET_STAT		= 0xff
                           2643 	
                           2644 	;; USB Request Type and Endpoint Directions
                    0000   2645 	USB_DIR_OUT                     = 0
                    0080   2646 	USB_DIR_IN                      = 0x80
                           2647 
                    0000   2648 	USB_TYPE_STANDARD               = (0x00 << 5)
                    0020   2649 	USB_TYPE_CLASS                  = (0x01 << 5)
                    0040   2650 	USB_TYPE_VENDOR                 = (0x02 << 5)
                    0060   2651 	USB_TYPE_RESERVED               = (0x03 << 5)
                           2652 
                    0000   2653 	USB_RECIP_DEVICE                = 0x00
                    0001   2654 	USB_RECIP_INTERFACE             = 0x01
                    0002   2655 	USB_RECIP_ENDPOINT              = 0x02
                    0003   2656 	USB_RECIP_OTHER                 = 0x03
                           2657 
                           2658 	;; Request target types.
                    0000   2659 	USB_RT_DEVICE                   = 0x00
                    0001   2660 	USB_RT_INTERFACE                = 0x01
                    0002   2661 	USB_RT_ENDPOINT                 = 0x02
                           2662 
                    BAC0   2663 	VENDID	= 0xbac0
                    6137   2664 	PRODID	= 0x6137
                           2665 
   0B74                    2666 devicedescr:
   0B74 12                 2667 	.db	18			; bLength
   0B75 01                 2668 	.db	USB_DT_DEVICE		; bDescriptorType
   0B76 00 01              2669 	.db	0x00, 0x01		; bcdUSB
   0B78 FF                 2670 	.db	USB_CLASS_VENDOR_SPEC	; bDeviceClass
   0B79 00                 2671 	.db	0			; bDeviceSubClass
   0B7A FF                 2672 	.db	0xff			; bDeviceProtocol
   0B7B 40                 2673 	.db	0x40			; bMaxPacketSize0
   0B7C C0 BA              2674 	.db	<VENDID,>VENDID		; idVendor
   0B7E 37 61              2675 	.db	<PRODID,>PRODID		; idProduct
   0B80 01 00              2676 	.db	0x01,0x00		; bcdDevice
   0B82 01                 2677 	.db	1			; iManufacturer
   0B83 02                 2678 	.db	2			; iProduct
   0B84 03                 2679 	.db	3			; iSerialNumber
   0B85 01                 2680 	.db	1			; bNumConfigurations
                           2681 
   0B86                    2682 config0descr:
   0B86 09                 2683 	.db	9			; bLength
   0B87 02                 2684 	.db	USB_DT_CONFIG		; bDescriptorType
   0B88 3B 00              2685 	.db	<config0sz,>config0sz	; wTotalLength
   0B8A 01                 2686 	.db	1			; bNumInterfaces
   0B8B 01                 2687 	.db	1			; bConfigurationValue
   0B8C 00                 2688 	.db	0			; iConfiguration
   0B8D 40                 2689 	.db	0b01000000		; bmAttributs (self powered)
   0B8E 00                 2690 	.db	0			; MaxPower (mA/2) (self powered so 0)
                           2691 	;; standard packet interface (needed so the driver can hook to it)
                           2692 	;; interface descriptor I0:A0
   0B8F 09                 2693 	.db	9			; bLength
   0B90 04                 2694 	.db	USB_DT_INTERFACE	; bDescriptorType
   0B91 00                 2695 	.db	0			; bInterfaceNumber
   0B92 00                 2696 	.db	0			; bAlternateSetting
   0B93 01                 2697 	.db	1			; bNumEndpoints
   0B94 FF                 2698 	.db	0xff			; bInterfaceClass (vendor specific)
   0B95 00                 2699 	.db	0x00			; bInterfaceSubClass
   0B96 FF                 2700 	.db	0xff			; bInterfaceProtocol (vendor specific)
   0B97 00                 2701 	.db	0			; iInterface
                           2702 	;; endpoint descriptor I0:A0:E0
   0B98 07                 2703 	.db	7			; bLength
   0B99 05                 2704 	.db	USB_DT_ENDPOINT		; bDescriptorType
   0B9A 81                 2705 	.db	(USB_DIR_IN | 1)	; bEndpointAddress
   0B9B 02                 2706 	.db	0x02			; bmAttributes (bulk)
   0B9C 40 00              2707 	.db	0x40,0x00		; wMaxPacketSize
   0B9E 00                 2708 	.db	0			; bInterval
                           2709 	;; interface descriptor I0:A1
   0B9F 09                 2710 	.db	9			; bLength
   0BA0 04                 2711 	.db	USB_DT_INTERFACE	; bDescriptorType
   0BA1 00                 2712 	.db	0			; bInterfaceNumber
   0BA2 01                 2713 	.db	1			; bAlternateSetting
   0BA3 03                 2714 	.db	3			; bNumEndpoints
   0BA4 FF                 2715 	.db	0xff			; bInterfaceClass (vendor specific)
   0BA5 00                 2716 	.db	0x00			; bInterfaceSubClass
   0BA6 FF                 2717 	.db	0xff			; bInterfaceProtocol (vendor specific)
   0BA7 00                 2718 	.db	0			; iInterface
                           2719 	;; endpoint descriptor I0:A1:E0
   0BA8 07                 2720 	.db	7			; bLength
   0BA9 05                 2721 	.db	USB_DT_ENDPOINT		; bDescriptorType
   0BAA 81                 2722 	.db	(USB_DIR_IN | 1)	; bEndpointAddress
   0BAB 03                 2723 	.db	0x03			; bmAttributes (interrupt)
   0BAC 40 00              2724 	.db	0x40,0x00		; wMaxPacketSize
   0BAE 08                 2725 	.db	8			; bInterval
                           2726 	;; endpoint descriptor I0:A1:E1
   0BAF 09                 2727 	.db	9			; bLength
   0BB0 05                 2728 	.db	USB_DT_ENDPOINT		; bDescriptorType
   0BB1 88                 2729 	.db	(USB_DIR_IN | 8)	; bEndpointAddress
   0BB2 01                 2730 	.db	0x01			; bmAttributes (iso)
   0BB3                    2731 descinframesize:
   0BB3 02 00              2732 	.db	0x02,0x00		; wMaxPacketSize
   0BB5 01                 2733 	.db	1			; bInterval
   0BB6 00                 2734 	.db	0			; bRefresh
   0BB7 00                 2735 	.db	0			; bSynchAddress
                           2736 	;; endpoint descriptor I0:A1:E2
   0BB8 09                 2737 	.db	9			; bLength
   0BB9 05                 2738 	.db	USB_DT_ENDPOINT		; bDescriptorType
   0BBA 08                 2739 	.db	(USB_DIR_OUT | 8)	; bEndpointAddress
   0BBB 01                 2740 	.db	0x01			; bmAttributes (iso)
   0BBC                    2741 descoutframesize:
   0BBC 02 00              2742 	.db	0x02,0x00		; wMaxPacketSize
   0BBE 01                 2743 	.db	1			; bInterval
   0BBF 00                 2744 	.db	0			; bRefresh
   0BC0 00                 2745 	.db	0			; bSynchAddress
                    003B   2746 config0sz = . - config0descr
                           2747 
   0BC1                    2748 stringdescr:
   0BC1rC9s0B              2749 	.db	<string0,>string0
   0BC3rCDs0B              2750 	.db	<string1,>string1
   0BC5rDBs0B              2751 	.db	<string2,>string2
   0BC7rFBs0B              2752 	.db	<stringserial,>stringserial
                           2753 
                    0004   2754 numstrings = (. - stringdescr)/2
                           2755 
   0BC9                    2756 string0:
   0BC9 04                 2757 	.db	string0sz		; bLength
   0BCA 03                 2758 	.db	USB_DT_STRING		; bDescriptorType
   0BCB 00 00              2759 	.db	0,0			; LANGID[0]: Lang Neutral
                    0004   2760 string0sz = . - string0
                           2761 
   0BCD                    2762 string1:
   0BCD 0E                 2763 	.db	string1sz		; bLength
   0BCE 03                 2764 	.db	USB_DT_STRING		; bDescriptorType
   0BCF 42 00 61 00 79 00  2765 	.db	'B,0,'a,0,'y,0,'c,0,'o,0,'m,0
        63 00 6F 00 6D 00
                    000E   2766 string1sz = . - string1
                           2767 
   0BDB                    2768 string2:
   0BDB 20                 2769 	.db	string2sz		; bLength
   0BDC 03                 2770 	.db	USB_DT_STRING		; bDescriptorType
   0BDD 55 00 53 00 42 00  2771 	.db	'U,0,'S,0,'B,0,'F,0,'L,0,'E,0,'X,0,' ,0
        46 00 4C 00 45 00
        58 00 20 00
   0BED 28 00 41 00 75 00  2772 	.db	'(,0,'A,0,'u,0,'d,0,'i,0,'o,0,'),0
        64 00 69 00 6F 00
        29 00
                    0020   2773 string2sz = . - string2
                           2774 	
   0BFB                    2775 stringserial:
   0BFB 02                 2776 	.db	2			; bLength
   0BFC 03                 2777 	.db	USB_DT_STRING		; bDescriptorType
   0BFD 00 00 00 00 00 00  2778 	.dw	0,0,0,0,0,0,0,0
        00 00 00 00 00 00
        00 00 00 00
   0C0D 00 00 00 00 00 00  2779 	.dw	0,0,0,0,0,0,0,0
        00 00 00 00 00 00
        00 00 00 00
                           2780 
