The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: JayPee on February 05, 2009, 09:43:09 PM

Title: Converting MASM to GoAsm code
Post by: JayPee on February 05, 2009, 09:43:09 PM
Hi all

I am a new user to assembly tho I did do a bit in the early 80's under DOS (those were the days lol).
Now that I have retired I would like to get back into it so I set up Easy Code with GoASM, a excellent package and it's free!!.

I have been playing with a Audio API BASS.DLL however I have a problem with a inc file (BASS.INC). It is written for MASN and there are a few lines I would like to convert but not sure of the correct syntax for GoASM. A example is:-

BASS_SampleLoad                 PROTO :DW,:DW,:DW,:DW,:DW,:DW

BASS_DX8_COMPRESSOR struct
  fGain      float ?
  fAttack    float ?
  fRelease   float ?
  fThreshold float ?
  fRatio     float ?
  fPredelay  float ?
BASS_DX8_COMPRESSOR ends

Are there any programs that will convert code for MASN to GoASM??

Any help would be greatly appreciated
Thanks
JayPee
Title: Re: Converting MASM to GoAsm code
Post by: donkey on February 06, 2009, 01:54:51 AM
Hi JayPee,

There is no need at all in GoAsm for the PROTO so you can leave that line out completely. For the structure, GoAsm only deals with the actual width of the data and doesn't care what you put in there so float is actually a REAL4 and can be replaced by DD. If you want to initialize it as a REAL4 data member you can do this...

BASS_DX8_COMPRESSOR struct
  fGain      DD 0.0
  fAttack    DD 0.0
  fRelease   DD 0.0
  fThreshold DD 0.0
  fRatio     DD 0.0
  fPredelay  DD 0.0
ENDS


Jeremy includes the program AdaptAsm.Exe with GoTools, it does a fairly decent job of translating simple assembly programs, also WJR has an excellent tool called xlatHINC that translates header files.

http://www.magma.ca/~wjr/
Title: Re: Converting MASM to GoAsm code
Post by: JayPee on February 07, 2009, 02:22:49 AM
Hi Donkey thanks very much for your help - didn't fix my problem so I will look elsewhere and see where I have gone wrong lol

Best Wishes
JayPee