In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: How about this? [code] ' ------------------------------------------------------------------------- ' Use: LCD_DEC4 value ' -- displays Word value in DEC4 format SUB LCD_DEC4 tmpW1 = __WPARAM12 ' copy output value tmpB2 = tmpW1/1000 ' 1000s tmpW1 = __REMAINDER ' save 100's etc tmpB2 = "0" + tmpB2 LCD_OUT tmpB2 tmpB2 = tmpW1 / 100 ' get 100's digit tmpW1 = __REMAINDER ' save 10's & 1's tmpB2 = "0" + tmpB2 ' make 100's character LCD_OUT tmpB2 ' print it tmpB2 = tmpW1 / 10 ' get 10's digit tmpW1 = __REMAINDER ' save 1's tmpB2 = "0" + tmpB2 ' make 10's character LCD_OUT tmpB2 ' print it tmpB2 = "0" + tmpW1 ' make 1's character LCD_OUT tmpB2 ' print it ENDSUB [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=331481#m331485 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)