Elementary assembly lang question...

Ludis Langens ludis at cruzers.com
Sat Nov 4 03:00:02 GMT 2000


Dale Klein wrote:
> 
>         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.
> 
> 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

I'd say it's waiting for the ECM to get reset by the COP timer.  Older
C3's tend to have code something like this - ie a conditional branch to
itself.  Error conditions cause these infinite loops.  The C3's use this
to exit bench test mode - once the input forcing bech test is gone, the
program inifinite loops until the watchdog resets it.

-- 
Ludis Langens                               ludis (at) cruzers (dot) com
Mac, Fiero, & engine controller goodies:  http://www.cruzers.com/~ludis/


----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org




More information about the Gmecm mailing list