VOGONS


Tandy Nano - 3 Voice Soundcard ISA - Lowprofile

Topic actions

Reply 160 of 164, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote on Yesterday, 18:03:
Suggestion for greater efficiency: […]
Show full quote

Suggestion for greater efficiency:

asm {
push dx
mov dx,2C0h
out dx,al
pop dx
}

There's no need to push/pop AX because the value isn't changed, and you can instead push/pop DX to write to the port directly -- then al_val and outp() aren't needed.

Thanks i compiled with tasm but i get no sound from two games i modded, zak and maniac

Now im working let my try to compile again and i will give you feedback

thanks a lot for your code and help!

Reply 161 of 164, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I think you'll need a C compiler rather than an assembler like TASM, because my suggestion is for your C code above.

Reply 162 of 164, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote on Yesterday, 18:14:

I think you'll need a C compiler rather than an assembler like TASM, because my suggestion is for your C code above.

Ah sorry , i add some code to compile like a tsr in asm to your code and use tasm

Now i understand sorry! i will test in borland and give you feedback as soon i can

thanks!!! for sure your code will be much better than mine, and in a 286 every optimization is need

Reply 163 of 164, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

IIRC, the interrupt handler procedures in C push/pop most registers for safety, so might not even need to explicitly preserve the value of DX...

The attached archive includes binary and source for an assembly implementation of the idea for maximum efficiency, lean and mean. 😉

Reply 164 of 164, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote on Yesterday, 18:59:

IIRC, the interrupt handler procedures in C push/pop most registers for safety, so might not even need to explicitly preserve the value of DX...

The attached archive includes binary and source for an assembly implementation of the idea for maximum efficiency, lean and mean. 😉

amazing thanks man

i think tomorrow will be home and test, greetings