Hello,
I am wondering why MOVX is being used by the compiler for the following
program.
#include <8051.h>
main()
{
while(1){}
}
When compiled with:
sdcc --model-small -mmcs51 src.c
packihx src.ihx > src.hex
Why is MOVX being generated by SDCC for a small memory model?
Is there a way to force SDCC not to use External Memory instructions such as
MOVX?
This is a suspected cause as to why SDCC does not work with EdSim51.
Regards,
Charles
Complete disassembly below:
ORG 0000H
LJMP 0008H
LCALL 0064H
SJMP 0FEH
MOV 81H,#07H
LCALL 0066H
MOV A,82H
JZ 03H
LJMP 0003H
MOV R1,#00H
MOV A,R1
ORL A,#00H
JZ 1BH
MOV R2,#00H
MOV DPTR, #006AH
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,0F4H
DJNZ R2,0F2H
MOV 0A0H,#0FFH
CLR A
MOV R0,#0FFH
MOV @R0,A
DJNZ R0,0FDH
MOV R0,#00H
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
MOV DPTR, #0000H
CLR A
MOVX @DPTR,A
INC DPTR
DJNZ R0,0FCH
DJNZ R1,0FAH
LJMP 0003H
SJMP 0FEH
MOV 82H,#00H
RET
END
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user