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

Back to Subject List

Thread Closed: Became flame-war

???
06/23/06 08:37
Read: times


 
#118926 - Help
Responding to: ???'s previous message
Arvind Shrivastava said:
In the previous thread I have written the comments and followed the HTMl tags also

No, you have not used the HTML tags as described for posting code.
Look at the code here:
http://www.8052.com/forum/read.phtml?id=118674
Do you honestly think this is clearly laid-out and easy to read?

Your aim should be something like this:
   ORG 001BH 
INTERRUPT_1: 
   PUSH  ACC 
   PUSH  PSW 
   CLR   TR1 
   MOV   PSW, #00H 
   ACALL KEYPRESSED 
   JNZ   CALCULATE 
   JB    FLAG_SECOND, HALT1 ; if no key is pressed and earlier
                            ; the key were presed taking into 
   JB    FLAG_FIRST, COOL   ; account the 1st & 2nd press, then
                            ; jump to HALT1 and only once key 
   JMP   AGAIN              ; is pressed then jump to COOL or
                            ; jump to AGAIN

CALCULATE: 
   ACALL KEYPRESSED         ; again check whether any key is
                            ; pressed or not
   JZ    HALT               ; if no key is pressed then jump 
                            ; to halt for checking the key 
                            ; is pressed ;before or not by 
                            ; cheking the flag ... FLAG_FIRST 
   ACALL CONVERT            ; check the validity of the key 
                            ; pressed 
   JBC   FLAG_INVALIDKEY, HALT ; if the key pressed is invalid
                               ; then jump to HALT 
   INC   R0                 ; increment R0 fro checking 
                            ; whether the key is pressed first
                            ; time or not 
   CJNE  R0, #01, COMPARE   ; if the key is not pressed for 
                            ; the first time then jump to
                            ; COMPARE 
   MOV   NEWKEY, A          ; here it shows the key is pressed 
                            ; for the first time and so the
                            ; fresh key ;is taken to a new flag
                            ; named NEWKEY for further checking
                            ; on second time key hit 
   SETB  FLAG_FIRST         ; set this flag which shows the key
                            ; is pressed 1st time, this flag is
                            ; used while the checking the in 
                            ; the subroutine HALT 
   JMP   OUTPUT             ; jump to output the 1st time
                            ; keypressed 


Your comments need to give more detail on what you are trying to achieve, it's a bit focussed on the operation of individual instructions at the moment.

It would also help if you provided separate comments that describe the meaning & usage of each of your variables.

Arvind Shrivastava said:
So dont be ajust a blamer try to help others ..

Here is what you need to do:
http://www.8052.com/forum/read.phtml?id=118587

Have you followed that process:
What hypotheses have you tested?
What have been your conclusions?


List of 32 messages in thread
TopicAuthorDate
switch and LED interface problem            01/01/70 00:00      
   Duplicate thread            01/01/70 00:00      
      DIFFERENT            01/01/70 00:00      
         Still unformatted and NO comments            01/01/70 00:00      
   Mr. Andy Neil            01/01/70 00:00      
      Help            01/01/70 00:00      
      Seniors, not baby sitters            01/01/70 00:00      
         Tell it to the Teddy Bear...            01/01/70 00:00      
         comments are added ... have a look again            01/01/70 00:00      
            Formatting!            01/01/70 00:00      
            LOOK AGAIN ... MODIFIED ...            01/01/70 00:00      
               This is hopeless!            01/01/70 00:00      
                  FINAL MODIFIES CODE ... have a look            01/01/70 00:00      
                     why do you check for keys a few microsec            01/01/70 00:00      
                     Debounce scheme cannot be identified            01/01/70 00:00      
                     I had 15 minutes waiting for someone and            01/01/70 00:00      
      no way            01/01/70 00:00      
         i dont know            01/01/70 00:00      
            He responded this morning            01/01/70 00:00      
               He wiil strike again on Monday            01/01/70 00:00      
   Spaghetti code            01/01/70 00:00      
      Before (re)writing            01/01/70 00:00      
      Again            01/01/70 00:00      
      and he comkplains about the tomato sauce            01/01/70 00:00      
   What about this?            01/01/70 00:00      
   HELOOOOOOOOOO !!!...            01/01/70 00:00      
      Why are you shouting??            01/01/70 00:00      
      Pot calling kettle - Come in Kettle!            01/01/70 00:00      
      TANSTAAFL            01/01/70 00:00      
      Consensus            01/01/70 00:00      
   ????????????????????            01/01/70 00:00      
   hitting in dark            01/01/70 00:00      

Back to Subject List