⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arj_xms.asm

📁 arj source code
💻 ASM
字号:
;*;* $Id: arj_xms.asm,v 1.1.1.1 2002/03/28 00:02:01 andrew_belov Exp $;* ---------------------------------------------------------------------------;* To make FILELIST.C less platform-dependent, its XMS routies are placed into;* this file.;*INCLUDE         ASM_INCL.INC;*;* XMS move structure as proposed by XMS v 2.0;*xms_move        struc  blk_length    dd      ?  src_handle    dw      ?  src_offset    dd      ?  dest_handle   dw      ?  dest_offset   dd      ?xms_move        ends;*;* Exported stubs;*public          detect_xms, get_xms_entry, allocate_xms, free_xms, move_xms.CODE;*;* Detects XMS presence. Returns 1 if it's present;*detect_xms      proc                mov     ah, 30h                int     21h                cmp     al, 3                jb      dx_none                mov     ax, 4300h                int     2Fh                cmp     al, 80h                jne     dx_none                mov     ax, 1                jmp     short dx_returndx_none:                sub     ax, axdx_return:                retdetect_xms      endp;*;* Stores XMS entry point in an internal area;*get_xms_entry   proc    uses es bx                mov     ax, 4310h                int     2Fh                mov     word ptr xms_entry, bx                mov     word ptr xms_entry+2, es                retget_xms_entry   endp;*;* Allocates N kilobytes of XMS memory;*allocate_xms    proc    uses bx, kbs:word, hptr:ptr word                mov     ah, 9                mov     dx, kbs                call    dword ptr xms_entryIF @DataSize                push    es                les     bx, hptr                mov     word ptr es:[bx], dx                pop     esELSE                mov     bx, hptr                mov     word ptr ss:[bx], dxENDIF                retallocate_xms    endp;*;* Frees a block of XMS memory;*free_xms        proc    uses bx, handle:word                mov     ah, 0Ah                mov     dx, handle                call    dword ptr xms_entry                retfree_xms        endp;*;* Moves a block;*move_xms        proc    uses bx si ds, xms_mm:ptr xms_move                mov     ah, 0BhIF @DataSize                lds     si, xms_mmELSE                mov     si, xms_mm                push    ss                pop     dsENDIF                call    dword ptr xms_entry                retmove_xms        endp.DATA?xms_entry       dd      ?        	end

⌨️ 快捷键说明

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