Jump to content

qratman

EstablishedMember
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About qratman

  • Rank
    Newbrie

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Estonia
  1. Hi, This code: bit SCK_TRIS @ TRISB.5; bit SDI_TRIS @ TRISB.6; bit CS_TRIS @ TRISB.4; bit SDO_TRIS @ TRISC.7; bit NIRQ_TRIS @ TRISB.7; bit LED_TRIS @ TRISC.5; #define OUTPUT 0 #define INPUT 1 // *** // This code compiles nice. CS_TRIS = OUTPUT; SDI_TRIS = OUTPUT; SCK_TRIS = OUTPUT; LED_TRIS = OUTPUT; SDO_TRIS = INPUT; NIRQ_TRIS = INPUT; // *** Produces asm output which seems very fine: CS_TRIS = OUTPUT; 00F8 1206 BCF gbl_CS_TRIS,4 SDI_TRIS = OUTPUT; 00F9 1306 BCF gbl_SDI_TRIS,6 SCK_TRIS = OUTPUT; 00FA 1286 BCF gbl_SCK_TRIS,5 LED_TRIS = OUTPUT; 00FB 1287 BCF gbl_LED_TRIS,5 SDO_TRIS = INPUT; 00FC 1787 BSF gbl_SDO_TRIS,7 NIRQ_TRIS = INPUT; 00FD 1786 BSF gbl_NIRQ_TRIS,7 However, writing it shorter: // tris assignements and defines not shown CS_TRIS = SDI_TRIS = SCK_TRIS = LED_TRIS = OUTPUT; SDO_TRIS = NIRQ_TRIS = INPUT; Produces: CS_TRIS = SDI_TRIS = SCK_TRIS = LED_TRIS = OUTPUT; 00F8 1283 BCF STATUS, RP0 00F9 01A5 CLRF CompTempVar583 00FA 1683 BSF STATUS, RP0 00FB 1287 BCF gbl_LED_TRIS,5 00FC 1283 BCF STATUS, RP0 00FD 01A6 CLRF CompTempVar584 00FE 1683 BSF STATUS, RP0 00FF 1286 BCF gbl_SCK_TRIS,5 0100 1283 BCF STATUS, RP0 0101 1C25 BTFSS CompTempVar583,0 0102 2905 GOTO label13 0103 1683 BSF STATUS, RP0 0104 1686 BSF gbl_SCK_TRIS,5 0105 1283 BCF STATUS, RP0 0106 1825 BTFSC CompTempVar583,0 0107 0AA6 INCF CompTempVar584, F 0108 01A7 CLRF CompTempVar585 0109 1683 BSF STATUS, RP0 010A 1306 BCF gbl_SDI_TRIS,6 010B 1283 BCF STATUS, RP0 010C 1C26 BTFSS CompTempVar584,0 010D 2910 GOTO label14 010E 1683 BSF STATUS, RP0 010F 1706 BSF gbl_SDI_TRIS,6 0110 1283 BCF STATUS, RP0 0111 1826 BTFSC CompTempVar584,0 0112 0AA7 INCF CompTempVar585, F 0113 1683 BSF STATUS, RP0 0114 1206 BCF gbl_CS_TRIS,4 0115 1283 BCF STATUS, RP0 0116 1C27 BTFSS CompTempVar585,0 0117 291A GOTO label15 0118 1683 BSF STATUS, RP0 0119 1606 BSF gbl_CS_TRIS,4 SDO_TRIS = NIRQ_TRIS = INPUT; 011A 1283 BCF STATUS, RP0 011B 01A5 CLRF CompTempVar586 011C 0AA5 INCF CompTempVar586, F 011D 1683 BSF STATUS, RP0 011E 1786 BSF gbl_NIRQ_TRIS,7 011F 1387 BCF gbl_SDO_TRIS,7 0120 1283 BCF STATUS, RP0 0121 1C25 BTFSS CompTempVar586,0 0122 2925 GOTO label16 0123 1683 BSF STATUS, RP0 0124 1787 BSF gbl_SDO_TRIS,7 That is 6 vs. 45 instructions. I would excpect these two C blocks to be equal. Is this normal or is SourceBoost making bad optimisation? I'm using BoostC 6.95.
  2. Hi, I use a chance and ask what about bits and bools in structure? These aren't supported currently. Why? Plans to add support for them?
  3. It seems there is currently no way to assign any hotkeys/keyboard shortcuts to menu commands. I very often turn on and off compiler output panel (i like it half a screen high) and targetging the small hammer icon by mouse takes a lot more time than it would with quick keyboard combo (CTRL+E for togglE output and CTRL+W for toggle workspace perhaps ?). So what would be cool is if you could add user shortcuts/hotkeys (de)assigning dialog under settings menu. If that is not possible for some reason, then can you please atleast add hardcoded hotkeys (like it is now with F7) for toggling output panel, worspace panel, debugger and maybe some more. Thanks for great compiler.
  4. Besides mentioned libs, I also think on site source gallery would be nice. Maybe even wiki.
  5. Hi, All the register names in SourceBoost C language are written in small caps but assigning name to certain port pin requries port name in big CAPSES. Why is it so and cant the system be more unified (all register names in samll caps everywhere)? porta.0 = 0; intcon.GIE = 1; vs. volatile bit LED @ PORTA.0; // port names in big CAPS, why? volatile bit test @ PORTB.5;
  6. Thanks for clearing things up and thanks for the last link.
  7. That's strange because in the BoostC Reference Manual (page 42) it says: "Arrays can have any number dimensions" So there's no way to do such lookup table in BoostC ? Anyone some ideas ?
  8. These examples are for one dimensional array but I need two dimensional array. I have tried with the following methods but none of them worked: char const data[2][5] = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; char const *data[5] = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; const char **data = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; Neither with 'rom' keyword: rom char data[2][5] = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; rom char *data[5] = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; rom char **data = {{1,3,5,7,9}, { 0, 2, 4, 6, 8}}; Compiler output: error : missing semicolon (sometimes says this, actually isn't missing) error : failure
  9. Hi, I am trying to port nokia 3310 LCD driving routines written in Hi-Tech C to BoostC and I am stuck in place named data lookup table: // ASCII lookup table static const byte FontLookup [][5] = { { 0x00, 0x00, 0x00, 0x00, 0x00 }, // sp { 0x00, 0x00, 0x2f, 0x00, 0x00 }, // ! { 0x00, 0x07, 0x00, 0x07, 0x00 }, // " { 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // # // Lots more characters between here { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y { 0x44, 0x64, 0x54, 0x4C, 0x44 } // z }; I know rom is the keyword here but I tried in many ways without success. Is there some way to accomplish this in BoostC?
  10. Ah yep, there's the boostc.html doc which i didn't look at first. Now linked to hex successfully.
  11. But how can I compile .c file into .hex file using command line? Boostc.pic16.exe generates .obj file which seems to not be the machine code yet?
  12. Yes and no. When I removed those DLLs and run the program it started ok. When I closed it to try to open again, it didn't start and still doesn't start
  13. Guess I'll have to use only the command line tools then.
  14. boostc.pic16.exe runs and compiles into .obj fine. I have no antivirus software installed. I got it running once somehow (changed sourceboost folder to read-only) but it doesn't work when i try again. No matter if I run it directly from ide.exe or through .__c file. Does SourceBoost ide need some services to be running, cause i have a bunch of them disabled?
  15. I have 256MB of memory. It should be enough I think. Installed SP2 but ide.exe still doesn't work.
×
×
  • Create New...