Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Assembly 如何使用DPMI将内存分配给特定的虚拟地址?_Assembly_X86 - Fatal编程技术网

Assembly 如何使用DPMI将内存分配给特定的虚拟地址?

Assembly 如何使用DPMI将内存分配给特定的虚拟地址?,assembly,x86,Assembly,X86,我希望使用DPMI将内存分配给特定的虚拟地址,并按如下方式清除它: mov edi, 0x400000 ; Base address. mov ecx, 0x2000 ; Number of bytes to allocate. ??? cld mov al, 0 rep stosb ; Clear the allocated memory. 我该如何做,即,我应该写什么给???部分?看起来DPMI中没有用于此的API 仅供参考,Win32s Windows 3.11也无法将PE.e

我希望使用DPMI将内存分配给特定的虚拟地址,并按如下方式清除它:

mov edi, 0x400000  ; Base address.
mov ecx, 0x2000    ; Number of bytes to allocate.
???
cld
mov al, 0
rep stosb  ; Clear the allocated memory.

我该如何做,即,我应该写什么给???部分?

看起来DPMI中没有用于此的API

仅供参考,Win32s Windows 3.11也无法将PE.exe文件加载到任意基地址。(它要求PE.exe文件具有重定位功能。)如果有用于内存分配的DPMI API用于任意虚拟地址,则可能带Win32的Windows 3.11将使用Windows 3.11 386增强模式中的类似API将PE.exe文件加载到任意基地址