NASM 0.98.39: Ported!

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
pcmattman
Member
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!

Post by pcmattman »

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).
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 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 4392 times
NASM 0.98.39 running natively
NASM 0.98.39 running natively
nasm.png (43.26 KiB) Viewed 4397 times
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

Nice, love that startup text about crashing :P
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

Wow, that's pretty cool. I'm sort of working on porting nasm/fasm to my OS.
pcmattman
Member
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:

Post by pcmattman »

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).
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

By hard coded do you mean that it is compiled into the kernel?
pcmattman
Member
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:

Post by pcmattman »

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 :D.

EDIT: loading of the program = grabbing it from the ramfs.
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

Any hope of code being uploaded to your CVS for perusal? *crosses fingers*
pcmattman
Member
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:

Post by pcmattman »

Code will be uploaded within the next 2 weeks ;).

As I said in the original post, this is a school project which, once handed in, will be renamed to my main OS name (Mattise) and uploaded to repositories and packaged for a release.
pcmattman
Member
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:

Post by pcmattman »

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.
Attachments
The Mattise "MiniSH" running
The Mattise "MiniSH" running
minish.png (37.4 KiB) Viewed 4307 times
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

thats pretty cool, id love to have even some of the toolchain ported to my os. maybe ill start setting up the environment when i get bored of vga fiddling
~ Lukem95 [ Cake ]
Release: 0.08b
Image
pcmattman
Member
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:

Post by pcmattman »

t0xic wrote:Any hope of code being uploaded to your CVS for perusal? *crosses fingers*
I've just committed my code to my SVN repository (see my sig). Happy reading :D!
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

Your sig says CVS, do you mean CVS or have you moved to SVN and not updated your sig?
pcmattman
Member
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:

Post by pcmattman »

Sig updated, thanks for pointing that out.
Post Reply