{"id":493,"date":"2014-09-05T14:34:29","date_gmt":"2014-09-05T14:34:29","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=493"},"modified":"2022-02-18T15:37:49","modified_gmt":"2022-02-18T15:37:49","slug":"assembler-variables-to-be-located-in-access-ram","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic18\/xc8-compiler\/converting-from-c18-projects-to-xc8\/assembler-variables-to-be-located-in-access-ram","title":{"rendered":"Assembler variables to be located in access ram"},"content":{"rendered":"<h5>\nOld C18 code<br \/>\n<\/h5>\n<pre>\r\n<code>\r\n\/\/Inline assembler access bank variables\r\n#pragma udata access acssect\t\t\t\/\/ &quot;acssect&quot; is the section label\r\nnear unsigned char uc_asm_irq_temp;\t\t\/\/ near qualifier specifies access RAM\r\nnear unsigned char uc_asm_irq_temp1;\r\n#pragma udata\r\n<\/code><\/pre>\n<h5>\nNew XC8 Code<br \/>\n<\/h5>\n<pre>\r\n<code>\r\n\/\/Inline assembler access bank variables\r\nnear static unsigned char uc_asm_irq_temp;\t\t\/\/ near qualifier specifies access RAM\r\nnear static unsigned char uc_asm_irq_temp1;\r\n<\/code><\/pre>\n<p>\nDon&#39;t bother with an extern declaration.\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Old C18 code \/\/Inline assembler access bank variables #pragma udata access acssect \/\/ &quot;acssect&quot; is the section label near unsigned char uc_asm_irq_temp; \/\/ near qualifier specifies access RAM near unsigned char uc_asm_irq_temp1; #pragma udata New XC8 Code \/\/Inline assembler access bank variables near static unsigned char uc_asm_irq_temp; \/\/ near qualifier specifies access RAM near static [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,56],"tags":[],"class_list":["post-493","post","type-post","status-publish","format-standard","hentry","category-converting-from-c18-projects-to-xc8","category-basic-template-project-changes"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/493\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}