{"id":2202,"date":"2025-04-15T08:19:19","date_gmt":"2025-04-15T08:19:19","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2202"},"modified":"2025-05-02T06:21:27","modified_gmt":"2025-05-02T06:21:27","slug":"sub-d23","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/","title":{"rendered":"SUB [D>=23]"},"content":{"rendered":"\n<p><code>X = Y - X; R:0 = &lt;carry&gt;; (Y = T; Z = T)<\/code><\/p>\n\n\n\n<p>Binary 8-bit subtraction of\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3808\">X<\/a>\u00a0from Y.\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/stack-instructions\/pop\/\">Pop<\/a>s the operands off the stack, leaves the result in X. If the subtraction produces a borrow, sets the carry flag.<\/p>\n\n\n\n<p>The R register does double duty as result flags for binary arithmetic instructions.<\/p>\n\n\n\n<p>From dialect 23 bit 0 of R is the carry flag. A carry out of an<code> ADD, ADC, SUB<\/code>&nbsp;or&nbsp;<code>SBC<\/code>&nbsp;instruction will set bit 0 of R.<\/p>\n\n\n\n<p>The same bit 0 then acts as the carry input to&nbsp;<code>ADC<\/code>&nbsp;and&nbsp;<code>SBC<\/code>.<\/p>\n\n\n\n<p>See also\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/add-d23\/\">ADD<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/adc-d23\/\">ADC<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sbc-d23\/\">SBC<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/stack-instructions\/rtox-d23\/\">RtoX<\/a><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>X = Y &#8211; X; R:0 = &lt;carry&gt;; (Y = T; Z = T) Binary 8-bit subtraction of\u00a0X\u00a0from Y.\u00a0Pops the operands off the stack, leaves&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2199,"menu_order":2,"template":"","class_list":["post-2202","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>SUB [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=\"SUB [D&gt;=23] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"X = Y - X; R:0 = &lt;carry&gt;; (Y = T; Z = T) Binary 8-bit subtraction of\u00a0X\u00a0from Y.\u00a0Pops the operands off the stack, leaves...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-02T06:21:27+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\/arithmetic-8-bit-integer-instructions\/sub-d23\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/\",\"name\":\"SUB [D>=23] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T08:19:19+00:00\",\"dateModified\":\"2025-05-02T06:21:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/#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\":\"Arithmetic (8 bit integer) instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SUB [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":"SUB [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":"SUB [D>=23] - SPLat Controls","og_description":"X = Y - X; R:0 = &lt;carry&gt;; (Y = T; Z = T) Binary 8-bit subtraction of\u00a0X\u00a0from Y.\u00a0Pops the operands off the stack, leaves...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/","og_site_name":"SPLat Controls","article_modified_time":"2025-05-02T06:21:27+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\/arithmetic-8-bit-integer-instructions\/sub-d23\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/","name":"SUB [D>=23] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T08:19:19+00:00","dateModified":"2025-05-02T06:21:27+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/sub-d23\/#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":"Arithmetic (8 bit integer) instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/arithmetic-8-bit-integer-instructions\/"},{"@type":"ListItem","position":5,"name":"SUB [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\/2202","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\/2199"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}