News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

switch error

Started by Twister, August 10, 2010, 10:09:02 PM

Previous topic - Next topic

Twister

Could anyone find the problem with this switch statement because I sure can't.

    switch eax
      case 1
        mov dwMonth, 0
      case 2
        mov dwMonth, 3
      case 3
        mov dwMonth, 3
      case 4
        mov dwMonth, 6
      case 5
        mov dwMonth, 1
      case 6
        mov dwMonth, 4
      case 7
        mov dwMonth, 6
      case 8
        mov dwMonth, 2
      case 9
        mov dwMonth, 5
      case 10
        mov dwMonth, 0
      case 11
        mov dwMonth, 3
      case 12
        mov dwMonth, 5
      default
        jmp @error
    endsw

oex

No problem.... What's the error you get/surrounding code?
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

Twister

getdayofweek.asm(39) : error A2008: syntax error : eax
getdayofweek.asm(40) : error A2008: syntax error : case
getdayofweek.asm(42) : error A2008: syntax error : case
getdayofweek.asm(44) : error A2008: syntax error : case
getdayofweek.asm(46) : error A2008: syntax error : case
getdayofweek.asm(48) : error A2008: syntax error : case
getdayofweek.asm(50) : error A2008: syntax error : case
getdayofweek.asm(52) : error A2008: syntax error : case
getdayofweek.asm(54) : error A2008: syntax error : case
getdayofweek.asm(56) : error A2008: syntax error : case
getdayofweek.asm(58) : error A2008: syntax error : case
getdayofweek.asm(60) : error A2008: syntax error : case
getdayofweek.asm(62) : error A2008: syntax error : case
getdayofweek.asm(64) : error A2008: syntax error : default

getdayofweek.asm(66) : error A2008: syntax error : endsw

Twister

Oh, I forgot to include the macros.asm file. I'll just include masm32rt.inc instead.