[AD] About inp & outp

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eheh, I knew there was a way to compile to asm code via gcc... gcc -S
Now, I made two simple programs that call inportb()/outportb() and inp()/outp(); the output asm code, compiled with gcc
switches -S -O3, showed me that inportb()/outportb() are directly converted into inb/outb asm statements, while
inp()/outp() are converted into calls to the _inp and _outp libc internal functions... I don't know what these do; for
sure they do an inb/outb, but what else? I doubt the CPU cycles spent to do a far call are enough to justify the fact
that on my computer they work, while inportb()/outportb() - that are converted to direct I/O access asm instructions -
don't work. Then why when I added the delays they still didn't worked? It's something really strange...

Now I'm open to all solutions: if it works for all as is now, let's stay as is; I don't want to force anyone to use
my crappy solution; I'll just need to add a "#define inportb inp" and "#define outportb outp" to the sndscape.c file of
my own Allegro distribuition, to ensure it works with my computer... Anyway, I don't use DOS/Windows anymore, and
under Linux (what I use) I don't have these problems; I was just curious to know why Allegro 3.12 sound worked on my pc
under DOS, while the newest WIP wasn't working, and I started investigating.

-- 
Angelo Mottola
a.mottola@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/