"Compile ANSIC" fails and LDmico exits with error dialogs when the CLRWDT instruction is used (by Greg Blackwell)
Test case to demonstrate this issue:
Start the current version of LDmicro version 4.3.8
Create a simple program that has a single rung with the single instruction CLRWDT
- Menu: Operations that change the course of the program -> Insert CLRWDT
Compile to ANSI C
- Menu: Compile -> Compile ANSIC
The "Compile To" dialog is displayed. Accept the default filename new.c
The LDmicro.exe displays two error dialog boxes and then exits
- the first error dialog has the text: INT_2010
- the second error dialog has the text: Internal error at line 1103 file 'ansic.cpp'
My investigation into the reason for this behaviour:
INT_CLRWDT is #define'd in the file intcode.h
In the file ansic.cpp the function GenerateAnsiC() does not have a case defined for INT_CLRWDT so it falls through to the default case which calls ooops("INT_%d", IntCode[i].op) to report the error.
(no subject) (by oleksiy)
Be patient, and wait for 4.3.8.2.