home *** CD-ROM | disk | FTP | other *** search
/ CD-X 1 / cdx_01.iso / demodisc / tyrant / pmode / pmode.asm < prev   
Encoding:
Assembly Source File  |  1995-03-17  |  1.3 KB  |  67 lines

  1. program segment
  2. .386p
  3.  
  4. ; Ez a pár sor egy prot-mode manager    
  5. ; Az EMS managert vedd ki!
  6.  
  7. assume cs:program
  8. k proc near
  9.         mov     cs:byte ptr mem48,16
  10.         mov     eax,seg gdt
  11.         shl     eax,4
  12.         mov     bx,offset gdt
  13.         movzx   ebx,bx
  14.         add     eax,ebx
  15.         mov     cs:dword ptr mem48+2,eax
  16.         lgdt    cs:pword ptr mem48
  17.         mov     bx,8
  18.         push    ds
  19.         cli
  20.         mov     eax,cr0
  21.         or      eax,1
  22.         mov     cr0,eax
  23.         jmp     short k1
  24. k1:     mov     gs,bx
  25.         mov     fs,bx
  26.         mov     es,bx
  27.         mov     ds,bx
  28.         and     al,0feh
  29.         mov     cr0,eax
  30.         jmp     k2
  31. k2:     sti
  32.         pop     ds
  33.  
  34. ; PMODE MANAGER VEGE
  35.  
  36.         mov     ax,013h
  37.         int     10h
  38.  
  39.  
  40. mov ax,0
  41. mov es,ax
  42. mov ax,0a000h
  43. mov es,ax
  44.  
  45.         mov     esi,0a0000h+160            ; PONT HELYE
  46.         mov     al,0fh                ; PONT SZíNE
  47.         mov     [esi],al            ; PONT KIRAKÅSA
  48.  
  49.         mov     edi,0001h            ; UE REAL MODE-BAN
  50.         mov     al,0eh
  51.         stosb
  52.  
  53. b1:     in      al,060h
  54.         cmp     al,1
  55.         jne     b1
  56.  
  57.         mov     ah,4ch
  58.         int     21h
  59.  
  60. mem48:  db      0,0,0,0,0,0
  61. gdt:    db      0,0,0,0,0,0,0,0
  62.         db      0ffh,0ffh,0,0,0,92h,0cfh,0ffh
  63.  
  64. k endp
  65. program ends
  66. end k
  67.                     Comment :  TyRaNT / MurmidoneS