Lines Matching refs:a
189 .org 0x100H ; wants to be on a page boundary
221 clr a
222 mov tx_ring_in, a
223 mov tx_ring_out, a
224 mov rx_ring_in, a
225 mov rx_ring_out, a
226 mov tx_unthrottle_threshold, a
232 mov a, #0xfe
235 movx @dptr, a
239 mov a, #0xfd
242 movx @dptr, a
249 mov a, #0xBf
250 movx @dptr, a
252 mov a, #0xef
253 movx @dptr, a
256 mov a, #0x10
258 movx @dptr,a
261 mov a, #0x00
263 movx @dptr,a
266 mov a, #0x40
268 movx @dptr,a
271 mov a, #0x00
273 movx @dptr,a
276 mov a, #0x82
278 movx @dptr,a
283 mov a, #0x03
284 movx @dptr, a
289 movx a,@dptr
291 movx @dptr, a
293 mov a,#0x01 ; enable SUDAV: setup data available (for ep0)
295 movx @dptr, a ; clear SUDAVI
297 movx @dptr, a
300 mov a,#0x04 ; enable IN2 int
301 movx @dptr, a
304 mov a,#0x04 ; enable OUT2 int
305 movx @dptr, a
307 movx @dptr, a ; arm OUT2
309 ;; mov a, #0x84 ; turn on RTS, DTR
311 ;; movx @dptr, a
313 mov a, #0x7 ; turn on DTR
315 movx @dptr, a
317 mov a, #0x20 ; turn on the RED led
319 movx @dptr, a
321 mov a, #0x80 ; turn on RTS
323 movx @dptr, a
326 mov a,#0x53 ; mode 1, enable rx, clear int
327 mov SCON, a
347 mov a, #0x41
349 mov SBUF, a
350 inc a
351 anl a, #0x3F
352 orl a, #0x40
353 ; xrl a, #0x02
368 mov a, #0
369 mov dps, a
371 mov a, #0x02 ; DISCON=0, DISCOE=0, RENUM=1
372 movx @dptr, a
383 mov a, #0x06 ; DISCON=0, DISCOE=1, RENUM=1
384 movx @dptr, a
399 mov a,EXIF
401 mov EXIF,a ; clear INT2 first
403 mov a,#01h
404 movx @dptr,a
408 movx a, @dptr
409 mov r1, a ; r1 = bmRequestType
411 movx a, @dptr
412 mov r2, a ; r2 = bRequest
414 movx a, @dptr
415 mov r3, a ; r3 = wValueL
417 movx a, @dptr
418 mov r4, a ; r4 = wValueH
421 mov a, r1
422 anl a, #0x60
423 cjne a, #0x00, setup_bmreq_type_not_standard
428 ;; a still has bmreq&0x60
429 cjne a, #0x40, setup_bmreq_type_not_vendor
458 movx a, @dptr
459 orl a, #0x02
460 movx @dptr, a
465 movx a, @dptr
466 anl a, #0xfd ; ~0x02
467 movx @dptr, a
469 movx a, @dptr
470 anl a, #0xfd ; ~0x02
471 movx @dptr, a
482 mov a, tx_ring_out
484 subb a, tx_ring_in ; out-1-in = 255 - (in-out)
489 mov a, tx_ring_in
491 subb a, tx_ring_out ; in-out
516 clr a
517 movx @dptr, a
519 movx @dptr, a
521 mov a, #2
522 movx @dptr, a
541 ;; Clear_Feature(stall). should clear a stall bit. TODO
554 ;; Set_Feature(stall). Should set a stall bit. TODO
569 mov a, #HIGH(desc_device)
570 movx @dptr, a
572 mov a, #LOW(desc_device)
573 movx @dptr, a
581 mov a, #HIGH(desc_config1)
582 movx @dptr, a
584 mov a, #LOW(desc_config1)
585 movx @dptr, a
591 mov a, #((desc_strings_end-desc_strings)/2)
593 subb a,r3 ; a=4, r3 = 0..3 . if a<=0 then stall
596 mov a, r3
597 add a, r3 ; a = 2*wValueL
599 add a, dpl
600 mov dpl, a
601 mov a, #0
602 addc a, dph
603 mov dph, a ; dph = desc_strings[a]. big endian! (handy)
604 ;; it looks like my adapter uses a revision of the EZUSB that
613 ;; leftover strings). Writing this out by hand is a nuisance, so for
615 movx a, @dptr
616 mov r1, a
618 movx a, @dptr
619 mov r2, a
621 mov a, r1
622 movx @dptr, a
624 mov a, r2
625 movx @dptr, a
636 mov a, #1
639 movx @dptr, a
640 mov a, #1
642 movx @dptr, a
650 ;; 0a: Get_Interface. get the current altsetting for int[wIndexL]
651 ;; since we only have one interface, ignore wIndexL, return a 0
652 mov a, #0
665 mov a, #0x02
666 movx @dptr, a
672 movx a, @dptr
673 orl a, EP0STALLbit
674 movx @dptr, a
689 ;; verify a < 10
690 mov a, r3
693 subb a, #10
695 mov a, r3
696 rl a ; a = index*2
697 add a, #LOW(baud_table)
698 mov dpl, a
699 mov a, #HIGH(baud_table)
700 addc a, #0
701 mov dph, a
705 movx a,@dptr ; BAUD_HIGH
706 mov RCAP2H, a
707 mov TH2, a
709 movx a,@dptr ; BAUD_LOW
710 mov RCAP2L, a
711 mov TL2, a
725 mov a, r3 ; wValue[0] holds new bits: b7 is new RTS
726 xrl a, #0xff ; 1 means active, 0V, +12V ?
727 anl a, #0x80
728 mov r3, a
730 movx a, @dptr ; only change bit 7
731 anl a, #0x7F ; ~0x84
732 orl a, r3
733 movx @dptr, a ; other pins are inputs, bits ignored
737 movx a, @dptr
738 xrl a, #0xff
750 mov a,EXIF
752 mov EXIF,a ; clear INT2 first
754 mov a,#04h
755 movx @dptr,a
757 mov a, #0x20 ; Turn off the green LED
759 movx @dptr, a
765 mov a, #0x20 ; Turn off the green LED
767 movx @dptr, a
787 mov a, #0x10 ; Turn the green LED
789 movx @dptr, a
793 mov a,EXIF
795 mov EXIF,a ; clear INT2 first
797 mov a,#04h
798 movx @dptr,a
804 movx a,@dptr
805 mov r1, a
806 clr a
807 mov dps, a
812 movx a,@dptr ; read
815 movx @dptr,a ; store
816 mov a,dpl1
817 cjne a, tx_ring_out, OUT_no_overflow
831 movx @dptr,a
837 mov a, #0x20 ; Turn off the green LED
839 movx @dptr, a
850 ;; fill in EP4in with a debugging message:
856 clr a
857 mov dps, a
860 movx a, @dptr
864 mov a, tx_ring_in
865 movx @dptr, a
867 mov a, tx_ring_out
868 movx @dptr, a
871 mov a, rx_ring_in
872 movx @dptr, a
874 mov a, rx_ring_out
875 movx @dptr, a
878 clr a
880 inc a
882 movx @dptr, a
889 movx a, @dptr
892 movx @dptr, a
898 mov a, #0xfc
899 movx @dptr, a
907 movx a, @dptr
910 movx @dptr, a
916 clr a
917 mov dps, a
919 mov a, #38
920 movx @dptr, a
931 mov a, tx_ring_in
932 cjne a,tx_ring_out, start_tx__work
939 movx a, @dptr
940 mov sbuf, a
945 mov a, #0
946 cjne a, tx_unthrottle_threshold, start_tx__maybe_unthrottle_tx
952 mov a, tx_ring_out
954 subb a, tx_ring_in
955 ;; a is now write_room. If thresh >= a, we can unthrottle
957 subb a, tx_unthrottle_threshold
959 ;; yes, we can unthrottle. remove the threshold and mark a request
996 mov a, sbuf
997 movx @dptr, a
999 mov a, dpl
1000 cjne a, rx_ring_out, get_rx_char__no_overflow
1011 mov a,#0x10
1013 movx @dptr,a
1016 movx a, @dptr
1019 ;; see if there is any work to do. a serial interrupt might occur
1021 mov a, rx_ring_in
1022 cjne a, rx_ring_out, start_in__have_work
1026 clr a
1027 mov dps, a
1031 movx @dptr, a ; in[0] signals that rest of IN is rx data
1037 mov a, rx_ring_in
1038 cjne a, rx_ring_out, start_in__still_copying
1043 movx a, @dptr
1045 movx @dptr, a ; write into IN buffer
1053 mov a, #0x10 ; Turn the green LED
1055 movx @dptr, a
1057 mov a, r1
1059 movx @dptr, a
1065 ;; special sequence: send a tx unthrottle message
1067 clr a
1068 mov dps, a
1070 mov a, #1
1071 movx @dptr, a
1073 mov a, #2
1074 movx @dptr, a
1076 movx @dptr, a
1081 mov SBUF, a
1142 ;; *that* is a pain in the ass to encode. And they are little-endian