This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help on keil

hello frds,

i am new to keil and i like work mostly in assembly but when i wrote program for approx 1 second delay i had got 3 warnings please help me to get good knowledge on programing in assembly please i will also post my code for 1 second delay and also what warnings i got when i build target please check the code if it is approx for 1 second.


and here is the code

/* THIS IS PROGRAM FOR GENERATING ONE SECOND DELAY
AND I AM GOING TO USE REGISTERS A,R1,R2 */

ORG 00H
MOV A,#00H // 1 MACHINCE CYLE//
START: MOV P1,A // 1 MACHINE CYLE//
MOV P2,A
MOV P3,A
ACALL SECOND // 1 MACHINE CYCLE//
CPL A // 1 MACHINE CYCLE//
SJMP START // 1 MACHINE CYCLE//

/* APPROXIMATELY 1 SECOND DELAY PROCEDURE FOR CRYSTAL 11.0592 MHZ */

/*THE BELOW PROCEDURE UPTO 1SEC TAKES 4 MACHINE CYLCES*/

SECOND: MOV R1,#255
MOV R2,#7
MOV R3,#18
MOV R4,#255
/*THE BELOW LO0P FOR 1SEC TAKES 130305 MACHINE CYCLES*/

SEC: DJNZ R4,SEC // 2 MACHINE CYLCES INTO 255,510 MACHINE CYCLES//
MOV R4,255 // 1 MACHINE CYLCE //
DJNZ R1,SEC // 2 MACHINE CYCLE INTO 255,510 MACHINE CYCLES//
DJNZ R2,SEC // 2 MACHINE CYCLES FOR 7 TIMES//

/*YHE BELOW LOOP FOR LE9465 TAKES 9465 MACHINE CYLCES*/

LE9465: DJNZ R4,LE9465 // 2 MACHINE CYCLES INTO 255,510 MACHINE CYCLES //
MOV R4,255 // 1 MAVHINE CYLCLE//
DJNZ R3,LE9465 // 2 MACHINE CYCLES FOR 18 TIMES//
RET

END


here is the result which i got when i build target please help;

and i am not getting correct respone from simulators ports for delay

they are providing less than 1 second delay .please help.

i need accurate timings please and i also want to code in assembly only and get correct respones at ports in simulator.

please me to get good programming skills in assembly and use keil efficiently.



Build target 'Target 1'
assembling robot.asm...
linking...
*** WARNING L5: CODE SPACE MEMORY OVERLAP
FROM: 0000H
TO: 0002H
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
ADDRESS: 080AH
Program Size: data=9.0 xdata=0 code=51
creating hex file from "robo"...
"robo" - 0 Error(s), 3 Warning(s).