sdcc z80 trouble with asm complie

Help
Tony
2014-03-09
2014-03-11
  • Raphael Neider

    Raphael Neider - 2014-03-09

    Did you try replacing $41 with plain 41 or #41? I have no clue regarding z80 assembler, but encoding literals is often tool specific...

    Good luck,
    Raphael

     
  • Tony

    Tony - 2014-03-10

    Hi Raphael,

    thanks for the reply. if i write #65 it compiles and i have 3E 41 in my hex file.. = load 0x41 to acc. this is ok. does not work for just 41, the problem is, the asm compiler i used in the past used $ as the hex literal directive. i will have to go back now and convert all my asm files where i refer to hex to decimal to use in sdcc. what i cant work out is how to write a literal hex in sdcc asm?

     
    • Philipp Klaus Krause

      Am 10.03.2014 09:59, schrieb Tony:

      Hi Raphael,

      thanks for the reply. if i write #65 it compiles and i have 3E 41 in my
      hex file.. = load 0x41 to acc. this is ok. does not work for just 41,
      the problem is, the asm compiler i used in the past used $ as the hex
      literal directive. i will have to go back now and convert all my asm
      files where i refer to hex to decimal to use in sdcc. what i cant work
      out is how to write a literal hex in sdcc asm?

      0x65

      Philipp

       
      • Philipp Klaus Krause

        Am 11.03.2014 11:59, schrieb Philipp Klaus Krause:

        Am 10.03.2014 09:59, schrieb Tony:

        Hi Raphael,
        
        thanks for the reply. if i write #65 it compiles and i have 3E 41 in my
        hex file.. = load 0x41 to acc. this is ok. does not work for just 41,
        the problem is, the asm compiler i used in the past used $ as the hex
        literal directive. i will have to go back now and convert all my asm
        files where i refer to hex to decimal to use in sdcc. what i cant work
        out is how to write a literal hex in sdcc asm?
        

        0x65

        Philipp

        Sourceforge even interprets special symbols when they come in an email.
        So I don't know how to state the correct notation exlicitly. But the
        notation Raphel suggested is the correct way to do it.

        Philipp

         
  • Raphael Neider

    Raphael Neider - 2014-03-10

    Hmmm, I don't know. Would #0x41 work for you/the assembler? Replacing $<hexit><hexit> with #0x<hexit><hexit> seems like an easy task for Perl ;-) Well, converting the hexadecimal value to decimal should also be possible using Perl, but the might adversely affect legibility of the code...

    Have fun,
    Raphael

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks