![]() |
|
[Assembly] Simple OS coded in NASM (16-bit, both for QEMU or VBox) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Assembly] Simple OS coded in NASM (16-bit, both for QEMU or VBox) (/showthread.php?tid=5500536) |
Simple OS coded in NASM (16-bit, both for QEMU or VBox) - Infamia - Dec 21, 2016 OS (Click to View) Build File (PYTHON) (Click to View) BAT Exec (Click to View) It isn't much, but it could be used for learning- it's written in pure NASM with-out any macros or C functions, so this can be just run under DOSBox with certain commands to build it to be so. But this does require prerequisites for it to work, one- being Python- is optional, and the other- NASM- isn't so optional unless you've found a way of building it manually. Save the Assembly file as something like _os.asm (so it is at the top of the directory listing- usually) and the Python file under _build.py or something of the likes. If you cannot afford to download Python, then simply save the .bat as something like _build.bat and run it. (I don't know the equivalent for Linux, but it should be the same as calling NASM and just selecting the file) This is a floppy file, so if you run it in Virtual Box or so; if any additions of code plus over 1440KB, you will encounter an error; thus you'll need to run it in QEMU as as far as I know, Virtual Box doesn't support plain binary formats. So just simply add an instruction in the Python file which calls qemu-system-i386 -fda _os.bin/flp (thus you'll need to have qemu installed, which isn't that big of a file. My Github is at: https :// github .com/unazed/OS1 if you want to see older versions (or however Github works) or commit code. Thanks for reading. Here's a picture of it being run in QEMU imgur .com/GKdJcoK.png * - Malicious Intent - Dec 21, 2016 Well done man. I hope you will develop this project into something bigger over the time. Good luck * - Infamia - Dec 21, 2016 (Dec 21, 2016 02:50 PM)michypc Wrote: Well done man. I hope you will develop this project into something bigger over the time. Good luck Thanks, I've commented the code since somebody on Discord suggested that people trying to read it might be baffled. I do plan on adding integration with languages like D or C later on, but I think I should make it a shell first. But nonetheless thanks for your post, my friend said people here would embarrass me or something ;) * - Malicious Intent - Dec 21, 2016 (Dec 21, 2016 02:54 PM)Infamia Wrote: Thanks, I've commented the code since somebody on Discord suggested that people trying to read it might be baffled. I do plan on adding integration with languages like D or C later on, but I think I should make it a shell first. But nonetheless thanks for your post, my friend said people here would embarrass me or something ;) Lol don't listen to your friend haha.. Yeah shell would be nice for sure. Its nice to see projects with big potential just taking of. As i said i hope you will continue to develop this. Bright future ahead buddy. * - Infamia - Dec 21, 2016 (Dec 21, 2016 03:04 PM)michypc Wrote: Lol don't listen to your friend haha.. Yeah shell would be nice for sure. Its nice to see projects with big potential just taking of. As i said i hope you will continue to develop this. Bright future ahead buddy. Oh God, I've just fallen into the problem of running out of space in the sector; I've written the shell already but I can't fit the most vital 2 bytes into there which signifies that it's actually bootable and an OS, I guess I'll have to write a bootloader first. * - Malicious Intent - Dec 21, 2016 (Dec 21, 2016 04:59 PM)Infamia Wrote: Oh God, I've just fallen into the problem of running out of space in the sector; I've written the shell already but I can't fit the most vital 2 bytes into there which signifies that it's actually bootable and an OS, I guess I'll have to write a bootloader first. Lol .. there you go... you will probably run into many problems like this but by the time you done with them you will have nice lil functional OS.. * - Infamia - Dec 21, 2016 (Dec 21, 2016 05:10 PM)michypc Wrote: Lol .. there you go... you will probably run into many problems like this but by the time you done with them you will have nice lil functional OS.. True man, I hope the rest of Hackforums is mostly like you, thusfar I've posted a few times in Lounge and I think the people are kind of nice but prone to getting mad at something annoying. I will try to keep the OS in on or two files however since I hate switching back and forth files, with the exception of build files of course. * - Malicious Intent - Dec 21, 2016 Well ill be following this development.. * - Venom0 - Feb 15, 2017 Hey, nice work. I also have some experience with this. Have you planned on adding support for protected mode and memory segmentation? It would allow you to put in your shell. I could help you with that. * - Infamia - Feb 16, 2017 (Feb 15, 2017 03:10 PM)Venom0 Wrote: Hey, nice work. I also have some experience with this. Have you planned on adding support for protected mode and memory segmentation? It would allow you to put in your shell. I could help you with that. this idea is quite gone, sorry. i'm learning more c/++ so i can cross-compile it later with the assembly and make an actual OS rather than a text editor with protected mode and all the other neat shit. * - _L0cky_ - May 30, 2017 (Feb 16, 2017 12:29 AM)Infamia Wrote: this idea is quite gone, sorry. Such a great post, it's a pity you're no longer into this. |