Subversion Repositories Kolibri OS

Rev

Rev 380 | Rev 389 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 380 Rev 381
Line 296... Line 296...
296
;        movzx eax,byte [0x2f0000+0x9010]  ; mouse port
296
;        movzx eax,byte [0x2f0000+0x9010]  ; mouse port
297
;        mov   [0xF604],byte 1  ;al
297
;        mov   [0xF604],byte 1  ;al
298
        mov     al, [0x2F0000+0x901F]   ; DMA writing
298
        mov     al, [0x2F0000+0x901F]   ; DMA writing
299
        mov     [allow_dma_write], al
299
        mov     [allow_dma_write], al
300
        mov   al,[0x2f0000+0x9000]        ; bpp
300
        mov   al,[0x2f0000+0x9000]        ; bpp
301
        mov   [0xFBF1],al
301
        mov   [ScreenBPP],al
302
        movzx eax,word [0x2f0000+0x900A]  ; X max
302
        movzx eax,word [0x2f0000+0x900A]  ; X max
303
        dec   eax
303
        dec   eax
304
        mov   [0xfe00],eax
304
        mov   [ScreenWidth],eax
305
        mov   [screen_workarea.right],eax
305
        mov   [screen_workarea.right],eax
306
        movzx eax,word [0x2f0000+0x900C]  ; Y max
306
        movzx eax,word [0x2f0000+0x900C]  ; Y max
307
        dec   eax
307
        dec   eax
308
        mov   [0xfe04],eax
308
        mov   [ScreenHeight],eax
309
        mov   [screen_workarea.bottom],eax
309
        mov   [screen_workarea.bottom],eax
310
        movzx eax,word [0x2f0000+0x9008]  ; screen mode
310
        movzx eax,word [0x2f0000+0x9008]  ; screen mode
311
        mov   [0xFE0C],eax
311
        mov   [SCR_MODE],eax
312
        mov   eax,[0x2f0000+0x9014]       ; Vesa 1.2 bnk sw add
312
        mov   eax,[0x2f0000+0x9014]       ; Vesa 1.2 bnk sw add
313
        mov   [0xE030],eax
313
        mov   [BANK_SWITCH],eax
314
        mov   [0xfe08],word 640*4         ; Bytes PerScanLine
314
        mov   [BytesPerScanLine],word 640*4         ; Bytes PerScanLine
315
        cmp   [0xFE0C],word 0x13          ; 320x200
315
        cmp   [SCR_MODE],word 0x13          ; 320x200
316
        je    @f
316
        je    @f
317
        cmp   [0xFE0C],word 0x12          ; VGA 640x480
317
        cmp   [SCR_MODE],word 0x12          ; VGA 640x480
318
        je    @f
318
        je    @f
319
        mov   ax,[0x2f0000+0x9001]        ; for other modes
319
        mov   ax,[0x2f0000+0x9001]        ; for other modes
320
        mov   [0xfe08],ax
320
        mov   [BytesPerScanLine],ax
321
      @@:
321
      @@:
Line 322... Line 322...
322
 
322
 
Line 323... Line 323...
323
; GRAPHICS ADDRESSES
323
; GRAPHICS ADDRESSES
Line 332... Line 332...
332
        mov     byte [0x2f0000+0x901e],0x0
332
        mov     byte [0x2f0000+0x901e],0x0
333
        mov     eax,[0x2f0000+0x9018]
333
        mov     eax,[0x2f0000+0x9018]
334
      ;no_d_lfb:
334
      ;no_d_lfb:
335
        mov     [LFBAddress],eax
335
        mov     [LFBAddress],eax
Line 336... Line 336...
336
 
336
 
337
        cmp     [0xfe0c],word 0100000000000000b
337
        cmp     [SCR_MODE],word 0100000000000000b
338
        jge     setvesa20
338
        jge     setvesa20
339
        cmp     [0xfe0c],word 0x13
339
        cmp     [SCR_MODE],word 0x13
340
        je      v20ga32
340
        je      v20ga32
341
        mov     [0xe020],dword Vesa12_putpixel24  ; Vesa 1.2
341
        mov     [PUTPIXEL],dword Vesa12_putpixel24  ; Vesa 1.2
342
        mov     [0xe024],dword Vesa12_getpixel24
342
        mov     [0xe024],dword Vesa12_getpixel24
343
        cmp     [0xfbf1],byte 24
343
        cmp     [ScreenBPP],byte 24
344
        jz      ga24
344
        jz      ga24
345
        mov     [0xe020],dword Vesa12_putpixel32
345
        mov     [PUTPIXEL],dword Vesa12_putpixel32
346
        mov     [0xe024],dword Vesa12_getpixel32
346
        mov     [0xe024],dword Vesa12_getpixel32
347
      ga24:
347
      ga24:
348
        jmp     v20ga24
348
        jmp     v20ga24
349
      setvesa20:
349
      setvesa20:
350
        mov     [0xe020],dword Vesa20_putpixel24  ; Vesa 2.0
350
        mov     [PUTPIXEL],dword Vesa20_putpixel24  ; Vesa 2.0
351
        mov     [0xe024],dword Vesa20_getpixel24
351
        mov     [0xe024],dword Vesa20_getpixel24
352
        cmp     [0xfbf1],byte 24
352
        cmp     [ScreenBPP],byte 24
353
        jz      v20ga24
353
        jz      v20ga24
354
      v20ga32:
354
      v20ga32:
355
        mov     [0xe020],dword Vesa20_putpixel32
355
        mov     [PUTPIXEL],dword Vesa20_putpixel32
356
        mov     [0xe024],dword Vesa20_getpixel32
356
        mov     [0xe024],dword Vesa20_getpixel32
357
      v20ga24:
357
      v20ga24:
358
        cmp     [0xfe0c],word 0x12                ; 16 C VGA 640x480
358
        cmp     [SCR_MODE],word 0x12                ; 16 C VGA 640x480
359
        jne     no_mode_0x12
359
        jne     no_mode_0x12
360
        mov     [0xe020],dword VGA_putpixel
360
        mov     [PUTPIXEL],dword VGA_putpixel
361
        mov     [0xe024],dword Vesa20_getpixel32
361
        mov     [0xe024],dword Vesa20_getpixel32
Line 362... Line 362...
362
      no_mode_0x12:
362
      no_mode_0x12:
363
 
363
 
Line 510... Line 510...
510
        mov   [TASK_BASE],dword TASK_DATA
510
        mov   [TASK_BASE],dword TASK_DATA
Line 511... Line 511...
511
 
511
 
512
        mov   esi,char
512
        mov   esi,char
513
        xor   ebx,ebx
513
        xor   ebx,ebx
514
        mov   ecx,2560;26000
514
        mov   ecx,2560;26000
515
        mov   edx,0x3F600;0x37000
515
        mov   edx,FONT_I
Line 516... Line 516...
516
        call  fs_RamdiskRead
516
        call  fs_RamdiskRead
517
 
517
 
518
        mov   esi,char2
518
        mov   esi,char2
519
        xor   ebx,ebx
519
        xor   ebx,ebx
520
        mov   ecx,2560;26000
520
        mov   ecx,2560;26000
Line 521... Line 521...
521
        mov   edx,0x3EC00;0x30000
521
        mov   edx,FONT_II
522
        call  fs_RamdiskRead
522
        call  fs_RamdiskRead
Line 678... Line 678...
678
        mov   esi,250               ; wait 1/4 a second
678
        mov   esi,250               ; wait 1/4 a second
679
        call  delay_ms
679
        call  delay_ms
680
        call  _rdtsc
680
        call  _rdtsc
681
        sub   eax,ecx
681
        sub   eax,ecx
682
        shl   eax,2
682
        shl   eax,2
683
        mov   [0xf600],eax          ; save tsc / sec
683
        mov   [CPU_FREQ],eax          ; save tsc / sec
684
        mov ebx, 1000000
684
        mov ebx, 1000000
685
        div ebx
685
        div ebx
686
        mov [stall_mcs], eax
686
        mov [stall_mcs], eax
Line 687... Line 687...
687
 
687
 
Line 694... Line 694...
694
        call  stack_init
694
        call  stack_init
695
        call  fdc_init
695
        call  fdc_init
Line 696... Line 696...
696
 
696
 
Line 697... Line 697...
697
; PALETTE FOR 320x200 and 640x480 16 col
697
; PALETTE FOR 320x200 and 640x480 16 col
698
 
698
 
699
        cmp   [0xfe0c],word 0x12
699
        cmp   [SCR_MODE],word 0x12
700
        jne   no_pal_vga
700
        jne   no_pal_vga
701
        mov   esi,boot_pal_vga
701
        mov   esi,boot_pal_vga
702
        call  boot_log
702
        call  boot_log
Line 703... Line 703...
703
        call  paletteVGA
703
        call  paletteVGA
704
      no_pal_vga:
704
      no_pal_vga:
705
 
705
 
706
        cmp   [0xfe0c],word 0x13
706
        cmp   [SCR_MODE],word 0x13
707
        jne   no_pal_ega
707
        jne   no_pal_ega
708
        mov   esi,boot_pal_ega
708
        mov   esi,boot_pal_ega
Line 780... Line 780...
780
; START MULTITASKING
780
; START MULTITASKING
Line 781... Line 781...
781
 
781
 
782
        mov   esi,boot_tasking
782
        mov   esi,boot_tasking
Line 783... Line 783...
783
        call  boot_log
783
        call  boot_log
Line 784... Line 784...
784
 
784
 
Line 785... Line 785...
785
        mov   [0xe000],byte 1        ; multitasking enabled
785
 ;      mov   [ENABLE_TASKSWITCH],byte 1        ; multitasking enabled
786
 
786
 
Line 933... Line 933...
933
;        mov   [irq_owner+eax],byte 1
933
;        mov   [irq_owner+eax],byte 1
Line 934... Line 934...
934
 
934
 
935
 
935
 
936
                                       ; RESERVE PORTS
936
                                       ; RESERVE PORTS
937
        mov   edi,1                    ; 0x00-0x2d
937
        mov   edi,1                    ; 0x00-0x2d
938
        mov   [0x2d0000],edi
938
        mov   [RESERVED_PORTS],edi
939
        shl   edi,4
939
        shl   edi,4
940
        mov   [0x2d0000+edi+0],dword 1
940
        mov   [RESERVED_PORTS+edi+0],dword 1
Line 941... Line 941...
941
        mov   [0x2d0000+edi+4],dword 0x0
941
        mov   [RESERVED_PORTS+edi+4],dword 0x0
942
        mov   [0x2d0000+edi+8],dword 0x2d
942
        mov   [RESERVED_PORTS+edi+8],dword 0x2d
943
 
943
 
944
        inc   dword [0x2d0000]          ; 0x30-0x4d
944
        inc   dword [RESERVED_PORTS]          ; 0x30-0x4d
945
        mov   edi,[0x2d0000]
945
        mov   edi,[RESERVED_PORTS]
946
        shl   edi,4
946
        shl   edi,4
Line 947... Line 947...
947
        mov   [0x2d0000+edi+0],dword 1
947
        mov   [RESERVED_PORTS+edi+0],dword 1
948
        mov   [0x2d0000+edi+4],dword 0x30
948
        mov   [RESERVED_PORTS+edi+4],dword 0x30
949
        mov   [0x2d0000+edi+8],dword 0x4d
949
        mov   [RESERVED_PORTS+edi+8],dword 0x4d
950
 
950
 
951
        inc   dword [0x2d0000]          ; 0x50-0xdf
951
        inc   dword [RESERVED_PORTS]          ; 0x50-0xdf
952
        mov   edi,[0x2d0000]
952
        mov   edi,[RESERVED_PORTS]
Line 953... Line 953...
953
        shl   edi,4
953
        shl   edi,4
954
        mov   [0x2d0000+edi+0],dword 1
954
        mov   [RESERVED_PORTS+edi+0],dword 1
955
        mov   [0x2d0000+edi+4],dword 0x50
955
        mov   [RESERVED_PORTS+edi+4],dword 0x50
956
        mov   [0x2d0000+edi+8],dword 0xdf
956
        mov   [RESERVED_PORTS+edi+8],dword 0xdf
957
 
957
 
958
        inc   dword [0x2d0000]          ; 0xe5-0xff
958
        inc   dword [RESERVED_PORTS]          ; 0xe5-0xff
Line 959... Line 959...
959
        mov   edi,[0x2d0000]
959
        mov   edi,[RESERVED_PORTS]
960
        shl   edi,4
960
        shl   edi,4
961
        mov   [0x2d0000+edi+0],dword 1
961
        mov   [RESERVED_PORTS+edi+0],dword 1
Line 1009... Line 1009...
1009
set_variables:
1009
set_variables:
Line 1010... Line 1010...
1010
 
1010
 
1011
        mov   ecx,0x100                       ; flush port 0x60
1011
        mov   ecx,0x100                       ; flush port 0x60
1012
.fl60:  in    al,0x60
1012
.fl60:  in    al,0x60
1013
        loop  .fl60
1013
        loop  .fl60
1014
        mov   [0xfcff],byte 0                 ; mouse buffer
1014
        mov   [MOUSE_BUFF_COUNT],byte 0                 ; mouse buffer
1015
        mov   [0xf400],byte 0                 ; keyboard buffer
1015
        mov   [KEY_COUNT],byte 0                 ; keyboard buffer
1016
        mov   [0xf500],byte 0                 ; button buffer
1016
        mov   [BTN_COUNT],byte 0                 ; button buffer
Line 1017... Line 1017...
1017
;        mov   [0xfb0a],dword 100*65536+100    ; mouse x/y
1017
;        mov   [MOUSE_X],dword 100*65536+100    ; mouse x/y
1018
 
1018
 
1019
        push  eax
1019
        push  eax
1020
        mov   ax,[0x2f0000+0x900c]
1020
        mov   ax,[0x2f0000+0x900c]
1021
        shr   ax,1
1021
        shr   ax,1
1022
        shl   eax,16
1022
        shl   eax,16
1023
        mov   ax,[0x2f0000+0x900A]
1023
        mov   ax,[0x2f0000+0x900A]
1024
        shr   ax,1
1024
        shr   ax,1
Line 1025... Line 1025...
1025
        mov   [0xfb0a],eax
1025
        mov   [MOUSE_X],eax
1026
        pop   eax
1026
        pop   eax
1027
 
1027
 
Line 1028... Line 1028...
1028
        mov   byte [SB16_Status],0            ; Minazzi Paolo
1028
        mov   byte [SB16_Status],0            ; Minazzi Paolo
1029
        mov   [display_data-12],dword 1       ; tiled background
1029
        mov   [display_data-12],dword 1       ; tiled background
1030
        mov   [0xfe88],dword 0x2C0000         ; address of button list
1030
        mov   [BTN_ADDR],dword BUTTON_INFO    ; address of button list
Line 1031... Line 1031...
1031
 
1031
 
Line 1032... Line 1032...
1032
     ;!! IP 04.02.2005:
1032
     ;!! IP 04.02.2005:
1033
        mov   [next_usage_update], 100
1033
        mov   [next_usage_update], 100
1034
        mov   byte [0xFFFF], 0 ; change task if possible
1034
        mov   byte [0xFFFF], 0 ; change task if possible
1035
 
1035
 
1036
        ret
1036
        ret
1037
 
1037
 
1038
;* mouse centered - start code- Mario79
1038
;* mouse centered - start code- Mario79
1039
mouse_centered:
1039
mouse_centered:
1040
        push  eax
1040
        push  eax
1041
        mov   eax,[0xFE00]
1041
        mov   eax,[ScreenWidth]
1042
        shr   eax,1
1042
        shr   eax,1
1043
        mov   [0xFB0A],ax
1043
        mov   [MOUSE_X],ax
Line 1044... Line 1044...
1044
        mov   eax,[0xFE04]
1044
        mov   eax,[ScreenHeight]
Line 1053... Line 1053...
1053
sys_outport:
1053
sys_outport:
Line 1054... Line 1054...
1054
 
1054
 
1055
    mov   edi,ebx          ; separate flag for read / write
1055
    mov   edi,ebx          ; separate flag for read / write
Line 1056... Line 1056...
1056
    and   ebx,65535
1056
    and   ebx,65535
1057
 
1057
 
1058
    mov   ecx,[0x2d0000]
1058
    mov   ecx,[RESERVED_PORTS]
1059
    test  ecx,ecx
1059
    test  ecx,ecx
1060
    jne   sopl8
1060
    jne   sopl8
Line 1068... Line 1068...
1068
    cld
1068
    cld
1069
  sopl1:
1069
  sopl1:
Line 1070... Line 1070...
1070
 
1070
 
1071
    mov   esi,ecx
1071
    mov   esi,ecx
1072
    shl   esi,4
1072
    shl   esi,4
1073
    add   esi,0x2d0000
1073
    add   esi,RESERVED_PORTS
1074
    cmp   edx,[esi+0]
1074
    cmp   edx,[esi+0]
1075
    jne   sopl2
1075
    jne   sopl2
1076
    cmp   ebx,[esi+4]
1076
    cmp   ebx,[esi+4]
1077
    jb    sopl2
1077
    jb    sopl2
Line 1723... Line 1723...
1723
 
1723
 
1724
           cmp eax, 6
1724
           cmp eax, 6
1725
           ja msset
1725
           ja msset
1726
           jmp [mousefn+eax*4]
1726
           jmp [mousefn+eax*4]
1727
msscreen:
1727
msscreen:
1728
           mov  eax,[0xfb0a]
1728
           mov  eax,[MOUSE_X]
1729
           shl  eax,16
1729
           shl  eax,16
1730
           mov  ax,[0xfb0c]
1730
           mov  ax,[MOUSE_Y]
1731
           mov  [esp+36],eax
1731
           mov  [esp+36],eax
1732
           ret
1732
           ret
1733
mswin:
1733
mswin:
1734
           mov  eax,[0xfb0a]
1734
           mov  eax,[MOUSE_X]
1735
           shl  eax,16
1735
           shl  eax,16
1736
           mov  ax,[0xfb0c]
1736
           mov  ax,[MOUSE_Y]
1737
           mov  esi,[TASK_BASE]
1737
           mov  esi,[TASK_BASE]
1738
           mov  bx, word [esi-twdw+WDATA.box.left]
1738
           mov  bx, word [esi-twdw+WDATA.box.left]
1739
           shl  ebx,16
1739
           shl  ebx,16
1740
           mov  bx, word [esi-twdw+WDATA.box.top]
1740
           mov  bx, word [esi-twdw+WDATA.box.top]
Line 1747... Line 1747...
1747
           sub  ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
1747
           sub  ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
1748
           rol  eax,16
1748
           rol  eax,16
1749
           mov  [esp+36],eax
1749
           mov  [esp+36],eax
1750
           ret
1750
           ret
1751
msbutton:
1751
msbutton:
1752
           movzx eax,byte [0xfb40]
1752
           movzx eax,byte [BTN_DOWN]
1753
           mov  [esp+36],eax
1753
           mov  [esp+36],eax
1754
           ret
1754
           ret
1755
msset:
1755
msset:
1756
           ret
1756
           ret
Line 1933... Line 1933...
1933
  for_shutdown_parameter:
1933
  for_shutdown_parameter:
Line 1934... Line 1934...
1934
 
1934
 
1935
     mov  eax,[TASK_COUNT]
1935
     mov  eax,[TASK_COUNT]
1936
     add  eax,2
1936
     add  eax,2
1937
     mov  [shutdown_processes],eax
1937
     mov  [shutdown_processes],eax
1938
     mov  [0xFF00],al
1938
     mov  [SYS_SHUTDOWN],al
1939
     and  dword [esp+36], 0
1939
     and  dword [esp+36], 0
1940
     ret
1940
     ret
1941
  uglobal
1941
  uglobal
1942
   shutdown_processes: dd 0x0
1942
   shutdown_processes: dd 0x0
Line 2018... Line 2018...
2018
     mov  eax,[idleusesec]
2018
     mov  eax,[idleusesec]
2019
     mov  [esp+36], eax
2019
     mov  [esp+36], eax
2020
     ret
2020
     ret
Line 2021... Line 2021...
2021
 
2021
 
2022
sysfn_getcpuclock:              ; 18.5 = GET TSC/SEC
2022
sysfn_getcpuclock:              ; 18.5 = GET TSC/SEC
2023
     mov  eax,[0xf600]
2023
     mov  eax,[CPU_FREQ]
2024
     mov  [esp+36], eax
2024
     mov  [esp+36], eax
Line 2025... Line 2025...
2025
     ret
2025
     ret
2026
 
2026
 
Line 2072... Line 2072...
2072
     ret
2072
     ret
2073
   for_all_tables:
2073
   for_all_tables:
2074
     mov edi,[TASK_BASE]
2074
     mov edi,[TASK_BASE]
2075
     mov edi,[edi+TASKDATA.mem_start]
2075
     mov edi,[edi+TASKDATA.mem_start]
2076
     add edi,ecx
2076
     add edi,ecx
2077
     mov esi,0x40000
2077
     mov esi,DRIVE_DATA
2078
     ret
2078
     ret
2079
  full_table:
2079
  full_table:
2080
     cmp  ebx,2
2080
     cmp  ebx,2
2081
     jnz  exit_for_anyone
2081
     jnz  exit_for_anyone
2082
     call for_all_tables
2082
     call for_all_tables
Line 2139... Line 2139...
2139
     mov  [mouse_delay],ecx
2139
     mov  [mouse_delay],ecx
2140
     ret
2140
     ret
2141
 .set_pointer_position:
2141
 .set_pointer_position:
2142
     cmp  ebx,4  ; set mouse pointer position
2142
     cmp  ebx,4  ; set mouse pointer position
2143
     jnz  .end
2143
     jnz  .end
2144
     mov   [0xFB0C],cx    ;y
2144
     mov   [MOUSE_Y],cx    ;y
2145
     ror   ecx,16
2145
     ror   ecx,16
2146
     mov   [0xFB0A],cx    ;x
2146
     mov   [MOUSE_X],cx    ;x
2147
     rol   ecx,16
2147
     rol   ecx,16
2148
 .end:
2148
 .end:
2149
     ret
2149
     ret
Line 2150... Line 2150...
2150
 
2150
 
Line 2253... Line 2253...
2253
    jbe   nosb2
2253
    jbe   nosb2
2254
    mov   edx,[ebx]
2254
    mov   edx,[ebx]
2255
    and   edx,0xFF000000 ;255*256*256*256
2255
    and   edx,0xFF000000 ;255*256*256*256
2256
    and   ecx,0x00FFFFFF ;255*256*256+255*256+255
2256
    and   ecx,0x00FFFFFF ;255*256*256+255*256+255
2257
    add   edx,ecx
2257
    add   edx,ecx
2258
    mov   [ebx+0x300000],edx
2258
    mov   [ebx+IMG_BACKGROUND],edx
2259
;    mov   [bgrchanged],1
2259
;    mov   [bgrchanged],1
2260
    ret
2260
    ret
2261
  nosb2:
2261
  nosb2:
Line 2262... Line 2262...
2262
 
2262
 
Line 2265... Line 2265...
2265
draw_background_temp:
2265
draw_background_temp:
2266
;    cmp   [bgrchanged],1 ;0
2266
;    cmp   [bgrchanged],1 ;0
2267
;    je    nosb31
2267
;    je    nosb31
2268
;draw_background_temp:
2268
;draw_background_temp:
2269
;    mov   [bgrchanged],1 ;0
2269
;    mov   [bgrchanged],1 ;0
2270
    mov   [0xfff0],byte 1
2270
    mov   [REDRAW_BACKGROUND],byte 1
2271
    mov    [background_defined], 1
2271
    mov    [background_defined], 1
2272
   nosb31:
2272
   nosb31:
2273
    ret
2273
    ret
2274
  nosb3:
2274
  nosb3:
Line 2294... Line 2294...
2294
    mov   ebx, ecx
2294
    mov   ebx, ecx
2295
    add   ecx, edx
2295
    add   ecx, edx
2296
    cmp   ecx, 0x160000-16
2296
    cmp   ecx, 0x160000-16
2297
    ja    .fin
2297
    ja    .fin
2298
 ;   add   edi, 0x300000
2298
 ;   add   edi, 0x300000
2299
    add   ebx, 0x300000
2299
    add   ebx, IMG_BACKGROUND
2300
    mov   ecx, edx
2300
    mov   ecx, edx
2301
    cmp   ecx, 0x160000-16
2301
    cmp   ecx, 0x160000-16
2302
    ja    .fin
2302
    ja    .fin
2303
;    mov   [bgrchanged],1
2303
;    mov   [bgrchanged],1
2304
  ;  cld
2304
  ;  cld
Line 2327... Line 2327...
2327
    cmp   eax,2                                  ; PIXEL
2327
    cmp   eax,2                                  ; PIXEL
2328
    jnz   nogb2
2328
    jnz   nogb2
2329
    mov   edx,0x160000-16
2329
    mov   edx,0x160000-16
2330
    cmp   edx,ebx
2330
    cmp   edx,ebx
2331
    jbe   nogb2
2331
    jbe   nogb2
2332
    mov   eax, [ebx+0x300000]
2332
    mov   eax, [ebx+IMG_BACKGROUND]
2333
    and   eax, 0xFFFFFF
2333
    and   eax, 0xFFFFFF
2334
    mov   [esp+36],eax
2334
    mov   [esp+36],eax
2335
    ret
2335
    ret
2336
  nogb2:
2336
  nogb2:
Line 2351... Line 2351...
2351
    mov   ebx, [CURRENT_TASK]                          ; TOP OF WINDOW STACK
2351
    mov   ebx, [CURRENT_TASK]                          ; TOP OF WINDOW STACK
2352
    movzx ecx,word [WIN_STACK + ebx * 2]
2352
    movzx ecx,word [WIN_STACK + ebx * 2]
2353
    mov   edx,[TASK_COUNT]
2353
    mov   edx,[TASK_COUNT]
2354
    cmp   ecx,edx
2354
    cmp   ecx,edx
2355
    jne   .finish
2355
    jne   .finish
2356
    cmp   [0xf400],byte 0
2356
    cmp   [KEY_COUNT],byte 0
2357
    je    .finish
2357
    je    .finish
2358
    movzx eax,byte [0xf401]
2358
    movzx eax,byte [KEY_BUFF]
2359
    shl   eax,8
2359
    shl   eax,8
2360
    push  eax
2360
    push  eax
2361
    dec   byte [0xf400]
2361
    dec   byte [KEY_COUNT]
2362
    and   byte [0xf400],127
2362
    and   byte [KEY_COUNT],127
2363
    movzx ecx,byte [0xf400]
2363
    movzx ecx,byte [KEY_COUNT]
2364
    add   ecx,2
2364
    add   ecx,2
2365
 ;   mov   esi,0xf402
2365
 ;   mov   esi,0xf402
2366
 ;   mov   edi,0xf401
2366
 ;   mov   edi,0xf401
2367
 ;   cld
2367
 ;   cld
2368
 ;  rep   movsb
2368
 ;  rep   movsb
2369
    mov   eax, 0xF402
2369
    mov   eax, KEY_BUFF+1
2370
    mov   ebx, 0xF401
2370
    mov   ebx, KEY_BUFF
2371
    call  memmove
2371
    call  memmove
2372
    pop   eax
2372
    pop   eax
2373
.ret_eax:
2373
.ret_eax:
2374
    mov   [esp+36],eax
2374
    mov   [esp+36],eax
2375
    ret
2375
    ret
Line 2400... Line 2400...
2400
    mov   [esp+36],dword 1
2400
    mov   [esp+36],dword 1
2401
    movzx ecx, word [WIN_STACK + ebx * 2]
2401
    movzx ecx, word [WIN_STACK + ebx * 2]
2402
    mov   edx, [TASK_COUNT] ; less than 256 processes
2402
    mov   edx, [TASK_COUNT] ; less than 256 processes
2403
    cmp   ecx,edx
2403
    cmp   ecx,edx
2404
    jne   .exit
2404
    jne   .exit
2405
    movzx eax,byte [0xf500]
2405
    movzx eax,byte [BTN_COUNT]
2406
    test  eax,eax
2406
    test  eax,eax
2407
    jz    .exit
2407
    jz    .exit
2408
    mov   eax,[0xf501]
2408
    mov   eax,[BTN_BUFF]
2409
    shl   eax,8
2409
    shl   eax,8
2410
    mov   [0xf500],byte 0
2410
    mov   [BTN_COUNT],byte 0
2411
    mov   [esp+36],eax
2411
    mov   [esp+36],eax
2412
 .exit:
2412
 .exit:
2413
    ret
2413
    ret
Line 2621... Line 2621...
2621
 
2621
 
Line 2622... Line 2622...
2622
    mov   ecx,[CURRENT_TASK]
2622
    mov   ecx,[CURRENT_TASK]
Line 2623... Line 2623...
2623
 
2623
 
2624
  sys_newba2:
2624
  sys_newba2:
2625
 
2625
 
Line 2626... Line 2626...
2626
    mov   edi,[0xfe88]
2626
    mov   edi,[BTN_ADDR]
2627
    cmp   [edi],dword 0  ; empty button list ?
2627
    cmp   [edi],dword 0  ; empty button list ?
Line 2664... Line 2664...
2664
 
2664
 
2665
    mov   edx,[TASK_BASE]      ; return whole screen draw area for this app
2665
    mov   edx,[TASK_BASE]      ; return whole screen draw area for this app
2666
    add   edx,draw_data-CURRENT_TASK
2666
    add   edx,draw_data-CURRENT_TASK
2667
    mov   [edx+RECT.left], 0
2667
    mov   [edx+RECT.left], 0
2668
    mov   [edx+RECT.top], 0
2668
    mov   [edx+RECT.top], 0
2669
    mov   eax,[0xfe00]
2669
    mov   eax,[ScreenWidth]
2670
    mov   [edx+RECT.right],eax
2670
    mov   [edx+RECT.right],eax
2671
    mov   eax,[0xfe04]
2671
    mov   eax,[ScreenHeight]
Line 2672... Line 2672...
2672
    mov   [edx+RECT.bottom],eax
2672
    mov   [edx+RECT.bottom],eax
2673
 
2673
 
Line 2977... Line 2977...
2977
    add   ecx, eax
2977
    add   ecx, eax
2978
    add   edx, ebx
2978
    add   edx, ebx
2979
    call  calculatescreen
2979
    call  calculatescreen
2980
    pop   edx ecx ebx eax
2980
    pop   edx ecx ebx eax
Line 2981... Line 2981...
2981
 
2981
 
2982
    mov   [0xf400],byte 0           ; empty keyboard buffer
2982
    mov   [KEY_COUNT],byte 0           ; empty keyboard buffer
Line 2983... Line 2983...
2983
    mov   [0xf500],byte 0           ; empty button buffer
2983
    mov   [BTN_COUNT],byte 0           ; empty button buffer
2984
 
2984
 
2985
  newd:
2985
  newd:
Line 3106... Line 3106...
3106
 
3106
 
3107
        mov   eax,edi               ; redraw screen at old position
3107
        mov   eax,edi               ; redraw screen at old position
3108
        xor   esi,esi
3108
        xor   esi,esi
Line 3109... Line 3109...
3109
        call  redrawscreen
3109
        call  redrawscreen
3110
 
3110
 
3111
        mov   [0xfff5],byte 0 ; mouse pointer
3111
        mov   [DONT_DRAW_MOUSE],byte 0 ; mouse pointer
Line 3112... Line 3112...
3112
        mov   [0xfff4],byte 0 ; no mouse under
3112
        mov   [MOUSE_BACKGROUND],byte 0 ; no mouse under
3113
        mov   [0xfb44],byte 0 ; react to mouse up/down
3113
        mov   [MOUSE_DOWN],byte 0 ; react to mouse up/down
3114
 
3114
 
3115
        mov   ecx,10          ; wait 1/10 second
3115
        mov   ecx,10          ; wait 1/10 second
Line 3130... Line 3130...
3130
;    jz    temp_nobackgr
3130
;    jz    temp_nobackgr
3131
;    mov   [0xfff0],byte 2
3131
;    mov   [0xfff0],byte 2
3132
;    call  change_task
3132
;    call  change_task
3133
;    mov   [draw_data+32+0],dword 0
3133
;    mov   [draw_data+32+0],dword 0
3134
;    mov   [draw_data+32+4],dword 0
3134
;    mov   [draw_data+32+4],dword 0
3135
;    mov   eax,[0xfe00]
3135
;    mov   eax,[ScreenWidth
3136
;    mov   ebx,[0xfe04]
3136
;    mov   ebx,[0xfe04]
3137
;    mov   [draw_data+32+8],eax
3137
;    mov   [draw_data+32+8],eax
3138
;    mov   [draw_data+32+12],ebx
3138
;    mov   [draw_data+32+12],ebx
3139
;    call  drawbackground
3139
;    call  drawbackground
3140
;    mov   [0xfff0],byte 0
3140
;    mov   [0xfff0],byte 0
3141
;    mov   [0xfff4],byte 0
3141
;    mov   [MOUSE_BACKGROUND],byte 0
3142
;temp_nobackgr:
3142
;temp_nobackgr:
3143
;    ret
3143
;    ret
Line 3144... Line 3144...
3144
 
3144
 
3145
uglobal
3145
uglobal
Line 3256... Line 3256...
3256
; check if pixel is allowed to be drawn
3256
; check if pixel is allowed to be drawn
Line 3257... Line 3257...
3257
 
3257
 
3258
checkpixel:
3258
checkpixel:
Line 3259... Line 3259...
3259
        push eax edx
3259
        push eax edx
3260
 
3260
 
3261
        mov  edx,[0xfe00]     ; screen x size
3261
        mov  edx,[ScreenWidth]     ; screen x size
3262
        inc  edx
3262
        inc  edx
Line 3263... Line 3263...
3263
        imul edx, ebx
3263
        imul edx, ebx
Line 3306... Line 3306...
3306
    or    [edi+SLOT_BASE+APPDATA.event_mask], dword 00100000b
3306
    or    [edi+SLOT_BASE+APPDATA.event_mask], dword 00100000b
3307
    loop  set_mouse_event
3307
    loop  set_mouse_event
3308
  mouse_not_active:
3308
  mouse_not_active:
Line 3309... Line 3309...
3309
 
3309
 
3310
 
3310
 
3311
    cmp   [0xfff0],byte 0               ; background update ?
3311
    cmp   [REDRAW_BACKGROUND],byte 0               ; background update ?
3312
    jz    nobackgr
3312
    jz    nobackgr
3313
    cmp    [background_defined], 0
3313
    cmp    [background_defined], 0
3314
    jz    nobackgr
3314
    jz    nobackgr
3315
    mov   [0xfff0],byte 2
3315
    mov   [REDRAW_BACKGROUND],byte 2
3316
    call  change_task
3316
    call  change_task
3317
	mov   [draw_data+32 + RECT.left],dword 0
3317
	mov   [draw_data+32 + RECT.left],dword 0
3318
	mov   [draw_data+32 + RECT.top],dword 0
3318
	mov   [draw_data+32 + RECT.top],dword 0
3319
    mov   eax,[0xfe00]
3319
    mov   eax,[ScreenWidth]
3320
    mov   ebx,[0xfe04]
3320
    mov   ebx,[ScreenHeight]
3321
	mov   [draw_data+32 + RECT.right],eax
3321
	mov   [draw_data+32 + RECT.right],eax
3322
	mov   [draw_data+32 + RECT.bottom],ebx
3322
	mov   [draw_data+32 + RECT.bottom],ebx
3323
    call  drawbackground
3323
    call  drawbackground
Line 3324... Line 3324...
3324
    mov   [0xfff0],byte 0
3324
    mov   [REDRAW_BACKGROUND],byte 0
Line 3325... Line 3325...
3325
    mov   [0xfff4],byte 0
3325
    mov   [MOUSE_BACKGROUND],byte 0
Line 3326... Line 3326...
3326
 
3326
 
3327
  nobackgr:
3327
  nobackgr:
Line 3328... Line 3328...
3328
 
3328
 
3329
 
3329
 
Line 3330... Line 3330...
3330
    ; system shutdown request
3330
    ; system shutdown request
3331
 
3331
 
Line 3332... Line 3332...
3332
    cmp  [0xFF00],byte 0
3332
    cmp  [SYS_SHUTDOWN],byte 0
3333
    je   noshutdown
3333
    je   noshutdown
3334
 
3334
 
3335
    mov  edx,[shutdown_processes]
3335
    mov  edx,[shutdown_processes]
3336
    sub  dl,2
3336
    sub  dl,2
3337
 
3337
 
3338
    cmp  [0xff00],dl
3338
    cmp  [SYS_SHUTDOWN],dl
Line 3339... Line 3339...
3339
    jne  no_mark_system_shutdown
3339
    jne  no_mark_system_shutdown
Line 3340... Line 3340...
3340
 
3340
 
Line 3341... Line 3341...
3341
    mov   edx,0x3040
3341
    mov   edx,0x3040
Line 3342... Line 3342...
3342
    movzx ecx,byte [0xff00]
3342
    movzx ecx,byte [SYS_SHUTDOWN]
3343
    add   ecx,5
3343
    add   ecx,5
Line 3344... Line 3344...
3344
  markz:
3344
  markz:
Line 3489... Line 3489...
3489
        ; all black
3489
        ; all black
Line 3490... Line 3490...
3490
 
3490
 
3491
        mov   [display_data-8],dword 4      ; size x
3491
        mov   [display_data-8],dword 4      ; size x
Line 3492... Line 3492...
3492
        mov   [display_data-4],dword 2      ; size y
3492
        mov   [display_data-4],dword 2      ; size y
3493
 
3493
 
3494
        mov   edi, 0x300000                 ; set background to black
3494
        mov   edi, IMG_BACKGROUND                 ; set background to black
3495
        xor   eax, eax
3495
        xor   eax, eax
3496
        mov   ecx, 0x0fff00 / 4
3496
        mov   ecx, 0x0fff00 / 4
Line 3497... Line 3497...
3497
        cld
3497
        cld
3498
        rep   stosd
3498
        rep   stosd
3499
 
3499
 
3500
        mov   edi,display_data              ; set os to use all pixels
3500
        mov   edi,display_data              ; set os to use all pixels
Line 3501... Line 3501...
3501
        mov   eax,0x01010101
3501
        mov   eax,0x01010101
Line 3502... Line 3502...
3502
        mov   ecx,0x15ff00 / 4
3502
        mov   ecx,0x15ff00 / 4
Line 3503... Line 3503...
3503
        rep   stosd
3503
        rep   stosd
3504
 
3504
 
Line 3707... Line 3707...
3707
 
3707
 
Line 3708... Line 3708...
3708
  gidril1:
3708
  gidril1:
3709
 
3709
 
3710
     mov   ebx,eax
3710
     mov   ebx,eax
3711
     shl   ebx,12
3711
     shl   ebx,12
3712
     add   ebx,0x2e0000
3712
     add   ebx,IRQ_SAVE
3713
     mov   eax,[ebx]
3713
     mov   eax,[ebx]
3714
     mov   ecx,1
3714
     mov   ecx,1
Line 3782... Line 3782...
3782
 
3782
 
3783
     cmp   ebx,ecx            ; beginning > end ?
3783
     cmp   ebx,ecx            ; beginning > end ?
3784
     ja    rpal1
3784
     ja    rpal1
3785
     cmp   ecx,65536
3785
     cmp   ecx,65536
3786
     jae   rpal1
3786
     jae   rpal1
3787
     mov   esi,[0x2d0000]
3787
     mov   esi,[RESERVED_PORTS]
3788
     test  esi,esi            ; no reserved areas ?
3788
     test  esi,esi            ; no reserved areas ?
3789
     je    rpal2
3789
     je    rpal2
3790
     cmp   esi,255            ; max reserved
3790
     cmp   esi,255            ; max reserved
3791
     jae   rpal1
3791
     jae   rpal1
3792
   rpal3:
3792
   rpal3:
3793
     mov   edi,esi
3793
     mov   edi,esi
3794
     shl   edi,4
3794
     shl   edi,4
3795
     add   edi,0x2d0000
3795
     add   edi,RESERVED_PORTS
3796
     cmp   ebx,[edi+8]
3796
     cmp   ebx,[edi+8]
3797
     ja    rpal4
3797
     ja    rpal4
3798
     cmp   ecx,[edi+4]
3798
     cmp   ecx,[edi+4]
3799
     jae   rpal1
3799
     jae   rpal1
Line 3838... Line 3838...
3838
   no_unmask_io:
3838
   no_unmask_io:
Line 3839... Line 3839...
3839
 
3839
 
3840
     popad                         ; end enable io map
3840
     popad                         ; end enable io map
Line 3841... Line 3841...
3841
     sti
3841
     sti
3842
 
3842
 
3843
     mov   edi,[0x2d0000]
3843
     mov   edi,[RESERVED_PORTS]
3844
     add   edi,1
3844
     add   edi,1
3845
     mov   [0x2d0000],edi
3845
     mov   [RESERVED_PORTS],edi
3846
     shl   edi,4
3846
     shl   edi,4
3847
     add   edi,0x2d0000
3847
     add   edi,RESERVED_PORTS
3848
     mov   esi,[TASK_BASE]
3848
     mov   esi,[TASK_BASE]
3849
     mov   esi,[esi+TASKDATA.pid]
3849
     mov   esi,[esi+TASKDATA.pid]
3850
     mov   [edi],esi
3850
     mov   [edi],esi
Line 3856... Line 3856...
3856
 
3856
 
Line 3857... Line 3857...
3857
free_port_area:
3857
free_port_area:
Line 3858... Line 3858...
3858
 
3858
 
3859
     pushad
3859
     pushad
3860
 
3860
 
3861
     mov   esi,[0x2d0000]     ; no reserved areas ?
3861
     mov   esi,[RESERVED_PORTS]     ; no reserved areas ?
3862
     test  esi,esi
3862
     test  esi,esi
3863
     je    frpal2
3863
     je    frpal2
3864
     mov   edx,[TASK_BASE]
3864
     mov   edx,[TASK_BASE]
3865
     mov   edx,[edx+TASKDATA.pid]
3865
     mov   edx,[edx+TASKDATA.pid]
3866
   frpal3:
3866
   frpal3:
3867
     mov   edi,esi
3867
     mov   edi,esi
3868
     shl   edi,4
3868
     shl   edi,4
3869
     add   edi,0x2d0000
3869
     add   edi,RESERVED_PORTS
3870
     cmp   edx,[edi]
3870
     cmp   edx,[edi]
3871
     jne   frpal4
3871
     jne   frpal4
Line 3888... Line 3888...
3888
     mov   esi,edi
3888
     mov   esi,edi
3889
     add   esi,16
3889
     add   esi,16
3890
     cld
3890
     cld
3891
     rep   movsb
3891
     rep   movsb
Line 3892... Line 3892...
3892
 
3892
 
Line 3893... Line 3893...
3893
     dec   dword [0x2d0000]
3893
     dec   dword [RESERVED_PORTS]
Line 3894... Line 3894...
3894
 
3894
 
Line 3958... Line 3958...
3958
     mov   [esp+36],ecx ; return in eax
3958
     mov   [esp+36],ecx ; return in eax
3959
     ret
3959
     ret
Line 3960... Line 3960...
3960
 
3960
 
3961
drawbackground:
3961
drawbackground:
3962
       inc   [mouse_pause]
3962
       inc   [mouse_pause]
3963
       cmp   [0xfe0c],word 0x12
3963
       cmp   [SCR_MODE],word 0x12
3964
       je   dbrv20
3964
       je   dbrv20
3965
     dbrv12:
3965
     dbrv12:
3966
       cmp  [0xfe0c],word 0100000000000000b
3966
       cmp  [SCR_MODE],word 0100000000000000b
3967
       jge  dbrv20
3967
       jge  dbrv20
3968
       cmp  [0xfe0c],word 0x13
3968
       cmp  [SCR_MODE],word 0x13
3969
       je   dbrv20
3969
       je   dbrv20
3970
       call  vesa12_drawbackground
3970
       call  vesa12_drawbackground
3971
       dec   [mouse_pause]
3971
       dec   [mouse_pause]
3972
       call   [draw_pointer]
3972
       call   [draw_pointer]
Line 4013... Line 4013...
4013
        mov     ebp, putimage_get24bpp
4013
        mov     ebp, putimage_get24bpp
4014
        mov     esi, putimage_init24bpp
4014
        mov     esi, putimage_init24bpp
4015
sys_putimage_bpp:
4015
sys_putimage_bpp:
4016
;        call    [disable_mouse] ; this will be done in xxx_putimage
4016
;        call    [disable_mouse] ; this will be done in xxx_putimage
4017
;        mov     eax, vga_putimage
4017
;        mov     eax, vga_putimage
4018
        cmp     [0xfe0c], word 0x12
4018
        cmp     [SCR_MODE], word 0x12
4019
        jz      @f   ;.doit
4019
        jz      @f   ;.doit
4020
        mov     eax, vesa12_putimage
4020
        mov     eax, vesa12_putimage
4021
        cmp     [0xfe0c], word 0100000000000000b
4021
        cmp     [SCR_MODE], word 0100000000000000b
4022
        jae     @f
4022
        jae     @f
4023
        cmp     [0xfe0c], word 0x13
4023
        cmp     [SCR_MODE], word 0x13
4024
        jnz     .doit
4024
        jnz     .doit
4025
@@:
4025
@@:
4026
        mov     eax, vesa20_putimage
4026
        mov     eax, vesa20_putimage
4027
.doit:
4027
.doit:
4028
        inc     [mouse_pause]
4028
        inc     [mouse_pause]
Line 4112... Line 4112...
4112
        add     ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
4112
        add     ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
4113
        add     edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
4113
        add     edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
4114
  .forced:
4114
  .forced:
4115
    inc   [mouse_pause]
4115
    inc   [mouse_pause]
4116
;        call    [disable_mouse]
4116
;        call    [disable_mouse]
4117
    cmp   [0xfe0c],word 0x12
4117
    cmp   [SCR_MODE],word 0x12
4118
    je   dbv20
4118
    je   dbv20
4119
   sdbv20:
4119
   sdbv20:
4120
    cmp  [0xfe0c],word 0100000000000000b
4120
    cmp  [SCR_MODE],word 0100000000000000b
4121
    jge  dbv20
4121
    jge  dbv20
4122
    cmp  [0xfe0c],word 0x13
4122
    cmp  [SCR_MODE],word 0x13
4123
    je   dbv20
4123
    je   dbv20
4124
    call vesa12_drawbar
4124
    call vesa12_drawbar
4125
    dec   [mouse_pause]
4125
    dec   [mouse_pause]
4126
    call   [draw_pointer]
4126
    call   [draw_pointer]
4127
    ret
4127
    ret
Line 4242... Line 4242...
4242
 
4242
 
4243
 
4243
 
Line 4244... Line 4244...
4244
setmouse:  ; set mousepicture -pointer
4244
setmouse:  ; set mousepicture -pointer
Line 4245... Line 4245...
4245
           ; ps2 mouse enable
4245
           ; ps2 mouse enable
4246
 
4246
 
4247
     mov     [0xf200],dword mousepointer
4247
     mov     [MOUSE_PICTURE],dword mousepointer
4248
 
4248
 
Line 4594... Line 4594...
4594
 
4594
 
Line 4595... Line 4595...
4595
sys_gs:                         ; direct screen access
4595
sys_gs:                         ; direct screen access
4596
 
4596
 
4597
     cmp  eax,1                 ; resolution
4597
     cmp  eax,1                 ; resolution
4598
     jne  no_gs1
4598
     jne  no_gs1
4599
     mov  eax,[0xfe00]
4599
     mov  eax,[ScreenWidth]
4600
     shl  eax,16
4600
     shl  eax,16
4601
     mov  ax,[0xfe04]
4601
     mov  ax,[ScreenHeight]
4602
     add  eax,0x00010001
4602
     add  eax,0x00010001
4603
     mov  [esp+36],eax
4603
     mov  [esp+36],eax
Line 4604... Line 4604...
4604
     ret
4604
     ret
4605
   no_gs1:
4605
   no_gs1:
4606
 
4606
 
4607
     cmp   eax,2                ; bits per pixel
4607
     cmp   eax,2                ; bits per pixel
4608
     jne   no_gs2
4608
     jne   no_gs2
4609
     movzx eax,byte [0xfbf1]
4609
     movzx eax,byte [ScreenBPP]
Line 4610... Line 4610...
4610
     mov   [esp+36],eax
4610
     mov   [esp+36],eax
4611
     ret
4611
     ret
4612
   no_gs2:
4612
   no_gs2:
4613
 
4613
 
4614
     cmp   eax,3                ; bytes per scanline
4614
     cmp   eax,3                ; bytes per scanline
4615
     jne   no_gs3
4615
     jne   no_gs3
Line 4616... Line 4616...
4616
     mov   eax,[0xfe08]
4616
     mov   eax,[BytesPerScanLine]
Line 4707... Line 4707...
4707
 
4707
 
Line 4708... Line 4708...
4708
align 4
4708
align 4
Line 4709... Line 4709...
4709
 
4709
 
4710
syscall_getscreensize:                  ; GetScreenSize
4710
syscall_getscreensize:                  ; GetScreenSize
4711
 
4711
 
4712
     movzx eax,word[0xfe00]
4712
     movzx eax,word[ScreenWidth]
4713
     shl   eax,16
4713
     shl   eax,16
Line 4714... Line 4714...
4714
     mov   ax,[0xfe04]
4714
     mov   ax,[ScreenHeight]
Line 4747... Line 4747...
4747
     ret
4747
     ret
Line 4748... Line 4748...
4748
 
4748
 
Line 4749... Line 4749...
4749
align 4
4749
align 4
4750
 
4750
 
4751
syscall_getpixel:                       ; GetPixel
4751
syscall_getpixel:                       ; GetPixel
4752
     mov   ecx,[0xfe00]
4752
     mov   ecx,[ScreenWidth]
4753
     inc   ecx
4753
     inc   ecx
4754
     xor   edx,edx
4754
     xor   edx,edx
4755
     div   ecx
4755
     div   ecx