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, Code:
z80word MACRO Value dc.w ((Value)&$FF)<<8|((Value)&$FF00)>>8 ENDM 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) ENDM ; Dac Entries DAC_Entry $05,CymbalSnare,pri Please Phx, fix this as soon as possible. Psy-ASM68k uses a slash to seperate the tag from the label, like so: \MacroTag\_End Edit: tl;dr: ASM68k: z80word (Sample_End-1)|$8000 ; 06h - End Offset (in End bank) | V z80word (CymbalSnare_End-1)|$8000 ; 06h - End Offset (in End bank) VASM: z80word (Sample_End-1)|$8000 ; 06h - End Offset (in End bank) | V 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 |
30 December 2014, 22:41 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
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: Code:
z80word (\Sample\()_End-1)|$8000 |
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 | 16 | 11 February 2019 22:59 |
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 |
|
|