Debugging assembly

Hi all, I'm writing some routine for a Motorola 68HC11, but it seems that debugging the code in assembler is a little bit difficult !! Please, what software do U suggest me to simplify this job ??

Assembling the code with asmhc11.exe give me back many errors, but not what this error are and where thery are !! Is there a way to know it ??

Thank U

Ric

Reply to
rasega
Loading thread data ...

I take it you cannot get the program to assemble, debugging is normaly the phase after you have got the program assembled, you need to take each error 1 at a time starting from the top. 1 mistake can cause multiple error messages to be generated so it's not as bad as it first appears. Your assembler should tell you what the error is and what line it appears on fix all the obvious ones first.

Reply to
cbarn24050

Uhm, ok well, but the assembler don't seems to like this way ;-) and tells me just the number of errors :-((

Reply to
rasega

If your assembler only tells you the number of errors and not what the errors are, you need a new/different assembler.

--
James T. White
Reply to
James T. White

As is so often the case, the answer may be to RTFM. Look there for command line options that control the assembler's error output.

-- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mrkesti at comcast dot net | - The Who, Bargain

Reply to
Michael R. Kesti

try to generate the .lst file (or whatever it is for MOT) and find out from there the details of the error(s) rw

Reply to
Ryan Weihl

Many assemblers provide you with listing files (.lst) that contain the errorneous lines of the assembly program. When you run the assembler for you code file, check if a similarly named .lst file appears in the directory. This file usually contains the errors. Also, there might be a command-line option to enable/disable the listing-file generation. The answer is to RTFM, like someone so oftly put :)

- Antti Keskinen

Reply to
Antti Keskinen

Ditch assembly, get yourself a good C compiler.

Dan

Reply to
Dan N

OK, thanks all, I'll try some option of my assembler !!

Sorry but...what does RTFM means ??

Reply to
rasega

formatting link

-- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mrkesti at comcast dot net | - The Who, Bargain

Reply to
Michael R. Kesti

Bad advice, that's just assembly with a different set of mnemonics ;-)

Reply to
Leif Holmgren

And a whole extra bunch or errors to make.

Ian

Reply to
Ian Bell

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.

Paul

Reply to
Paul Keinanen

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.

Paul Burke

Reply to
Paul Burke

Or if you want to write in C but want to get the most out of size/performance. In such cases I frequently check the generated assembly from the compiler.

Meindert

Reply to
Meindert Sprang

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

Reply to
rasega

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

Reply to
Paul Keinanen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.