Figure 6-3.
The RCX's display
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
signed)
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 decimal)
For example, to display the number -4198, use the following:
3002 -1066 3001 LCD_NUMBER LCD_REFRESH