I like to play with STC's 8051 MCU for fun and have developed a HAL for them covering all STC8 and STC15 series, and the STC12C5A56S2 family. Here it is.
Beside the code examples provided in the demos directory, I also make available the code of a UART-to-IR remote module I've built using my HAL in this other repository.
It demonstrates that the same application can be built for the STC15W408AS, the STC8G1K08A, or the STC8G1K17 (or if you wish, the STC15W4K32S4, STC8A8K64S4A12, STC8A8K64D4, and STC8G2K64S4) by only changing the included header file and a few macros.