MUL, DIV

I've never used these before. I'm sure there's something i'm doing i'm not allowed. Basically, i want to do Y * xres + x. All values are unsigned, xres is 640, and y and x are at max 399 and 639 respectively.

Thanks. Like i said, all i know is what i read off the internet just before trying them out. I wrote my program with only the knowledge that the result of mul with 2 16 bit numbers goes into dx:ax... i didn't know you could just use 32 bit regs. Thanks again!