Michał Lankosz
Guest
Sun Mar 21, 2010 9:12 pm
Jak zinterpretować zapis poniższy skoków? Co to za etykiety czy wartości "1"
i "1f"?
Fragment znajduje się w pliku i2cmaster.S pobranym ze strony
http://jump.to/fleury
;*************************************************************************
; delay half period
; For I2C in normal mode (100kHz), use T/2 > 5us
; For I2C in fast mode (400kHz), use T/2 > 1.3us
;*************************************************************************
.stabs "",100,0,0,i2c_delay_T2
.stabs "i2cmaster.S",100,0,0,i2c_delay_T2
.func i2c_delay_T2 ; delay 5.0 microsec with 4 Mhz crystal
i2c_delay_T2: ; 4 cycles
rjmp 1f ; 2 "
1: rjmp 2f ; 2 "
2: rjmp 3f ; 2 "
3: rjmp 4f ; 2 "
4: rjmp 5f ; 2 "
5: rjmp 6f ; 2 "
6: nop ; 1 "
ret ; 3 "
.endfunc ; total 20 cyles = 5.0 microsec with 4 Mhz crystal
Michał
Zbych
Guest
Sun Mar 21, 2010 9:27 pm
Michał Lankosz przemówił ludzkim głosem:
Quote:
Jak zinterpretować zapis poniższy skoków? Co to za etykiety czy wartości "1"
i "1f"?
A do manuala zajrzałeś?
Local labels help compilers and programmers use names temporarily. They
create symbols which are guaranteed to be unique over the entire scope
of the input source code and which can be referred to by a simple
notation. To define a local label, write a label of the form N: (where
N represents any positive integer). To refer to the most recent previous
definition of that label write Nb, using the same number as when you
defined the label. To refer to the next definition of a local label,
write Nfthe b stands for backwards and the f stands for forwards.
Here is an example:
1: branch 1f
2: branch 1b
1: branch 2f
2: branch 1b
Which is the equivalent of:
label_1: branch label_3
label_2: branch label_1
label_3: branch label_4
label_4: branch label_3
Michał Lankosz
Guest
Sun Mar 21, 2010 9:57 pm
Użytkownik "Zbych" <abuse@onet.pl> napisał w wiadomości
news:ho5vj9$2bb7$1@news.mm.pl...
Quote:
Michał Lankosz przemówił ludzkim głosem:
Jak zinterpretować zapis poniższy skoków? Co to za etykiety czy wartości
"1"
i "1f"?
A do manuala zajrzałeś?
Może słabo i nie tam gdzie trzeba szukałem. Poza tym też nie bardzo
wiedziałem, czego szukam.
Dziękuję za pomoc.
Michał