Subversion Repositories Kolibri OS

Rev

Rev 248 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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