1
1
mirror of https://github.com/nmlgc/ReC98.git synced 2025-02-24 09:33:07 +00:00
nmlgc 43c97ccaa1 [Maintenance] Decide on __asm as the keyword for inline assembly
Which works in both Borland C++, Open Watcom, and Visual C++.

Not that we're about to port any of the games to these compilers, just
something I noticed while evaluating 32-bit compilers for ReC98's own
32-bit pipeline tools. Modders might want to look into that though,
since 100% position independence also makes it easier to change
compilers.
2020-06-21 22:18:00 +02:00

17 lines
286 B
C

int snd_determine_mode(void)
{
__asm mov ah, PMD_GET_DRIVER_VERSION;
__asm int PMD;
_BX = 0;
if(_AL != 0xFF) {
__asm inc bx;
snd_fm_possible = 1;
} else {
__asm mov bl, snd_midi_active;
}
__asm mov snd_active, bl;
return _BX;
}
#pragma codestring "\x90"