I have created the game "Angry Birds" in assembly 8086. My main problem now is that I want to play the song of the game while the main loop is running. I've already written the code for the music. I thought about using multi-threading but found out the assembly interrupt for creating threads only works on cmd and not on DOSBox.
However, I found another way of doing multi-threading, which was to call a command from the C++ Windows.h file, that creates a thread. That was too complicated.
Now, I have managed to communicate between two different DOSBox windows, using interrupt 14h for sending messages over LAN ports. Basically, I've written a separate code for the music. Both codes run and only when the music code gets the sign, it starts playing the music.
However, I found out that when two DOSBox windows are open, only the sound of the main one works. You have to switch windows in order to hear the music, which means you can't hear it.
Does anyone have any idea of how I can solve this problem, or generally play music while the main loop is running?
Thank you