{"id":2326,"date":"2025-04-15T10:14:34","date_gmt":"2025-04-15T10:14:34","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2326"},"modified":"2025-06-10T07:00:21","modified_gmt":"2025-06-10T07:00:21","slug":"iigethex-bbnn-d28","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/","title":{"rendered":"iiGetHex bb#,nn [D>=28]"},"content":{"rendered":"\n<p>Extract (Get) a (8-bit) ASCII coded (printable) hexadecimal number from a buffer in&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o414\">RAM<\/a>.<\/p>\n\n\n\n<p>Consider an Xwire receive data block to be\u00a0<code>nn<\/code>\u00a0bytes of RAM starting at address\u00a0<code>bb<\/code>. Extract a hexadecimal number from the data block, starting at RAM address\u00a0<code>bb+I<\/code>\u00a0(i.e. the starting address is indexed). Skip any leading spaces. Process at most 2 hexadecimal digits. Terminate on anything that&#8217;s not a hex digit. Advance\u00a0<code>I<\/code>\u00a0past the characters used, leaving it pointing at the terminating character (auto-index). Result in\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3808\">X<\/a>, 0 if nothing there. R register signals outcome. 0 = OK, 1 = no valid hexadecimal number present. This instruction is not case sensitive.<\/p>\n\n\n\n<p>Notes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Typically used for receiving ASCII-coded information from an Xwire peripheral board.<\/li>\n\n\n\n<li>Conversion will end on the first unexpected character or after 2 hexadecimal digits.<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2825\">Dialect<\/a>&nbsp;exclusions: Not available in dialects before 28<\/p>\n\n\n\n<p>See also:&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/counting-and-related-instructions\/iifprintwfw-destfp-d23\/\">iifPrintWFW<\/a><\/code>,&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/counting-and-related-instructions\/iifprintwvw-destfp-d23\/\">iifPrintWVW<\/a><\/code>,<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example<\/h6>\n\n\n\n<p>The following program will write some test data to RAM (<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iiprinttext-desttext-string-d-23\/\">iiPrintText<\/a><\/code>) and then loop around extracting hexadecimal numbers from the data. To try the program yourself in SPLat\/PC (simulation).:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Launch SPLat\/PC.<\/li>\n\n\n\n<li>Set the dialect to 28 (<code>File&gt;Configure&gt;Dialect<\/code>). If you don&#8217;t have you will need to&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/download\/splat-pc-32-bit\/\">upgrade SPLat\/PC<\/a>.<\/li>\n\n\n\n<li>Copy the code below into the edit window.<\/li>\n\n\n\n<li>Display the registers (type&nbsp;<code>CTRL+R<\/code>)<\/li>\n\n\n\n<li>Set a breakpoint on the last line (position the cursor and press&nbsp;<code>F9<\/code>)<\/li>\n\n\n\n<li>Reset everything by typing&nbsp;<code>CTRL+F7<\/code>.<\/li>\n\n\n\n<li>Press&nbsp;<code>F5<\/code>&nbsp;repeatedly, and look at the result in X, I and R each time.<\/li>\n\n\n\n<li>Type&nbsp;<code>CTRL+F7<\/code>&nbsp;at any time to start again.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">XWBuffer        mEQU    100\nBufLen          EQU     30\n\n        LoadI   0\n        iiPrintText      XWBuffer,\"1 2    A   AB DEFedcba9876543210abcdef\"\n        ;                          012345678901234567890123456789\n\n        LoadI   0\nAgin:\n        iiGetHex        XWBuffer,BufLen\n        GoTo            Agin  ;&lt;&lt;&lt;&lt;&lt;&lt;  Breakpoint here\n                           <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Extract (Get) a (8-bit) ASCII coded (printable) hexadecimal number from a buffer in&nbsp;RAM. Consider an Xwire receive data block to be\u00a0nn\u00a0bytes of RAM starting at&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2256,"menu_order":9,"template":"","class_list":["post-2326","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>iiGetHex bb#,nn [D&gt;=28] - 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=\"iiGetHex bb#,nn [D&gt;=28] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Extract (Get) a (8-bit) ASCII coded (printable) hexadecimal number from a buffer in&nbsp;RAM. Consider an Xwire receive data block to be\u00a0nn\u00a0bytes of RAM starting at...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T07:00:21+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=\"1 minute\" \/>\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\/communications-instructions\/iigethex-bbnn-d28\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/\",\"name\":\"iiGetHex bb#,nn [D>=28] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T10:14:34+00:00\",\"dateModified\":\"2025-06-10T07:00:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/#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\":\"Communications instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"iiGetHex bb#,nn [D>=28]\"}]},{\"@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":"iiGetHex bb#,nn [D>=28] - 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":"iiGetHex bb#,nn [D>=28] - SPLat Controls","og_description":"Extract (Get) a (8-bit) ASCII coded (printable) hexadecimal number from a buffer in&nbsp;RAM. Consider an Xwire receive data block to be\u00a0nn\u00a0bytes of RAM starting at...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T07:00:21+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/","name":"iiGetHex bb#,nn [D>=28] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T10:14:34+00:00","dateModified":"2025-06-10T07:00:21+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iigethex-bbnn-d28\/#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":"Communications instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/"},{"@type":"ListItem","position":5,"name":"iiGetHex bb#,nn [D>=28]"}]},{"@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\/2326","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\/2256"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}