Debugging assembly
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Debugging assembly
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
rasega
Guest





Posted: Mon Nov 28, 2005 3:42 pm    Post subject: Re: Debugging assembly Reply with quote

Thanks All,
I've RTFM and solved many problems (one of the problems was that I
didn't have the manual !!)...now searching for the complete list of the
assembler error codes ...
Back to top
Dave Hansen
Guest





Posted: Mon Nov 28, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

On Mon, 28 Nov 2005 08:19:06 +0000 in comp.arch.embedded, Paul Burke
<paul@scazon.com> wrote:

[...]
Quote:
No, I've worked with embedded systems for 25 years now, and whereas I
had to learn the assembler in the earlier days, everything is in C now.
It's still not totally portable, because of the closeness to the
hardware and its vagaries, but I'm supporting four processors at the
moment, and most of the time I couldn't care which is which.

You only really need assembler if you've underestimated the processor
capacity, or you have to support someone else's system, or you're
writing the compiler.

You've had a very sheltered 25 years. Most (99% or more) of the code
I write is in C or C++. But there are things you can do in assembly
that you can't do any other way, or at least, not in C. For example,
at a PPOE, I needed to write a pseudo-reset routine that would place
all processor registers in the reset state (but leave certain
peripherals untouched) before jumping to the reset vector.

Regards,
-=Dave
-=Dave

--
Change is inevitable, progress is not.
Back to top
Paul Keinanen
Guest





Posted: Tue Nov 29, 2005 1:15 am    Post subject: Re: Debugging assembly Reply with quote

On Mon, 28 Nov 2005 08:19:06 +0000, Paul Burke <paul@scazon.com>
wrote:

Quote:
Paul Keinanen wrote:

While assembly might not be a cost effective tool for implementing
large (more than a few kilobytes) systems, understanding of
assembly/disassembly at least at a rudimentary level is essential for
working with embedded systems.

No, I've worked with embedded systems for 25 years now, and whereas I
had to learn the assembler in the earlier days, everything is in C now.
It's still not totally portable, because of the closeness to the
hardware and its vagaries, but I'm supporting four processors at the
moment, and most of the time I couldn't care which is which.

You only really need assembler if you've underestimated the processor
capacity, or you have to support someone else's system, or you're
writing the compiler.

I noticed in the 1970's that I could not consistently beat the RSX-11
Fortran IV+ compiler by manually translating the modules one by one
into assembly. Of course if I used e.g. global register assignment,
which the compiler did not know anything about, I could write much
better code.

Anyhow, a person working with embedded systems should have a clear
view of what each C/C++ construction will cost in terms of code space
and execution time. Writing an ISR routine entry/exit code as well as
any debugging would still require some understanding of the assembly
language for that platform.

Paul
Back to top
rasega
Guest





Posted: Tue Nov 29, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

Where to find the complete list of "assembly error codes" that the
assembler reports in the .lst file ??
(error 235, error 250, ... )
Back to top
rasega
Guest





Posted: Tue Nov 29, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

Ehmmm
Back to top
Grant Edwards
Guest





Posted: Tue Nov 29, 2005 5:16 pm    Post subject: Re: Debugging assembly Reply with quote

On 2005-11-29, rasega <richi.rasega@gmail.com> wrote:

Quote:
Where to find the complete list of "assembly error codes" that the
assembler reports in the .lst file ??
(error 235, error 250, ... )

In the manual for the assembler.

--
Grant Edwards grante Yow! I'm ZIPPY the PINHEAD
at and I'm totally committed
visi.com to the festive mode.
Back to top
rasega
Guest





Posted: Wed Nov 30, 2005 9:15 am    Post subject: Re: Debugging assembly Reply with quote

Well,
it seems that the errors reported in the manual are of a form different
from what my assembler gives me back !!
In the manual I find error codes like this : Error Axxxx
What do I receive back is : Error xxx
Then I can't find the errors I'm searching for... :-(
Back to top
Guest






Posted: Wed Nov 30, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

rasega wrote:
Quote:
OH my god, I found a little table in the pcbug manual :
235 Symbol: undefined symbol
250 Data: displacement too large (normally branch)

I suppose the first (235) is due to the second (250) error,
how to correct errors like this ??
The jump can't be long as far as my code needs !!

No, the second is more likely to be due to the first. You need to
define your symbols, chances are that you have missplet it somewhere.
Back to top
rasega
Guest





Posted: Wed Nov 30, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

I'm tryin' to modify the code without using long jumps...hoping in a
good solution !!
Thank You
Back to top
Paul Burke
Guest





Posted: Wed Nov 30, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

rasega wrote:
Quote:
OH my god, I found a little table in the pcbug manual :
235 Symbol: undefined symbol
250 Data: displacement too large (normally branch)

I suppose the first (235) is due to the second (250) error,
how to correct errors like this ??
The jump can't be long as far as my code needs !!


Strategy 1:

Use an absolute jump. If it's a conditional jump that's causing the
problem, invert the test, and jump round the long jump which follows
immediately, e.g. (no particular assembler)

...
jz MilesAway
...

becomes

...
jnz Nearby
ljmp MilesAway
Nearby ...

Strategy 2: don't write code that uses long jumps anyway.


Paul Burke
Back to top
rasega
Guest





Posted: Wed Nov 30, 2005 5:15 pm    Post subject: Re: Debugging assembly Reply with quote

OH my god, I found a little table in the pcbug manual :
235 Symbol: undefined symbol
250 Data: displacement too large (normally branch)

I suppose the first (235) is due to the second (250) error,
how to correct errors like this ??
The jump can't be long as far as my code needs !!
Back to top
Alex Colvin
Guest





Posted: Wed Nov 30, 2005 8:54 pm    Post subject: Re: Debugging assembly Reply with quote

Quote:
OH my god, I found a little table in the pcbug manual :
235 Symbol: undefined symbol
250 Data: displacement too large (normally branch)

I suppose the first (235) is due to the second (250) error,
how to correct errors like this ??
The jump can't be long as far as my code needs !!

maybe the other way - the symbol is undefined. the assembler bravely tries
to continue, using the value 0, which happens to be too far away?


--
mac the naïf
Back to top
rasega
Guest





Posted: Fri Dec 02, 2005 4:25 pm    Post subject: Re: Debugging assembly Reply with quote

Well, thank you everybody the answer was :
the labels are not accepted declared like this :
"label :"
by my assembler, than I've to do this :
"label EQU *"
Why ?? I don't know :-(
Back to top
Jim Granville
Guest





Posted: Sat Dec 03, 2005 12:39 am    Post subject: Re: Debugging assembly Reply with quote

rasega wrote:

Quote:
Well, thank you everybody the answer was :
the labels are not accepted declared like this :
"label :"
by my assembler, than I've to do this :
"label EQU *"
Why ?? I don't know :-(

Did you try this (in Column1) ?
Label:
Back to top
rasega
Guest





Posted: Mon Dec 05, 2005 9:15 am    Post subject: Re: Debugging assembly Reply with quote

Now I'm trying to "upload" the program on eeprom using JBUG11 but it
prompts the error :
"Argument(s) overlap excluded range"

What the problem should be ??
1) The program is bigger than available space
2) Some code try to write in protected register or memory ??
3) What else ??
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB