im really struggling with sdcc and trying to include my asm lines, up to the point where i cant even get a simple load to acc to compile. what am i doing wrong here.. its highly frustrating..
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Am 11.03.2014 11:59, schrieb Philipp Klaus Krause:
Am 10.03.2014 09:59, schrieb Tony:
HiRaphael,thanksforthereply.ifiwrite#65 it compiles and i have 3E 41 in myhexfile..=load0x41toacc.thisisok.doesnotworkforjust41,theproblemis,theasmcompileriusedinthepastused$asthehexliteraldirective.iwillhavetogobacknowandconvertallmyasmfileswhereirefertohextodecimaltouseinsdcc.whaticantworkoutishowtowritealiteralhexinsdccasm?
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
im really struggling with sdcc and trying to include my asm lines, up to the point where i cant even get a simple load to acc to compile. what am i doing wrong here.. its highly frustrating..
with the below i get: Error: machine specific addressing or addressing mode error
the problem lies at line 51 which in the asm below is: "ld a, $41"
any help would be much appreciated!!
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
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?
Am 10.03.2014 09:59, schrieb Tony:
0x65
Philipp
Am 11.03.2014 11:59, schrieb Philipp Klaus Krause:
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
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