Hi guys, first of all forgive me if my English is not perfect but this is not my first language.

Anyway what I'm trying to do is just comparing two numbers. More precisely I have to verify that a number is less than or equal to 64000. What I'm doing is reading the string typed by the user and converting it into a number (this should be OK since I make it display the number after conversion and it is always right) stored in NUM, defined as

`NUM DW 0`

Then I try to compare this number with 64000 by doing this:

`MOV AX,NUM`

CMP AX,NUM_MAX

JLE NO_ERR_SUP

CALL ERR_SUP

JMP START

......

where NUM_MAX is defined as

`NUM_MAX DW 64000`

The problem is it (rightly) accepts 45678 but not 34 or 100. After some tests I found out that the smallest number accepted is 32768 which is 2^15.

How can I solve this?

Thank you!