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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/26/05 18:19
Read: times


 
#92395 - Assembly Language
Responding to: ???'s previous message
Hello Friends

Mr.Andy Niel

""But now all you have is code that doesn't work and no comments""

I have really learned the lesson but the situation is not so bad that i don't know/understand what logic i have written in the program.
I know it very well.

The same program which was exceeding the 8k limit was reduced below 8k by just replacing the unnecessary LJMP with AJMP/SJMP
There is nothing wrong with the code.

Mr. Ian

"You really should consider getting a better assembler. Most nowadays will allow you to use JMP and CALL instructions and the assembler itself will work out if you need ACALL, LCALL etc. "

Can you suggest me a good assembler? I mean from where can i get it?

""I suspect he is using a very old assembler as he says it requires code to be written in uppercase.""

Your guess is right. The assembler is pretty old.

Mr.Erik Malund

"The "standard" assembler for assembly only is the Metalink that can be downloaded for free from many places e.g. http://www.metaice.com/ASM51/ASM51.htm. "

I am using the same assembler that you are taking about.Does this assembler have any code limit?????????



Mr.David Mars

" Maybe the assembler (if you use one) has an 8K limit? Does the MCU hang instantly or after a while? I would look closely at the "stack" created by all these jmp's (its easy to forget a RET). Try to implement some debug outputs through LED's or display to give you atleast some idea on WHERE it hangs."

Thanks a lot for your suggestion. I have closely looked at the stack and there is no RET missing. As i have said earlier, the code was first tested in small modules. So there is no question of doubting whether the code is right.
Anything after 8kb code causes the system to hang up.

Mr.Jan Waclawek

" Does you assembler give any warnings when assembling the >8kB version?"

No,the assembler doesn't give any error if the code exceeds 8kb.

"Do you use any linker? How exactly do you produce your hex code?"

Can you tell what do you mean by a linker?????
I have a exe file named "ASM51".
If i execute this file ASM51.EXE, the following message appears

8051 CROSS COMPILER, VERSION 1.2K
(C) Copyright 1984-1996 by METALINK CORPORATION
SOURCE FILE DRIVE AND NAME[.ASM]:

now i input the file having asm extension
The output is a hex file and lst file.

"Does your parallel programmer read in the whole hex? And does it burn all? The P89V51RD2 has a 8kB extra boot FLASH (plus the 64kB user FLASH) don't you try to program the boot FLASH by accident? Try perhaps to borrow some different type of programmer (or try FlashMagic or just a terminal program for ISP)"

Yes the parallel programmer reads in the whole hex and burn it all.
I am not trying to program the boot FLASH.
I guess i have to try the FLASH MAGIC.

"Unless your code uses any special feature of this particular part, try the code in a different part - e.g. AT89C55 as Mehdi suggested, or, if e.g. XRAM needed, try e.g. AT89C51ED2.
Are you aware that the P89V51RD2 has only 768 bytes of XRAM (the advertised 1kB RAM includes the 256 bytes of IRAM)?"

I am not using XRAM and i am aware of the fact that P89V51RD2 has only 768 bytes of XRAM.


BUT I STILL DON'T UNDERSTAND WHY A CODE ABOVE 8KB MAKES THE MICROCONTROLLER TO HANG UP JUST LIKE IT HAS SEEN A GHOST?????????????????????????????????????????????????????????????????????????????????????????????????


Friends, thanks a lot for your ideas & suggestions. I need them at this important juncture of time.

Sushil

List of 35 messages in thread
TopicAuthorDate
Assembly Language            01/01/70 00:00      
   Some tips            01/01/70 00:00      
      Do you have Enough,,,            01/01/70 00:00      
         I stand Corrected,....            01/01/70 00:00      
   Re:Assembly Language            01/01/70 00:00      
      Eh???            01/01/70 00:00      
         Re            01/01/70 00:00      
            What size are we talking about?            01/01/70 00:00      
               we talking about a same size!            01/01/70 00:00      
                  HUH            01/01/70 00:00      
                     To Erik!            01/01/70 00:00      
                        if you do't know            01/01/70 00:00      
                           If i know that i don't know?            01/01/70 00:00      
   ERASE            01/01/70 00:00      
      Assembly Language            01/01/70 00:00      
         Comments - a lesson learned?            01/01/70 00:00      
            redeeming the situation            01/01/70 00:00      
         JMP and CALL            01/01/70 00:00      
            I know of none            01/01/70 00:00      
               Which Assembler            01/01/70 00:00      
         Case sensitivity...            01/01/70 00:00      
            irrelevant            01/01/70 00:00      
               Not at all.            01/01/70 00:00      
                  I apologize            01/01/70 00:00      
                     No problem.            01/01/70 00:00      
   Assembler limit?            01/01/70 00:00      
   Try Flash Magic            01/01/70 00:00      
   8k?            01/01/70 00:00      
      Assembly Language            01/01/70 00:00      
         no            01/01/70 00:00      
         One more attempt..            01/01/70 00:00      
         To Sushil !            01/01/70 00:00      
   updated?            01/01/70 00:00      
   'step by step' or 'divide and conquer'            01/01/70 00:00      
   Assembly Language            01/01/70 00:00      

Back to Subject List