Skip to main content
gamedev.net
🔒 Locked

Assembly

Started by SirRuperto Nov 19, 2004 at 1:50 AM 2 replies 550+ views
Original Post
SirRuperto
SirRuperto
ok ok i know its my 1st post here.... but i have a big question ....... lets say you wanted to get output threw your sound card using assembler ... how can you make this happen ? // Im a newb in asm coding ...
TheBluMage
TheBluMage
Are you talking about writing actual low-level drivers to directly manipulate the sound cards and send/receive data through it, or use pre-existing libraries/drivers. The latter seems more realistic, and if that's what you mean, it shouldn't be a too much harder than doing it in C/C++ (more time-consuming, but probably not a whole lot harder). You just need to know how to use memory, registers and function calls. Once you've done what you're trying to do in a higher-level language, it will probably be a lot easier to do in assembly.

I'm not sure what processor you're planning on writing for, but try Googling for a tutorial in whichever one you choose and you can probably find some good stuff. To start off, I suggest using asm blocks in C++. This allows you to write assembly inside of a C++ function, and is a good way to start learning, without having to write a whole program in assembly (though that's not too hard either, just time-consuming).
kovacsp
kovacsp
Hi,

you can try this for example:
http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html

But you need an sb compatible card to do it (and I don't know whether xp will allow a non-ring0 code to access ports directly). However, I did some sb16 programming in asm in the good old DOS days according to an older version of this document.
So if you really want to, it's possible.

Peter
------------------------------------------------------------Neo, the Matrix should be 16-byte aligned for better performance!
SirRuperto
SirRuperto
TheBluMage thanx that is really helping :)

kovacsp nah nah no drivers ... i just want to get a note out threw the sound card ....... i dont know how to explain this ..... ermm lets say i wanted to make a piano app and the code has to be coded in asm, and the output must be generated by the sound card .... :S

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.