MK_FP() under Win32

i write a program(?) in C++ , win32 console application.
in there isn't MK_FP(seg,off) macro, right (under win32) ?
i have two macros of me that works fine under DOS,
......mkfp(seg,off) ((((long)seg)<<16)|off)
......mkint(high,low) ((((int)high)<<8)|low)
when OS execute the following command :
......*(int far *)mkfp(0xb800,0x0000)=mkint(ATR,'k')
then it hungs, until CTR+ALT+DEL, which close DOS window,
and it's all ok (windows not crashed).
is there any explanation about this ?
..i read in an old question that you can't select any segment of
..memory under win32,is that right ?







Comments

  • : ..i read in an old question that you can't select any segment of
    : ..memory under win32,is that right ?

    [blue]Correct.
    The old ways of SEG:OFS are gone and incompatible. I see you use it to write text to a console window - there is a Console API for this and you can find it here:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/functions_by_category.asp

    Just click on [b]Console[/b]...

    Or, if you like Borland - you can use my class [b][italic]xxiConsole[/italic][/b] which I did for Win32 API console coding. It can be found here:

    http://www.codexxi.com/MyBlocks.html[/blue]
  • ..you are very cool good,thank for classes,
    ..i havent used them but i read and i think it's very good code
    ..
    ..about the problem
    ..i read some code from some that switch machine in ProtectedMode
    ..and one of the GDRT tables he set is one as data-seg at 0xB800
    ..then he used it's handle, and prints directly (C & ASM)
    ..i assume if we scan the GDTR and find seg 0xB800 and if
    ..winos havent locked it, we can do the direct access (?)
    ..
    ..anyway, thanks
    ..
    ..about the IP & Net courses i said before,was somehow big, but
    ..now it's there. it's very good,read it.
    .. www.geocities.com/xkvirusgr
    ..it's writer told me :
    .."Some people are weatherwise, but most are otherwise."
    ....Benjamin Franklin
    ..


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories