Hello,
My project works not no bad but I'm facing a strange problem.
I have a c calculation (it can be interrupted by timer interrupt which doent modify the registers of the calculation)
long n;
TleValueAvg is int
Range is uint
In this first case the calculation of n works fine
253 n = (long)(RamRO.Tle[1].TleValueAvg);//
8be3: 32026E LDHX 0x026E
8be6: 9F TXA
8be7: 8B PSHH
8be8: 88 PULX
8be9: 87 PSHA
8bea: CD9C46 JSR 0x9C46 _SEXT16_32 (0x9c46)
8bed: 95 TSX
8bee: AF06 AIX #6
8bf0: CD9C2C JSR 0x9C2C _POP32 (0x9c2c)
256 n = n * Data.Tle[0].Range;
8bf3: 328016 LDHX 0x8016
8bf6: 4F CLRA
8bf7: 89 PSHX
8bf8: 8B PSHH
8bf9: 87 PSHA
8bfa: 87 PSHA
8bfb: 95 TSX
8bfc: 89 PSHX
8bfd: 8B PSHH
8bfe: AF06 AIX #6
8c00: 89 PSHX
8c01: 8B PSHH
8c02: 9EFE03 LDHX 3,SP
8c05: CD9BEA JSR 0x9BEA _LMUL (0x9bea)
8c08: 95 TSX
8c09: AF0C AIX #12
8c0b: CD9C2C JSR 0x9C2C _POP32 (0x9c2c)
In this second case, the calculation of n return errors
n = f9f9f6a0 instead of fffff6a0
or n = fdfdfce0
My concern is that there is an access to 0x0230 which has nothing yo do with this calculation
I use very often this kind of code and I'm afraid of the errors it could create
Thanks very much for the help
francois
253 n = (long)(RamRO.Tle[1].TleValueAvg) * Data.Tle[0].Range;
8be3: 32026E LDHX 0x026E
8be6: 9F TXA
8be7: 8B PSHH
8be8: 88 PULX
8be9: 87 PSHA
8bea: CD9C37 JSR 0x9C37 _SEXT16_32 (0x9c37)
8bed: C68017 LDA 0x8017
8bf0: CE8016 LDX 0x8016
8bf3: 87 PSHA
8bf4: 89 PSHX
8bf5: C60230 LDA 0x0230
8bf8: 87 PSHA
8bf9: 87 PSHA
8bfa: 95 TSX
8bfb: 89 PSHX
8bfc: 8B PSHH
8bfd: AF04 AIX #4
8bff: CD9BDB JSR 0x9BDB _LMUL (0x9bdb)
8c02: AF07 AIX #7
8c04: CD9C1D JSR 0x9C1D _POP32 (0x9c1d)