Page 1 of 1

Beginner's Post

Posted: Mon Sep 14, 2009 6:51 pm
by ahduy
Please, help me...

i am a beginner in c, assembly, and usb., everything i saw in this source code, it always make me want to cry at loud...

i started study assembly part of usb driver:
when i look into assembly part of this usb driver, in this case "usbdrvasm12.inc", in this piece:

rxLoop:
eor x3, shift ;1 [0] reconstruct: x3 is 0 at bit locations we changed, 1 at others
in x1, USBIN ;1 [1] <-- sample bit 0
st y+, x3 ;2 [3] store data
ser x3 ;1 [4]
nop ;1 [5]
eor x2, x1 ;1 [6]
bst x2, USBMINUS;1 [7]
bld shift, 0 ;1 [8]
in x2, USBIN ;1 [9] <-- sample bit 1 (or possibly bit 0 stuffed)
andi x2, USBMASK ;1 [10]
breq se0 ;1 [11] SE0 check for bit 1

source above branch to label "se0".. where can i find those label ?

pleeaaaseee... and thanks before

sorry, my english bad :mrgreen:

Re: Beginner's Post

Posted: Mon Sep 14, 2009 8:53 pm
by Grendel
It's defined in asmcommon.inc:

Code: Select all

;----------------------------------------------------------------------------
; Processing of received packet (numbers in brackets are cycles after center of SE0)
;----------------------------------------------------------------------------
;This is the only non-error exit point for the software receiver loop
;we don't check any CRCs here because there is no time left.
se0:
    subi    cnt, USB_BUFSIZE    ;[5]
    ....

Re: Beginner's Post

Posted: Tue Sep 15, 2009 2:07 am
by ahduy
oh my...
thanks very much., it's only my problems... hahahaha, i'm beginner., fyuuh
grendel, please help if i find any problems again.,
:D