Note: You have to case the input variable. The compiler does not really know what the constant 17 is to be treated as. So, the cast tells the compiler to treat as a word.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using:
GCASM List File (GCBASIC 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073)
with an 18F4550.
I wrote this simple code:
When I run the code it says coef_0 = 17.
I think it should be 272.
What am I doing wrong?
Correction
When I run the code it says coef_0 = 16 not 17
Time to update the compiler... going for the oldest compiler in use award. :-) SMILING
Compiled with GCBASIC (2025.11.12 (Windows 64 bit) : Build 1527) using PIC-AS ( not GCASM).
Gives
272.Note: You have to case the input variable. The compiler does not really know what the constant 17 is to be treated as. So, the cast tells the compiler to treat as a word.
Thanks!
That worked
Did the explaination make sense?
The ASM shows the process. In the next release you can walk the program in a real Debugger to see what is happening.
yes, it made sense.