Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Another thread already exists on this topic

???
01/30/06 16:14
Read: times


 
#108734 - 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 get correct respone from simulators ports for delay

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





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).

List of 11 messages in thread
TopicAuthorDate
help on keil            01/01/70 00:00      
   Clean it up, please            01/01/70 00:00      
      startup.a51?            01/01/70 00:00      
   formatted            01/01/70 00:00      
      The linker settings            01/01/70 00:00      
         more precisely            01/01/70 00:00      
            Not quite precise enough!            01/01/70 00:00      
               sorry, prof... :-)            01/01/70 00:00      
            other, free tools            01/01/70 00:00      
   In detail            01/01/70 00:00      
   Start with a simple example            01/01/70 00:00      

Back to Subject List