BM> DG>Is there a program that will take an assemlber source file for input
and
BM> DG>output a file with suggested optimizations and/or possible detection
f
BM> DG>logic errors?
BM>
BM> Detect logic errors? In assembly language? That is doubtful...
BM> optimizations, however, could be done, especially if it was written for a
BM> different processor...
You could detect some specifics, but you'd have to make a "smart"
assembler. Example, give the 'bler (assembler) a knowledge base
of DOS interupt services. It can check if you've assigned the
right registers for the service.
You could try a "define before use" clause for registers. If a register
has not been assigned a value (by declaration or by INT call), you could
produce a warning that it may not be defined yet.
You could try to define pairs of instuctions. Maybe warn if a "push"
has no accompanying "pop" in a function macro. Warn if a macro destroys
registers that haven't been saved (or pushed).
If a well experienced asm writter could think of the common mistakes
he makes, he could find some semantic warnings that would really fit
the bill.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)839-8237 (1:3811/350)
|