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,
精彩评论