> Also, don't
> use any generic routines that are capable of doing anything
> you don't
> need (like print.jal, which is capable of handling dwords).

I'm not sure if the dword capability needs code words, if the dwords procedure 
isn't called, it's not compiled. 

But you're right, that's a good point to save code words. You're outputting a 
10-bit value through a procedure that can output 16-bit values. That's a waste 
of code. And, the "print" procedures are very readable, but they use divisions 
by 10, which uses lots of code space.

To output the value, you could be saving space by, e.g...

if Volt<1000 then 
  serial_data='0'
else
  serial_data='1'
  Volt=Volt-1000
end if 

var byte digit='0'
While Volt >100 loop 
  digit=digit+1
  Volt=Volt-100
end loop
serial_data= digit

digit='0'
While byte(Volt) >10 loop -- no need to check the upper byte, it's zero
  digit=digit+1
  Volt=byte(Volt)-10
end loop
serial_data= digit

serial_data= Volt+'0'

So, instead of four or five divisions in "print", you have two little loops 
that only contain additions and subtractions. Without having compiled, I bet 
that would save quite a bit of code space.

Greets,
Kiste


-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to