Lots of the source of CP/M came with the distribution, and it wasn't hard to dis-assemble specific bits you were interested in.
Some CP/M software (I'm thinking of WordStar specifically here, but no doubt others) almost required you to write a keyboard and display handler in Z80/8080 machine code to get decent performance over the generic CP/M code - been there on Research Machines 380Zs.
Some CP/M software (I'm thinking of WordStar specifically here, but no doubt others) almost required you to write a keyboard and display handler in Z80/8080 machine code to get decent performance over the generic CP/M code - been there on Research Machines 380Zs.