Jump to content

Open Club  ·  64 members

DASM
IGNORED

IF ELSE ENDIF expression question


SpiceWare

Recommended Posts

Should the expression for the IF clause support logical or?

 

I wanted to do this:

 

NTSC    = 0
PAL50   = 1
PAL60   = 2

COMPILE_VERSION = NTSC
;COMPILE_VERSION = PAL50
;COMPILE_VERSION = PAL60

    IF COMPILE_VERSION = NTSC || COMPILER_VERSION = PAL60
    
VB_TIMER = $2e
OS_TIMER = $21

    ELSE

VB_TIMER = $4c
OS_TIMER = $41
    
    ENDIF

 

 

it builds correctly for NTSC, but PAL50 and PAL60 both fail with VB_TIMER and OS_TIMER being undefined. I tried using or instead of || as well as wrapping the expression in () or [] with no luck.

 

I was able to work around that by using this, but it doesn't read as well to me.

 

    IF COMPILE_VERSION != PAL50
    
VB_TIMER = $2e
OS_TIMER = $21

    ELSE

VB_TIMER = $4c
OS_TIMER = $41
    
    ENDIF

 

Link to comment
Share on other sites

Maybe, though it was in the output:

 

~/Projects/Atari/Helping Others/JetmanUK/> --- Unresolved Symbol List
COMPILER_VERSION         0000 ????         (R )
OS_TIMER                 0000 ????         (R )
VB_TIMER                 0000 ????         (R )
--- 3 Unresolved Symbols

 

 

I'd misread that as "2 Unresolved" then stopped scanning upward after seeing the 2 timer symbols.

 

I was running jEdit on my left monitor:

 

image.thumb.png.7a5c44d25adedf6746c76f47696aa665.png

 

Which puts the output at the far left and was slightly out of focus with my old computer glasses.  Picked up my new glasses on Friday, hopefully that'll help going forward.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...