Mar 28, 2012 #1 A anand_jha_30 Member level 2 Joined Oct 29, 2010 Messages 50 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,288 Activity points 1,616 While writing assembly code for 8051 is it illegal to write this mov dph,#12; mov dpl,#34; instead of mov dptr,#1234; I am using Ride compiler and its throwing error as --- undefined symbol (PASS 2) 'DPH' undefined symbol (PASS 2) 'DPL' Is it compiler dependent.
While writing assembly code for 8051 is it illegal to write this mov dph,#12; mov dpl,#34; instead of mov dptr,#1234; I am using Ride compiler and its throwing error as --- undefined symbol (PASS 2) 'DPH' undefined symbol (PASS 2) 'DPL' Is it compiler dependent.
Mar 28, 2012 #2 S srizbf Advanced Member level 5 Joined Apr 3, 2010 Messages 1,992 Helped 417 Reputation 840 Reaction score 329 Trophy points 1,363 Activity points 10,985 if include file contains, #define dph xxh #define dpl yyh then it is permitted. check your include <8051.h> whether it defines the symbol. and clarify how you include the assembly instruction in the c code.
if include file contains, #define dph xxh #define dpl yyh then it is permitted. check your include <8051.h> whether it defines the symbol. and clarify how you include the assembly instruction in the c code.
Mar 29, 2012 #3 A anand_jha_30 Member level 2 Joined Oct 29, 2010 Messages 50 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,288 Activity points 1,616 srizbf said: if include file contains, #define dph xxh #define dpl yyh then it is permitted. check your include <8051.h> whether it defines the symbol. and clarify how you include the assembly instruction in the c code. Click to expand... I am not writing C code. I am writing assembly code only and hence there is no include file.
srizbf said: if include file contains, #define dph xxh #define dpl yyh then it is permitted. check your include <8051.h> whether it defines the symbol. and clarify how you include the assembly instruction in the c code. Click to expand... I am not writing C code. I am writing assembly code only and hence there is no include file.
Mar 29, 2012 #4 S srizbf Advanced Member level 5 Joined Apr 3, 2010 Messages 1,992 Helped 417 Reputation 840 Reaction score 329 Trophy points 1,363 Activity points 10,985 anand_jha_30 said: I am using Ride compiler and its throwing error as --- undefined symbol (PASS 2) 'DPH' undefined symbol (PASS 2) 'DPL' Is it compiler dependent. Click to expand... since you mentioned ride compiler and asked whether it is compiler dependent , it is assumed as c code. if you post a minimal 8051 sample code , which gives the error , it may be possible to identify the problem.
anand_jha_30 said: I am using Ride compiler and its throwing error as --- undefined symbol (PASS 2) 'DPH' undefined symbol (PASS 2) 'DPL' Is it compiler dependent. Click to expand... since you mentioned ride compiler and asked whether it is compiler dependent , it is assumed as c code. if you post a minimal 8051 sample code , which gives the error , it may be possible to identify the problem.
Mar 29, 2012 #5 A anand_jha_30 Member level 2 Joined Oct 29, 2010 Messages 50 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,288 Activity points 1,616 I am using RIDE IDE and doing coding in assembly. When I write the code as org 0000h mov dptr,#1234; end There is no error an hex is generating. If I write org 0000h mov dph,#12h mov dpl,#34h end there is error for both dph and dpl as undefined symbols
I am using RIDE IDE and doing coding in assembly. When I write the code as org 0000h mov dptr,#1234; end There is no error an hex is generating. If I write org 0000h mov dph,#12h mov dpl,#34h end there is error for both dph and dpl as undefined symbols
Mar 30, 2012 #6 S srizbf Advanced Member level 5 Joined Apr 3, 2010 Messages 1,992 Helped 417 Reputation 840 Reaction score 329 Trophy points 1,363 Activity points 10,985 execute the following and find if there is any error. org 0000h mov 83h,#12h mov 82hl,#34h end