Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;
  2. ;   à¨¬¥à ¯à®£à ¬¬ë ¤«ï MenuetOS
  3. ;   ®§¢ã稢 ¥â ª®¤ ­ ¦ â®© ª« ¢¨è¨ ;)
  4. ;
  5. ;   Š®¬¯¨«¨à®¢ âì FASM'®¬
  6. ;
  7. ;   ‘¬. â ª¦¥:
  8. ;     template.asm  -  ¯à¨¬¥à ¯à®á⥩襩 ¯à®£à ¬¬ë (­®¢ë©!)
  9. ;     rb.asm        -  ª®­â¥ªáâ­®¥ ¬¥­î à ¡®ç¥£® á⮫ 
  10. ;     example2.asm  -  ¯à¨¬¥à ¬¥­î ¨ ¤®¯®«­¨â¥«ì­ëå ®ª®­
  11. ;     example3.asm  -  ¯à¨¬¥à ¬¥­î, ॠ«¨§®¢ ­­®£® ¯®-¤à㣮¬ã
  12. ;---------------------------------------------------------------------
  13.  
  14.   use32              ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
  15.   org    0x0         ;  ¤à¥á æ¨ï á ­ã«ï
  16.  
  17.   db     'MENUET01'  ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
  18.   dd     0x01        ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
  19.   dd     START       ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
  20.   dd     I_END       ; à §¬¥à ¯à®£à ¬¬ë
  21.   dd     0x1000      ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
  22.   dd     0x1000      ;  ¤à¥á ¢¥à設ë áâíª 
  23.   dd     0x0         ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
  24.   dd     0x0         ; § à¥§¥à¢¨à®¢ ­®
  25.  
  26. include 'MACROS.INC' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
  27.  
  28. ;---------------------------------------------------------------------
  29. ;---  €—€‹Ž Žƒ€ŒŒ›  ----------------------------------------------
  30. ;---------------------------------------------------------------------
  31.  
  32. START:
  33. ;       mcall 5,10
  34.         mov     ecx, 1
  35.         mov     edx, drvinfo
  36.         push    @f
  37.         jmp     call_driver
  38. @@:
  39. ;       jmp run_launcher
  40.  
  41.         mov     ecx, 2
  42.         push    @f
  43. call_driver:
  44.         mcall 21,13
  45.         ret
  46. @@:
  47. ;       cmp eax,-1
  48.         inc     eax
  49.        je   run_launcher
  50. ;       cmp  ecx,280
  51. ;       je  change_vrr
  52. ;       cmp  ecx,277
  53. ;       je  change_vrr
  54. ;       cmp  ecx,6
  55. ;       je  change_vrr
  56. ;       cmp  ecx,7
  57. ;       je  change_vrr
  58. ;       jmp  run_launcher
  59. change_vrr:
  60. ;       mov ax,cx
  61. ;       dec cx
  62. ;       shl cx,1
  63. ;       xor edx,edx
  64. ;       mov dx,[vidmode+ecx]
  65. ;       mov ebx,ecx
  66. ;       shl ebx,2
  67. ;       add ebx,ecx   ; ebx=ebx*5
  68. ;       shr ax,8
  69. ;       dec ax
  70. ;       shl ax,1
  71. ;       add ebx,eax
  72. ;       ror edx,16
  73. ;       mov dx,[_m1+ebx]
  74. ;       rol edx,16
  75.         ;mov eax,ecx
  76.         mov     eax, 10
  77.         cmp cx,277+3
  78.         je  yes_277
  79.         cmp cx,274+3
  80.         jne yes_280
  81.      yes_274:
  82.         add al,10
  83.      yes_277:
  84.         add al,10
  85.      yes_280:
  86.         mov     edx, [_m1+eax-2]
  87.         lea     dx, [ecx-3]
  88.         push    run_launcher
  89.         mov     ecx, 3
  90.         jmp     call_driver
  91. run_launcher:
  92.        mcall 70,launcher
  93.        mcall -1
  94.  
  95. launcher:
  96.         dd      7
  97.         dd      0
  98.         dd      0
  99.         dd      0
  100.         dd      0
  101.         db      0
  102. prog:   dd      autorun_prog
  103.  
  104. autorun_prog db '/hd0/1/kolibri/bin/launcher',0
  105. I_END:                             ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
  106.         db      ?       ; system loader will zero all memory after program end
  107.                         ; this byte will be terminating zero for launcher string
  108. ; \begin{Serge}
  109.                         ; A you really believe it?
  110.                         ; Áëàæåí, êòî âåðóåò, òåïëî åìó íà ñâåòå!
  111. ; \end{Serge}
  112. drvinfo:   ; 512 bytes driver info area
  113. ; +0   - Full driver name
  114. ; +32  - Driver version
  115. ; +64  - Word List of support video modes (max 32 positions)
  116. ; +128 - 5 words list of support vertical rate to each present mode
  117.       org $+32
  118. drvver:
  119.       org $+32
  120. vidmode:
  121.       org $+64
  122. _m1:
  123.       org drvinfo+200h
  124.