Page 1 of 1
mov dx, 1f6h
Posted: Sat Jul 17, 2004 11:00 pm
by St8ic
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"
RE:mov dx, 1f6h
Posted: Sun Jul 18, 2004 11:00 pm
by jcmatias
try mov dx, 0x1f6
RE:mov dx, 1f6h
Posted: Sun Jul 18, 2004 11:00 pm
by St8ic
"try mov dx, 0x1f6"
already did. No change.
RE:mov dx, 1f6h
Posted: Sun Jul 18, 2004 11:00 pm
by ASHLEY4
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.
RE:mov dx, 1f6h
Posted: Mon Jul 19, 2004 11:00 pm
by Anton
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.
RE:mov dx, 1f6h
Posted: Tue Jul 20, 2004 11:00 pm
by St8ic
no compiler hints, and 1f*h gets an error. Any ideas?
RE:mov dx, 1f6h
Posted: Tue Jul 20, 2004 11:00 pm
by SystemHalted
Did you try "mov dx, 01f6h" or "mov dx, 0x01f6"
RE:mov dx, 1f6h
Posted: Tue Jul 20, 2004 11:00 pm
by GT
The line works perfectly fine under NASM 0.98.38.
RE:mov dx, 1f6h
Posted: Tue Jul 20, 2004 11:00 pm
by GT
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...
RE:mov dx, 1f6h
Posted: Wed Jul 21, 2004 11:00 pm
by Anton
Could you post the code around it(before and after)? It's hard to judge just by one instruction.
Anton