??? 05/24/10 01:56 Modified: 05/24/10 01:57 Read: times |
#176140 - found a cause, but .... Responding to: ???'s previous message |
... still unfamiliar with the thingy I am reluctant to put it in a bug report.
the startup code goues out to lunch (see below) if _sdcc_external_startup is left out or return zero. If _sdcc_external_startup returns nonzero, all is OK. manually copying the disassembly from the emulator window: fairly normal looking code till here djnz ; the end of the xdata clearing djnz mov 29h,#80h mov 2ah,#81h mov 2bh,#82h ... adding 1 to both left and right mov 50h,#f3h mov 51h,#f4h !!!!!!!!! observe the anomaly (not +1, +1 mov 52h,#f8h mov 53h,#ffh setb 2a.4h setb 2a.5h setb 2a.6h .... next bit setb 2f.3h mov 7ch,#80h mov 7dh,#81h ... adding 1 to both left and right mov 87h,#8eh !!!!!!!!!!!! sets the power down bit as stated above, due to unfamiliarity I am reluctant to put it in a bug report, if someone 'fluent' in SDCC confirms this, (s) is welcome to add a bug report. Is it so that not having _sdcc_external_startup is so unusual that this simply has not been detected? Instead of all this jumping through hoops for the sake of universality, I guess I will just "SDCCize" a regular (Keil) startup code and include that. Since I disallow initialized (to nonzero) global variables, I should be fine. Erik |