English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

Thread Tools
Old 30 December 2014, 01:55   #1
Posts: n/a
Trouble with macro parameters in VASM

I'm doing some experimental stuff right now for a driver, and the macros I need for it work in other assemblers except VASM... It's not Amiga stuff, but the person who works on the source of the VASM (Phx) is here.

So basically,

z80word MACRO Value
	dc.w	((Value)&$FF)<<8|((Value)&$FF00)>>8

DAC_Entry MACRO Pitch, Sample, Flags
	dc.b	Flags			; 00h	- Flags
	dc.b	Pitch			; 01h	- Pitch
	dc.b	(Sample>>15)&$FF	; 02h	- Start Bank
	dc.b	(Sample_End>>15)&$FF	; 03h	- End Bank
	z80word	(Sample)|$8000		; 04h	- Start Offset (in Start bank)
	z80word	(Sample_End-1)|$8000	; 06h	- End Offset (in End bank)

; Dac Entries
        DAC_Entry $05,CymbalSnare,pri
The problem: The entry right at the bottom of the code is supposed to treat Sample_End in the DAC_Entry macro as "CymbalSnare_End", but instead, the assembler interprets "Sample" in "Sample_End" it as a regular label together and not a macro tag.

Please Phx, fix this as soon as possible. Psy-ASM68k uses a slash to seperate the tag from the label, like so:


Edit: tl;dr:

z80word (Sample_End-1)|$8000 ; 06h - End Offset (in End bank)
z80word (CymbalSnare_End-1)|$8000 ; 06h - End Offset (in End bank)

z80word (Sample_End-1)|$8000 ; 06h - End Offset (in End bank)
z80word (Sample_End-1)|$8000 ; 06h - End Offset (in End bank)

Error! Error!

Last edited by kazblox; 30 December 2014 at 02:02. Reason: tl;dr
Old 30 December 2014, 22:41   #2

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,189
I understand what you mean, but your example is absolutely useless. I found no vasm syntax- or cpu-module which accepts only parts of that source.

Probably you are working with "std" or "oldstyle" syntax, as those are the only syntax modules which accept named macro arguments. But in this case all arguments have to be preceded by a backslash character ('\').

And there is already a solution to your problem. "\()" may be used to separate macro arguments from the following code. So in your case it should be:
    z80word    (\Sample\()_End-1)|$8000
phx is offline  
Old 03 January 2015, 03:28   #3
Posts: n/a
Oh, thank you so much! I didn't think for the '\()' seperator to be there, as nothing like that was in the VASM manual (unless I didn't read through the whole thing).

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line parameters, rezipping, savestates? lifeless support.WinUAE 11 10 September 2018 14:16
Passing parameters to a script via WBRun mfilos support.Other 18 14 January 2014 22:29
Recommended DTC parameters for these titles? MethodGit project.SPS (was CAPS) 7 29 July 2012 18:46
WinUAE commandline parameters Borg_Number_One New to Emulation or Amiga scene 7 04 October 2006 14:34
A list of command line parameters D-Dan request.UAE Wishlist 0 10 June 2004 03:46

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 05:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.05636 seconds with 15 queries