Title: ccs picc pcwhd compiler confusion Post by: devetka on February 07, 2022, 06:03:38 06:03 Code: [code]having some weird questions about how this compiler works .. I noticed some time ago it is mostly case insensitive (weird for C) but some other stuff is weirder .. but then I call it with char * parameter and it works ?!?!? Code: lcd_putc("\fline1\nline2"); ?! where is the lcd_putc(char *) defined... I assume there is somewhere lcd_putc(char *) that calls lcd_putc(char) for each char in lcd_putc but I can not find it anywhere?![/code][/code] Title: Re: ccs picc pcwhd compiler confusion Post by: Manuel on February 07, 2022, 09:31:21 09:31 Helpful ? : https://www.ccsinfo.com/forum/viewtopic.php?t=36234
Dig More, maybe can find into CCS manual.. Take care, X! Title: Re: ccs picc pcwhd compiler confusion Post by: gan_canny on February 07, 2022, 02:46:13 14:46 As best as I remember CCS has a unique way of passing a collection of chars ( aka string). It has an inbuilt special function that sends a single char and repeats calls to that special function until all the chars are passed. The compiler spots the passing of more than a single char and replaces it with multiple single char actions.
Title: Re: ccs picc pcwhd compiler confusion Post by: devetka on February 08, 2022, 06:53:34 18:53 @manuel, awesome, I was not the only one baffled by this :D
@gan_canny looks like that ... I went through listing and lcd_putc(char) and lcd_putc(rom char *) are def on different addresses and lcd_putc(rom char*) I disassembled and it calls lcd_putc(char) ... but I failed to find anything about it in the documentation other than that lcd_putc(constant string) works... |