pbFORTH can display a number from the stack with the following word:
LCD_NUMBER (decimal value signed -- )
This word shows the number value on the display. The decimal parameter controls the location of the decimal point, if there is one, while the signed parameter determines whether value
is shown as signed or unsigned. The acceptable values of decimal and signed are shown in Table 6-5 and Table 6-6.
Table 6-5. Values for the decimal Parameter of LCD_NUMBER
Value (in hexadecimal)
Description
3002
No decimal point
3003
One digit after the decimal point
3004
Two digits after the decimal point
3005
Three digits after the decimal point
any value
Single digit on the right of the display (use 3017 for
Table 6-6. Values for the signed Parameter of LCD_NUMBER
Value (in hexadecimal)
Description
3001
Signed, no leading zeros
301F
Unsigned with leading zeros
3017
Single digit on the right of the display (ignores
For example, to display the number -4198, use the following:
Need help?
Do you have a question about the MINDSTORMS Robots and is the answer not in the manual?
Questions and answers