OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:12 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: simple nasm batch file
PostPosted: Sun Jan 13, 2013 7:59 pm 
Offline
Member
Member

Joined: Sun Dec 23, 2012 5:48 pm
Posts: 97
This might be obvious to some people but for people like myself who never thought about it and I just created this so it will make kernel converting to asm to bin easier.

This is for windows only

create a new text document and paste this code

cd \Users\*Your Username*\AppData\Local\nasm
nasm kernel.asm -f bin -o kernel.bin

then change the file extension to .bat
again most of you probably know this but others like myself didn't know it. Hope I made it easier for those who feel that it is hard to remember the nasm command.

_________________
Flow OS
https://sourceforge.net/projects/flow-os/


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Sun Jan 13, 2013 11:40 pm 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
Without sounding elitist - People who don't know that (or can't easily figure that out), have no business attempting OSdev (yet).

_________________
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Mon Jan 14, 2013 6:42 am 
Offline
Member
Member

Joined: Sun Dec 23, 2012 5:48 pm
Posts: 97
That's not the case for some actually. Some people make operating systems to learn programming. Though those people are rare and most of us know what to do it just for those people who aren't a good programmer yet

_________________
Flow OS
https://sourceforge.net/projects/flow-os/


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Mon Jan 14, 2013 7:07 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Well, I'd agree with thepowersgang that anyone who can't knock up a simple batch file, shell script, makefile, linker script, etc. is unlikely to get far in OS development.


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Mon Jan 14, 2013 7:51 am 
Offline
Member
Member
User avatar

Joined: Sat Jul 30, 2011 10:07 am
Posts: 374
Location: Wrocław/Racibórz, Poland
"Want to learn programming? Write OS!" is simply broken in way too many ways to ever list them.

If you don't know pitfalls and caveats of your programming language of choice and ways of debugging things (not to mention shell usage...), then you have nothing to do in this field.

_________________
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Mon Jan 14, 2013 3:53 pm 
Offline
Member
Member

Joined: Sun Dec 23, 2012 5:48 pm
Posts: 97
Indeed making an OS is difficult but I have seen a few stories starting like this "I don't know a bunch of programming but how would I begin an OS?" And yes they probably don't relize how hard it is to make a working kernel even the most basic kernel

_________________
Flow OS
https://sourceforge.net/projects/flow-os/


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Tue Jan 15, 2013 1:28 am 
Offline
Member
Member
User avatar

Joined: Tue Mar 09, 2010 8:57 am
Posts: 255
Location: Moscow, Russia
feare56 wrote:
Indeed making an OS is difficult

Making a real OS is SO difficult that newbies often greatly underestimate the complexity of task.

_________________
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Tue Jan 15, 2013 3:04 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
Developers generally use build systems which only rebuild things whose prerequisites have been modified since the last build. As your code base grows, this will become more valuable. As an example, see the Makefile article on the wiki.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Thu Jan 17, 2013 4:34 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 26, 2009 2:48 am
Posts: 792
feare56 wrote:
cd \Users\*Your Username*\AppData\Local\nasm
nasm kernel.asm -f bin -o kernel.bin

Do you store the source code in "\Users\*Your Username*\AppData\Local\nasm"?


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Thu Jan 17, 2013 6:42 am 
Offline
Member
Member

Joined: Sun Dec 23, 2012 5:48 pm
Posts: 97
Yea that's where I put mine and I made a shortcut on desktop for quick access

_________________
Flow OS
https://sourceforge.net/projects/flow-os/


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Thu Jan 17, 2013 8:51 am 
Offline
Member
Member
User avatar

Joined: Sat Jul 30, 2011 10:07 am
Posts: 374
Location: Wrocław/Racibórz, Poland
Then you're definitely not ready for participating in this community.

_________________
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Thu Jan 17, 2013 10:37 am 
Offline
Member
Member

Joined: Thu Jul 05, 2012 5:12 am
Posts: 923
Location: Finland
Griwes wrote:
"Want to learn programming? Write OS!" is simply broken in way too many ways to ever list them.


Although this is true, I think that it is quite possible to start making some "boot loader experiments" quite early on. These should not be considered as an OS but more like simple programs. Printing on screen etc. Of course everyone is going to say it is better to do this on real OS (e.g. making normal programs). Yes it is, I cannot deny. However, as a side project it is not very bad idea to try these simple "bare metal" code snippets.

If someone had shown me how to boot simple "Hello World OS" ten years ago, I am quite sure I would have eagerly start investigating it more. Making it print two "Hello Worlds". This is awesome! I can do whatever I want it and I do not even have an operating system! I will grab a book and start studying more.

What I mean is that if you find it interesting to play with "nasm kernel.asm -f bin -o kernel.bin" I recommend that you continue. Also, please also keep studying programming in general. Please continue participating this community (especially: read the wiki) but do not make this kind of thread because this community concentrates on more advanced topics. Expect the Auto-Delete Forum occasionally.

_________________
Undefined behavior since 2012


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Fri Jan 18, 2013 2:57 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 26, 2009 2:48 am
Posts: 792
I'd say anyone is ready for participating in this community.


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Fri Jan 18, 2013 8:14 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
To help lighten the mood, here is an ASCII art butt:

Code:
             .         .             
             |         |             
             j    :    l             
            /           \             
           /             \           
          Y       .       Y           
          |       |       |           
          l "----~Y~----" !           
           \      |      /           
            Y     |     Y             
            |     I     |         

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: simple nasm batch file
PostPosted: Fri Jan 18, 2013 11:55 am 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 558
Hobbes wrote:
I'd say anyone is ready for participating in this community.

Even those who store their source code in the same place as they store their toolchain? *points a few posts up*


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group