Knowledge of Assembly code is very useful-- in fact, required. You will need to write code to directly interface with the hardware, and build standard function calls that can be used by other programs. Later you can write I/O functions and then your own ANSI C library functions to make your programming life easier.
But, the basic things you need to do are:
- Method for ogranizning data on a disk (file system)
- Method for reading/writing files
- Functions for displaying text to the screen
- Functions for handling allocating memory to other programs
- Functions to run and exit a program
- Write a command interpreter so that someone at a keyboard can issue commands to the OS to execute programs, and manage files on the disk (a very basic one is COMMAND.COM, which you can learn more about at Guides:Shells/COMMAND.COM-CMD.EXE - CoderGuide)
- You'll also need to write a boot loader to load your operating system when the system boots. On PCs, this is a single sector on a floppy or hard disk (512 bytes), and yes, written entirely in assembly code.
And that's pretty much it.
I was about to write my own OS back when I was 16, but then I discovered something called Linux, and figured, what's the point? Ah well. If you'll be writing a OS for the PC, you'll need the BIOS interrupt list when in real mode. Eventually that'll be put into coderguide.com, but other things are more important at the moment.
So.. what's 80x86 (Intel/PCs in real mode) assembly code? It looks a bit like this:
Code:
xor ax,ax
mov ah, 13h
int 10h
mov cx, 64000
mov ds, a000
xor ax,ax
:label
mov [ds:cx], al
inc al
loopz label
My assembler is a little rusty, but, that should write a bunch of color bands to a 320x200 VGA (256 color) screen. And then crash because I didn't put the code in there at the end to return to the operating system

.
My loop and memory reference code may be wrong. I can't remember which/if certain registers were not allowed in memory references.