ERRORS Number Out of Range

 

This means that the number you have written is greater than 255 (in decimal), or FF (in hexadecimal). Don't forget that the default numbering system is hexadecimal, so if you write:

MOVLW      255

This will register the Number Out of Range error, because the assembler will think you are referring to the hexadecimal number 255, which is greater than FF in hex.

To overcome this error you will have to choose a smaller number. If you need to deal with larger numbers, you may want to try splitting them up into smaller bits. For example rather than dealing with the hexadecimal number 34E8, you would have to split it up into 34 and E8, both of which are lower than FF.

Copyright ©2006 Perfect Square Ltd.