This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problems with hexidecimal values

Greetings, a rookie here!

I'm hoping that my problem will be borderline moronic, such that the problem will be easily solved and all I'll need is a hit over the head! I'm rather new at encountering some of these problems!

I am trying to set up descriptor tables for a USB firmware project. Nothing special, simply loading my ROM with data. When attempting to compile/build, it chokes on only certain lines with Hexidecimal values. The only way to properly explain is through example:

db 12h ;Descriptor Length
db 01h ;Descriptor Type
db 00h ;USB Spec Ver. 1.00 (L)
db 01h ;USB Spec Ver. 1.00 (H)
*db FFh ;Device Class
db 255 ;Device Sub-Class
db 255 ;Device Protocol

The line with the asterisk is where the error "UNDEFINED SYMBOL" came up. Note that the two lines following are in decimal form. They ALSO were errors when in hexidecimal format, but changing them to decimal allowed me to compile.

Throughout the table, similar errors cropped up, but disappeared when I changed to decimal from hexidecimal. Although this DOES fix the problem, do you know what is causing this? It seems that the values that had problems all contained a digit with A-F in it, while the problem free values had digits only from 0-9.

I am using Keil's uVision2 Eval version.

Parents Reply Children