AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
269 stars 63 forks source link

[X11] No beep sound with INT 1CH AH=06H #37

Closed frank-deng closed 6 years ago

frank-deng commented 6 years ago

I tried to use the BIOS's beep function with the following code, but failed to produce any sound.

#include <stdio.h>
#include <dos.h>

union REGS inregs, outregs;

void main(){
    inregs.h.ah = 0x06;
    inregs.x.cx = 1;
    inregs.x.dx = 1000;
    int86y(0x1C, &inregs, &outregs);
}

LSI C-86 Ver. 3.30c試食版 is used for compiling the code above inside the PC98 emulator.

AZO234 commented 6 years ago

To sound beep, we must write value to timer with address, without interrupt. (PC-98 is not AT machine.)