mikr00lz wrote:because you dont want [cx] you just want cx. but when you fix that you'll find that you can't move a 16-bit register to an 8-bit register.
the braces in [cx] mean that you're want to move the value of the LOCATION of cx into another register...... being that cx is a REGISTER, it doesnt HAVE a memory location.
and please keep such trivial issues out of "OS Development"?
Oh, please do share more great words of wisdom with us.
On a more serious note, in the x86 family, the possible 16-bit addressing modes are as follows:
[bx+si+displacement]
[bx+di+displacement]
[bp+si+displacement]
[bp+di+displacement]
[si+displacement]
[di+displacement]
[bp+displacement]
[bx+displacement]
[address]
where displacement is a word, signed byte or nothing.
The 32-bit addressing modes are as follows:
[base+displacement]
[base+index+displacement]
[base+index*scale+displacement]
[address+index*scale]
[address]
where base is any register, index is any register except esp, scale is 1, 2, 4 or 8, and displacement is a double word, signed byte or nothing.
[cx] is therefore not a valid addressing mode, but [bx] is valid, and so is [ecx].
By the way, the meaning of mov bx, PointTo is different between assemblers. In NASM, this indicates an immediate operand, which is what you want here. In MASM, it indicates a memory operand, and you would write mov bx, offset PointTo to use the address as an immediate operand.
If you have further questions, please don't hesitate to
RTFM.