Subversion Repositories Kolibri OS

Rev

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

Rev 2434 Rev 2441
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
7
 
8
 
8
 
9
struc VBE_VGAInfo {
9
struc VBE_VGAInfo {
10
  .VESASignature          dd ?    ; char
10
  .VESASignature          dd ?    ; char
11
  .VESAVersion            dw ?    ; short
11
  .VESAVersion            dw ?    ; short
12
  .OemStringPtr           dd ?    ; char *
12
  .OemStringPtr           dd ?    ; char *
13
  .Capabilities           dd ?    ; ulong
13
  .Capabilities           dd ?    ; ulong
14
  .VideoModePtr           dd ?    ; ulong
14
  .VideoModePtr           dd ?    ; ulong
15
  .TotalMemory            dw ?    ; short
15
  .TotalMemory            dw ?    ; short
16
  ; VBE 2.0+
16
  ; VBE 2.0+
17
  .OemSoftwareRev         db ?    ; short
17
  .OemSoftwareRev         db ?    ; short
18
  .OemVendorNamePtr       dw ?    ; char *
18
  .OemVendorNamePtr       dw ?    ; char *
19
  .OemProductNamePtr      dw ?    ; char *
19
  .OemProductNamePtr      dw ?    ; char *
20
  .OemProductRevPtr       dw ?    ; char *
20
  .OemProductRevPtr       dw ?    ; char *
21
  .reserved               rb 222  ; char
21
  .reserved               rb 222  ; char
22
  .OemData                rb 256  ; char
22
  .OemData                rb 256  ; char
23
}
23
}
24
 
24
 
25
struc VBE_ModeInfo {
25
struc VBE_ModeInfo {
26
  .ModeAttributes         dw ?    ; short
26
  .ModeAttributes         dw ?    ; short
27
  .WinAAttributes         db ?    ; char
27
  .WinAAttributes         db ?    ; char
28
  .WinBAttributes         db ?    ; char
28
  .WinBAttributes         db ?    ; char
29
  .WinGranularity         dw ?    ; short
29
  .WinGranularity         dw ?    ; short
30
  .WinSize                dw ?    ; short
30
  .WinSize                dw ?    ; short
31
  .WinASegment            dw ?    ; ushort
31
  .WinASegment            dw ?    ; ushort
32
  .WinBSegment            dw ?    ; ushort
32
  .WinBSegment            dw ?    ; ushort
33
  .WinFuncPtr             dd ?    ; void *
33
  .WinFuncPtr             dd ?    ; void *
34
  .BytesPerScanLine       dw ?    ; short
34
  .BytesPerScanLine       dw ?    ; short
35
  .XRes                   dw ?    ; short
35
  .XRes                   dw ?    ; short
36
  .YRes                   dw ?    ; short
36
  .YRes                   dw ?    ; short
37
  .XCharSize              db ?    ; char
37
  .XCharSize              db ?    ; char
38
  .YCharSize              db ?    ; char
38
  .YCharSize              db ?    ; char
39
  .NumberOfPlanes         db ?    ; char
39
  .NumberOfPlanes         db ?    ; char
40
  .BitsPerPixel           db ?    ; char
40
  .BitsPerPixel           db ?    ; char
41
  .NumberOfBanks          db ?    ; char
41
  .NumberOfBanks          db ?    ; char
42
  .MemoryModel            db ?    ; char
42
  .MemoryModel            db ?    ; char
43
  .BankSize               db ?    ; char
43
  .BankSize               db ?    ; char
44
  .NumberOfImagePages     db ?    ; char
44
  .NumberOfImagePages     db ?    ; char
45
  .res1                   db ?    ; char
45
  .res1                   db ?    ; char
46
  .RedMaskSize            db ?    ; char
46
  .RedMaskSize            db ?    ; char
47
  .RedFieldPosition       db ?    ; char
47
  .RedFieldPosition       db ?    ; char
48
  .GreenMaskSize          db ?    ; char
48
  .GreenMaskSize          db ?    ; char
49
  .GreenFieldPosition     db ?    ; char
49
  .GreenFieldPosition     db ?    ; char
50
  .BlueMaskSize           db ?    ; char
50
  .BlueMaskSize           db ?    ; char
51
  .BlueFieldPosition      db ?    ; char
51
  .BlueFieldPosition      db ?    ; char
52
  .RsvedMaskSize          db ?    ; char
52
  .RsvedMaskSize          db ?    ; char
53
  .RsvedFieldPosition     db ?    ; char
53
  .RsvedFieldPosition     db ?    ; char
54
  .DirectColorModeInfo    db ?    ; char ; MISSED IN THIS TUTORIAL!! SEE ABOVE
54
  .DirectColorModeInfo    db ?    ; char ; MISSED IN THIS TUTORIAL!! SEE ABOVE
55
  ; VBE 2.0+
55
  ; VBE 2.0+
56
  .PhysBasePtr            dd ?    ; ulong
56
  .PhysBasePtr            dd ?    ; ulong
57
  .OffScreenMemOffset     dd ?    ; ulong
57
  .OffScreenMemOffset     dd ?    ; ulong
58
  .OffScreenMemSize       dw ?    ; short
58
  .OffScreenMemSize       dw ?    ; short
59
  ; VBE 3.0+
59
  ; VBE 3.0+
60
  .LinbytesPerScanLine    dw ?    ; short
60
  .LinbytesPerScanLine    dw ?    ; short
61
  .BankNumberOfImagePages db ?    ; char
61
  .BankNumberOfImagePages db ?    ; char
62
  .LinNumberOfImagePages  db ?    ; char
62
  .LinNumberOfImagePages  db ?    ; char
63
  .LinRedMaskSize         db ?    ; char
63
  .LinRedMaskSize         db ?    ; char
64
  .LinRedFieldPosition    db ?    ; char
64
  .LinRedFieldPosition    db ?    ; char
65
  .LingreenMaskSize       db ?    ; char
65
  .LingreenMaskSize       db ?    ; char
66
  .LinGreenFieldPosition  db ?    ; char
66
  .LinGreenFieldPosition  db ?    ; char
67
  .LinBlueMaskSize        db ?    ; char
67
  .LinBlueMaskSize        db ?    ; char
68
  .LinBlueFieldPosition   db ?    ; char
68
  .LinBlueFieldPosition   db ?    ; char
69
  .LinRsvdMaskSize        db ?    ; char
69
  .LinRsvdMaskSize        db ?    ; char
70
  .LinRsvdFieldPosition   db ?    ; char
70
  .LinRsvdFieldPosition   db ?    ; char
71
  .MaxPixelClock          dd ?    ; ulong
71
  .MaxPixelClock          dd ?    ; ulong
72
  .res2                   rb 190  ; char
72
  .res2                   rb 190  ; char
73
}
73
}
74
 
74
 
75
virtual at $A000
75
virtual at $A000
76
  vi VBE_VGAInfo
76
  vi VBE_VGAInfo
77
  mi VBE_ModeInfo
77
  mi VBE_ModeInfo
78
modes_table:
78
modes_table:
79
end virtual
79
end virtual
80
cursor_pos  dw 0         ;âðåìåííîå õðàíåíèå êóðñîðà.
80
cursor_pos  dw 0         ;âðåìåííîå õðàíåíèå êóðñîðà.
81
home_cursor dw 0    ;current shows rows a table
81
home_cursor dw 0    ;current shows rows a table
82
end_cursor  dw 0     ;end of position current shows rows a table
82
end_cursor  dw 0     ;end of position current shows rows a table
83
scroll_start dw 0    ;start position of scroll bar
83
scroll_start dw 0    ;start position of scroll bar
84
scroll_end  dw 0     ;end position of scroll bar
84
scroll_end  dw 0     ;end position of scroll bar
85
long_v_table equ 9   ;long of visible video table
85
long_v_table equ 9   ;long of visible video table
86
size_of_step equ 10
86
size_of_step equ 10
87
scroll_area_size equ (long_v_table-2)
87
scroll_area_size equ (long_v_table-2)
88
int2str:
88
int2str:
89
        dec     bl
89
        dec     bl
90
        jz      @f
90
        jz      @f
91
        xor     edx, edx
91
        xor     edx, edx
92
        div     ecx
92
        div     ecx
93
        push    edx
93
        push    edx
94
        call    int2str
94
        call    int2str
95
        pop     eax
95
        pop     eax
96
    @@:
96
    @@:
97
        or      al, 0x30
97
        or      al, 0x30
98
        mov     [ds:di], al
98
        mov     [ds:di], al
99
        inc     di
99
        inc     di
100
        ret
100
        ret
101
 
101
 
102
int2strnz:
102
int2strnz:
103
        cmp     eax, ecx
103
        cmp     eax, ecx
104
        jb      @f
104
        jb      @f
105
        xor     edx, edx
105
        xor     edx, edx
106
        div     ecx
106
        div     ecx
107
        push    edx
107
        push    edx
108
        call    int2strnz
108
        call    int2strnz
109
        pop     eax
109
        pop     eax
110
    @@:
110
    @@:
111
        or      al, 0x30
111
        or      al, 0x30
112
        mov     [es:di], al
112
        mov     [es:di], al
113
        inc     di
113
        inc     di
114
        ret
114
        ret
115
 
115
 
116
;-------------------------------------------------------
116
;-------------------------------------------------------
117
;Write message about incorrect v_mode and write message about jmp on swith v_mode
117
;Write message about incorrect v_mode and write message about jmp on swith v_mode
118
v_mode_error:
118
v_mode_error:
119
        _setcursor 19,2
119
        _setcursor 19,2
120
        mov     si, fatalsel
120
        mov     si, fatalsel
121
        call    printplain
121
        call    printplain
122
        _setcursor 20,2
122
        _setcursor 20,2
123
        mov     si, pres_key
123
        mov     si, pres_key
124
        call    printplain
124
        call    printplain
125
        xor     eax, eax
125
        xor     eax, eax
126
        int     16h
126
        int     16h
127
        jmp     cfgmanager.d
127
        jmp     cfgmanager.d
128
;-------------------------------------------------------
128
;-------------------------------------------------------
129
;
129
;
130
 
130
 
131
 
131
 
132
 
132
 
133
;-------------------------------------------------------
133
;-------------------------------------------------------
134
print_vesa_info:
134
print_vesa_info:
135
        _setcursor 5,2
135
        _setcursor 5,2
136
 
136
 
137
        mov     [es:vi.VESASignature], 'VBE2'
137
        mov     [es:vi.VESASignature], 'VBE2'
138
        mov     ax, 0x4F00
138
        mov     ax, 0x4F00
139
        mov     di, vi     ;0xa000
139
        mov     di, vi     ;0xa000
140
        int     0x10
140
        int     0x10
141
        or      ah, ah
141
        or      ah, ah
142
        jz      @f
142
        jz      @f
143
        mov     [es:vi.VESASignature], 'VESA'
143
        mov     [es:vi.VESASignature], 'VESA'
144
        mov     ax, $4F00
144
        mov     ax, $4F00
145
        mov     di, vi
145
        mov     di, vi
146
        int     0x10
146
        int     0x10
147
        or      ah, ah
147
        or      ah, ah
148
        jnz     .exit
148
        jnz     .exit
149
  @@:
149
  @@:
150
        cmp     [es:vi.VESASignature], 'VESA'
150
        cmp     [es:vi.VESASignature], 'VESA'
151
        jne     .exit
151
        jne     .exit
152
        cmp     [es:vi.VESAVersion], 0x0100
152
        cmp     [es:vi.VESAVersion], 0x0100
153
        jb      .exit
153
        jb      .exit
154
        jmp     .vesaok2
154
        jmp     .vesaok2
155
 
155
 
156
  .exit:
156
  .exit:
157
        mov     si, novesa
157
        mov     si, novesa
158
        call    printplain
158
        call    printplain
159
        ret
159
        ret
160
 
160
 
161
  .vesaok2:
161
  .vesaok2:
162
        mov     ax, [es:vi.VESAVersion]
162
        mov     ax, [es:vi.VESAVersion]
163
        add     ax, '00'
163
        add     ax, '00'
164
 
164
 
165
        mov     [s_vesa.ver], ah
165
        mov     [s_vesa.ver], ah
166
        mov     [s_vesa.ver+2], al
166
        mov     [s_vesa.ver+2], al
167
        mov     si, s_vesa
167
        mov     si, s_vesa
168
        call    printplain
168
        call    printplain
169
 
169
 
170
        _setcursor 4,2
170
        _setcursor 4,2
171
        mov     si, word[es:vi.OemStringPtr]
171
        mov     si, word[es:vi.OemStringPtr]
172
        mov     di, si
172
        mov     di, si
173
 
173
 
174
        push    ds
174
        push    ds
175
        mov     ds, word[es:vi.OemStringPtr+2]
175
        mov     ds, word[es:vi.OemStringPtr+2]
176
        call    printplain
176
        call    printplain
177
        pop     ds
177
        pop     ds
178
 
178
 
179
        ret
179
        ret
180
;-----------------------------------------------------------------------------
180
;-----------------------------------------------------------------------------
181
 
181
 
182
calc_vmodes_table:
182
calc_vmodes_table:
183
        pushad
183
        pushad
184
 
184
 
185
;        push    0
185
;        push    0
186
;        pop     es
186
;        pop     es
187
 
187
 
188
        lfs     si, [es:vi.VideoModePtr]
188
        lfs     si, [es:vi.VideoModePtr]
189
 
189
 
190
        mov     bx, modes_table
190
        mov     bx, modes_table
191
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
191
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
192
        mov     word [es:bx], 640
192
        mov     word [es:bx], 640
193
        mov     word [es:bx+2], 480
193
        mov     word [es:bx+2], 480
194
        mov     word [es:bx+6], 0x13
194
        mov     word [es:bx+6], 0x13
195
        
195
 
196
        mov     word [es:bx+10], 640
196
        mov     word [es:bx+10], 640
197
        mov     word [es:bx+12], 480
197
        mov     word [es:bx+12], 480
198
        mov     word [es:bx+16], 0x12
198
        mov     word [es:bx+16], 0x12
199
        add     bx, 20
199
        add     bx, 20
200
  .next_mode:
200
  .next_mode:
201
        mov     cx, word [fs:si]; mode number
201
        mov     cx, word [fs:si]; mode number
202
        cmp     cx, -1
202
        cmp     cx, -1
203
        je      .modes_ok.2
203
        je      .modes_ok.2
204
 
204
 
205
        mov     ax, 0x4F01
205
        mov     ax, 0x4F01
206
        mov     di, mi
206
        mov     di, mi
207
        int     0x10
207
        int     0x10
208
 
208
 
209
        or      ah, ah
209
        or      ah, ah
210
        jnz     .modes_ok.2;vesa_info.exit
210
        jnz     .modes_ok.2;vesa_info.exit
211
 
211
 
212
        test    [es:mi.ModeAttributes], 00000001b  ;videomode support ?
212
        test    [es:mi.ModeAttributes], 00000001b  ;videomode support ?
213
        jz      @f
213
        jz      @f
214
        test    [es:mi.ModeAttributes], 00010000b  ;picture ?
214
        test    [es:mi.ModeAttributes], 00010000b  ;picture ?
215
        jz      @f
215
        jz      @f
216
        test    [es:mi.ModeAttributes], 10000000b  ;LFB ?
216
        test    [es:mi.ModeAttributes], 10000000b  ;LFB ?
217
        jz      @f
217
        jz      @f
218
 
218
 
219
        cmp     [es:mi.BitsPerPixel], 24        ;It show only videomodes to have support 24 and 32 bpp
219
        cmp     [es:mi.BitsPerPixel], 24        ;It show only videomodes to have support 24 and 32 bpp
220
        jb      @f
220
        jb      @f
221
 
221
 
222
;        cmp     [es:mi.BitsPerPixel],16
222
;        cmp     [es:mi.BitsPerPixel],16
223
;        jne     .l0
223
;        jne     .l0
224
;        cmp     [es:mi.GreenMaskSize],5
224
;        cmp     [es:mi.GreenMaskSize],5
225
;        jne     .l0
225
;        jne     .l0
226
;        mov     [es:mi.BitsPerPixel],15
226
;        mov     [es:mi.BitsPerPixel],15
227
 
227
 
228
 
228
 
229
.l0:
229
.l0:
230
        cmp     [es:mi.XRes], 640
230
        cmp     [es:mi.XRes], 640
231
        jb      @f
231
        jb      @f
232
        cmp     [es:mi.YRes], 480
232
        cmp     [es:mi.YRes], 480
233
        jb      @f
233
        jb      @f
234
;        cmp     [es:mi.BitsPerPixel],8
234
;        cmp     [es:mi.BitsPerPixel],8
235
;        jb      @f
235
;        jb      @f
236
 
236
 
237
        mov     ax, [es:mi.XRes]
237
        mov     ax, [es:mi.XRes]
238
        mov     [es:bx+0], ax              ; +0[2] : resolution X
238
        mov     [es:bx+0], ax              ; +0[2] : resolution X
239
        mov     ax, [es:mi.YRes]
239
        mov     ax, [es:mi.YRes]
240
        mov     [es:bx+2], ax              ; +2[2] : resolution Y
240
        mov     [es:bx+2], ax              ; +2[2] : resolution Y
241
        mov     ax, [es:mi.ModeAttributes]
241
        mov     ax, [es:mi.ModeAttributes]
242
        mov     [es:bx+4], ax              ; +4[2] : attributes
242
        mov     [es:bx+4], ax              ; +4[2] : attributes
243
 
243
 
244
        cmp     [s_vesa.ver], '2'
244
        cmp     [s_vesa.ver], '2'
245
        jb      .lp1
245
        jb      .lp1
246
 
246
 
247
        or      cx, 0x4000 ; use LFB
247
        or      cx, 0x4000 ; use LFB
248
.lp1:
248
.lp1:
249
        mov     [es:bx+6], cx              ; +6 : mode number
249
        mov     [es:bx+6], cx              ; +6 : mode number
250
        movzx   ax, byte [es:mi.BitsPerPixel]
250
        movzx   ax, byte [es:mi.BitsPerPixel]
251
        mov     word [es:bx+8], ax              ; +8 : bits per pixel
251
        mov     word [es:bx+8], ax              ; +8 : bits per pixel
252
        add     bx, size_of_step                ; size of record 
252
        add     bx, size_of_step                ; size of record
253
 
253
 
254
    @@:
254
    @@:
255
        add     si, 2
255
        add     si, 2
256
        jmp     .next_mode
256
        jmp     .next_mode
257
 
257
 
258
  .modes_ok.2:
258
  .modes_ok.2:
259
 
259
 
260
        mov     word[es:bx], -1 ;end video table
260
        mov     word[es:bx], -1 ;end video table
261
        mov     word[end_cursor], bx    ;save end cursor position
261
        mov     word[end_cursor], bx    ;save end cursor position
262
;;;;;;;;;;;;;;;;;;
262
;;;;;;;;;;;;;;;;;;
263
;Sort array
263
;Sort array
264
;        mov     si,modes_table
264
;        mov     si,modes_table
265
;.new_mode:
265
;.new_mode:
266
;        mov     ax,word [es:si]
266
;        mov     ax,word [es:si]
267
;        cmp     ax,-1
267
;        cmp     ax,-1
268
;        je      .exxit
268
;        je      .exxit
269
;        add     ax,word [es:si+2]
269
;        add     ax,word [es:si+2]
270
;        add     ax,word [es:si+8]
270
;        add     ax,word [es:si+8]
271
;        mov     bp,si
271
;        mov     bp,si
272
;.again:
272
;.again:
273
;        add     bp,12
273
;        add     bp,12
274
;        mov     bx,word [es:bp]
274
;        mov     bx,word [es:bp]
275
;        cmp     bx,-1
275
;        cmp     bx,-1
276
;        je      .exit
276
;        je      .exit
277
;        add     bx,word [es:bp+2]
277
;        add     bx,word [es:bp+2]
278
;        add     bx,word [es:bp+8]
278
;        add     bx,word [es:bp+8]
279
;        
279
;
280
;        cmp     ax,bx
280
;        cmp     ax,bx
281
;        ja      .loops
281
;        ja      .loops
282
;        jmp     .again
282
;        jmp     .again
283
;.loops: 
283
;.loops:
284
;        push    dword [es:si]
284
;        push    dword [es:si]
285
;        push    dword [es:si+4]
285
;        push    dword [es:si+4]
286
;        push    dword [es:si+8]
286
;        push    dword [es:si+8]
287
;        push    dword [es:bp]
287
;        push    dword [es:bp]
288
;        push    dword [es:bp+4]
288
;        push    dword [es:bp+4]
289
;        push    dword [es:bp+8]
289
;        push    dword [es:bp+8]
290
;
290
;
291
;        pop     dword [es:si+8]
291
;        pop     dword [es:si+8]
292
;        pop     dword [es:si+4]
292
;        pop     dword [es:si+4]
293
;        pop     dword [es:si]
293
;        pop     dword [es:si]
294
;        pop     dword [es:bp+8]
294
;        pop     dword [es:bp+8]
295
;        pop     dword [es:bp+4]
295
;        pop     dword [es:bp+4]
296
;        pop     dword [es:bp]
296
;        pop     dword [es:bp]
297
;        jmp     .new_mode
297
;        jmp     .new_mode
298
;
298
;
299
;.exit:  add     si,12
299
;.exit:  add     si,12
300
;        jmp     .new_mode
300
;        jmp     .new_mode
301
;.exxit:
301
;.exxit:
302
        popad
302
        popad
303
        ret
303
        ret
304
 
304
 
305
;-----------------------------------------------------------------------------
305
;-----------------------------------------------------------------------------
306
 
306
 
307
draw_current_vmode:
307
draw_current_vmode:
308
        push    0
308
        push    0
309
        pop     es
309
        pop     es
310
 
310
 
311
        mov     si, word [cursor_pos]
311
        mov     si, word [cursor_pos]
312
 
312
 
313
        cmp     word [es:si+6], 0x12
313
        cmp     word [es:si+6], 0x12
314
        je      .no_vesa_0x12
314
        je      .no_vesa_0x12
315
 
315
 
316
        cmp     word [es:si+6], 0x13
316
        cmp     word [es:si+6], 0x13
317
        je      .no_vesa_0x13
317
        je      .no_vesa_0x13
318
 
318
 
319
        mov     di, loader_block_error
319
        mov     di, loader_block_error
320
        movzx   eax, word[es:si+0]
320
        movzx   eax, word[es:si+0]
321
        mov     ecx, 10
321
        mov     ecx, 10
322
        call    int2strnz
322
        call    int2strnz
323
        mov     byte[es:di], 'x'
323
        mov     byte[es:di], 'x'
324
        inc     di
324
        inc     di
325
        movzx   eax, word[es:si+2]
325
        movzx   eax, word[es:si+2]
326
        call    int2strnz
326
        call    int2strnz
327
        mov     byte[es:di], 'x'
327
        mov     byte[es:di], 'x'
328
        inc     di
328
        inc     di
329
        movzx   eax, word[es:si+8]
329
        movzx   eax, word[es:si+8]
330
        call    int2strnz
330
        call    int2strnz
331
        mov     dword[es:di], 0x00000d0a
331
        mov     dword[es:di], 0x00000d0a
332
        mov     si, loader_block_error
332
        mov     si, loader_block_error
333
        push    ds
333
        push    ds
334
        push    es
334
        push    es
335
        pop     ds
335
        pop     ds
336
        call    printplain
336
        call    printplain
337
        pop     ds
337
        pop     ds
338
        ret
338
        ret
339
.no_vesa_0x13:
339
.no_vesa_0x13:
340
        mov     si, mode0
340
        mov     si, mode0
341
        jmp     .print
341
        jmp     .print
342
.no_vesa_0x12:
342
.no_vesa_0x12:
343
        mov     si, mode9
343
        mov     si, mode9
344
.print:
344
.print:
345
        call    printplain
345
        call    printplain
346
        ret
346
        ret
347
;-----------------------------------------------------------------------------
347
;-----------------------------------------------------------------------------
348
check_first_parm:
348
check_first_parm:
349
        mov     si, word [preboot_graph]
349
        mov     si, word [preboot_graph]
350
        test    si, si
350
        test    si, si
351
        jnz     .no_zero         ;if no zero
351
        jnz     .no_zero         ;if no zero
352
.zerro:
352
.zerro:
353
;        mov     ax,modes_table
353
;        mov     ax,modes_table
354
;        mov     word [cursor_pos],ax
354
;        mov     word [cursor_pos],ax
355
;        mov     word [home_cursor],ax
355
;        mov     word [home_cursor],ax
356
;        mov     word [preboot_graph],ax
356
;        mov     word [preboot_graph],ax
357
;SET default video of mode first probe will fined a move of work 1024x768@32
357
;SET default video of mode first probe will fined a move of work 1024x768@32
358
 
358
 
359
        mov     ax, 1024
359
        mov     ax, 1024
360
        mov     bx, 768
360
        mov     bx, 768
361
        mov     si, modes_table
361
        mov     si, modes_table
362
        call    .loops
362
        call    .loops
363
        test    ax, ax
363
        test    ax, ax
364
        jz      .ok_found_mode
364
        jz      .ok_found_mode
365
        mov     ax, 800
365
        mov     ax, 800
366
        mov     bx, 600
366
        mov     bx, 600
367
        mov     si, modes_table
367
        mov     si, modes_table
368
        call    .loops
368
        call    .loops
369
        test    ax, ax
369
        test    ax, ax
370
        jz      .ok_found_mode
370
        jz      .ok_found_mode
371
        mov     ax, 640
371
        mov     ax, 640
372
        mov     bx, 480
372
        mov     bx, 480
373
        mov     si, modes_table
373
        mov     si, modes_table
374
        call    .loops
374
        call    .loops
375
        test    ax, ax
375
        test    ax, ax
376
        jz      .ok_found_mode
376
        jz      .ok_found_mode
377
 
377
 
378
        mov     si, modes_table
378
        mov     si, modes_table
379
        jmp     .ok_found_mode
379
        jmp     .ok_found_mode
380
 
380
 
381
 
381
 
382
 
382
 
383
.no_zero:
383
.no_zero:
384
        mov     bp, word [number_vm]
384
        mov     bp, word [number_vm]
385
        cmp     bp, word [es:si+6]
385
        cmp     bp, word [es:si+6]
386
        jz      .ok_found_mode
386
        jz      .ok_found_mode
387
        mov     ax, word [x_save]
387
        mov     ax, word [x_save]
388
        mov     bx, word [y_save]
388
        mov     bx, word [y_save]
389
        mov     si, modes_table
389
        mov     si, modes_table
390
        call    .loops
390
        call    .loops
391
        test    ax, ax
391
        test    ax, ax
392
        jz      .ok_found_mode
392
        jz      .ok_found_mode
393
 
393
 
394
        mov     si, modes_table
394
        mov     si, modes_table
395
;        cmp     ax,modes_table
395
;        cmp     ax,modes_table
396
;        jb      .zerro           ;check on correct if bellow
396
;        jb      .zerro           ;check on correct if bellow
397
;        cmp     ax,word [end_cursor]
397
;        cmp     ax,word [end_cursor]
398
;        ja      .zerro           ;check on correct if anymore
398
;        ja      .zerro           ;check on correct if anymore
399
 
399
 
400
.ok_found_mode:
400
.ok_found_mode:
401
        mov     word [home_cursor], si
401
        mov     word [home_cursor], si
402
;        mov     word [cursor_pos],si
402
;        mov     word [cursor_pos],si
403
        mov     word [preboot_graph], si
403
        mov     word [preboot_graph], si
404
        mov     ax, si
404
        mov     ax, si
405
 
405
 
406
        mov     ecx, long_v_table
406
        mov     ecx, long_v_table
407
 
407
 
408
.loop:
408
.loop:
409
        add     ax, size_of_step
409
        add     ax, size_of_step
410
        cmp     ax, word [end_cursor]
410
        cmp     ax, word [end_cursor]
411
        jae     .next_step
411
        jae     .next_step
412
        loop    .loop
412
        loop    .loop
413
.next_step:
413
.next_step:
414
        sub     ax, size_of_step*long_v_table
414
        sub     ax, size_of_step*long_v_table
415
        cmp     ax, modes_table
415
        cmp     ax, modes_table
416
        jae     @f
416
        jae     @f
417
        mov     ax, modes_table
417
        mov     ax, modes_table
418
@@:
418
@@:
419
 
419
 
420
        mov     word [home_cursor], ax
420
        mov     word [home_cursor], ax
421
        mov     si, [preboot_graph]
421
        mov     si, [preboot_graph]
422
        mov     word [cursor_pos], si
422
        mov     word [cursor_pos], si
423
 
423
 
424
        push    word [es:si]
424
        push    word [es:si]
425
        pop     word [x_save]
425
        pop     word [x_save]
426
        push    word [es:si+2]
426
        push    word [es:si+2]
427
        pop     word [y_save]
427
        pop     word [y_save]
428
        push    word [es:si+6]
428
        push    word [es:si+6]
429
        pop     word [number_vm]
429
        pop     word [number_vm]
430
 
430
 
431
        ret
431
        ret
432
;;;;;;;;;;;;;;;;;;;;;;;;;;;
432
;;;;;;;;;;;;;;;;;;;;;;;;;;;
433
.loops:
433
.loops:
434
        cmp     ax, word [es:si]
434
        cmp     ax, word [es:si]
435
        jne     .next
435
        jne     .next
436
        cmp     bx, word [es:si+2]
436
        cmp     bx, word [es:si+2]
437
        jne     .next
437
        jne     .next
438
        cmp     word [es:si+8], 32
438
        cmp     word [es:si+8], 32
439
        je      .ok
439
        je      .ok
440
        cmp     word [es:si+8], 24
440
        cmp     word [es:si+8], 24
441
        je      .ok
441
        je      .ok
442
.next:
442
.next:
443
        add     si, size_of_step
443
        add     si, size_of_step
444
        cmp     word [es:si], -1
444
        cmp     word [es:si], -1
445
        je      .exit
445
        je      .exit
446
        jmp     .loops
446
        jmp     .loops
447
.ok:
447
.ok:
448
        xor     ax, ax
448
        xor     ax, ax
449
        ret
449
        ret
450
.exit:
450
.exit:
451
        or      ax, -1
451
        or      ax, -1
452
        ret
452
        ret
453
 
453
 
454
 
454
 
455
;-----------------------------------------------------------------------------
455
;-----------------------------------------------------------------------------
456
 
456
 
457
;default_vmode:
457
;default_vmode:
458
        
458
 
459
;-----------------------------------------------------------------------------
459
;-----------------------------------------------------------------------------
460
draw_vmodes_table:
460
draw_vmodes_table:
461
        _setcursor 9, 2
461
        _setcursor 9, 2
462
        mov     si, gr_mode
462
        mov     si, gr_mode
463
        call    printplain
463
        call    printplain
464
 
464
 
465
        mov     si, _st
465
        mov     si, _st
466
        call    printplain
466
        call    printplain
467
 
467
 
468
        push    word [cursor_pos]
468
        push    word [cursor_pos]
469
        pop     ax
469
        pop     ax
470
        push    word [home_cursor]
470
        push    word [home_cursor]
471
        pop     si
471
        pop     si
472
        mov     cx, si
472
        mov     cx, si
473
 
473
 
474
        cmp     ax, si
474
        cmp     ax, si
475
        je      .ok
475
        je      .ok
476
        jb      .low
476
        jb      .low
477
 
477
 
478
 
478
 
479
        add     cx, size_of_step*long_v_table
479
        add     cx, size_of_step*long_v_table
480
        
480
 
481
        cmp     ax, cx
481
        cmp     ax, cx
482
        jb      .ok
482
        jb      .ok
483
        
483
 
484
        sub     cx, size_of_step*long_v_table
484
        sub     cx, size_of_step*long_v_table
485
        add     cx, size_of_step
485
        add     cx, size_of_step
486
        cmp     cx, word[end_cursor]
486
        cmp     cx, word[end_cursor]
487
        jae     .ok
487
        jae     .ok
488
        add     si, size_of_step
488
        add     si, size_of_step
489
        push    si
489
        push    si
490
        pop     word [home_cursor]
490
        pop     word [home_cursor]
491
        jmp     .ok
491
        jmp     .ok
492
 
492
 
493
 
493
 
494
.low:
494
.low:
495
        sub     cx, size_of_step
495
        sub     cx, size_of_step
496
        cmp     cx, modes_table
496
        cmp     cx, modes_table
497
        jb      .ok
497
        jb      .ok
498
        push    cx
498
        push    cx
499
        push    cx
499
        push    cx
500
        pop     word [home_cursor]
500
        pop     word [home_cursor]
501
        pop     si
501
        pop     si
502
 
502
 
503
 
503
 
504
.ok:
504
.ok:
505
; calculate scroll position
505
; calculate scroll position
506
        push    si
506
        push    si
507
        mov     ax, [end_cursor]
507
        mov     ax, [end_cursor]
508
        sub     ax, modes_table
508
        sub     ax, modes_table
509
        mov     bx, size_of_step
509
        mov     bx, size_of_step
510
        cwd
510
        cwd
511
        div     bx
511
        div     bx
512
        mov     si, ax          ; si = size of list
512
        mov     si, ax          ; si = size of list
513
        mov     ax, [home_cursor]
513
        mov     ax, [home_cursor]
514
        sub     ax, modes_table
514
        sub     ax, modes_table
515
        cwd
515
        cwd
516
        div     bx
516
        div     bx
517
        mov     di, ax
517
        mov     di, ax
518
        mov     ax, scroll_area_size*long_v_table
518
        mov     ax, scroll_area_size*long_v_table
519
        cwd
519
        cwd
520
        div     si
520
        div     si
521
        test    ax, ax
521
        test    ax, ax
522
        jnz     @f
522
        jnz     @f
523
        inc     ax
523
        inc     ax
524
@@:
524
@@:
525
        cmp     al, scroll_area_size
525
        cmp     al, scroll_area_size
526
        jb      @f
526
        jb      @f
527
        mov     al, scroll_area_size
527
        mov     al, scroll_area_size
528
@@:
528
@@:
529
        mov     cx, ax
529
        mov     cx, ax
530
; cx = scroll height
530
; cx = scroll height
531
; calculate scroll pos
531
; calculate scroll pos
532
        xor     bx, bx          ; initialize scroll pos
532
        xor     bx, bx          ; initialize scroll pos
533
        sub     al, scroll_area_size+1
533
        sub     al, scroll_area_size+1
534
        neg     al
534
        neg     al
535
        sub     si, long_v_table-1
535
        sub     si, long_v_table-1
536
        jbe     @f
536
        jbe     @f
537
        mul     di
537
        mul     di
538
        div     si
538
        div     si
539
        mov     bx, ax
539
        mov     bx, ax
540
@@:
540
@@:
541
        inc     bx
541
        inc     bx
542
        imul    ax, bx, size_of_step
542
        imul    ax, bx, size_of_step
543
        add     ax, [home_cursor]
543
        add     ax, [home_cursor]
544
        mov     [scroll_start], ax
544
        mov     [scroll_start], ax
545
        imul    cx, size_of_step
545
        imul    cx, size_of_step
546
        add     ax, cx
546
        add     ax, cx
547
        mov     [scroll_end], ax
547
        mov     [scroll_end], ax
548
        pop     si
548
        pop     si
549
        mov     bp, long_v_table              ;show rows
549
        mov     bp, long_v_table              ;show rows
550
.@@_next_bit:
550
.@@_next_bit:
551
;clear cursor
551
;clear cursor
552
        mov     ax, '  '
552
        mov     ax, '  '
553
        mov     word[ds:_r1+21], ax
553
        mov     word[ds:_r1+21], ax
554
        mov     word[ds:_r1+50], ax
554
        mov     word[ds:_r1+50], ax
555
 
555
 
556
        mov     word[ds:_r2+21], ax
556
        mov     word[ds:_r2+21], ax
557
        mov     word[ds:_r2+45], ax
557
        mov     word[ds:_r2+45], ax
558
 
558
 
559
        mov     word[ds:_rs+21], ax
559
        mov     word[ds:_rs+21], ax
560
        mov     word[ds:_rs+46], ax
560
        mov     word[ds:_rs+46], ax
561
; draw string
561
; draw string
562
        cmp     word [es:si+6], 0x12
562
        cmp     word [es:si+6], 0x12
563
        je      .show_0x12
563
        je      .show_0x12
564
        cmp     word [es:si+6], 0x13
564
        cmp     word [es:si+6], 0x13
565
        je      .show_0x13
565
        je      .show_0x13
566
 
566
 
567
        movzx   eax, word[es:si]
567
        movzx   eax, word[es:si]
568
        cmp     ax, -1
568
        cmp     ax, -1
569
        je      .@@_end
569
        je      .@@_end
570
        mov     di, _rs+23
570
        mov     di, _rs+23
571
        mov     ecx, 10
571
        mov     ecx, 10
572
        mov     bl, 4
572
        mov     bl, 4
573
        call    int2str
573
        call    int2str
574
        movzx   eax, word[es:si+2]
574
        movzx   eax, word[es:si+2]
575
        inc     di
575
        inc     di
576
        mov     bl, 4
576
        mov     bl, 4
577
        call    int2str
577
        call    int2str
578
 
578
 
579
        movzx   eax, word[es:si+8]
579
        movzx   eax, word[es:si+8]
580
        inc     di
580
        inc     di
581
        mov     bl, 2
581
        mov     bl, 2
582
        call    int2str
582
        call    int2str
583
 
583
 
584
        cmp     si, word [cursor_pos]
584
        cmp     si, word [cursor_pos]
585
        jne     .next
585
        jne     .next
586
;draw   cursor
586
;draw   cursor
587
        mov     word[ds:_rs+21], '>>'
587
        mov     word[ds:_rs+21], '>>'
588
        mov     word[ds:_rs+46], '<<'
588
        mov     word[ds:_rs+46], '<<'
589
        
589
 
590
 
590
 
591
 
591
 
592
.next:
592
.next:
593
        push    si
593
        push    si
594
        mov     si, _rs
594
        mov     si, _rs
595
.@@_sh:
595
.@@_sh:
596
; add to the string pseudographics for scrollbar
596
; add to the string pseudographics for scrollbar
597
        pop     bx
597
        pop     bx
598
        push    bx
598
        push    bx
599
        mov     byte [si+53], ' '
599
        mov     byte [si+53], ' '
600
        cmp     bx, [scroll_start]
600
        cmp     bx, [scroll_start]
601
        jb      @f
601
        jb      @f
602
        cmp     bx, [scroll_end]
602
        cmp     bx, [scroll_end]
603
        jae     @f
603
        jae     @f
604
        mov     byte [si+53], 0xDB ; filled bar
604
        mov     byte [si+53], 0xDB ; filled bar
605
@@:
605
@@:
606
        push    bx
606
        push    bx
607
        add     bx, size_of_step
607
        add     bx, size_of_step
608
        cmp     bx, [end_cursor]
608
        cmp     bx, [end_cursor]
609
        jnz     @f
609
        jnz     @f
610
        mov     byte [si+53], 31 ; 'down arrow' symbol
610
        mov     byte [si+53], 31 ; 'down arrow' symbol
611
@@:
611
@@:
612
        sub     bx, [home_cursor]
612
        sub     bx, [home_cursor]
613
        cmp     bx, size_of_step*long_v_table
613
        cmp     bx, size_of_step*long_v_table
614
        jnz     @f
614
        jnz     @f
615
        mov     byte [si+53], 31 ; 'down arrow' symbol
615
        mov     byte [si+53], 31 ; 'down arrow' symbol
616
@@:
616
@@:
617
        pop     bx
617
        pop     bx
618
        cmp     bx, [home_cursor]
618
        cmp     bx, [home_cursor]
619
        jnz     @f
619
        jnz     @f
620
        mov     byte [si+53], 30 ; 'up arrow' symbol
620
        mov     byte [si+53], 30 ; 'up arrow' symbol
621
@@:
621
@@:
622
        call    printplain
622
        call    printplain
623
        pop     si
623
        pop     si
624
        add     si, size_of_step
624
        add     si, size_of_step
625
 
625
 
626
        dec     bp
626
        dec     bp
627
        jnz     .@@_next_bit
627
        jnz     .@@_next_bit
628
 
628
 
629
.@@_end:
629
.@@_end:
630
        mov     si, _bt
630
        mov     si, _bt
631
        call    printplain
631
        call    printplain
632
        ret
632
        ret
633
.show_0x13:
633
.show_0x13:
634
        push    si
634
        push    si
635
 
635
 
636
        cmp     si, word [cursor_pos]
636
        cmp     si, word [cursor_pos]
637
        jne     @f
637
        jne     @f
638
        mov     word[ds:_r1+21], '>>'
638
        mov     word[ds:_r1+21], '>>'
639
        mov     word[ds:_r1+50], '<<'
639
        mov     word[ds:_r1+50], '<<'
640
@@:
640
@@:
641
        mov     si, _r1
641
        mov     si, _r1
642
        jmp     .@@_sh
642
        jmp     .@@_sh
643
.show_0x12:
643
.show_0x12:
644
        push    si
644
        push    si
645
        cmp     si, word [cursor_pos]
645
        cmp     si, word [cursor_pos]
646
        jne     @f
646
        jne     @f
647
 
647
 
648
        mov     word[ds:_r2+21], '>>'
648
        mov     word[ds:_r2+21], '>>'
649
        mov     word[ds:_r2+45], '<<'
649
        mov     word[ds:_r2+45], '<<'
650
@@:
650
@@:
651
        mov     si, _r2
651
        mov     si, _r2
652
        jmp     .@@_sh
652
        jmp     .@@_sh
653
 
653
 
654
;-----------------------------------------------------------------------------
654
;-----------------------------------------------------------------------------
655
;Clear arrea of current video page (0xb800)
655
;Clear arrea of current video page (0xb800)
656
clear_vmodes_table:
656
clear_vmodes_table:
657
        pusha
657
        pusha
658
       ; draw frames
658
       ; draw frames
659
        push    es
659
        push    es
660
        push    0xb800
660
        push    0xb800
661
        pop     es
661
        pop     es
662
        mov     di, 1444
662
        mov     di, 1444
663
        xor     ax, ax
663
        xor     ax, ax
664
        mov     ah, 1*16+15
664
        mov     ah, 1*16+15
665
        mov     cx, 70
665
        mov     cx, 70
666
        mov     bp, 12
666
        mov     bp, 12
667
.loop_start:
667
.loop_start:
668
        rep stosw
668
        rep stosw
669
        mov     cx, 70
669
        mov     cx, 70
670
        add     di, 20
670
        add     di, 20
671
        dec     bp
671
        dec     bp
672
        jns     .loop_start
672
        jns     .loop_start
673
        pop     es
673
        pop     es
674
        popa
674
        popa
675
        ret
675
        ret
676
 
676
 
677
;-----------------------------------------------------------------------------
677
;-----------------------------------------------------------------------------
678
 
678
 
679
set_vmode:
679
set_vmode:
680
        push    0 ;0;x1000
680
        push    0 ;0;x1000
681
        pop     es
681
        pop     es
682
 
682
 
683
        mov     si, word [preboot_graph]           ;[preboot_graph]
683
        mov     si, word [preboot_graph]           ;[preboot_graph]
684
        mov     cx, word [es:si+6]           ; number of mode
684
        mov     cx, word [es:si+6]           ; number of mode
685
        
685
 
686
 
686
 
687
        mov     ax, word [es:si+0]           ; resolution X
687
        mov     ax, word [es:si+0]           ; resolution X
688
        mov     bx, word [es:si+2]           ; resolution Y
688
        mov     bx, word [es:si+2]           ; resolution Y
689
 
689
 
690
 
690
 
691
        mov     word [es:0x900A], ax             ; resolution X
691
        mov     word [es:BOOT_X_RES], ax             ; resolution X
692
        mov     word [es:0x900C], bx             ; resolution Y
692
        mov     word [es:BOOT_Y_RES], bx             ; resolution Y
693
        mov     word [es:0x9008], cx             ; number of mode
693
        mov     word [es:BOOT_VESA_MODE], cx     ; number of mode
694
 
694
 
695
        cmp     cx, 0x12
695
        cmp     cx, 0x12
696
        je      .mode0x12_0x13
696
        je      .mode0x12_0x13
697
        cmp     cx, 0x13
697
        cmp     cx, 0x13
698
        je      .mode0x12_0x13
698
        je      .mode0x12_0x13
699
 
699
 
700
 
700
 
701
        cmp     byte [s_vesa.ver], '2'
701
        cmp     byte [s_vesa.ver], '2'
702
        jb      .vesa12
702
        jb      .vesa12
703
 
703
 
704
;  VESA 2 and Vesa 3
704
;  VESA 2 and Vesa 3
705
 
705
 
706
        mov     ax, 0x4f01
706
        mov     ax, 0x4f01
707
        and     cx, 0xfff
707
        and     cx, 0xfff
708
        mov     di, mi;0xa000
708
        mov     di, mi;0xa000
709
        int     0x10
709
        int     0x10
710
        ; LFB
710
        ; LFB
711
        mov     eax, [es:mi.PhysBasePtr];di+0x28]
711
        mov     eax, [es:mi.PhysBasePtr];di+0x28]
712
        mov     [es:0x9018], eax
712
        mov     [es:BOOT_LFB], eax
713
        ; ---- vbe voodoo
713
        ; ---- vbe voodoo
714
        BytesPerLine equ 0x10
714
        BytesPerLine equ 0x10
715
        mov     ax, [es:di+BytesPerLine]
715
        mov     ax, [es:di+BytesPerLine]
716
        mov     [es:0x9001], ax
716
        mov     [es:BOOT_PITCH], ax
717
        ; BPP
717
        ; BPP
718
        cmp     [es:mi.BitsPerPixel], 16
718
        cmp     [es:mi.BitsPerPixel], 16
719
        jne     .l0
719
        jne     .l0
720
        cmp     [es:mi.GreenMaskSize], 5
720
        cmp     [es:mi.GreenMaskSize], 5
721
        jne     .l0
721
        jne     .l0
722
        mov     [es:mi.BitsPerPixel], 15
722
        mov     [es:mi.BitsPerPixel], 15
723
.l0:
723
.l0:
724
        mov     al, byte [es:di+0x19]
724
        mov     al, byte [es:di+0x19]
725
        mov     [es:0x9000], al
725
        mov     [es:BOOT_BPP], al
726
        jmp     .exit
726
        jmp     .exit
727
 
727
 
728
.mode0x12_0x13:
728
.mode0x12_0x13:
729
        mov     byte [es:0x9000], 32
729
        mov     byte [es:BOOT_BPP], 32
730
        or      dword [es:0x9018], 0xFFFFFFFF; 0x800000
730
        or      dword [es:BOOT_LFB], 0xFFFFFFFF; 0x800000
731
 
731
 
732
 
732
 
733
;  VESA 1.2 PM BANK SWITCH ADDRESS
733
;  VESA 1.2 PM BANK SWITCH ADDRESS
734
 
734
 
735
.vesa12:
735
.vesa12:
736
 
736
 
737
 
737
 
738
        mov     ax, 0x4f0A
738
        mov     ax, 0x4f0A
739
        xor     bx, bx
739
        xor     bx, bx
740
        int     0x10
740
        int     0x10
741
        xor     eax, eax
741
        xor     eax, eax
742
        xor     ebx, ebx
742
        xor     ebx, ebx
743
        mov     ax, es
743
        mov     ax, es
744
        shl     eax, 4
744
        shl     eax, 4
745
        mov     bx, di
745
        mov     bx, di
746
        add     eax, ebx
746
        add     eax, ebx
747
        movzx   ebx, word[es:di]
747
        movzx   ebx, word[es:di]
748
        add     eax, ebx
748
        add     eax, ebx
749
        push    0x0000
749
        push    0x0000
750
        pop     es
750
        pop     es
751
        mov     [es:0x9014], eax
751
        mov     [es:0x9014], eax
752
  .exit:
752
  .exit:
753
        ret
753
        ret
754
 
754
 
755
 
-
 
756
;        mov     dword[es:0x9018],0x000A0000
-
 
757
;        ret
-
 
758
 
755
 
759
;=============================================================================
756
;=============================================================================
760
;=============================================================================
757
;=============================================================================
761
;=============================================================================
758
;=============================================================================
762
@@:
759
@@:
763
>
760
>
764
@@:
761
@@:
765
>
762
>
766
@@:
763
@@:
767
>
764
>
768
@@:
765
@@:
769
>
766
>
770
>
767
 
771
>
768
 
-
 
769
 
-
 
770
.next:
-
 
771
>
-
 
772
 
-
 
773
 
-
 
774
 
-
 
775
.next:
-
 
776
>