Subversion Repositories Kolibri OS

Rev

Rev 1930 | Rev 1952 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1930 Rev 1941
Line 53... Line 53...
53
;; your rights and responsibilities. It should be in a file named COPYING.
53
;; your rights and responsibilities. It should be in a file named COPYING.
54
;; Among other things, the copyright notice and this notice must be preserved
54
;; Among other things, the copyright notice and this notice must be preserved
55
;; on all copies.
55
;; on all copies.
56
;;
56
;;
57
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
57
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
58
 
58
 
59
include 'macros.inc'
59
include 'macros.inc'
Line 60... Line 60...
60
 
60
 
Line 61... Line 61...
61
$Revision: 1930 $
61
$Revision: 1941 $
Line 62... Line 62...
62
 
62
 
Line 116... Line 116...
116
		  org	0x0
116
		  org	0x0
117
		  jmp	start_of_code
117
		  jmp	start_of_code
Line 118... Line 118...
118
 
118
 
Line 119... Line 119...
119
version db    'Kolibri OS  version 0.7.7.0+     ',13,10,13,10,0
119
version db    'Kolibri OS  version 0.7.7.0+     ',13,10,13,10,0
120
 
120
 
Line 121... Line 121...
121
include "boot/bootstr.inc"     ; language-independent boot messages
121
;include "boot/bootstr.inc"     ; language-independent boot messages
Line 122... Line 122...
122
include "boot/preboot.inc"
122
include "boot/preboot.inc"
Line 217... Line 217...
217
	   bts [cpu_caps-OS_BASE], CAPS_TSC	;force use rdtsc
217
	   bts [cpu_caps-OS_BASE], CAPS_TSC	;force use rdtsc
Line 218... Line 218...
218
 
218
 
Line 219... Line 219...
219
	   call init_BIOS32	; (init.inc - to be removed later)
219
	   call init_BIOS32	; (init.inc - to be removed later)
220
 
220
 
221
; PCIe extended config space access
221
; PCIe extended config space access
Line 222... Line 222...
222
;	   call rs7xx_pcie_init	; (bus/HT.inc)
222
;          call rs7xx_pcie_init ; (bus/HT.inc)
223
	   call fusion_pcie_init	; (bus/HT.inc)
223
	   call fusion_pcie_init	; (bus/HT.inc)
224
 
224
 
Line 318... Line 318...
318
    mov    eax, [BOOT_VAR + 0x9044]    ; version & flags
318
    mov    eax, [BOOT_VAR + 0x9044]    ; version & flags
319
    mov    [apm_vf], eax
319
    mov    [apm_vf], eax
320
; -----------------------------------------
320
; -----------------------------------------
321
	mov	al, [BOOT_VAR+0x901F]		; DMA access
321
	mov	al, [BOOT_VAR+0x901F]		; DMA access
322
	mov	[allow_dma_access], al
322
	mov	[allow_dma_access], al
323
	mov     eax, 32	 			; bpp
323
	mov	eax, 32 			; bpp
324
	mov     [ScreenBPP],al
324
	mov	[ScreenBPP],al
325
	mov     [_display.bpp], eax
325
	mov	[_display.bpp], eax
326
 
326
 
327
	mov     [_display.vrefresh], 60
327
	mov	[_display.vrefresh], 60
328
	mov     [_display.disable_mouse],  __sys_disable_mouse
328
	mov	[_display.disable_mouse],  __sys_disable_mouse
329
 
329
 
330
	movzx   eax,word [BOOT_VAR+0x900A]  ; X max
330
	movzx	eax,word [BOOT_VAR+0x900A]  ; X max
331
	mov     [_display.width], eax
331
	mov	[_display.width], eax
332
	dec     eax
332
	dec	eax
333
	mov     [Screen_Max_X],eax
333
	mov	[Screen_Max_X],eax
334
	mov     [screen_workarea.right],eax
334
	mov	[screen_workarea.right],eax
335
	movzx   eax,word [BOOT_VAR+0x900C]        ; Y max
335
	movzx	eax,word [BOOT_VAR+0x900C]	  ; Y max
336
	mov     [_display.height], eax
336
	mov	[_display.height], eax
337
	dec     eax
337
	dec	eax
338
	mov     [Screen_Max_Y],eax
338
	mov	[Screen_Max_Y],eax
339
	mov     [screen_workarea.bottom],eax
339
	mov	[screen_workarea.bottom],eax
340
	movzx   eax,word [BOOT_VAR+0x9008]        ; screen mode
340
	movzx	eax,word [BOOT_VAR+0x9008]	  ; screen mode
341
	mov     [SCR_MODE],eax
341
	mov	[SCR_MODE],eax
342
 
342
 
343
	movzx   eax, word[BOOT_VAR+0x9001]        ; for other modes
343
	movzx	eax, word[BOOT_VAR+0x9001]	  ; for other modes
344
	mov     [BytesPerScanLine],ax
344
	mov	[BytesPerScanLine],ax
345
	mov     [_display.pitch], eax
345
	mov	[_display.pitch], eax
346
 
346
 
347
	mov     eax, [_display.width]
347
	mov	eax, [_display.width]
348
	mul     [_display.height]
348
	mul	[_display.height]
349
	mov     [_WinMapSize], eax
349
	mov	[_WinMapSize], eax
Line 350... Line 350...
350
 
350
 
351
	mov	esi, BOOT_VAR+0x9080
351
	mov	esi, BOOT_VAR+0x9080
352
	movzx	ecx, byte [esi-1]
352
	movzx	ecx, byte [esi-1]
353
	mov	[NumBiosDisks], ecx
353
	mov	[NumBiosDisks], ecx
Line 403... Line 403...
403
	mov	dword [SLOT_BASE+256+APPDATA.io_map+4], eax
403
	mov	dword [SLOT_BASE+256+APPDATA.io_map+4], eax
404
	stdcall map_page, tss+0x1080, eax, PG_SW
404
	stdcall map_page, tss+0x1080, eax, PG_SW
Line 405... Line 405...
405
 
405
 
Line 406... Line 406...
406
; LOAD IDT
406
; LOAD IDT
Line 407... Line 407...
407
 
407
 
408
	   call         build_interrupt_table ;lidt is executed
408
	   call 	build_interrupt_table ;lidt is executed
409
 
409
 
410
	   call         init_kernel_heap
410
	   call 	init_kernel_heap
411
	   stdcall      kernel_alloc, RING0_STACK_SIZE+512
411
	   stdcall	kernel_alloc, RING0_STACK_SIZE+512
412
	   mov  [os_stack_seg], eax
412
	   mov	[os_stack_seg], eax
413
 
413
 
414
	   lea  esp, [eax+RING0_STACK_SIZE]
414
	   lea	esp, [eax+RING0_STACK_SIZE]
415
 
415
 
416
	   mov  [tss._ss0], os_stack
416
	   mov	[tss._ss0], os_stack
417
	   mov  [tss._esp0], esp
417
	   mov	[tss._esp0], esp
418
	   mov  [tss._esp], esp
418
	   mov	[tss._esp], esp
419
	   mov  [tss._cs],os_code
419
	   mov	[tss._cs],os_code
420
	   mov  [tss._ss],os_stack
420
	   mov	[tss._ss],os_stack
421
	   mov  [tss._ds],app_data
421
	   mov	[tss._ds],app_data
422
	   mov  [tss._es],app_data
422
	   mov	[tss._es],app_data
423
	   mov  [tss._fs],app_data
423
	   mov	[tss._fs],app_data
424
	   mov  [tss._gs],app_data
424
	   mov	[tss._gs],app_data
425
	   mov  [tss._io],128
425
	   mov	[tss._io],128
426
;Add IO access table - bit array of permitted ports
426
;Add IO access table - bit array of permitted ports
427
	   mov  edi, tss._io_map_0
427
	   mov	edi, tss._io_map_0
428
	   xor  eax, eax
428
	   xor	eax, eax
429
	   mov  ecx, 2047
429
	   mov	ecx, 2047
Line 430... Line 430...
430
	   rep  stosd		     ; access to 65504 ports granted
430
	   rep	stosd		     ; access to 65504 ports granted
431
	   not  eax		     ; the last 32 ports blocked
431
	   not	eax		     ; the last 32 ports blocked
Line 432... Line 432...
432
	   stosd
432
	   stosd
433
 
433
 
434
	   mov	ax,tss0
434
	   mov	ax,tss0
435
	   ltr	ax
435
	   ltr	ax
436
 
436
 
437
	   mov  [LFBSize], 0x800000
437
	   mov	[LFBSize], 0x800000
438
	   call init_LFB
438
	   call init_LFB
Line 439... Line 439...
439
	   call init_fpu
439
	   call init_fpu
440
	   call init_malloc
440
	   call init_malloc
441
;-
441
;-
Line 442... Line 442...
442
	   stdcall alloc_kernel_space, 0x51000
442
	   stdcall alloc_kernel_space, 0x51000
443
	   mov  [default_io_map], eax
443
	   mov	[default_io_map], eax
Line 444... Line 444...
444
 
444
 
445
	   add  eax, 0x2000
445
	   add	eax, 0x2000
Line 446... Line 446...
446
	   mov  [ipc_tmp], eax
446
	   mov	[ipc_tmp], eax
447
	   mov  ebx, 0x1000
447
	   mov	ebx, 0x1000
Line 448... Line 448...
448
 
448
 
449
	   add  eax, 0x40000
449
	   add	eax, 0x40000
Line 450... Line 450...
450
	   mov  [proc_mem_map], eax
450
	   mov	[proc_mem_map], eax
451
 
451
 
Line 452... Line 452...
452
	   add  eax, 0x8000
452
	   add	eax, 0x8000
453
	   mov  [proc_mem_pdir], eax
453
	   mov	[proc_mem_pdir], eax
Line 454... Line 454...
454
 
454
 
455
	   add  eax, ebx
455
	   add	eax, ebx
Line 456... Line 456...
456
	   mov  [proc_mem_tab], eax
456
	   mov	[proc_mem_tab], eax
457
 
457
 
Line 458... Line 458...
458
	   add  eax, ebx
458
	   add	eax, ebx
Line 459... Line 459...
459
	   mov  [tmp_task_pdir], eax
459
	   mov	[tmp_task_pdir], eax
460
 
460
 
461
	   add  eax, ebx
461
	   add	eax, ebx
462
	   mov  [tmp_task_ptab], eax
462
	   mov	[tmp_task_ptab], eax
463
 
463
 
464
	   add  eax, ebx
464
	   add	eax, ebx
465
	   mov  [ipc_pdir], eax
465
	   mov	[ipc_pdir], eax
466
 
466
 
467
	   add  eax, ebx
467
	   add	eax, ebx
Line 468... Line 468...
468
	   mov  [ipc_ptab], eax
468
	   mov	[ipc_ptab], eax
469
 
469
 
470
	   stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
470
	   stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
471
				 (unpack.lc+unpack.lp)))*4
471
				 (unpack.lc+unpack.lp)))*4
472
 
472
 
473
	   mov  [unpack.p], eax
473
	   mov	[unpack.p], eax
474
 
474
 
475
	   call init_events
475
	   call init_events
476
	   mov  eax, srv.fd-SRV_FD_OFFSET
476
	   mov	eax, srv.fd-SRV_FD_OFFSET
477
	   mov  [srv.fd], eax
477
	   mov	[srv.fd], eax
478
	   mov  [srv.bk], eax
478
	   mov	[srv.bk], eax
Line 479... Line 479...
479
 
479
 
480
	   mov  edi, irq_tab
480
	   mov	edi, irq_tab
481
	   xor  eax, eax
481
	   xor	eax, eax
482
	   mov  ecx, 16
482
	   mov	ecx, 16
Line 542... Line 542...
542
	out	0x21, al
542
	out	0x21, al
543
	mov	al, 0x3F
543
	mov	al, 0x3F
544
	out	0xA1, al
544
	out	0xA1, al
Line 545... Line 545...
545
 
545
 
546
; Enable interrupts in IDE controller
546
; Enable interrupts in IDE controller
547
        mov     al, 0
547
	mov	al, 0
548
        mov     dx, 0x3F6
548
	mov	dx, 0x3F6
549
        out     dx, al
549
	out	dx, al
550
        mov     dl, 0x76
550
	mov	dl, 0x76
Line 551... Line 551...
551
        out     dx, al
551
	out	dx, al
552
 
552
 
553
;!!!!!!!!!!!!!!!!!!!!!!!!!!
553
;!!!!!!!!!!!!!!!!!!!!!!!!!!
Line 554... Line 554...
554
include 'detect/disks.inc'
554
include 'detect/disks.inc'
Line 555... Line 555...
555
;!!!!!!!!!!!!!!!!!!!!!!!!!!
555
;!!!!!!!!!!!!!!!!!!!!!!!!!!
Line 556... Line 556...
556
 
556
 
557
  call Parser_params
557
  call Parser_params
558
 
558
 
559
; READ RAMDISK IMAGE FROM HD
559
; READ RAMDISK IMAGE FROM HD
560
 
560
 
Line 561... Line 561...
561
;!!!!!!!!!!!!!!!!!!!!!!!
561
;!!!!!!!!!!!!!!!!!!!!!!!
Line 624... Line 624...
624
 
624
 
Line 625... Line 625...
625
; SET BACKGROUND DEFAULTS
625
; SET BACKGROUND DEFAULTS
626
 
626
 
627
	mov   esi,boot_bgr
627
	mov   esi,boot_bgr
628
	call  boot_log
628
	call  boot_log
Line 629... Line 629...
629
	call  init_background   ; 
629
	call  init_background	;
Line 630... Line 630...
630
        call  calculatebackground
630
	call  calculatebackground
631
 
631
 
Line 652... Line 652...
652
 
652
 
653
	mov esi, fpu_data
653
	mov esi, fpu_data
654
	mov ecx, 512/4
654
	mov ecx, 512/4
655
	cld
655
	cld
656
	rep movsd
656
	rep movsd
657
 
657
 
658
	mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
658
	mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
Line 659... Line 659...
659
	mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
659
	mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
660
 
660
 
Line 724... Line 724...
724
	;call   detect_devices
724
	;call   detect_devices
725
	stdcall load_driver, szPS2MDriver
725
	stdcall load_driver, szPS2MDriver
Line 726... Line 726...
726
 
726
 
727
	mov   esi,boot_setmouse
727
	mov   esi,boot_setmouse
728
	call  boot_log
728
	call  boot_log
729
;	call  setmouse
729
;       call  setmouse
730
;     mov     [MOUSE_PICTURE],dword mousepointer
730
;     mov     [MOUSE_PICTURE],dword mousepointer
Line 731... Line 731...
731
        cli
731
	cli
Line 732... Line 732...
732
 
732
 
733
; STACK AND FDC
733
; STACK AND FDC
Line 750... Line 750...
750
	   stdcall map_page,tss._io_map_0,\
750
	   stdcall map_page,tss._io_map_0,\
751
		   [SLOT_BASE+256+APPDATA.io_map], PG_MAP
751
		   [SLOT_BASE+256+APPDATA.io_map], PG_MAP
752
	   stdcall map_page,tss._io_map_1,\
752
	   stdcall map_page,tss._io_map_1,\
753
		   [SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
753
		   [SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
Line 754... Line -...
754
 
-
 
755
  mov ax,[OS_BASE+0x10000+bx_from_load]
-
 
756
  cmp ax,'r1'		; if not rused ram disk - load network configuration from files {SPraid.simba}
-
 
757
  je  no_st_network
-
 
758
	call set_network_conf
-
 
Line 759... Line 754...
759
  no_st_network:
754
 
760
 
755
 
761
	call init_userDMA	; <<<<<<<<< ============== core/memory.inc =================
756
	call init_userDMA	; <<<<<<<<< ============== core/memory.inc =================
Line 2513... Line 2508...
2513
    ; Window state
2508
    ; Window state
2514
	mov	al, [ecx+window_data+WDATA.fl_wstate]
2509
	mov	al, [ecx+window_data+WDATA.fl_wstate]
2515
	stosb
2510
	stosb
Line 2516... Line 2511...
2516
 
2511
 
2517
    ; Event mask (+71)
2512
    ; Event mask (+71)
2518
        mov     EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
2513
	mov	EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
Line 2519... Line 2514...
2519
        stosd
2514
	stosd
2520
 
2515
 
Line 2521... Line 2516...
2521
	pop	esi
2516
	pop	esi
Line 2889... Line 2884...
2889
 
2884
 
2890
redrawscreen:
2885
redrawscreen:
2891
	 pushad
2886
	 pushad
Line 2892... Line 2887...
2892
	 push  eax
2887
	 push  eax
2893
 
2888
 
Line 2894... Line 2889...
2894
	 xor   ecx,ecx	                ; redraw flags for apps
2889
	 xor   ecx,ecx			; redraw flags for apps
2895
       newdw2:
2890
       newdw2:
Line 3234... Line 3229...
3234
     test  ecx,0xFFFF0000
3229
     test  ecx,0xFFFF0000
3235
     jnz   @f
3230
     jnz   @f
3236
  .exit:
3231
  .exit:
3237
     ret
3232
     ret
3238
 @@:
3233
 @@:
3239
        push    edi
3234
	push	edi
3240
	mov	edi,[current_slot]
3235
	mov	edi,[current_slot]
3241
	add	dx,word[edi+APPDATA.wnd_clientbox.top]
3236
	add	dx,word[edi+APPDATA.wnd_clientbox.top]
3242
	rol	edx,16
3237
	rol	edx,16
3243
	add	dx,word[edi+APPDATA.wnd_clientbox.left]
3238
	add	dx,word[edi+APPDATA.wnd_clientbox.left]
3244
        pop     edi
3239
	pop	edi
3245
	rol	edx,16
3240
	rol	edx,16
3246
  .forced:                              ; called from gui/skincode.inc [215]
3241
  .forced:				; called from gui/skincode.inc [215]
3247
	push	esi
3242
	push	esi
3248
	mov     esi, ecx
3243
	mov	esi, ecx
3249
        shr     esi, 16                 ; SizeX
3244
	shr	esi, 16 		; SizeX
3250
        lea     esi, [esi*2+esi]        ; 3 bytes per pixel
3245
	lea	esi, [esi*2+esi]	; 3 bytes per pixel
3251
        mov     [img_buf_line_size], esi
3246
	mov	[img_buf_line_size], esi
3252
        mov     [img_draw_core_fn], draw_core_24bpp
3247
	mov	[img_draw_core_fn], draw_core_24bpp
3253
        mov     [img_draw_edge_fn], draw_edge_24bpp
3248
	mov	[img_draw_edge_fn], draw_edge_24bpp
3254
        mov     [img_bytes_per_pix], 3
3249
	mov	[img_bytes_per_pix], 3
3255
        pop     esi
3250
	pop	esi
Line 3256... Line 3251...
3256
 
3251
 
3257
sys_putimage_bpp:                       ; only called from sys_putimage_palette
3252
sys_putimage_bpp:			; only called from sys_putimage_palette
3258
	inc	[mouse_pause]
3253
	inc	[mouse_pause]
3259
	call	_putimage		
3254
	call	_putimage
3260
	dec	[mouse_pause]
3255
	dec	[mouse_pause]
3261
	call	[draw_pointer]
3256
	call	[draw_pointer]
Line 3262... Line 3257...
3262
        ret
3257
	ret
3263
 
3258
 
3264
 
3259
 
3265
align 4
3260
align 4
3266
sys_putimage_palette:                   ; sysFn 65
3261
sys_putimage_palette:			; sysFn 65
3267
; ebx = pointer to image
3262
; ebx = pointer to image
3268
; ecx = [xsize]*65536 + [ysize]
3263
; ecx = [xsize]*65536 + [ysize]
Line 3275... Line 3270...
3275
	add	dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3270
	add	dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3276
	rol	edx, 16
3271
	rol	edx, 16
3277
	add	dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3272
	add	dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3278
	rol	edx, 16
3273
	rol	edx, 16
3279
.forced:
3274
.forced:
3280
        push    eax
3275
	push	eax
3281
        push    esi 
3276
	push	esi
3282
        mov     [img_palette], edi
3277
	mov	[img_palette], edi
3283
        mov     eax, esi
3278
	mov	eax, esi
3284
        cmp     eax, 32                 ;>32bpp (stupid call)
3279
	cmp	eax, 32 		;>32bpp (stupid call)
3285
        ja      .exit
3280
	ja	.exit
3286
        shr     al, 3                   ; 0=1bpp or solid color
3281
	shr	al, 3			; 0=1bpp or solid color
3287
        mov     [img_bytes_per_pix], eax
3282
	mov	[img_bytes_per_pix], eax
3288
        mov     esi, [eax*4 + img_core_proc_0]
3283
	mov	esi, [eax*4 + img_core_proc_0]
3289
        mov     [img_draw_core_fn], esi
3284
	mov	[img_draw_core_fn], esi
3290
        mov     esi, [eax*4 + img_edge_proc_0]
3285
	mov	esi, [eax*4 + img_edge_proc_0]
3291
        mov     [img_draw_edge_fn], esi
3286
	mov	[img_draw_edge_fn], esi
3292
        mov     esi, ecx
3287
	mov	esi, ecx
3293
        shr     esi, 16                 ; esi = SizeX
3288
	shr	esi, 16 		; esi = SizeX
3294
	imul	esi, eax
3289
	imul	esi, eax
3295
        or      al, al
3290
	or	al, al
3296
        jnz     .done
3291
	jnz	.done
3297
        mov     eax, [esp]              ; bits per pixel
3292
	mov	eax, [esp]		; bits per pixel
3298
        or      al, al
3293
	or	al, al
3299
        jz      .done
3294
	jz	.done
3300
.1bpp:
3295
.1bpp:
3301
	add	esi, 7
3296
	add	esi, 7
3302
	shr	esi, 3                  ; 8 pixels per byte
3297
	shr	esi, 3			; 8 pixels per byte
3303
        mov     [img_draw_edge_fn], draw_edge_1bpp
3298
	mov	[img_draw_edge_fn], draw_edge_1bpp
3304
        mov     [img_draw_core_fn], draw_core_1bpp
3299
	mov	[img_draw_core_fn], draw_core_1bpp
3305
.done:
3300
.done:
3306
        add     esi, ebp                ; + line offset
3301
	add	esi, ebp		; + line offset
3307
        mov     [img_buf_line_size], esi
3302
	mov	[img_buf_line_size], esi
3308
        pop     esi
3303
	pop	esi
3309
        pop     eax
3304
	pop	eax
3310
	jmp	sys_putimage_bpp
3305
	jmp	sys_putimage_bpp
3311
.exit:
3306
.exit:
3312
        ret
3307
	ret
Line 3313... Line 3308...
3313
 
3308
 
3314
align 4
3309
align 4
3315
img_core_proc_0         dd      draw_core_0bpp 
3310
img_core_proc_0 	dd	draw_core_0bpp
3316
img_core_proc_1         dd      draw_core_8bpp 
3311
img_core_proc_1 	dd	draw_core_8bpp
3317
img_core_proc_2         dd      draw_core_16bpp 
3312
img_core_proc_2 	dd	draw_core_16bpp
3318
img_core_proc_3         dd      draw_core_24bpp 
3313
img_core_proc_3 	dd	draw_core_24bpp
3319
img_core_proc_4         dd      draw_core_32bpp 
3314
img_core_proc_4 	dd	draw_core_32bpp
3320
 
3315
 
3321
img_edge_proc_0         dd      draw_edge_0bpp 
3316
img_edge_proc_0 	dd	draw_edge_0bpp
3322
img_edge_proc_1         dd      draw_edge_8bpp 
3317
img_edge_proc_1 	dd	draw_edge_8bpp
3323
img_edge_proc_2         dd      draw_edge_16bpp 
3318
img_edge_proc_2 	dd	draw_edge_16bpp
3324
img_edge_proc_3         dd      draw_edge_24bpp 
3319
img_edge_proc_3 	dd	draw_edge_24bpp
Line 3325... Line 3320...
3325
img_edge_proc_4         dd      draw_edge_32bpp 
3320
img_edge_proc_4 	dd	draw_edge_32bpp
3326
 
3321
 
3327
end if
3322
end if
3328
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
3323
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Line 4148... Line 4143...
4148
     xor   edx, edx
4143
     xor   edx, edx
4149
     mov   eax, ebx
4144
     mov   eax, ebx
4150
     div   ecx
4145
     div   ecx
4151
     mov   ebx, edx
4146
     mov   ebx, edx
4152
     xchg  eax, ebx
4147
     xchg  eax, ebx
4153
     call  get_pixel    ; eax - x, ebx - y
4148
     call  get_pixel	; eax - x, ebx - y
4154
     mov   [esp + 32], ecx
4149
     mov   [esp + 32], ecx
4155
     ret
4150
     ret
Line 4156... Line 4151...
4156
 
4151