![]() |
![]() |
#1 |
Registered User
Join Date: May 2011
Location: Italy
Posts: 214
|
VASM - Question on conditional assembly
Good Sunday!
I have been trying to compile in VASM 1.9d the Blueberry's DemoStartup.s with the additional Lemon changes from the ExampleDemo of https://aminet.net/package/dev/cross...DemoToolchain5 I know this is supposed to work as such in VASM, but I am not sure whether this is true because the VASM returns errors on the IFs. The DemoStartup.s relies on a number of conditional IFs. According to my noob reading of the VASM/MOT docs, "IF" should be able to conditionally assemble when the following lines are non-zero. So I tried to use the IFC, IFEQ, IFNE and IFGT to adjust them. The constats are defined in the main demo.s file and not in this included startup one - e.g. COMPATIBILITY and others. I list a single instance of each of them to check whether these changes are needed or possible (coudn't find examples of ifc applied, so hope that syntax would be okay)
![]() For the ease of reference, please find the original demostartup.s and the changed one. Thank you in advance for any info you could be able to share ![]() Last edited by RoC; 02 July 2023 at 10:59. |
![]() |
![]() |
#2 | |||||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,551
|
Quote:
expression must be constant, because the symbols you are using are nowhere defined. So they cannot be evaluated. Quote:
IFdirective's operand field. Quote:
IFCcompares strings and doesn't evaluate symbols. IFNEis the same as IF. Quote:
Quote:
IFC, which simply doesn't work the way you think. IFCis mostly used for checking whether a macro argument was empty. For example: Code:
ifc "\1","" ...argument missing... endc |
|||||
![]() |
![]() |
#3 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,068
|
I prefer IFB/IFNB for that (blank, not blank), and IFC for straight up string compares. Just make sure you don't have a trailing comment, if could be interpreted as it's not blank and the expression is always true.
|
![]() |
![]() |
#4 |
Registered User
Join Date: May 2011
Location: Italy
Posts: 214
|
@phx and @a/b
I feared I was doing something wonky and indeed I did :-) I must have completely misunderstood the if and thanks for bringing me on the right track. I resume from the original ;-) |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about XREF vs XDEF (vasm 1.8 vs vasm 1.9) | roondar | Coders. Asm / Hardware | 8 | 01 May 2023 20:59 |
A couple of basic question regarding Amiga assembly programming | Haplo | Coders. Asm / Hardware | 25 | 19 February 2023 10:38 |
Question about NEAR directive in vasm | dansalvato | Coders. Asm / Hardware | 2 | 18 March 2022 12:40 |
Another Vasm question | LeCaravage | Coders. Asm / Hardware | 7 | 27 January 2021 23:30 |
vasm question | marduk_kurios | Coders. Asm / Hardware | 7 | 14 February 2014 20:06 |
|
|