Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
MASM 5.1 does not support the latest Intel Instruction set (I'm not even sure it supports 32 bit instructions). Either try using a newer MASM version or a different assembler.
I'd recommend one of these: FASM, NASM, MASM32...
Second, the fact that you have segment declarations is kind of disturbing.
I hope you're not trying to compile that piece of code as a PE or MZ executable.
You don't even know how many ways you're making me want to insult you right now! I wrote about 10-20 swears/curses/insults/bad words that I erased and put this instead, but a psychologist (or a moderator) would say that's bad for my health, so please stop making me sick!
Then that error message was not very informative, and it support what I've been trying to say: throw out MASM and get FASM or one of the others that were mentioned. You won't regret it, trust me. If you're just starting out OSDeving, do it now, before it's too late.