| delorie.com/archives/browse.cgi | search |
| From: | "Martin Czamai" <M DOT Czamai AT peak-system DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Does CWSDPMI block jumps to 0xFFFF0 ?? |
| Date: | Sat, 20 Oct 2001 15:45:40 +0200 |
| Organization: | [neXgo] the next generation online |
| Lines: | 36 |
| Message-ID: | <9qrvcp$a15$1@newsread4.nexgo.de> |
| NNTP-Posting-Host: | d21173-gw.netzdienste.de |
| X-Trace: | newsread4.nexgo.de 10277 FR |
| X-Complaints-To: | abuse AT germany DOT net |
| NNTP-Posting-Date: | Sat, 20 Oct 2001 13:49:13 +0000 (UTC) |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
| X-Priority: | 3 |
| X-Newsreader: | Microsoft Outlook Express 5.00.2615.200 |
| X-MSMail-Priority: | Normal |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Hi,
can anybody tell me whether cwsdpmi blocks jumps to 0xFFFF0 (0xFFFF :
0x0000) to reboot the computer??
If not, what's wrong at this few lines of code??
#include <sys/farptr.h>
#include <go32.h>
void (*pRstFunction)(void); // simple
function pointer
int main(void)
{
_farpokew(_dos_ds, 0x40*16+0x72, 0x1234); // seg*16 +offset ; warm
boot
// _farpokew(_dos_ds, 0x40*16+0x72, 0x0000); // cold boot
// jmp to Adr. 0xFFFF:0000
// __asm__(" jmp 0xFFFF0 "); // direct jump to adress causes
segment violation (but a jmp to 0xFFFF works fine..)
pRstFunction = 0xFFFF0; // correct pointer
(*pRstFunction)(); // perform jump; causes
just a segement violation instead of a reboot
return(0); // should never run
this line of code, just to make the compiler happy
}
Thanks in advance for any help
Martin
M DOT Czamai AT PEAK-System DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |