开发者

How get current segment in dos

I am trying to get cs (current seg开发者_高级运维ment) register value by using c language. I tried it bay assembler by this code:

__asm__("movw %%eax, %%ecs;" : "=r" ( cur_seg ));
but my project did not recognise __asm__. May be there is other way to this? Please help.


Your code is gcc-specifics, are you using gcc under dos? If not try to use __asm {}, _asm {} or asm {} syntax. See more at http://msdn.microsoft.com/en-us/library/45yd4tzz(v=vs.80).aspx, http://www.daniweb.com/software-development/cpp/threads/4927,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜