Dear Sir, This is my coding. I want to write it in C language. I'm a very begginer. How can i write DB "DWIN" instruction in C language. Please Guide me. thank you for your help.
ORG 1FFCH DB "DWIN" START: MOV DPTR,#0044H MOVX A,@DPTR JNZ START INC DPL MOVX A,@DPTR JNZ START MOV A,#LOW(500) MOVX @DPTR,A DEC DPL MOV A,#HIGH(500) MOVX @DPTR,A MOV DPTR,#0042H MOVX A,@DPTR XRL A,#01H MOVX @DPTR,A LJMP START
Thanks & Regards, Saravanaeswaran.M
Wrong approach.
There isn't any 1:1 relationship between C and assembler, so don't try to translate individual assembler statements.
Figure out exactly what the assembler code does, and then figure out what C constructs you would need to get a similar result.
Dear Per Westermark,
Thank you for your reply and advice. Sir, in program DB "DWIN" is must. How can i write it in C language.
Sorry, you haven't convinced me that what you think is a must really is a must.
Dear Per Westermark, Sorry sir, i'm a fresher. i understand that. Thank you for your reply.
Thanks & Regard, Saravanaeswaran.M
Have you tried to describe what the assembler code does? And the meaning of the hard-coded addresses? The assembler code isn't exactly well documented...
Dear Per Westermark, Sir, we have one module(DCT100). That program is example coding of that module. i need to develop that. That example code is running correctly with that module.