<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>CodeWarrior for MCUのトピックRe: lcd control in assembly</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125163#M175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;You will need to decide whether you are going to write relocatable code, or absolute assembly code.&amp;nbsp; Currently, it is an incompatible mix of the two.&amp;nbsp; Your ORG statements (absolute assembly) would appear problematic.&amp;nbsp; An additional problem is the way you are interleaving code and data.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you are going to use relocatable code -&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Remove the ORG statements&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Remove the start vector data (DC.W&amp;nbsp; START) - the PRM file should identify the start location.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Re-position the TEXT1 data to outside of your MainLoop.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The &lt;FONT face="Courier New"&gt;BRA&amp;nbsp;*&lt;/FONT&gt; statement (corrected from &lt;FONT face="Courier New"&gt;BRA $&lt;/FONT&gt;)&amp;nbsp;will be a problem because the code will not progress beyond this point.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;With CW assembler, use &lt;FONT face="Courier New"&gt;BRSET 3,LCD,*&lt;/FONT&gt; instead of &lt;FONT face="Courier New"&gt;BRSET 3,LCD,$&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;These are the obvious errors that will affect program flow, and the&amp;nbsp;assembly and linking process.&amp;nbsp; I have not examined your LCD routines in detail.&amp;nbsp; The final two lines in your post would appear to be spurious, since the sub-routine is obviously incomplete.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2007 14:52:26 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-03-06T14:52:26Z</dc:date>
    <item>
      <title>lcd control in assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125162#M174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm writing a code on assembly which will display on LCD, model HD44780 something, but I've faced the problem which I can't solve...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am writing to program MC68HC908QB8, version of CodeWarrior IDE: 5.7.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I debug it CW displays the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;L1119: Vector allocated at absolute address 0xFFFE overlaps with sections placed in segment .absSeg1"&lt;BR /&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;main.asm file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;INCLUDE 'derivative.inc'&lt;BR /&gt;INCLUDE 'lcd1.inc'&lt;BR /&gt;&lt;BR /&gt;; export symbols&lt;BR /&gt;XDEF _Startup, main&lt;BR /&gt;&lt;BR /&gt;XREF __SEG_END_SSTACK ; symbol defined by the linker for the end of the stack&lt;BR /&gt;&lt;BR /&gt;; variable/data section&lt;BR /&gt;MY_ZEROPAGE: SECTION SHORT ; Insert here your data definition&lt;BR /&gt;&lt;BR /&gt;; code section&lt;BR /&gt;MyCode: SECTION&lt;BR /&gt;main:&lt;BR /&gt;_Startup:&lt;BR /&gt;LDHX #__SEG_END_SSTACK ; initialize the stack pointer&lt;BR /&gt;TXS&lt;BR /&gt;CLI ; enable interrupts&lt;BR /&gt;&lt;BR /&gt;mainLoop:&lt;BR /&gt;&lt;BR /&gt;LCD: EQU PTB&lt;BR /&gt;&lt;BR /&gt;org $F800&lt;BR /&gt;&lt;BR /&gt;START MOV #$3B, CONFIG1&lt;BR /&gt;JSR LCD4SET&lt;BR /&gt;LDHX #TEXT1&lt;BR /&gt;JSR LINIA14&lt;BR /&gt;BRA $&lt;BR /&gt;&lt;BR /&gt;TEXT1: dc.b "SOMETHING"&lt;BR /&gt;&lt;BR /&gt;org $FFFE&lt;BR /&gt;DC.W START&lt;BR /&gt;&lt;BR /&gt;NOP&lt;BR /&gt;&lt;BR /&gt;feed_watchdog&lt;BR /&gt;BRA mainLoop&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;lcd1.inc file:&lt;/SPAN&gt;&lt;STRONG&gt;&lt;BR /&gt;E: equ 6&lt;BR /&gt;RS: equ 4&lt;BR /&gt;RW: equ 5&lt;BR /&gt;&lt;BR /&gt;ImpulsE: macro&lt;BR /&gt;BSET E,LCD&lt;BR /&gt;BCLR E,LCD&lt;BR /&gt;endm&lt;BR /&gt;&lt;BR /&gt;LCD4SET: BCLR E,LCD&lt;BR /&gt;MOV #$7F, LCD+4&lt;BR /&gt;LDA #150&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;MOV #$03, LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #41&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #1&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;ImpulsE&lt;BR /&gt;MOV #$02,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #$28&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;LDA #$0C&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;LDA #$06&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;LINIA14 LDA #$80&lt;BR /&gt;BRA LINIA_4&lt;BR /&gt;LINIA_4 JSR LCD4WRR&lt;BR /&gt;&lt;BR /&gt;LCD4WRD JSR LCD4BF&lt;BR /&gt;PSHA&lt;BR /&gt;NSA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;BSET RS,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;PULA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;BSET RS,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;LCD4WRR JSR LCD4BF&lt;BR /&gt;PSHA&lt;BR /&gt;NSA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;PULA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;LCD4BF MOV #$70,LCD+4&lt;BR /&gt;BSET RW,LCD&lt;BR /&gt;BCLR RS,LCD&lt;BR /&gt;BSET E,LCD&lt;BR /&gt;BRSET 3,LCD,* ////////!!!! originally it should be BRSET 3,LCD,$ but the debugger&lt;BR /&gt;///////!!!! wrote that there's the error at the end of expression so I've changed it...&lt;BR /&gt;BCLR E,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;MOV #$7F, LCD+4&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;L_CZEKA AIS #-2&lt;BR /&gt;STA 1,SP&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know whats the problem and can explain me how it should be written? Thx in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2007 07:09:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125162#M174</guid>
      <dc:creator>okn</dc:creator>
      <dc:date>2007-03-06T07:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: lcd control in assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125163#M175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;You will need to decide whether you are going to write relocatable code, or absolute assembly code.&amp;nbsp; Currently, it is an incompatible mix of the two.&amp;nbsp; Your ORG statements (absolute assembly) would appear problematic.&amp;nbsp; An additional problem is the way you are interleaving code and data.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you are going to use relocatable code -&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Remove the ORG statements&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Remove the start vector data (DC.W&amp;nbsp; START) - the PRM file should identify the start location.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Re-position the TEXT1 data to outside of your MainLoop.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The &lt;FONT face="Courier New"&gt;BRA&amp;nbsp;*&lt;/FONT&gt; statement (corrected from &lt;FONT face="Courier New"&gt;BRA $&lt;/FONT&gt;)&amp;nbsp;will be a problem because the code will not progress beyond this point.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;With CW assembler, use &lt;FONT face="Courier New"&gt;BRSET 3,LCD,*&lt;/FONT&gt; instead of &lt;FONT face="Courier New"&gt;BRSET 3,LCD,$&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;These are the obvious errors that will affect program flow, and the&amp;nbsp;assembly and linking process.&amp;nbsp; I have not examined your LCD routines in detail.&amp;nbsp; The final two lines in your post would appear to be spurious, since the sub-routine is obviously incomplete.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2007 14:52:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125163#M175</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-03-06T14:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: lcd control in assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125164#M176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Mixing absolute sections (ORG) with relocatable ones not strictly illegal, tough a bit unusual, at least with code.&lt;BR /&gt;Anyway, the problem the linker is reporting is that the reset vector location at 0xFFFE is twice defined, once in the shown assembly module:&lt;BR /&gt;org $FFFE&lt;BR /&gt;DC.W START&lt;BR /&gt;&lt;BR /&gt;And (very probably) a second time in the not shown linker parameter file (*.prm), probably as VECTOR directive (either VECTOR 0, or VECTOR ADDRESS 0xFFFE).&lt;BR /&gt;So to get it building, remove one of the two definitions.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2007 19:15:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125164#M176</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-06T19:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: lcd control in assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125165#M177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks a lot for your help.&lt;BR /&gt;&lt;BR /&gt;So I've modified the code a little:&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;main.asm&lt;/U&gt; file:&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;INCLUDE 'derivative.inc'&lt;BR /&gt;INCLUDE 'lcd1.inc'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XDEF _Startup, main&lt;BR /&gt;XREF __SEG_END_SSTACK&lt;BR /&gt;&lt;BR /&gt;; variable/data section&lt;BR /&gt;MY_ZEROPAGE: SECTION SHORT&lt;BR /&gt;&lt;BR /&gt;MyCode: SECTION&lt;BR /&gt;main:&lt;BR /&gt;_Startup:&lt;BR /&gt;LDHX #__SEG_END_SSTACK ; initialize the stack pointer&lt;BR /&gt;TXS&lt;BR /&gt;CLI ; enable interrupts&lt;BR /&gt;&lt;BR /&gt;mainLoop:&lt;BR /&gt;&lt;BR /&gt;LCD: EQU PTB&lt;BR /&gt;&lt;BR /&gt;START MOV #$3B, CONFIG1&lt;BR /&gt;JSR LCD4SET&lt;BR /&gt;LDHX #TEXT1&lt;BR /&gt;JSR LINIA14&lt;BR /&gt;BRA $&lt;BR /&gt;&lt;BR /&gt;TEXT1: dc.b "something"&lt;BR /&gt;&lt;BR /&gt;NOP&lt;BR /&gt;&lt;BR /&gt;feed_watchdog&lt;BR /&gt;BRA mainLoop&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;lcd1.inc&lt;/U&gt; file:&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;E: equ 6&lt;BR /&gt;RS: equ 7&lt;BR /&gt;;RW: equ 5&lt;BR /&gt;&lt;BR /&gt;ImpulsE: macro&lt;BR /&gt;BSET E,LCD&lt;BR /&gt;BCLR E,LCD&lt;BR /&gt;endm&lt;BR /&gt;&lt;BR /&gt;LCD4SET: BCLR E,LCD&lt;BR /&gt;MOV #$7F, LCD+4&lt;BR /&gt;LDA #150&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;MOV #$03, LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #41&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #1&lt;BR /&gt;JSR L_CZEKA&lt;BR /&gt;ImpulsE&lt;BR /&gt;MOV #$02,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;LDA #$28&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;LDA #$0C&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;LDA #$06&lt;BR /&gt;JSR LCD4WRR&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;LINIA14 LDA #$80&lt;BR /&gt;BRA LINIA_4&lt;BR /&gt;LINIA24 LDA #$c0&lt;BR /&gt;LINIA_4 JSR LCD4WRR&lt;BR /&gt;L_ZNAK LDA ,X&lt;BR /&gt;BEQ ENDL4&lt;BR /&gt;JSR LCD4WRD&lt;BR /&gt;AIX #1&lt;BR /&gt;BRA L_ZNAK&lt;BR /&gt;ENDL4 RTS&lt;BR /&gt;&lt;BR /&gt;LCD4WRD JSR LCD4BF&lt;BR /&gt;PSHA&lt;BR /&gt;NSA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;BSET RS,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;PULA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;BSET RS,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;LCD4WRR JSR LCD4BF&lt;BR /&gt;PSHA&lt;BR /&gt;NSA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;PULA&lt;BR /&gt;AND #$0F&lt;BR /&gt;STA LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;LCD4BF MOV #$70,LCD+4&lt;BR /&gt;;BSET RW,LCD&lt;BR /&gt;BCLR RS,LCD&lt;BR /&gt;BSET E,LCD&lt;BR /&gt;BRSET 3,LCD,*&lt;BR /&gt;BCLR E,LCD&lt;BR /&gt;ImpulsE&lt;BR /&gt;MOV #$7F, LCD+4&lt;BR /&gt;RTS&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;L_CZEKA AIS #-2&lt;BR /&gt;STA 1,SP&lt;BR /&gt;L_CZAS LDA #133&lt;BR /&gt;STA 2,SP&lt;BR /&gt;DBNZ 2,SP,*&lt;BR /&gt;DBNZ 1,SP,L_CZAS&lt;BR /&gt;AIS #2&lt;BR /&gt;RTS&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;And... yes it did compile and I've loaded the program to my uC but I can't see the result: it doesn't work. Do you think that it might be the software problem or hardware?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 10:04:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125165#M177</guid>
      <dc:creator>okn</dc:creator>
      <dc:date>2007-03-07T10:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: lcd control in assembly</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125166#M178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you wish others to review the code you are using, you will need to make the operation of the code much clearer to the reader.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The most glaring omission in your post is the complete&amp;nbsp;lack of comments&amp;nbsp;to explain your &lt;U&gt;intent&lt;/U&gt;.&amp;nbsp; As a minimum, I would suggest the basic function of each sub-routine to be identified (as a single phrase), and also include the data it expects to receive, and the data it makes available to the rest of the program (if any).&amp;nbsp; This is particularly important for assembly programs that are not "self documenting".&amp;nbsp; I would also&amp;nbsp;suggest any numeric constants to be identified as to what they represent.&amp;nbsp; For example, if a value is an LCD command byte, say what particular command it represents.&amp;nbsp; The addition of comments will also help &lt;U&gt;you&lt;/U&gt; to understand what you did when reading the code at some time in the future.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The other major issue is the confusion caused by lack of indentation, again more important for assembly than C code.&amp;nbsp; If the indentation disappears when you "paste" the text into the post, you will need to add it by hand.&amp;nbsp; Use either the "Insert Source code" button, or select Courier New as the font, to allow clear indentation.&amp;nbsp; Without indentation, as well as making the code difficult to read, you do not give the oportunity for your assembly code to be pasted to a text file and tested, without a lot of additional effort by the reader.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Finally, a minor point - the code is somewhat easier to read if not "bolded".&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I realise this doesn't solve your current problem, but if you make your code easy to follow, it is less likely to be put in the "too hard basket".&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regard,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 14:39:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/lcd-control-in-assembly/m-p/125166#M178</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-03-11T14:39:27Z</dc:date>
    </item>
  </channel>
</rss>

