Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

  1. DOSSEG
  2. .MODEL LARGE
  3. CRTL equ 4
  4. ALT equ 8
  5. DEL equ 53h
  6. INTERCEPT equ 4f00h
  7. WARM_BOOT_CODE equ 1234h
  8. ROM_DATA SEGMENT AT 040h
  9. org 17h
  10. KB_FLAG LABEL BYTE
  11. org 72h
  12. WARM_BOOT_FLAG LABEL WORD
  13. ROM_DATA ENDS
  14. .CODE
  15. ASSUME ds:nothing, es:nothing
  16. .286
  17. public _RebootSystem
  18. _RebootSystem proc far
  19. mov ax,3515h
  20. int 21h ; Get int 15h vector in ES:BX
  21. mov ax,es ; AX == Segment
  22. or ax,bx ; Is this a NULL ptr
  23. mov ax,seg ROM_DATA
  24. mov ds,ax ; ds addresses ROM BIOS data area
  25. assume ds:ROM_DATA
  26. jz WarmBoot ; If zero we can't do an int 15h
  27. DoInt15:
  28. mov KB_FLAG,CRTL+ALT
  29. mov ax,INTERCEPT OR DEL ; keyboard intercept, del key
  30. int 15h ; Put Ctrl/Alt/Del into key buffer
  31. WarmBoot:
  32. cli
  33. cld
  34. mov WARM_BOOT_FLAG,WARM_BOOT_CODE
  35. push 0ffffh
  36. push 0
  37. retf ; to processor power-on at ffff:0.
  38. _RebootSystem ENDP
  39. END