execute.asm

来自「XOSL 多操作系统管理工具 源代码 多系统引导工具」· 汇编 代码 · 共 34 行

ASM
34
字号
                .model  compact
                .386p
                .code
                public  _Execute

;void Execute(unsigned short StartSeg, unsigned short ReloSS,
;             unsigned short ExeSP, unsigned short ReloCS,
;             unsigned short ExeIP);

_Execute        proc    c
                arg     @@StartSeg: word, @@ReloSS: word
                arg     @@ExeSP: word, @@ReloCS: word
                arg     @@ExeIP: word

                mov     ax,@@StartSeg
                sub     ax,0010h
                mov     ds,ax
                mov     es,ax

                mov     ax,@@ReloSS
                add     ax,@@StartSeg
                mov     bx,@@ExeSP
                mov     cx,@@ReloCS
                add     cx,@@StartSeg
                mov     dx,@@ExeIP
                mov     ss,ax
                mov     sp,bx
                push    cx
                push    dx
                retf
_Execute        endp
                
                end

⌨️ 快捷键说明

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