30 September 2017, 15:35 | #1 |
Registered User
Join Date: Feb 2017
Location: fastmem
Posts: 53
|
vasm - anonymous labels?
Does anyone know a nice way of replicating anonymous labels in vasm (ala MASM/FASM etc)?
Excuse nonsensical example: Code:
REPT 32 .... cmp.l d0, d1 bne @F move.l d2, d1 @@: sub.l d3, d1 beq @F move.l d4, d1 @@: .... ENDR Yes, it's a lazy 'convenience', but it is convenient and I am lazy :) It also solves a problem I haven't been able to figure out with vasm - labels in rept blocks (like above). Currently if I have any rept block with labels I'm having to manually expand them (complete with unique label names). The macro solutions (\@, \@!, \@@ etc) don't work outside macros, afaict - or am I missing something obvious? TIA folks :) [Edit: Evil thought - macro expansion /inside/ a rept block may just work. Ew...] Last edited by pants; 30 September 2017 at 15:59. |
30 September 2017, 19:12 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
|
Yes, anonymous labels are on my to do list since a long time. But it's not easily implemented into vasm without being too intrusive. I also need it for the gas-compatibilty in the std-syntax module.
Currently you have the following workarounds: 1. (Ugly & dangerous) Do branches relative to the current location symbol '*', e.g.: Code:
bne.b *+4 Code:
REPT 32 inline cmp.l d0,d1 bne .1 move.l d2,d1 .1: sub.l d3,d1 beq .2 move.l d4,d1 .2: einline endr |
01 October 2017, 00:32 | #3 |
Registered User
Join Date: Feb 2017
Location: fastmem
Posts: 53
|
Nice! Tested and works on all my rept usecases (local/global never mixed) - many thanks for pointing it out! (couldn't find inline/einline in the docs, but just noticed it was in the release notes).
Last edited by pants; 01 October 2017 at 00:34. Reason: typo :s |
01 October 2017, 00:40 | #4 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floppy Labels | caver99 | support.Hardware | 6 | 26 April 2011 23:05 |
Anonymous contributions | TCD | HOL contributions | 2 | 24 November 2010 06:42 |
Workbench 3.1 Labels | lopos2000 | Amiga scene | 6 | 11 November 2005 17:31 |
Civilization Anonymous | oldpx | Retrogaming General Discussion | 0 | 29 August 2005 00:21 |
|
|