I don't know the asx8051 assembler but what error messages to you get on this? Anyhow, try putting 0D3h instead of PSW.3 and then see what error messages you get.
asx8051 is the 8051 assembler comes with the SDCC package. Currently I am trying to write a simple perl script to convert my old assembler files for Keil a51 to the asx8051, but I am completely stuck at this moment. I havn't get to the stage of debuggin the above code yet, even the following simple code give me problem:
.area CODE (ABS)
.org 0h000 jmp start
.org 0h100 start: nop nop nop jmp start
end
$> asx8051 simple.asm
?ASxxxx-Error- in line 4 of simple.asm machine specific addressing or addressing mode error ?ASxxxx-Error- in line 12 of simple.asm machine specific addressing or addressing mode error removing $>
Both line that get the errors are the jmp instructions. Anyone know what I am doing wrong?
Problem solved (partially): ================================== It seems the jmp instruction in keil a51 need to be replaced with ljmp/sjmp instructions. ==================================
This becomes:
ABC = 0h8000 ; note the value syntax changed (Doop!) FLAG_RS0 = PSW.3 ; this works ... mov dptr, #ABC ; this works mov dptr, #0h8000 ; or if I put the value, ; the value syntax changed in asx8051
... jb FLAG_RS0, somewhere
================================== The "end" at the end of assembly file need to be removed. ================================== Still couldn't find any way to replace MACRO :-(
So my script will need to convert all the values from Keil A51 syntax to asx8051 syntax.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.