QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: jessicajones on June 20, 2020, 11:34:36 am
-
Hi
I'm trying to compile a project, made in FreeBasic, in QB64.
So far, most syntax is converted but I'm stuck in a BAS file which is included in the project.
This BAS file has SUB's with asm code inside.
One of the SUB's gives this error: "expected ( on line 216"
Attached is the BAS file
[ This attachment cannot be displayed inline in 'Print Page' view ]
thx in advance!
-
No inline asm can be used with QB64.
-
I never wrote asm, so I didn't know!
How to write this asm: in what file and how to "include" it in my project? I need 2 SUB's with asm code as you can see in the file.
I'm a beginner, certainly for asm...
thx
-
Can anybody help?
I need 2 asm SUB's in QB64 but I don't know how to do it.
I also can't find any documentation how to do it.
Is asm possible in QB64 and yes, how?
Jessica
-
the code you posted is for DOS, as far as I know QB64 won't run in DOS
the better question is: what are you trying to achieve?
if you give a detailed explanation of what your program aim is, then I am confident that the friendly members of this forum will help
-
Hi
I try to port this program from FreeBasic to QB64.
https://www.vogons.org/viewtopic.php?t=59734
Is it possible this BASIC code can run in QB64 (it's made for MS-DOS)?
You can see it has ASM code too.
Here is the program attached too
[ This attachment cannot be displayed inline in 'Print Page' view ]
Jessica
-
Hi jessica
it seems that your needed asm code does this
sub timer_constructor constructor
and it is in DOSTIME.BAS
the goal of that code seems to have a good perfomant timer under DOS where the Interrupt doesn't do that well.
Moreover the rest of code seems to be a long set of OUT to get sound by OPL...
and it seems that OPL is a specific chipset to make sound and included in the most of '90 Soundcard.
http://dosmid.sourceforge.net (http://dosmid.sourceforge.net)
it is also possible to somewhat emulate MIDI via FM synthesis using an OPL chip (that is one of the Yamaha YM3812 or YMF262 chips, found on most sound cards from the nineties) - be warned however that, most of the time, such MIDI-over-OPL emulation will yeld less than desirable results, unless the MIDI file was specifically crafted for OPL.
see here https://ilovepa.ws/2017/06/09/yamaha-opl-isa-cards/ (https://ilovepa.ws/2017/06/09/yamaha-opl-isa-cards/)
https://www.musicradar.com/news/discodsps-opl-synth-plugin-sounds-like-your-pc-from-the-90s (https://www.musicradar.com/news/discodsps-opl-synth-plugin-sounds-like-your-pc-from-the-90s)
So if all the previous sentences are right the question that rises is:
do you need to use an OPL chipset or do you need simply to sound that kind of sound files on every machine with sound card?