Re: Windows Assembly



Richard Cooper wrote:

> Mostly what I don't like is GCC. It prints out all of these error
> messages which don't make a bit of sense, even after I figure out what
> I've done that it doesn't like. Should I do something as trivial as
> type "if (var1 == 12 and var2 == 14) {" then it starts complaining
> about every single line in the file rather than simply tell me that
> it doesn't know the word "and".

Always read errors from top to bottom and fix them in that order. A good IDE
with "goto line with error" is your friend here. If you start using STL, be
sure to get stlfilt.

> Then every time I make a new function, I have to type a prototype for
> it at the top of the file, and every time I make a new global
> variable, that has to go at the top of the file too. We've had
> two-pass assemblers forever, why not a two-pass C compiler?

Could be too expensive especially when templates are involved. Probably
other good reasons as well. Is it really that much bother doing prototypes?
When doing multi-module programming you really do need the protos. (yes,
something like the units of pascal or packages of java and C# would be
nicer).

> My main concern is that my C code isn't going to be as reliable as my
> assembly code. It's easy to type something in C that looks like it
> will work right, but it doesn't. Like this:
>
> if ( (pointer = mmap(this, that)) < 0 ) {

If you want to check for mmap failure, don't rely on "< 0", check explicitly
for MAP_FAILED.

> I like to write programs that detect errors and act appropriately, but
> because of the above two items, I don't know that I can do that in C.

Sounds pretty nasty if signal handlers aren't catching what they're supposed
to. Try to see if C++ exception handling "try { bleh(); } catch(...) {
diediedie(); }" can catch the error.

<snip>

Hm, selling software to linux users? Good luck :)

You could try targetting for OpenGL, if only to get modeswitching whether
you want hardware acceleration or not. I assume GL *is* able to change
resolution on linux, and not just run in a window? :). But then you of
course have the issue that only a couple (or three?) cards will have native
GL support, and the rest would be MESA (which relies on *what* for changing
video modes?)

> So I figure, *** Linux. It wouldn't be worth the effort.

Hrm, I have a couple of friends who have told me things have gotten oh so
much better now, with {Ubuntu, Gentoo, Fedora, <insert big fancy distro name
here> }. Can't really be bothered to download and install any of those after
your description.


.


Quantcast