What does this section of code do?!?!
Thread Starter
Supreme Member
iTrader: (2)
Joined: May 2007
Posts: 2,574
Likes: 0
From: right behind you
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
What does this section of code do?!?!
Like the title says. It looks like what's stored to A and B is either overwritten or not used at all. Enlightenment, please?
Code:
;-------------------------------------------------
;
;
;
;-------------------------------------------------
D8D8: BRCLR L0036,#$08,LD8F2 ; BR IF NOT b3, ALDL MODE 4
D8DC: LDAA L0160
D8DF: BITA #$04 ; b2
D8E1: BEQ LD8F2
; ... Else
D8E3: LDAB L0162
D8E6: CLRA
D8E7: PSHB
D8E8: PSHA
D8E9: PULX
D8EA: LDD #$FFFF
D8ED: IDIV
D8EE: STX L00D5
D8F0: BRA LD95A Last edited by bl85c; Oct 14, 2010 at 06:04 PM.
Re: What does this section of code do?!?!
It is a routine to modify the target AFR directly via ALDL Mode 4 and bypass the normal PE AFR calculation.
The value that is loaded into A (L0160) is a status bit that is checked before proceeding.
The value that is loaded into B (L0162) is the new AFR from the Mode 4 command message.
The value that is loaded into A (L0160) is a status bit that is checked before proceeding.
The value that is loaded into B (L0162) is the new AFR from the Mode 4 command message.
Last edited by tequilaboy; Oct 15, 2010 at 07:47 PM.
Member
Joined: Oct 2005
Posts: 330
Likes: 0
From: Dyer, In
Car: 91 Camaro RS
Engine: 355 Vortec
Transmission: 700r4
Axle/Gears: 3.42
Re: What does this section of code do?!?!
Like the title says. It looks like what's stored to A and B is either overwritten or not used at all. Enlightenment, please?
Code:
;-------------------------------------------------
;
;
;
;-------------------------------------------------
D8D8: BRCLR L0036,#$08,LD8F2 ; BR IF NOT b3, ALDL MODE 4
D8DC: LDAA L0160
D8DF: BITA #$04 ; b2
D8E1: BEQ LD8F2
; ... Else
D8E3: LDAB L0162
D8E6: CLRA
D8E7: PSHB
D8E8: PSHA
D8E9: PULX
D8EA: LDD #$FFFF
D8ED: IDIV
D8EE: STX L00D5
D8F0: BRA LD95A So.....
L00D5 = ffffh/L0162
Hope that makes sense.
Last edited by alvanwie; Oct 15, 2010 at 07:29 PM.
Thread Starter
Supreme Member
iTrader: (2)
Joined: May 2007
Posts: 2,574
Likes: 0
From: right behind you
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: What does this section of code do?!?!
Ah, I'm reading it wrong then. Looks to me like what was loaded onto A was subsequently cleared then commanded to push to the stack. So why is there a clear A command before A is put on the stack?
Member
Joined: Oct 2005
Posts: 330
Likes: 0
From: Dyer, In
Car: 91 Camaro RS
Engine: 355 Vortec
Transmission: 700r4
Axle/Gears: 3.42
Re: What does this section of code do?!?!
Sorry, looks like i got that slightly wrong.
B is loaded with the value from L0162 and A is cleared to zero. These 8 bit values are pushed onto the stack B first then A. They are then popped off of the stack into the 16 bit X register (high byte first) so effectively X (16 bit) contains the value from L0162.
So,,,
L00D5 (16 bit) = ffffh/L0162
B is loaded with the value from L0162 and A is cleared to zero. These 8 bit values are pushed onto the stack B first then A. They are then popped off of the stack into the 16 bit X register (high byte first) so effectively X (16 bit) contains the value from L0162.
So,,,
L00D5 (16 bit) = ffffh/L0162
Thread Starter
Supreme Member
iTrader: (2)
Joined: May 2007
Posts: 2,574
Likes: 0
From: right behind you
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: What does this section of code do?!?!
Thanks, that helps me with what I'm writing. Finding enough space for this hack is getting tedious.
Thread
Thread Starter
Forum
Replies
Last Post






