simple nasm batch file
simple nasm batch file
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.
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.
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: simple nasm batch file
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
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: simple nasm batch file
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
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.
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: simple nasm batch file
"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.
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
<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
Re: simple nasm batch file
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
Making a real OS is SO difficult that newbies often greatly underestimate the complexity of task.feare56 wrote:Indeed making an OS is difficult
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: simple nasm batch file
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 ]
[ Project UDI ]
Re: simple nasm batch file
Do you store the source code in "\Users\*Your Username*\AppData\Local\nasm"?feare56 wrote:cd \Users\*Your Username*\AppData\Local\nasm
nasm kernel.asm -f bin -o kernel.bin
Re: simple nasm batch file
Yea that's where I put mine and I made a shortcut on desktop for quick access
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: simple nasm batch file
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
<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
Re: simple nasm batch file
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.Griwes wrote:"Want to learn programming? Write OS!" is simply broken in way too many ways to ever list them.
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
I'd say anyone is ready for participating in this community.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: simple nasm batch file
To help lighten the mood, here is an ASCII art butt:
Code: Select all
. .
| |
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 ]
[ Project UDI ]
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: simple nasm batch file
Even those who store their source code in the same place as they store their toolchain? *points a few posts up*Hobbes wrote:I'd say anyone is ready for participating in this community.