Page 1 of 2
simple nasm batch file
Posted: Sun Jan 13, 2013 7:59 pm
by feare56
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.
Re: simple nasm batch file
Posted: Sun Jan 13, 2013 11:40 pm
by thepowersgang
Without sounding elitist - People who don't know that (or can't easily figure that out), have no business attempting OSdev (yet).
Re: simple nasm batch file
Posted: Mon Jan 14, 2013 6:42 am
by feare56
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
Re: simple nasm batch file
Posted: Mon Jan 14, 2013 7:07 am
by iansjack
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.
Re: simple nasm batch file
Posted: Mon Jan 14, 2013 7:51 am
by Griwes
"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.
Re: simple nasm batch file
Posted: Mon Jan 14, 2013 3:53 pm
by feare56
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
Re: simple nasm batch file
Posted: Tue Jan 15, 2013 1:28 am
by Yoda
feare56 wrote:Indeed making an OS is difficult
Making a real OS is SO difficult that newbies often greatly underestimate the complexity of task.
Re: simple nasm batch file
Posted: Tue Jan 15, 2013 3:04 am
by Love4Boobies
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.
Re: simple nasm batch file
Posted: Thu Jan 17, 2013 4:34 am
by qw
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"?
Re: simple nasm batch file
Posted: Thu Jan 17, 2013 6:42 am
by feare56
Yea that's where I put mine and I made a shortcut on desktop for quick access
Re: simple nasm batch file
Posted: Thu Jan 17, 2013 8:51 am
by Griwes
Then you're definitely not ready for participating in this community.
Re: simple nasm batch file
Posted: Thu Jan 17, 2013 10:37 am
by Antti
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.
Re: simple nasm batch file
Posted: Fri Jan 18, 2013 2:57 am
by qw
I'd say anyone is ready for participating in this community.
Re: simple nasm batch file
Posted: Fri Jan 18, 2013 8:14 am
by Love4Boobies
To help lighten the mood, here is an ASCII art butt:
Code: Select all
. .
| |
j : l
/ \
/ \
Y . Y
| | |
l "----~Y~----" !
\ | /
Y | Y
| I |
Re: simple nasm batch file
Posted: Fri Jan 18, 2013 11:55 am
by Kazinsal
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*