This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
toolchain [2017/03/02 19:08] admin created |
toolchain [2017/03/03 17:26] (current) admin |
||
|---|---|---|---|
| Line 20: | Line 20: | ||
| The NASM assembler will be your best choice when you write your [[real mode]] code. This will be your boot code. | The NASM assembler will be your best choice when you write your [[real mode]] code. This will be your boot code. | ||
| ===Compiler=== | ===Compiler=== | ||
| - | This is where it gets difficult. You will have to learn about user space and kernels and all very detailed stuff you don't want to know yet. Essentially, your compiler needs to understand that it does not have another operating system, like Linux or Windows, to rely upon. It will all be from scratch. You won't even have proper libraries to tell you how long a string is, and by far you won't have any code to initialise C++ constructors and the like.\\ | + | This is where it gets difficult. You will have to learn about user space and kernels and all very detailed stuff you don't want to know yet. Essentially, your compiler needs to understand that it does not have another operating system, like Linux or Windows, to rely upon. It will all be from scratch. Even the C libraries you normally depend upon and include without a second thought. You actually have to write those as well.\\ |
| - | //You// write the system. Nothing works until you make it so. | + | //You// write the system. Nothing will work until you make it so. It's kind of a big task. |
| ===Build tools=== | ===Build tools=== | ||
| You have your assemblers and your C-compiler that generates code. Now you need to combine it into something a computer will accept.\\ | You have your assemblers and your C-compiler that generates code. Now you need to combine it into something a computer will accept.\\ | ||
| Line 29: | Line 29: | ||
| The Windows 10 bash Linux command line does not (at the time of writing this) support removable drives, so I am using a Windows tool to apply my disk image to a USB drive. At the moment: Win32 Disk Imager\\ | The Windows 10 bash Linux command line does not (at the time of writing this) support removable drives, so I am using a Windows tool to apply my disk image to a USB drive. At the moment: Win32 Disk Imager\\ | ||
| \\ | \\ | ||
| - | My sequence to build my project is to execute "make" in bash, press "Write" and "Ok" in Win32 Disk Imager, and then launch the emulator. The process takes about 3 seconds, which is good since you do this every time you change the code. -which is often... | + | My sequence to build my project is simply to execute "make" in bash and then launch the emulator. The process takes about 3 seconds, which is good since you do this every time you change the code. -which is often... |
| ===Computer emulator=== | ===Computer emulator=== | ||
| Most emulators will do. I am using VirtualBox because I've used it before. Also, VirualBox can boot from a real disk, which you probably will want.\\ | Most emulators will do. I am using VirtualBox because I've used it before. Also, VirualBox can boot from a real disk, which you probably will want.\\ | ||
| Many kernel developers also use qemu. | Many kernel developers also use qemu. | ||