Author Topic: error in compiling asm SUB  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline jessicajones

  • Newbie
  • Posts: 12
    • View Profile
error in compiling asm SUB
« 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

  [ You are not allowed to view this attachment ]  

thx in advance!

FellippeHeitor

  • Guest
Re: error in compiling asm SUB
« Reply #1 on: June 20, 2020, 11:37:54 am »
No inline asm can be used with QB64.

Offline jessicajones

  • Newbie
  • Posts: 12
    • View Profile
Re: error in compiling asm SUB
« Reply #2 on: June 20, 2020, 11:42:18 am »
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

Offline jessicajones

  • Newbie
  • Posts: 12
    • View Profile
Re: error in compiling asm SUB
« Reply #3 on: June 20, 2020, 02:18:10 pm »
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

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: error in compiling asm SUB
« Reply #4 on: June 20, 2020, 02:32:16 pm »
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

Offline jessicajones

  • Newbie
  • Posts: 12
    • View Profile
Re: error in compiling asm SUB
« Reply #5 on: June 20, 2020, 02:45:24 pm »
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

  [ You are not allowed to view this attachment ]  

Jessica

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: error in compiling asm SUB
« Reply #6 on: June 20, 2020, 07:39:22 pm »
Hi jessica
it seems that your needed asm code does this
Quote
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
Quote
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://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:
Quote
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?
Programming isn't difficult, only it's  consuming time and coffee