|
Prev: Borland 5.5 Command line C/C++ compiler
Next: qsort
From: Richard Cooper on 12 Sep 2005 02:39 I decided I want to write a game. After exploring my options, I've decided two things: Linux isn't good for games, and C is a real pain. So I guess it's Windows Assembly time. I know a lot of people in this newsgroup program on Windows, so if some of you could point me to some good websites, that'd be really nice of you. Thanks. Here's where I'm at: I know assembly very well, however, I don't know the first thing about doing assembly, or any other programming, under Windows. I haven't even used Windows signifigantly since the 3.11 days. So all I really need is a nice little tutorial on how to use the Windows API from assembly language, as well as anything special that has to be done to get such programs to assemble correctly, and then some good documentation on the Windows API itself. I'd also really like to find an assembler that is more like C. If there were such a thing as a two-pass C compiler, such that you didn't have to prototype your functions and your global variables could appear anywhere in the code, that would be just awesome, but that's probably hoping for too much. The only thing I really like in C is the ability to use math expressions like "x = 12 * y + 47", fun complex pointer things like "*(&variable + x + 12) = *(pointer + y + 31)", and the ability easily pass parameters to and from functions, as those three features save a lot of time and usually produce the same assembly code I would have written myself anyway. I couldn't care less about the standard library, usually I don't like any of the functions in it anyway, not to mention I hate calling a function just to push a number into the FPU and calculate the sine. I currently use NASM, so documentation with examples in code that looks more like NASM and less like GAS would be more beneficial to me. Thanks. BTW, my email doesn't work. Sorry, but I'm too afraid of spam.
From: JGCASEY on 12 Sep 2005 04:57 Richard Cooper wrote: > I decided I want to write a game. What kind of game/s are you interested in? > After exploring my options, I've decided two > things: Linux isn't good for games, and C is > a real pain. So I guess it's Windows Assembly > time. Why is C a real pain? There are tutorials for game playing programs in C and even using C in a DirectX shell for games. > I know a lot of people in this newsgroup program > on Windows, so if some of you could point me to > some good websites, that'd be really nice of you. > Thanks. > > > Here's where I'm at: > > > I know assembly very well, however, I don't know > the first thing about doing assembly, or any other > programming, under Windows. I haven't even used > Windows signifigantly since the 3.11 days. Big learning curve ahead? > So all I really need is a nice little tutorial on > how to use the Windows API from assembly language, > as well as anything special that has to be done to > get such programs to assemble correctly, and then > some good documentation on the Windows API itself. > > > I'd also really like to find an assembler that is > more like C. HLA :-) > If there were such a thing as a two-pass C compiler, > such that you didn't have to prototype your functions > and your global variables could appear anywhere in > the code, that would be just awesome, but that's > probably hoping for too much. > > The only thing I really like in C is the ability to > use math expressions like > "x = 12 * y + 47", fun > complex pointer things like > "*(&variable + x + 12) = *(pointer + y + 31)", > and the ability easily pass parameters to and from > functions, as those three features save a lot of > time and usually produce the same assembly code > I would have written myself anyway. > > I couldn't care less about the standard library, > usually I don't like any of the functions in it > anyway, not to mention I hate calling a function > just to push a number into the FPU and calculate > the sine. > > > I currently use NASM, so documentation with > examples in code that looks more like NASM and > less like GAS would be more beneficial to me. So you use NASM and haven't used Windows I assume this means you have only used DOS? This is the position I am in and over the last three weeks have delved into the possibility of writing Win32 assembler programs. To what extent you need all that Window stuff depends on the kind of game you want to write. - John Casey
From: Betov on 12 Sep 2005 05:00 "Richard Cooper" <spamandviruses(a)xersedefixion.com> ýcrivait news:op.swy8rgvl29jixb(a)sucks.airplane.fire: > I decided I want to write a game. > > I know a lot of people in this newsgroup program on Windows, so if > some of you could point me to some good websites, that'd be really > nice of you. It seesm that RosAsm is what you are searching for. You will find several Win32 Api Tutorialss, and several examples of games, as well. > I'd also really like to find an assembler that is more like C. If > there were such a thing as a two-pass C compiler, such that you > didn't have to prototype your functions RosAsm does this (in one single Pass). > and your global variables > could appear anywhere in the code, RosAsm does this. > that would be just awesome, but > that's probably hoping for too much. The only thing I really like in > C is the ability to use math expressions like "x = 12 * y + 47", RosAsm does this. > fun > complex pointer things like "*(&variable + x + 12) = *(pointer + y + > 31)", Not that... :)) Betov. < http://rosasm.org >
From: Frank Kotler on 12 Sep 2005 11:17 Richard Cooper wrote: > I decided I want to write a game. After exploring my options, I've > decided two things: Linux isn't good for games, I think programming for Linux *is* a pretty good game! One you seem to be quite good at! > and C is a real pain. Some people *like* it!!! No accounting for taste! :) > So I guess it's Windows Assembly time. Sigh... .... > So all I really need is a nice little tutorial on how to use the > Windows API from assembly language, I think "*little* API tutorial" is an oxymoron. As Betov pointed out to me, you don't so much "learn the API" as learn to navigate the documentation so you can find what you need. Much of the documentation is in "C terms", so you'll have to translate it to asmese - same idea as reading the "man 2" pages to figure out sys_calls. .... > I'd also really like to find an assembler that is more like C. You might like HLA. At least it uses ";" as an instruction terminator, as you seem to prefer :) There's a portable standard library, but all console-mode stuff. Sevag is writing a game scripting engine for Windows GUI. (I'm sure he'd *like* it to be portable!) When you say you want to write a game, you probably don't mean using a scripting engine... but you might want to get in on coding it. If you decided you liked HLA, your knowledge of Linux would be quite useful to the HLA "camp", I think! Betov's already put in his pitch for RosAsm. It's well-suited for "games for Windows", I think - that's the kind of thing it's targetted at. RosAsm allows multiple instructions per line, which you like. You couldn't very well use custom "pre-processors" with it, like you do with Nasm... .... > I couldn't care less about the > standard library, usually I don't like any of the functions in it > anyway, not to mention I hate calling a function just to push a number > into the FPU and calculate the sine. But you think you're going to like the Windows API??? Ooookay... > I currently use NASM, so documentation with examples in code that looks > more like NASM and less like GAS would be more beneficial to me. Not much of a problem encountering Gas code for Windows - although it *does* exist. If you want to stick with Nasm, I'd download the "NaGoA" package. I personally don't want to use the IDE - I'm a command-line guy - but there are a ton of examples, tutorials, etc. and the "%include" files you'll want - unless you want to type in all those "long names for small integers"... http://www.visual-assembler.pt.vu I wish you luck with it... but I hope you'll reconsider :) Best, Frank
From: Betov on 12 Sep 2005 11:37
Frank Kotler <fbkotler(a)comcast.net> ýcrivait news:DuKdnXc73rrQAbjeRVn- gg(a)comcast.com: > Betov's already put in his pitch for RosAsm. It's well-suited for "games > for Windows", I think - that's the kind of thing it's targetted at. > RosAsm allows multiple instructions per line, which you like. You > couldn't very well use custom "pre-processors" with it, like you do with > Nasm... Sure, he _could not_. The missing point is that he would never _need_ to. :)) Betov. < http://rosasm.org > |