Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About onyx

  • Rank
  1. Bug description: hex file contains extended linear address record now Steps to reproduce: compile the following example #include <system.h> char a; void main() { while(1) { a = 23; } } generated hexfile for 16F876 target: :020000040000FA <-- extended linear address record :020000000828CE :0A000600173083120313A000032833 :020010000328C3 :00000001FF Expected behaviour: BoostC Compiler/Linker should generate extended linear address records ONLY WHEN IT IS NECESSARY, because otherwise it makes the downloader fail. I use Shane Tolmies BootLoader and Downloade
  2. Bug description: code for strings in rom not generated Steps to reproduce: compile the following example #include <system.h> rom char* strVersion = "Version 1.00"; rom char* strHello = "Hello World"; void myputch(char ch) { portb = ch; } void sendString(const char* s) { while(*s) { myputch(*s); s++; } } void main() { sendString(strVersion); sendString(strHello); } Expected behaviour: BoostC compiler should generate code that represent theese strings in rom, I would expect to see a romget routine for accessing the strings. Is the problem 100% reprodu
  3. Bug description: pointer arithmetic expression evaluation is not consistent, very often results in error: failed to generate expression Steps to reproduce: compile the following with BoostC #include <system.h> const char* d; const char* s; const char* res; int length; void main() { d += 1024; s++; res = d - s; // what's wrong with this expression ? res = d; // splitting up the expression works res -= s; // length = (int) res; // length is 1023 } Expected behaviour: the compiler should evaluate all pointer arithmetic expressions correctly and there s
  4. Bug description: compiler struggles with keyword register it complains error: missing semicolon, but i don't know where. if you remove the keyword register, it compiles fine Steps to reproduce: compile the following with BoostC #include <system.h> char strlen(const char* s) { register char len = 0; while(s[len]) len++; return len; } char length; void main() { length = strlen("how long is it"); // 14 } Expected behaviour: the compiler should ignore the keyword register Is the problem 100% reproduceable: yes IDE version: SourceBoost IDE 5.6.1
  5. Bug description: multiply by 256 generates wrong results Steps to reproduce: compile the following with BoostC #include <system.h> char h, l; unsigned int gamma; void main() { l = 0xE8; // low byte of gamma h = 0x03; // hi byte of gamma gamma = h*256 + l; // *** wrong, due to shift optimization ?;-) gamma = ((int) h) << 8 | l; // *** correct gamma = 1000 } produces the following code ... gamma = h*256 + l; // *** wrong, due to shift optimization ?;-) 1FE5 ; { 1FE5 A501 CLRF CompTempVar7
  6. Bug description: BoostC generates no BCF instructions in clear_bit(var,bit) Steps to reproduce: compile the following example with boostc #include <system.h> char beta; void main() { beta = 0x0f; set_bit(beta, 5); clear_bit(beta, 3); } compiles with boostC to the following void main() 1FF9 main; function begin { beta = 0x0f; 1FF9 ; { 1FF9 ; { 1FF9 0F30 MOVLW 0x0F 1FFA 1FFA A000 MOVWF gbl_beta 1FFB ; } set_bit(beta, 5); 1FFB ; { 1FFB A016 BSF gbl_beta,5 1FFC
  7. BoostC Alpha 1.1 Hi, Im missing the compiler option that inserts C-source into assembly code, it makes checking of compiled code much easier. if you could please make it available again in BoostC, thank you!
  8. Bug description: generates wrong code for shift operations Steps to reproduce: compile following example with boostc #include <system.h> unsigned int counter, result; void main() { counter = 2457; counter = counter >> 3; // division by 8 result = counter; counter = counter << 3; // multiply by 8 result = counter; } Expected behaviour: Compiler should generate a shift operation and not a rotate operation. for every right shift cycle the carry flag should be cleared. ORG 0x00000000 0000 0000 158A BSF PCLATH,3 0001 160A
  • Create New...