&是什么QUOT; DS:[40207A] QUOT;装配是什么意思? [英] What does "DS:[40207A]" mean in assembly?

查看:506
本文介绍了&是什么QUOT; DS:[40207A] QUOT;装配是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0040103A   CALL DWORD PTR DS:[40207A]                USER32.MessageBoxA

这是什么 DS:的意思是

推荐答案

这意味着该指令在数据段引用的内存 - 并且可以pretty多被现代操作系统忽略,因为它们与一个平面地址空间中运行模型(code,数据和堆栈段都指代相同的存储器范围,并存储保护与寻呼处理)。

It means the instruction is referencing memory in the Data Segment - and can pretty much be ignored on modern OSes, since they run with a flat address space model (code, data and stack segments all refer to the same memory range, and memory protection is handled with paging).

一个小的阐述 - 请注意,让事情变得简单,这是在运行Windows 32位保护模式的背景下

A little elaboration - note that, to keep things simple, this is in the context of 32bit protected mode running Windows.

A 段寄存器的(CS,DS,SS,ES,FS,GS)持有选择指向描述。有两家描述符表:全局( GDT )和地方(的 LDT ),并选择具有一个指示其使用。视窗(几乎?)完全使用全局表中。

A segment register (CS,DS,SS,ES,FS,GS) holds a selector pointing to a descriptor. There's two descriptor tables: global (GDT) and local (LDT), and the selector has a bit indicating which to use. Windows (almost?) exclusively uses the global table.

一个的描述符的就是基本 {起始地址,大小} 的对 - 有更多的它,但是这是这个范围之外帖子。

A descriptor is basically a {beginning-address, size} pair - there's more to it, but that's outside the scope of this post.

Windows使用平面内存模型:每个进程都有起始内存地址0 4GB的地址空间,使用< A HREF =htt​​p://en.wikipedia.org/wiki/Virtual_memory#Paged_virtual_memory>分页从海誓山盟分离过程。

Windows uses a Flat Memory Model: each process has a 4GB address space starting at memory address 0, and uses paging to isolate processes from eachother.

由于进程具有世界的平面视图,它们使用的所有段{0,4GB}描述运行 - 因而,而不是分配每个进程的描述符,Windows可以使用只有少数全球性的描述,并拥有所有进程都使用那些。

Since processes have this flat view of the world, they run with all segments using {0, 4GB} descriptors - and thus, instead of allocating per-process descriptors, Windows can use only a few global descriptors and have all processes use those.

借助移植可执行格式定义部分,这是不相关的到86 - 即使有一些概念上的重叠。该PE EXE文件可以有pretty多,你希望的任何部分的布局,但正常的是分割成(至少)code(读/执行),数据(读/写),资源(只读?)。分裂可执行段使得可以86页级存储器保护应用于所述存储器范围。

The Portable Executable format defines sections, which are unrelated to the x86 segments - even if there's some conceptual overlap. The PE EXEs can have pretty much any section layout you wish, but the normal is to split into (at least) code (read/execute), data (read/write), resources (readonly?). Splitting the executable into sections makes it possible to apply x86 page-level memory protection to the memory ranges.

而正常部分不每个进程的改变,Windows使用 FS 寄存器指向per-的线程的的 TIB 结构。

While the normal segments don't change per-process, Windows uses the FS register to point to the per-thread TIB structure.

请参阅一个概述。这是从旧的文件上80386,但信息仍然适用。

See this for an overview. This is from an old document on the 80386, but the information still applies.

这篇关于&是什么QUOT; DS:[40207A] QUOT;装配是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆