AnsweredAssumed Answered

Float compute error

Question asked by Alon Jun on Jul 28, 2016

PC: Windows XP

IDE: CodeWarrior for S12x V5.1

Chip: S12XEP100

Code:

Snap5.jpg

When run this code, VTST_BattOverCurrTh1_A not equal VTST_BattOverCurrTh2_A and get a wrong value

Snap6.jpg

So I view assembly code,

Snap7.jpg

When execute SEX  A,X  JSR  _FUFLOAT, get a wrong value, it seems SEX  A,X  wrong, compiler's bug?

Original Attachment has been moved to: Project.zip

Outcomes