Hello. I copied "LCD_4bit.c" and "LCD.h" files from Keil examples folder to my project folder and add it to my project. Then I changed Pins definition in "LCD_4bit.c" according to my project board LCD pins(LPC 2378). (I don't think that The problem is here.) Then I could successfully Build it, but when I download it to my project board,there is no signs that LCD works. However when I compile "LCD_4bit.c" in IAR environment ,the produced "hex file" works well on my project board. Thanks for your help.
"In order to make valid predictions, even in assembly, you need to be aware of many parameters (system load, memory barriers, scheduling issues if they apply, C compiler settings,...)."
agreed.
"In the end, just looking at HLL delay code might hide real faults, like loops being optimized out due to a forgotten "volatile" (certainly many here had that, when running out of ROM and needing to increase optimization level...). That's a little dangerous."
agreed too.