{"id":2587,"date":"2025-04-16T06:16:25","date_gmt":"2025-04-16T06:16:25","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2587"},"modified":"2025-06-10T11:57:35","modified_gmt":"2025-06-10T11:57:35","slug":"iiprinttext-desttext-string-d-23","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/","title":{"rendered":"iiPrintText dest#,text-string [D >= 23]"},"content":{"rendered":"\n<p>Print text.<\/p>\n\n\n\n<p>The text string given in the instruction will be sent to the destination called for in&nbsp;<em>dest<\/em>. If&nbsp;<em>dest<\/em>&nbsp;is a valid RAM address, the result will be written to RAM in successive bytes. You can use that to write to an Xwire buffer, for example. If&nbsp;<em>dest<\/em>&nbsp;is the address of a serial port, then the data will be sent out that serial port.<\/p>\n\n\n\n<p>The maximum number of bytes per message to the serial port is 255. However, the serial transmit buffer is 128 bytes (which could change in future\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o370\">Firmware<\/a>\u00a0revisions). If you try to send out more than the buffer can hold, your program will stall until there is room in the buffer (this is your whole program, not just a single MultiTrack task). You can avoid this by using\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/\">COMTx_Space<\/a><\/code>\u00a0to ensure there is room before attempting to output.<\/p>\n\n\n\n<p>The text &#8220;string&#8221; can be a comma-delimited list of bytes in any of the following formats:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Example<\/th><th>Max value<\/th><th>Description<\/th><\/tr><tr><td>23<\/td><td>255<\/td><td>Decimal constant<\/td><\/tr><tr><td>&#8216;A3<\/td><td>&#8216;FF<\/td><td>Hex constant<\/td><\/tr><tr><td>%10101100<\/td><td>%11111111<\/td><td>Binary constant<\/td><\/tr><tr><td>&#8220;Hello&#8221;<\/td><td>&nbsp;<\/td><td>A quoted text string<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Strings may be any printable characters, enclosed in quotes. A quotation mark is represented by two quotation marks in a row, viz &#8220;&#8221;<\/p>\n\n\n\n<p>Any number of individual bytes, words and strings may be concatenated, with commas separating them. Spaces are not allowed except within quoted strings.<\/p>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">   #Open_Serial User( 38400, 8, n )<br><br>_Loop<br>   iiPrintText 251,\"The quick brown fox\",'0D,'0A<br>   Pause  100<br>   Goto _Loop<\/pre>\n\n\n\n<p>This example will configure the default serial port, then print the quoted message followed by&nbsp;<code>'0D<\/code>&nbsp;(carriage return) and&nbsp;<code>'0A<\/code>&nbsp;(line feed).&nbsp; It will then wait 1 second before printing the message again.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">iiPrintText\tXWBuf,'FF,'09,'E3,'67,'FF<\/pre>\n\n\n\n<p>This example would print a series of hexadecimal bytes, perhaps destined for an Xwire peripheral that can make sense of them.<\/p>\n\n\n\n<p>This instruction is automatically indexed.<\/p>\n\n\n\n<p>When printing to&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o414\">RAM<\/a>&nbsp;the index register&nbsp;<code>I<\/code>&nbsp;is added to the dest address and the result is stored in that location.&nbsp;<code>I<\/code>&nbsp;is then incremented by the number of characters stored. This allows several things to be &#8220;printed&#8221; to RAM.<\/p>\n\n\n\n<p>&#8220;Printing&#8221; to RAM is typically used for communicating with an Xwire peripheral.<\/p>\n\n\n\n<p>The&nbsp;<em>dest<\/em>&nbsp;argument determines where the result of the instruction is directed.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Destination address (<em>dest)<\/em><\/td><td>Where the result is directed<\/td><\/tr><tr><td>0 &#8211; 249<\/td><td>The result is stored in successive RAM locations, starting at&nbsp;<em>dest.<\/em>&nbsp;It will occupy as many RAM locations as are needed to contain the result, one location per character. For example, the result of&nbsp;<code>iifPrintWFW 25,7,3<\/code>&nbsp;will occupy 7 bytes, RAM locations 25 through 31, because the format specifier calls for 7 digits of output. A run-time error will occur if the output over-runs the end of RAM (address 249). Using RAM as the destination is particularly useful for sending data out on Xwire.<strong>Note: These addresses are not&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3499\">jndexed<\/a><\/strong>. Instead they use&nbsp;<code>I<\/code>&nbsp;as an offset from the&nbsp;<em>dest<\/em>&nbsp;address, and automatically increment&nbsp;<code>I<\/code>&nbsp;by the number of bytes stored in RAM by the instruction.<\/td><\/tr><tr><td>251 &#8211; 254<\/td><td>The result is directed to the serial port at the address given, providing the selected protocol is &#8220;User programmable&#8221;, and that the controller you are programming has a serial port at that address. This is the primary means of generating any arbitrary serial output under program control.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\"> <\/pre>\n\n\n\n<p><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2825\">Dialect<\/a>&nbsp;restriction: This instruction is not implemented in boards with dialect numbers less than 23.<\/p>\n\n\n\n<p>See also&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprintnvtext-dest-d27\/\">iiPrintNVText<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Print text. The text string given in the instruction will be sent to the destination called for in&nbsp;dest. If&nbsp;dest&nbsp;is a valid RAM address, the result&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2572,"menu_order":13,"template":"","class_list":["post-2587","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>iiPrintText dest#,text-string [D &gt;= 23] - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"iiPrintText dest#,text-string [D &gt;= 23] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Print text. The text string given in the instruction will be sent to the destination called for in&nbsp;dest. If&nbsp;dest&nbsp;is a valid RAM address, the result...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T11:57:35+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/\",\"name\":\"iiPrintText dest#,text-string [D >= 23] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-16T06:16:25+00:00\",\"dateModified\":\"2025-06-10T11:57:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming reference\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Instructions arranged by function\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Index register instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"iiPrintText dest#,text-string [D >= 23]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"iiPrintText dest#,text-string [D >= 23] - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"iiPrintText dest#,text-string [D >= 23] - SPLat Controls","og_description":"Print text. The text string given in the instruction will be sent to the destination called for in&nbsp;dest. If&nbsp;dest&nbsp;is a valid RAM address, the result...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T11:57:35+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/","name":"iiPrintText dest#,text-string [D >= 23] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-16T06:16:25+00:00","dateModified":"2025-06-10T11:57:35+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/iiprinttext-desttext-string-d-23\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Programming reference","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/"},{"@type":"ListItem","position":3,"name":"Instructions arranged by function","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/"},{"@type":"ListItem","position":4,"name":"Index register instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/index-register-instructions\/"},{"@type":"ListItem","position":5,"name":"iiPrintText dest#,text-string [D >= 23]"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2572"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}