mov si,answer
call print_string
answer db "Yes.",0Dh,0Ah,0
mode after bare bones
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mode after bare bones
Couldn't you use something like this?Troy Martin wrote:/agree=completelySolar wrote:Just a gut feeling that we, as a community, are getting a bit too aggressive and negative.
It's possible we could "handle" the parameters in a clean and simple way, using just some kind of "if (param1 == param2);" that should count as usage without doing anything. If I'm wrong, it's because I have asmbrain.I wouldn't want to take out either the -Werror nor the parameters (as both are helpful), but I wouldn't want to bloat the tutorial with parameter-handling code...
Code: Select all
(void)param1;
(void)param2;
-
- 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:
Re: mode after bare bones
If it's GCC you could define an UNUSED macro (__attribute__((unused)) iirc, but it's been a long while) and put that around the main() parameter names.
That might make things too complicated though, it is a BareBones tutorial
That might make things too complicated though, it is a BareBones tutorial
Re: mode after bare bones
...and you'd have to go ahead and explain GCC attributes, and why it's not a good idea to rely on them, bloating the tutorial further.
I added a code comment; better yet would be example code that checks the magic number, and prints something from the multiboot data structure to screen - but I'm in a hurry (as always). Might add it later.
I added a code comment; better yet would be example code that checks the magic number, and prints something from the multiboot data structure to screen - but I'm in a hurry (as always). Might add it later.
Every good solution is obvious once you've found it.
Re: mode after bare bones
Can't really test it ATM, but now it should compile without problems.
Every good solution is obvious once you've found it.