+++ /dev/null
- TITLE CpuAsm.asm: \r
-;------------------------------------------------------------------------------\r
-;*\r
-;* Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>\r
-;* This program and the accompanying materials \r
-;* are licensed and made available under the terms and conditions of the BSD License \r
-;* which accompanies this distribution. The full text of the license may be found at \r
-;* http://opensource.org/licenses/bsd-license.php \r
-;* \r
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-;* \r
-;* CpuAsm.asm\r
-;* \r
-;* Abstract:\r
-;*\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; SetCodeSelector (\r
-; UINT16 Selector\r
-; );\r
-;------------------------------------------------------------------------------\r
-SetCodeSelector PROC PUBLIC\r
- sub rsp, 0x10\r
- lea rax, setCodeSelectorLongJump\r
- mov [rsp], rax\r
- mov [rsp+4], cx\r
- jmp fword ptr [rsp]\r
-setCodeSelectorLongJump:\r
- add rsp, 0x10\r
- ret\r
-SetCodeSelector ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; SetDataSelectors (\r
-; UINT16 Selector\r
-; );\r
-;------------------------------------------------------------------------------\r
-SetDataSelectors PROC PUBLIC\r
- mov ss, cx\r
- mov ds, cx\r
- mov es, cx\r
- mov fs, cx\r
- mov gs, cx\r
- ret\r
-SetDataSelectors ENDP\r
-\r
-END\r
-\r