更改CS:IP汇编语言 [英] Change CS:IP in Assembly Language
问题描述
你怎么能强行改变 CS
和 IP
无论是在汇编语言?
How can you forcibly change CS
and IP
both in assembly language ?
ORG
指令可以用来修改 IP
,但你如何修改<$数C $ C> CS ?
ORG
directive can be used to change the number of the IP
, but how do you change the CS
?
基本上我婉使用汇编来实现多线程。
Basically I wan to implement multi-threading using assembly.
许多论坛上,包括在堆栈溢出的问题已经说了是不可能的,但后来如何c具有即使当它从组装code做?多线程选项
Many forums, including a question in stack overflow has said its impossible, but then how does C have multi-threading options even when it is made from assembly code ?
推荐答案
要修改 CS:IP
只是做一个跳远 JMP
(如 JMP段:偏移
)或长呼叫
(如<$ C $。 C>呼叫段:偏移),根据您的需要。没有关于 JMP
的链接和呼叫
的链接。 。IP
To change cs:ip
just make a long jump with jmp
(eg. jmp segment:offset
) or a long call
(eg. call segment:offset
) depending on your needs. There are several different addressing modes available for jmp
link and call
link. Implementing multithreading is a totally different matter from simply changing cs:ip
.
这篇关于更改CS:IP汇编语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!