Hi Guys,

I'm just getting into embedded development, and am trying to gain some 
traction. I'm running linux as my desktop of choice, and really like this 
edsim51 program for simlation. I would use s51, but under linux, the simulator 
is command-line and not very intuitive. However, I'm having a hard time getting 
programs to run in the edsim51.

Let's say I have a simple c program (main.c):

#include <8051.h>

void main(void) {
    while(1) {
        P1 = P2;
    }
}


I compile the program

sdcc main.c

And copy the .ihx file .hex

cp main.ihx main.hex

I launch edsim51, and I get this error:

Error - Code Overlaps - MOV R1,#00H

About half the way though the disassembled text. Below's the complete text. Any 
ideas?

-Warren



; Records: 0, 2, 3, 4, 18, 19
; :03000000020012E9
; :0500030012000880FE60
; :0500080085A09080FBC3
; :01000D0022D0
; :03000E00758200F8
; :0100110022CC
ORG 0000H
        LJMP 0012H
        LCALL 0008H
        SJMP 0FEH
        MOV 90H,0A0H
        SJMP 0FBH
        RET
        MOV 82H,#00H
        RET
;------------------------------------

; Records: 1, 15
; :03006B000200038D
; :0B00600000900000E4F0A3D8FCD9FAE7
ORG 0060H
        NOP
        MOV DPTR, #0000H
        CLR A
        MOVX @DPTR,A
        INC DPTR
        DJNZ R0,0FCH
        DJNZ R1,0FAH
        LJMP 0003H
;------------------------------------

; Records: 5, 10, 11, 12, 13, 14
; :06004100E478FFF6D8FD93
; :06003B00F4DAF275A0FFEB
; :080047007800E84400600A792A
; :03004F000075A099
; :0600520000E4F309D8FCF4
; :080058007800E84400600C7917
ORG 003BH
        CPL A
        DJNZ R2,0F2H
        MOV 0A0H,#0FFH
        CLR A
        MOV R0,#0FFH
        MOV @R0,A
        DJNZ R0,0FDH
        MOV R0,#00H                        ; ERROR HERE
        MOV A,R0
        ORL A,#00H
        JZ 0AH
        MOV R1,#00H
        MOV 0A0H,#00H
        CLR A
        MOVX @R1,A
        INC R1
        DJNZ R0,0FCH
        MOV R0,#00H
        MOV A,R0
        ORL A,#00H
        JZ 0CH
        MOV R1,#00H
;------------------------------------

; Records: 6, 7, 8, 9, 17
; :08001F007900E94400601B7A3E
; :050027000090006E785E
; :03002C000075A0BC
; :0C002F0000E493F2A308B8000205A0D979
; :0A00150012000EE5826003020003F2
ORG 0015H
        LCALL 000EH
        MOV A,82H
        JZ 03H
        LJMP 0003H
        MOV R1,#00H
        MOV A,R1
        ORL A,#00H
        JZ 1BH
        MOV R2,#00H
        MOV DPTR, #006EH
        MOV R0,#00H
        MOV 0A0H,#00H
        CLR A
        MOVC A,@A+DPTR
        MOVX @R0,A
        INC DPTR
        INC R0
        CJNE R0,#00H,02H
        INC 0A0H
        DJNZ R1,00H
;------------------------------------

; Records: 16
; :03001200758107EE
ORG 0012H
        MOV 81H,#07H
;------------------------------------

; Records: 20
; :00000001FF
        END
;------------------------------------





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to