Programming with PC Interrupts.
Yup what people call BIOS had specific code to do a ton of things like reading the keyboard, parallel printer, driving the monitor, Hard Disk /Floppy controller code, DMA control, MIDI, Serial communications, Real time clock, Cassette interface, Joystick, extended memory, etc, etc, etc. Plus a bunch more of vendor specific ones.
Edit: I had the complete photocopied IBM PC ROM BIOS disassembly in a binder, not sure where is at (probably my wife tossed it).
And I believe Basic was somewhere in there as well.