mov dx, 1f6h
mov dx, 1f6h
This line doesn't work on nasm. It give two errors:
"warning: byte value exceeds bounds"
"'obj' output driver does not support one-byte relocations"
"warning: byte value exceeds bounds"
"'obj' output driver does not support one-byte relocations"
RE:mov dx, 1f6h
This is the reason, but as i do not understand c maybe some one can convert.
case 020: case 021: case 022:
if (ins->oprs[c-020].offset < -256 || ins->oprs[c-020].offset > 255)
errfunc (ERR_WARNING, "byte value exceeds bounds");
bytes[0] = ins->oprs[c-020].offset;
out (offset, segment, bytes, OUT_RAWDATA+1, NO_SEG, NO_SEG);
offset += 1;
break;
ASHLEY4.
case 020: case 021: case 022:
if (ins->oprs[c-020].offset < -256 || ins->oprs[c-020].offset > 255)
errfunc (ERR_WARNING, "byte value exceeds bounds");
bytes[0] = ins->oprs[c-020].offset;
out (offset, segment, bytes, OUT_RAWDATA+1, NO_SEG, NO_SEG);
offset += 1;
break;
ASHLEY4.
RE:mov dx, 1f6h
Well, somehow the compiler mixex up the "dx" with the byte.
Does "mov dx, 1f0h" give an error, or is it only with this magic number?
What about "mov ax,1f6"?
Do you have any code settings(compiler hints) before this instruction?(default operand size-you know)
Anton.
Does "mov dx, 1f0h" give an error, or is it only with this magic number?
What about "mov ax,1f6"?
Do you have any code settings(compiler hints) before this instruction?(default operand size-you know)
Anton.
RE:mov dx, 1f6h
There are a number of Intel instructions that take byte sized offsets, such as a short Jcc (jump on condition code). This code complains if you're trying to assemble one of those instructions but your offset is too big.
Note: it would never be called while assembling "mov dx,1f6h". Since this assembles perfectly fine under NASM, I assume the poster's actual problem is with some other line of code. Alas, not enough context was posted to determine where exactly the problem is...
Note: it would never be called while assembling "mov dx,1f6h". Since this assembles perfectly fine under NASM, I assume the poster's actual problem is with some other line of code. Alas, not enough context was posted to determine where exactly the problem is...
RE:mov dx, 1f6h
Could you post the code around it(before and after)? It's hard to judge just by one instruction.
Anton
Anton