In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: The device ID is not available to our programs at run time; you'll have to create a duplicate z-string in a DATA statement for use in TX_OUT as above (by the way, that's an outdated subroutine -- see below). The ID is included in the assembled code and can be read by using the IDE's Run\Device menu. This allows us to create a hex file of a program (to protect the source from others) and still have it be identified (once the hex file is loaded into the that dialog). To keep things trimmer and less complicated I use TX_BYTE and TX_STR in my programs; here are the latest: [code]' Use: TX_BYTE byteVal ' -- transmit "byteVal" at "BaudMode" on pin "TX" SUB TX_BYTE tmpB1 = __PARAM1 ' get byte to send SEROUT TX, BaudMode, tmpB1 ENDSUB ' ------------------------------------------------------------------------- ' Use: TX_STR [string | label] ' -- "string" is an embedded string constant ' -- "label" is DATA statement label for stored z-String SUB TX_STR tmpW1 = __WPARAM12 ' get address of string DO READINC tmpW1, tmpB1 ' read a character IF tmpB1 = 0 THEN EXIT ' if 0, string complete TX_BYTE tmpB1 ' send character LOOP 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=197972#m197974 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)