should mov [CS:bp],ax cause an error? In realmode this is...
it seems like it logically would cause an error, but also it seems to be valid if it just copies the segment value...
mov [CS:bp],ax --cause error?
Re: mov [CS:bp],ax --cause error?
I would hope it to be invalid, since accessing CS does not include write privileges.hckr83 wrote:should mov [CS:bp],ax cause an error? In realmode this is...
it seems like it logically would cause an error, but also it seems to be valid if it just copies the segment value...
it shouldnt ever cause an error in RMode, though in PMode it might (GPF--segment permissions violation)
it is a perfectly valid encoding, so it should assemble and execute without any trouble
this simply uses a segment override (CS -- that is prefix 0010 1110) and BP as an index into the segment (overridden to CS rather than the default SS), and moves the value in AX to that location
it is a perfectly valid encoding, so it should assemble and execute without any trouble
there are no restrictions on the use of any segment register (including CS) only on the permissions of the selector in the GDT -- which are completely open under RModeI would hope it to be invalid, since accessing CS does not include write privileges.
not exactly sure what you mean by this, no segment value is copied...it seems like it logically would cause an error, but also it seems to be valid if it just copies the segment value...
this simply uses a segment override (CS -- that is prefix 0010 1110) and BP as an index into the segment (overridden to CS rather than the default SS), and moves the value in AX to that location