![]() |
![]() |
#1 |
Registered User
Join Date: Dec 2019
Location: North Dakota
Posts: 741
|
vasm: Empty Macro issue
I'm porting a lot of code compiled by smac (I believe that's the madmac syntax originally) and I'm using these two macros for the folding of blocks inside Notepad++, which doesn't work in vasm:
Code:
.macro FoldStart .endm .macro FoldEnd .endm Code:
FoldStart ; wait_for_gpu_to_finish wait_for_gpu_to_finish: .wait_gpu: cmp.l #DSP_DONE, gpuState bne .wait_gpu rts FoldEnd This is the Windows vasm build: Code:
vasm 1.8d (c) in 2002-2018 Volker Barthelmann vasm M68k/CPU32/ColdFire cpu backend 2.3b (c) 2002-2017 Frank Wille vasm motorola syntax module 3.11c (c) 2002-2018 Frank Wille vasm hunk format output module 2.9b (c) 2002-2017 Frank Wille Code:
vasm -m68020 -Fhunkexe -o gt.exe gt.asm Code:
error 75 in line 73 of "gt.asm": label <FoldStart> redefined >FoldStart error 75 in line 82 of "gt.asm": label <FoldEnd> redefined >FoldEnd This is how it's currently defined in code Code:
FoldStart macro endm FoldEnd macro endm - Flipping "FoldStart macro" into "macro FoldStart" results in error :"unknown mnemonic <FoldStart> - I checked the mot section documentation and don't see a way to force the labels to use the ":" qualifier Now, I could, in theory, preprocess my file and remove any FoldStart/FoldEnd lines and feed the rest to vasm, but that's kinda absurd. Surely I'm just missing some mot-specific syntax rule here ? |
![]() |
![]() |
#2 |
Semi-Retired
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,045
|
It's at the start of the line, so I guess it is seen as a label. If you want to use it as a function/macro you need to indent probably.
Code:
FoldStart ; wait_for_gpu_to_finish wait_for_gpu_to_finish: .wait_gpu: cmp.l #DSP_DONE, gpuState bne .wait_gpu rts FoldEnd |
![]() |
![]() |
#3 | |
Registered User
Join Date: Dec 2019
Location: North Dakota
Posts: 741
|
Quote:
I just indented it by a Tab and it now doesn't see it as a label. It looks weird, indented like that, for the very first block, but I'm sure I'll get used to it soon. I guess I will have many surprises like this one, converting my whole codebase... Thanks ![]() |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VASM named macro arguments | guy lateur | Coders. Asm / Hardware | 20 | 01 October 2018 13:50 |
Vasm/Vlink odd issue linking | roondar | Coders. Asm / Hardware | 7 | 10 December 2017 20:19 |
vasm movem optimization issue? | dalton | Coders. Asm / Hardware | 2 | 23 September 2016 14:02 |
Trouble with macro parameters in VASM | kazblox | Coders. Asm / Hardware | 2 | 03 January 2015 03:28 |
WAITBLIT macro | phx | Coders. Asm / Hardware | 20 | 18 February 2014 14:22 |
|
|