NASM 0.98.39: Ported!
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
NASM 0.98.39: Ported!
Hi everyone,
I just got NASM 0.98.39 ported to my OS (currently fixing some minor bugs before I go on and port binutils) and assembled a file properly.
Before I got 0.98 ported I accidentally tried 2.02 (which isn't actually a stable version) and had no end to my troubles - but thanks to the NASM team for making such an easy-to-port program!
Screenshot of NASM running -v is attached, as well as a screenshot of NASM run with "-o /dev/tty" and input as a simple file ("start: jmp $").
(Note: the name "MirrorOS" is temporary, this is actually a project for school but once I hand it in I'll rename all the "MirrorOS" references with "Mattise" and release the kernel).
I just got NASM 0.98.39 ported to my OS (currently fixing some minor bugs before I go on and port binutils) and assembled a file properly.
Before I got 0.98 ported I accidentally tried 2.02 (which isn't actually a stable version) and had no end to my troubles - but thanks to the NASM team for making such an easy-to-port program!
Screenshot of NASM running -v is attached, as well as a screenshot of NASM run with "-o /dev/tty" and input as a simple file ("start: jmp $").
(Note: the name "MirrorOS" is temporary, this is actually a project for school but once I hand it in I'll rename all the "MirrorOS" references with "Mattise" and release the kernel).
- Attachments
-
- NASM assembling a file (file contents: "start: jmp $", hex of printed characters: EBFE [third char due to no extra null added at end of output string])
- nasm_ebfe.png (44.33 KiB) Viewed 4395 times
-
- NASM 0.98.39 running natively
- nasm.png (43.26 KiB) Viewed 4400 times
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
The advantage to having NASM ported is that it revealed a ton of bugs that I'd overlooked, and some basic coding mistakes (relying on uninitialized variables, using memory just allocated without ensuring it's mapped, etc...).
I'm currently writing up my execve function and once done I'll whip up a tiny shell and have a bit more choice about what to run (because at the moment, this is all hardcoded into the kernel).
I'm currently writing up my execve function and once done I'll whip up a tiny shell and have a bit more choice about what to run (because at the moment, this is all hardcoded into the kernel).
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
No, I mean the loading of the program and its argv is hard-coded.
Right now I'm changing my thread creation code to support passing an argv/argc pair so that I don't have to keep modifying a hard-coded set of strings to test different parts of NASM .
EDIT: loading of the program = grabbing it from the ramfs.
Right now I'm changing my thread creation code to support passing an argv/argc pair so that I don't have to keep modifying a hard-coded set of strings to test different parts of NASM .
EDIT: loading of the program = grabbing it from the ramfs.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Update: I wrote a simple shell that supports command recall (up/down keys), basic command editing (left/write keys, always overwrite), and support for "echo" and "cd" as well as running programs.
Attached is a screenshot of it in action.
Attached is a screenshot of it in action.
- Attachments
-
- The Mattise "MiniSH" running
- minish.png (37.4 KiB) Viewed 4310 times