Assembly is real open source .



arpl



Usage: ARPL dest,src (286+ protected mode) Modifies flags: ZF


Compares the RPL bits of 'dest' against 'src'. If the RPL bits of 'dest' are less than 'src', the destination


RPL bits are set equal to the source RPL bits and the Zero Flag is set. Otherwise the Zero Flag is cleared.


Adjust RPL Field of Selector



 



ARPL r/m16,reg16 ; 63 /r [286,PRIV]




 



ARPL expects its two word operands to be segment selectors. It adjusts the RPL (Requested Privilege Level - stored in the bottom two bits of the selector) field of the destination (first) operand to ensure that it is no less (i.e. no more privileged than) the RPL field of the source operand. The zero flag is set if and only if a change had to be made.



 


The RPL field represents the privilege level of the application program.


 



main:



arpl   eax  ebx


ret