Path: utzoo!attcan!uunet!husc6!mailrus!iuvax!purdue!decwrl!sun!burgundy!jborza From: jborza%burgundy@Sun.COM (Jim_Borza) Newsgroups: comp.sys.ibm.pc Subject: Re: How could I force a CTRL-ALT-DEL from a program? Summary: Quick, but not dirty. Message-ID: <86397@sun.uucp> Date: 21 Jan 89 06:53:07 GMT References: <4567@bunker.UUCP> Sender: news@sun.uucp Lines: 61 In article <4567@bunker.UUCP>, rha@bunker.UUCP (Robert H. Averack) writes: > > I am investigating how one can remotely cause a PC to reboot. Getting > the stimulus to the PC is clearly not the problem. The problem is getting > the software which recognizes the stimulus to issue a CTRL-ALT-DEL to MSDOS, > resulting in the reset and reboot. > You can reboot a PC with the following code. Assemble with MASM and convert to .COM via EXE2BIN. (It's a bit of overkill - but clean and reliable). ----------------- cut here --------------------------- PAGE ,132 TITLE REBOOT.COM Program reset the computer. COMMENT { This program will make a LONG call to location FFFF0(hex) which is the reset location for the 8088 CPU chip. Prior to doing that, the program also forces the word at location 00472(hex) to 1234(hex) which simulates a Ctrl-Alt-Del type of reboot and bypasses memory diagnostics in POST. { ;******************************************************************** ROM_BIOS_DATA segment at 40h ;location for RESET flag org 72h ;as setup by BIOS. RESET_FLAG label word ;word is 1234h during soft ROM_BIOS_DATA ends ;reboot. ;******************************************************************** REBOOT segment assume cs:REBOOT, ds:REBOOT, es:ROM_BIOS_DATA org 100h START: mov ax, 40h ;set up segment reg es: mov es, ax ;for ROM BIOS DATA mov ax, 01234h ;write 1234h to location 40:72 mov es:RESET_FLAG,ax xor ax,ax ;zero registers xor bx,bx xor cx,cx xor dx,dx xor si,si xor di,di push ax push ax push ax pop ds pop es popf ;clear flags call cs:BOOTER ;long call to reset location. mov ah,0 ;DOS exit (just for form - pro- int 21h ;gram should never get here!). ;-------------------------------------------------------------------- BOOTER dd 0FFFF0000h ;Reset location is FFFF0h. ;-------------------------------------------------------------------- REBOOT ends ;******************************************************************** end START ------------------------------ cut here ----------------------- Jim Borza - Sun Microsystems