+++ /dev/null
- TITLE CpuAsm.asm:\r
-;------------------------------------------------------------------------------\r
-;*\r
-;* Copyright (c) 2006 - 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
- .686\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; SetCodeSelector (\r
-; UINT16 Selector\r
-; );\r
-;------------------------------------------------------------------------------\r
-SetCodeSelector PROC PUBLIC\r
- mov ecx, [esp+4]\r
- sub esp, 0x10\r
- lea eax, setCodeSelectorLongJump\r
- mov [esp], eax\r
- mov [esp+4], cx\r
- jmp fword ptr [esp]\r
-setCodeSelectorLongJump:\r
- add esp, 0x10\r
- ret\r
-SetCodeSelector ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; SetDataSelectors (\r
-; UINT16 Selector\r
-; );\r
-;------------------------------------------------------------------------------\r
-SetDataSelectors PROC PUBLIC\r
- mov ecx, [esp+4]\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
-\r
-END\r