i've got a problem with x86 assembly instructions..
I'm trying to compile an ASM file using Borland TASM 5.0 using command

tasm32 /z /m /ml MyFile.asm

However, there is an instruction in that ASM file - SUB ECX, FFFFFF88
which the assembler declares as -
Undefined Symbol : FFFFFF88

It happens even if i add the "h" to it i.e . SUB ECX, FFFFFF88H

The strange thing is, if i change highest order hex no. (F) to something like 1FFFFF88 or 2FFFFF88, it compiles perfectly..

What could be the reason here? The value shouldnt be out of range since it is a 32 bit number

Try adding a 0 in front of your hex number. it cannot start with a letter
0FFFFFF88H

Try adding a 0 in front of your hex number. it cannot start with a letter
0FFFFFF88H

Yes exactly. If compiler find a letter it think of a label named FFFFFF88.

The H at the end define only how to interpret a numeric value.
For example mov ax,10 is different to mov ax,10h.
If tasm detects a value through leading "0" it should automatically interpret as hex but better style is to declar hex values ax FFFFFF88h or 0xFFFFFF88.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.