And I could finally appreciate how good the IDE is compared to version 5. There are still some quirks, the most unnerving being concentrated in debugger (like reaction to clrwdt instruction), but even there the improvement is considerable.
There is naturally still room for further improvement. For example there are problems with pointers to record fields.
Some errors are ilustrated in the following simple code compiled for 18F4620 processor
Code: Select all
type ParDat = record
ParMin: byte;
ParMax: byte;
ParVal: byte;
ParUni: boolean;
end;
var parr:ParDat; absolute $200;
ParDatp: ^ParDat;
begin
ParDatp:=@parr;
parr.ParMin:=1;
parr.ParMax:=4;
parr.ParVal:=128;
parr.ParUni:=false;
if ParDatp^.ParMax.0=1 then
inc(ParDatp^.ParMin);
if ParDatp^.ParUni then
ParDatp^.ParUni:=false;
// inc(ParDatp);
...
Both if... then instructions behave like the boolean expresions in them were always true. In the first one, lower pointer byte is checked instead of the pointer destination, the second does not check the ParUni field, but if the value of the whole pointer is zero.
The commented instruction inc(ParDatp) causes 'Argument is out of range' error.
Returning to debugger, one could live with the reaction to clrwdt command using DEFINE and IFDEF compiler directives, if not for the fact that the DEFINE directive is local so, to block all clrwdt commands while debugging, one has to use it in all units. Commenting and uncommenting them all depending on wheather one is debugging or compiling for downloading to processor is tiresome.