So assembly language interrupts are signals to the OS asking it to perform an action based on what is in the register. I was thinking, what would happen if there is no OS on the device you are programming. If you can't use interrupts from the OS would you have to make a large piece of code for a simple thing such as telling the computer to end the program?
Not directly. To shutdown the computer or reboot it, you can simply use direct hexcodes. Reboot for example is
DB 0EAh DW 0000h DW 0FFFFh
When you run your programme without an OS you can put your code in the interruptvector (should be many tuts in the net). But if you use your programme yourself (so if you don't intent to write your own OS ;)) it's not neccessary.
There are a lot of peripherals that one has to use including printers, disk drives, com ports, etc., etc.
For example, when you read/write something to the disk, you need to know if space is available on the said device, an appreciation of how the disk has tracks and segments, a lot of low level hardware related things including timing etc. When you read/write from the disk, do not think that the data is read or written on the very first try even though it may look so. How do you buffer the data read or to be written when you have many actions happening at the same time. On the COM port, how do you recover from an error, how many times do you retry before giving up. If you were to handle all these scenarios yourself, you will end up writing close to the DOS system we have. DOS has been around for a few years developed by a major corporation and used and critiqued by the world. Would you want to do it yourself?
What can be done is for special pursposes implement a non used interrupt in the interrupt vector (low memory area) and code you functionality. Even there you may fall back on many DOS provided functions.