fpu.asm

来自「Quantum Platform(QP) is a family of very」· 汇编 代码 · 共 77 行

ASM
77
字号
;*****************************************************************************; Purpose: FPU_save() and FPU_restore() implementation for x86/x87; Last Updated for Version: 3.2.04; Date of the Last Update:  Nov 23, 2006;;                    Q u a n t u m     L e a P s;                    ---------------------------;                    innovating embedded systems;; Copyright (C) 2002-2006 Quantum Leaps, LLC. All rights reserved.;; This software may be distributed and modified under the terms of the GNU; General Public License version 2 (GPL) as published by the Free Software; Foundation and appearing in the file GPL.TXT included in the packaging of; this file. Please note that GPL Section 2[b] requires that all works based; on this software must also be made publicly available under the terms of; the GPL ("Copyleft").;; Alternatively, this software may be distributed and modified under the; terms of Quantum Leaps commercial licenses, which expressly supersede; the GPL and are specifically designed for licensees interested in; retaining the proprietary status of their code.;; Contact information:; Quantum Leaps Web site:  http://www.quantum-leaps.com; e-mail:                  sales@quantum-leaps.com;*****************************************************************************            PUBLIC _FPU_save            PUBLIC _FPU_restore.MODEL      LARGE.CODE.186;*****************************************************************************; extern "C" void FPU_save(FPU_context *ctx);_FPU_save    PROC FAR             PUSH   BP                      ; Save work registers             MOV    BP,SP             PUSH   ES             PUSH   BX;             LES    BX, DWORD PTR [BP+6]    ; Point to 'pblk';             FSAVE  ES:[BX]                 ; Save FPU context;             POP    BX                      ; Restore work registers             POP    ES             POP    BP;             RET                            ; Return to caller_FPU_save    ENDP;*****************************************************************************; extern "C" void FPU_restore(FPU_context *ctx);_FPU_restore PROC FAR             PUSH   BP                      ; Save work registers             MOV    BP,SP             PUSH   ES             PUSH   BX;             LES    BX, DWORD PTR [BP+6]    ; Point to 'pblk';             FRSTOR ES:[BX]                 ; Restore FPU context;             POP    BX                      ; Restore work registers             POP    ES             POP    BP;             RET                            ; Return to caller_FPU_restore ENDP             END

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?