[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elementary assembly lang question...
This is probably an elementary question for those who know assembly. I
wouldn't know, I'm still in preschool.
Here is a little section from the T-side of the 8051 LT1. It has to do
with the aldl (or maybe the E <-> T side SCI communication?) message
checksum, I guess...
The question:
Why / What is the function of line BCD7, branch if carry, _back to the
same address_? Is this a hole that the program gets stuck in until some
interrupt digs it out? The cop timer gets reset just before (BCB0 to
BCB6), it wouldn't be waiting for the cop timer to go off, would it? and
then the t counter is compared with whatever is in memory 1986 (BCCD to
BCD1), and then the bcc line I'm wondering about.
I looked a though the anht hac for an example of a branch back to same
address, but couldn't find one myself. Does anyone know of an example of
this sort of thing?
Thanks,
Dale
BCB0 CC 55 AA LBCB0: ldD #$55AA
BCB3 B7 10 3A staA l_103a_hc11reg_coprst
BCB6 F7 10 3A staB l_103a_hc11reg_coprst
BCB9 CC 50 A0 ldD #$50A0
BCBC B7 18 06 staA L1806
BCBF F7 18 06 staB L1806
BCC2 B6 19 88 ldaA L1988
BCC5 81 0F cmpA #$0F
BCC7 22 0E bhi LBCD7
BCC9 26 0E bne LBCD9
BCCB 18 3C pushY
BCCD 18 FE 10 0E ldY l_100ef_hc11reg_tcnt
BCD1 18 BC 19 86 cmpY L1986
BCD5 18 38 popY
BCD7 24 FE LBCD7: bcc LBCD7
BCD9 F6 10 25 LBCD9: ldaB l_1025_hc11reg_tflg2
BCDC C5 80 bitB #%10000000
BCDE 27 09 beq @0
BCE0 C6 80 ldaB #$80
BCE2 F7 10 25 staB l_1025_hc11reg_tflg2
BCE5 4C incA
BCE6 B7 19 88 staA L1988
BCE9 B6 10 2E @0 ldaA l_102e_hc11reg_scsr
BCEC 85 0E bitA #%00001110
BCEE 27 04 beq @1
BCF0 38 popX
BCF1 7E BC 18 jmp LBC18
;
BCF4 B6 10 2E @1 ldaA l_102e_hc11reg_scsr
BCF7 85 20 bitA #%00100000
BCF9 27 B5 beq LBCB0
BCFB B6 10 2F ldaA l_102f_hc11reg_scdr
BCFE 16 tAB
BCFF FB 19 8A addB l_198a_cksum
BD02 F7 19 8A staB l_198a_cksum
BD05 39 ret
____________NetZero Free Internet Access and Email_________
Download Now http://www.netzero.net/download/index.html
Request a CDROM 1-800-333-3633
___________________________________________________________
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo@lists.diy-efi.org