Hi Guys,
Having a problem with blanking a leading zero on a O/C Display II card. I've tried to follow Nico Howto which was very helpful.
I have a four digit display for RPM and when below 1000rpm I want the leading zero supressed. I have run my code thru the IOconsole
in SIOC and it seems to give me the correct values UNTILL I hit > 1000 or 2000 rpm. It then goes weird giving incorrect values.
When operated with the hardware, Master card outputs and other Displays operate even though they are not configured in Sioc.
Could someone please review my code and see where im wrong and correct if possible. My maths and programming skills are
very basic and all help would be appreciated.
Here is the code and thanks
Les

Code:
Var 6020, name rpm, Link FSUIPC_IN, Offset $0898, Length 2, Type 1
{
  L0 = &rpm * 10800
  L1 = L0 / 65536
  L2 = MOD L1 10
  &Digitr = L2
  L2 = MOD L1 100
  &Digitl1 = L2

  L2 = MOD L1 1000
  &Digitl2 = L2

  L2 = Div L1 1000
  IF L2 < 1
 {
  &Digitl3 = -999999
 }
 ELSE
 {
  &Digitl3 = L2  
 }
}


Var 1, name Digitr Link IOCARD_DISPLAY, Digit 0, Numbers 1

Var 2, name Digitl1 Link IOCARD_DISPLAY, Digit 1, Numbers 1
 Var 3, name digitl2 Link IOCARD_DISPLAY, Digit 2, Numbers 1
 Var 4, name Digitl3 Link IOCARD_DISPLAY, Digit 3, Numbers 1