kernel constants compression/relocation
git-svn-id: svn://kolibrios.org@1941 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e37372cd01
commit
96673e3ce5
@ -20,7 +20,7 @@ $Revision$
|
|||||||
;
|
;
|
||||||
;==========================================================================
|
;==========================================================================
|
||||||
|
|
||||||
|
if 0
|
||||||
putchar:
|
putchar:
|
||||||
; in: al=character
|
; in: al=character
|
||||||
mov ah, 0Eh
|
mov ah, 0Eh
|
||||||
@ -61,6 +61,8 @@ macro _setcursor row,column
|
|||||||
call setcursor
|
call setcursor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end if
|
||||||
|
|
||||||
boot_read_floppy:
|
boot_read_floppy:
|
||||||
push si
|
push si
|
||||||
xor si, si
|
xor si, si
|
||||||
@ -78,11 +80,9 @@ boot_read_floppy:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
sayerr_plain:
|
sayerr_plain:
|
||||||
call printplain
|
|
||||||
jmp $
|
jmp $
|
||||||
|
|
||||||
sayerr:
|
sayerr:
|
||||||
call print
|
|
||||||
jmp $
|
jmp $
|
||||||
|
|
||||||
|
|
||||||
@ -173,38 +173,6 @@ no_hd_load:
|
|||||||
xor di, di
|
xor di, di
|
||||||
mov ah, 1*16+15
|
mov ah, 1*16+15
|
||||||
|
|
||||||
; draw top
|
|
||||||
mov si, d80x25_top
|
|
||||||
mov cx, d80x25_top_num * 80
|
|
||||||
@@:
|
|
||||||
lodsb
|
|
||||||
stosw
|
|
||||||
loop @b
|
|
||||||
; draw spaces
|
|
||||||
mov si, space_msg
|
|
||||||
mov dx, 25 - d80x25_top_num - d80x25_bottom_num
|
|
||||||
dfl1:
|
|
||||||
push si
|
|
||||||
mov cx, 80
|
|
||||||
@@:
|
|
||||||
lodsb
|
|
||||||
stosw
|
|
||||||
loop @b
|
|
||||||
pop si
|
|
||||||
dec dx
|
|
||||||
jnz dfl1
|
|
||||||
; draw bottom
|
|
||||||
mov si, d80x25_bottom
|
|
||||||
mov cx, d80x25_bottom_num * 80
|
|
||||||
@@:
|
|
||||||
lodsb
|
|
||||||
stosw
|
|
||||||
loop @b
|
|
||||||
|
|
||||||
mov byte [space_msg+80], 0 ; now space_msg is null terminated
|
|
||||||
|
|
||||||
_setcursor d80x25_top_num,0
|
|
||||||
|
|
||||||
cpugood:
|
cpugood:
|
||||||
|
|
||||||
push 0
|
push 0
|
||||||
@ -268,16 +236,6 @@ cpugood:
|
|||||||
mov [es:0x9044], ax ; Save APM Version
|
mov [es:0x9044], ax ; Save APM Version
|
||||||
mov [es:0x9046], cx ; Save APM flags
|
mov [es:0x9046], cx ; Save APM flags
|
||||||
|
|
||||||
; Write APM ver ----
|
|
||||||
and ax, 0xf0f
|
|
||||||
add ax, '00'
|
|
||||||
mov si, msg_apm
|
|
||||||
mov [si + 5], ah
|
|
||||||
mov [si + 7], al
|
|
||||||
_setcursor 0, 3
|
|
||||||
call printplain
|
|
||||||
; ------------------
|
|
||||||
|
|
||||||
mov ax, 0x5304 ; Disconnect interface
|
mov ax, 0x5304 ; Disconnect interface
|
||||||
xor bx, bx
|
xor bx, bx
|
||||||
int 0x15
|
int 0x15
|
||||||
@ -291,14 +249,12 @@ cpugood:
|
|||||||
mov [es:0x9054], dx
|
mov [es:0x9054], dx
|
||||||
|
|
||||||
apm_end:
|
apm_end:
|
||||||
_setcursor d80x25_top_num, 0
|
|
||||||
|
|
||||||
;CHECK current of code
|
;CHECK current of code
|
||||||
cmp [cfgmanager.loader_block], -1
|
cmp [cfgmanager.loader_block], -1
|
||||||
jz noloaderblock
|
jz noloaderblock
|
||||||
les bx, [cfgmanager.loader_block]
|
les bx, [cfgmanager.loader_block]
|
||||||
cmp byte [es:bx], 1
|
cmp byte [es:bx], 1
|
||||||
mov si, loader_block_error
|
|
||||||
jnz sayerr
|
jnz sayerr
|
||||||
push 0
|
push 0
|
||||||
pop es
|
pop es
|
||||||
@ -344,22 +300,11 @@ cfgmanager:
|
|||||||
cmp byte [di+preboot_biosdisk-preboot_device], 1
|
cmp byte [di+preboot_biosdisk-preboot_device], 1
|
||||||
adc byte [di+preboot_biosdisk-preboot_device], 0
|
adc byte [di+preboot_biosdisk-preboot_device], 0
|
||||||
|
|
||||||
_setcursor 7,0
|
|
||||||
mov si, space_msg
|
|
||||||
call printplain
|
|
||||||
; pop ax ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ??
|
; pop ax ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ??
|
||||||
jmp .continue
|
jmp .continue
|
||||||
.loader_block dd -1
|
.loader_block dd -1
|
||||||
.continue:
|
.continue:
|
||||||
sti
|
sti
|
||||||
_setcursor 6,0
|
|
||||||
mov si, space_msg
|
|
||||||
call printplain
|
|
||||||
call printplain
|
|
||||||
_setcursor 6,0
|
|
||||||
mov si, loading_msg
|
|
||||||
call print
|
|
||||||
_setcursor 15,0
|
|
||||||
jmp .load
|
jmp .load
|
||||||
|
|
||||||
.loadc:
|
.loadc:
|
||||||
@ -367,11 +312,6 @@ cfgmanager:
|
|||||||
.cont:
|
.cont:
|
||||||
push cs
|
push cs
|
||||||
pop ds
|
pop ds
|
||||||
mov si, space_msg
|
|
||||||
mov byte [si+80], 0
|
|
||||||
_setcursor 15,0
|
|
||||||
call printplain
|
|
||||||
_setcursor 15,0
|
|
||||||
.load:
|
.load:
|
||||||
|
|
||||||
; ASK GRAPHICS MODE
|
; ASK GRAPHICS MODE
|
||||||
@ -406,8 +346,6 @@ include 'detect/biosmem.inc'
|
|||||||
|
|
||||||
cmp [boot_dev],0
|
cmp [boot_dev],0
|
||||||
jne no_sys_on_floppy
|
jne no_sys_on_floppy
|
||||||
mov si,diskload
|
|
||||||
call print
|
|
||||||
xor ax, ax ; reset drive
|
xor ax, ax ; reset drive
|
||||||
xor dx, dx
|
xor dx, dx
|
||||||
int 0x13
|
int 0x13
|
||||||
@ -464,17 +402,8 @@ include 'detect/biosmem.inc'
|
|||||||
inc ch
|
inc ch
|
||||||
cmp ch, 80
|
cmp ch, 80
|
||||||
jae ok_sys_on_floppy
|
jae ok_sys_on_floppy
|
||||||
pusha
|
|
||||||
mov al, ch
|
mov al, ch
|
||||||
shr ch, 2
|
shr ch, 2
|
||||||
add al, ch
|
|
||||||
aam
|
|
||||||
xchg al, ah
|
|
||||||
add ax, '00'
|
|
||||||
mov si, pros
|
|
||||||
mov [si], ax
|
|
||||||
call printplain
|
|
||||||
popa
|
|
||||||
jmp .a1
|
jmp .a1
|
||||||
.nocd:
|
.nocd:
|
||||||
; no - read only used sectors from floppy
|
; no - read only used sectors from floppy
|
||||||
@ -704,11 +633,6 @@ sayerr_floppy:
|
|||||||
aam
|
aam
|
||||||
xchg al, ah
|
xchg al, ah
|
||||||
add ax, '00'
|
add ax, '00'
|
||||||
mov si, pros
|
|
||||||
cmp [si], ax
|
|
||||||
jz @f
|
|
||||||
mov [si], ax
|
|
||||||
call printplain
|
|
||||||
@@:
|
@@:
|
||||||
popa
|
popa
|
||||||
inc di
|
inc di
|
||||||
@ -717,10 +641,6 @@ sayerr_floppy:
|
|||||||
pop bx ; clear stack
|
pop bx ; clear stack
|
||||||
|
|
||||||
ok_sys_on_floppy:
|
ok_sys_on_floppy:
|
||||||
mov si, backspace2
|
|
||||||
call printplain
|
|
||||||
mov si, okt
|
|
||||||
call printplain
|
|
||||||
no_sys_on_floppy:
|
no_sys_on_floppy:
|
||||||
xor ax, ax ; reset drive
|
xor ax, ax ; reset drive
|
||||||
xor dx, dx
|
xor dx, dx
|
||||||
|
@ -14,19 +14,19 @@
|
|||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
|
||||||
d80x25_bottom:
|
;d80x25_bottom:
|
||||||
db 186,' KolibriOS is based on MenuetOS and comes with ABSOLUTELY '
|
; db 186,' KolibriOS is based on MenuetOS and comes with ABSOLUTELY '
|
||||||
db 'NO WARRANTY ',186
|
; db 'NO WARRANTY ',186
|
||||||
db 186,' See file COPYING for details '
|
; db 186,' See file COPYING for details '
|
||||||
db ' ',186
|
; db ' ',186
|
||||||
line_full_bottom
|
; line_full_bottom
|
||||||
d80x25_bottom_num = 3
|
;d80x25_bottom_num = 3
|
||||||
|
|
||||||
msg_apm db " APM x.x ", 0
|
;msg_apm db " APM x.x ", 0
|
||||||
vervesa db "Version of Vesa: Vesa x.x",13,10,0
|
;vervesa db "Version of Vesa: Vesa x.x",13,10,0
|
||||||
;novesa db "Display: EGA/CGA",13,10,0
|
;novesa db "Display: EGA/CGA",13,10,0
|
||||||
s_vesa db "Version of VESA: "
|
;s_vesa db "Version of VESA: "
|
||||||
.ver db "?.?",13,10,0
|
; .ver db "?.?",13,10,0
|
||||||
|
|
||||||
;gr_mode db "Select a videomode: ",13,10,0
|
;gr_mode db "Select a videomode: ",13,10,0
|
||||||
|
|
||||||
@ -48,11 +48,11 @@ s_vesa db "Version of VESA: "
|
|||||||
;btns db "Fatal - Can't determine color depth.",0
|
;btns db "Fatal - Can't determine color depth.",0
|
||||||
;badsect db 13,10,186," Fatal - Bad sector. Replace floppy.",0
|
;badsect db 13,10,186," Fatal - Bad sector. Replace floppy.",0
|
||||||
;memmovefailed db 13,10,186," Fatal - Int 0x15 move failed.",0
|
;memmovefailed db 13,10,186," Fatal - Int 0x15 move failed.",0
|
||||||
okt db " ... OK"
|
;okt db " ... OK"
|
||||||
linef db 13,10,0
|
;linef db 13,10,0
|
||||||
diskload db "Loading diskette: 00 %",8,8,8,8,0
|
;diskload db "Loading diskette: 00 %",8,8,8,8,0
|
||||||
pros db "00"
|
;pros db "00"
|
||||||
backspace2 db 8,8,0
|
;backspace2 db 8,8,0
|
||||||
boot_dev db 0 ; 0=floppy, 1=hd
|
boot_dev db 0 ; 0=floppy, 1=hd
|
||||||
;start_msg db "Press [abcd] to change settings, press [Enter] to continue booting",13,10,0
|
;start_msg db "Press [abcd] to change settings, press [Enter] to continue booting",13,10,0
|
||||||
;time_msg db " or wait "
|
;time_msg db " or wait "
|
||||||
@ -61,6 +61,6 @@ boot_dev db 0 ; 0=floppy, 1=hd
|
|||||||
;current_cfg_msg db "cfgmanager.printcfg reached",13,10,0
|
;current_cfg_msg db "cfgmanager.printcfg reached",13,10,0
|
||||||
;curvideo_msg db " [a] Videomode: ",0
|
;curvideo_msg db " [a] Videomode: ",0
|
||||||
|
|
||||||
loading_msg db "Loading KolibriOS...",0
|
;loading_msg db "Loading KolibriOS...",0
|
||||||
;save_quest db "Remember current settings? [y/n]: ",0
|
;save_quest db "Remember current settings? [y/n]: ",0
|
||||||
loader_block_error db "Invalid boot data",0
|
;loader_block_error db "Invalid boot data",0
|
||||||
|
@ -115,7 +115,6 @@ int2strnz:
|
|||||||
|
|
||||||
;-------------------------------------------------------
|
;-------------------------------------------------------
|
||||||
print_vesa_info:
|
print_vesa_info:
|
||||||
_setcursor 5,2
|
|
||||||
|
|
||||||
mov [es:vi.VESASignature],'VBE2'
|
mov [es:vi.VESASignature],'VBE2'
|
||||||
mov ax,0x4F00
|
mov ax,0x4F00
|
||||||
@ -136,22 +135,6 @@ print_vesa_info:
|
|||||||
jb $
|
jb $
|
||||||
|
|
||||||
.vesaok2:
|
.vesaok2:
|
||||||
mov ax,[es:vi.VESAVersion]
|
|
||||||
add ax,'00'
|
|
||||||
|
|
||||||
mov [s_vesa.ver], ah
|
|
||||||
mov [s_vesa.ver+2], al
|
|
||||||
mov si,s_vesa
|
|
||||||
call printplain
|
|
||||||
|
|
||||||
_setcursor 4,2
|
|
||||||
mov si,word[es:vi.OemStringPtr]
|
|
||||||
mov di,si
|
|
||||||
|
|
||||||
push ds
|
|
||||||
mov ds,word[es:vi.OemStringPtr+2]
|
|
||||||
call printplain
|
|
||||||
pop ds
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
@ -224,6 +207,7 @@ check_first_parm:
|
|||||||
test si,si
|
test si,si
|
||||||
jnz .no_zero ;if no zero
|
jnz .no_zero ;if no zero
|
||||||
.zerro:
|
.zerro:
|
||||||
|
mov word[preboot_graph], ax
|
||||||
|
|
||||||
mov ax,1024
|
mov ax,1024
|
||||||
mov bx,768
|
mov bx,768
|
||||||
@ -295,30 +279,6 @@ check_first_parm:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
|
||||||
;Clear area of current video page (0xb800)
|
|
||||||
;clear_vmodes_table:
|
|
||||||
; pusha
|
|
||||||
; draw frames
|
|
||||||
; push es
|
|
||||||
; push 0xb800
|
|
||||||
; pop es
|
|
||||||
; mov di,1444
|
|
||||||
; xor ax,ax
|
|
||||||
; mov ah, 1*16+15
|
|
||||||
; mov cx,70
|
|
||||||
; mov bp,12
|
|
||||||
;.loop_start:
|
|
||||||
; rep stosw
|
|
||||||
; mov cx,70
|
|
||||||
; add di,20
|
|
||||||
; dec bp
|
|
||||||
; jns .loop_start
|
|
||||||
; pop es
|
|
||||||
; popa
|
|
||||||
; ret
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
set_vmode:
|
set_vmode:
|
||||||
|
@ -28,11 +28,11 @@ preboot_dma db 0 ; use DMA for access to HDD (1-always, 2-only for read, 3-n
|
|||||||
preboot_device db 0 ; boot device
|
preboot_device db 0 ; boot device
|
||||||
; (1-floppy 2-harddisk 3-kernel restart 4-format ram disk)
|
; (1-floppy 2-harddisk 3-kernel restart 4-format ram disk)
|
||||||
;!!!! 0 - autodetect !!!!
|
;!!!! 0 - autodetect !!!!
|
||||||
preboot_blogesc = 0 ; start immediately after bootlog
|
preboot_blogesc = 0 ; start immediately after bootlog
|
||||||
preboot_biosdisk db 0 ; use V86 to access disks through BIOS (1-yes, 2-no)
|
preboot_biosdisk db 0 ; use V86 to access disks through BIOS (1-yes, 2-no)
|
||||||
|
|
||||||
if $>0x200
|
if $>0x200
|
||||||
ERROR: prebooting parameters must fit in first sector!!!
|
ERROR: prebooting parameters must fit in first sector!!!
|
||||||
end if
|
end if
|
||||||
hdsysimage db 'KOLIBRI IMG' ; load from
|
;hdsysimage db 'KOLIBRI IMG' ; load from
|
||||||
image_save db 'KOLIBRI IMG' ; save to
|
;image_save db 'KOLIBRI IMG' ; save to
|
||||||
|
@ -135,29 +135,29 @@ pci_make_config_cmd:
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
pci_read_reg:
|
pci_read_reg:
|
||||||
; push edx
|
; push edx
|
||||||
; xor edx, edx
|
; xor edx, edx
|
||||||
; mov dh, ah ; bus
|
; mov dh, ah ; bus
|
||||||
; mov dl, bh ; dev+fn
|
; mov dl, bh ; dev+fn
|
||||||
; shl edx, 12
|
; shl edx, 12
|
||||||
; mov dl, bl ; reg
|
; mov dl, bl ; reg
|
||||||
; add edx, PCIe_CONFIG_SPACE
|
; add edx, PCIe_CONFIG_SPACE
|
||||||
;
|
;
|
||||||
; and al, 2
|
; and al, 2
|
||||||
; jz @f
|
; jz @f
|
||||||
; mov eax, dword[edx]
|
; mov eax, dword[edx]
|
||||||
; pop edx
|
; pop edx
|
||||||
; ret
|
; ret
|
||||||
;@@:
|
;@@:
|
||||||
; and al, 1
|
; and al, 1
|
||||||
; jz @f
|
; jz @f
|
||||||
; mov ax, word[edx]
|
; mov ax, word[edx]
|
||||||
; pop edx
|
; pop edx
|
||||||
; ret
|
; ret
|
||||||
;@@:
|
;@@:
|
||||||
; mov al, byte[edx]
|
; mov al, byte[edx]
|
||||||
; pop edx
|
; pop edx
|
||||||
; ret
|
; ret
|
||||||
push esi ; save register size into ESI
|
push esi ; save register size into ESI
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
and esi,3
|
and esi,3
|
||||||
@ -220,28 +220,28 @@ pci_fin_read1:
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
pci_write_reg:
|
pci_write_reg:
|
||||||
; push edx
|
; push edx
|
||||||
; xor edx, edx
|
; xor edx, edx
|
||||||
; mov dh, ah ; bus
|
; mov dh, ah ; bus
|
||||||
; mov dl, bh ; dev+fn
|
; mov dl, bh ; dev+fn
|
||||||
; shl edx, 12
|
; shl edx, 12
|
||||||
; mov dl, bl ; reg
|
; mov dl, bl ; reg
|
||||||
; add edx, PCIe_CONFIG_SPACE
|
; add edx, PCIe_CONFIG_SPACE
|
||||||
;
|
;
|
||||||
; test al, 2
|
; test al, 2
|
||||||
; jz @f
|
; jz @f
|
||||||
; mov dword[edx], ecx
|
; mov dword[edx], ecx
|
||||||
; ret
|
; ret
|
||||||
;@@:
|
;@@:
|
||||||
; test al, 1
|
; test al, 1
|
||||||
; jz @f
|
; jz @f
|
||||||
; mov word[edx], cx
|
; mov word[edx], cx
|
||||||
; pop edx
|
; pop edx
|
||||||
; ret
|
; ret
|
||||||
;@@:
|
;@@:
|
||||||
; mov byte[edx], cl
|
; mov byte[edx], cl
|
||||||
; pop edx
|
; pop edx
|
||||||
; ret
|
; ret
|
||||||
push esi ; save register size into ESI
|
push esi ; save register size into ESI
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
and esi,3
|
and esi,3
|
||||||
@ -428,6 +428,24 @@ pci_mmio_unmap:
|
|||||||
stdcall user_free, ebx
|
stdcall user_free, ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------
|
||||||
|
align 4
|
||||||
|
sys_map1:
|
||||||
|
; copies a block from kernel to user space
|
||||||
|
; in: esi = address in kernel space
|
||||||
|
; edi = eddress in user space
|
||||||
|
; ebx = count (dwords)
|
||||||
|
; out: nothing
|
||||||
|
;------------------------------------------------
|
||||||
|
mov ecx, ebx
|
||||||
|
pushfd
|
||||||
|
cld
|
||||||
|
rep movsd
|
||||||
|
popfd
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
uglobal
|
uglobal
|
||||||
align 4
|
align 4
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
|
||||||
dpl0 equ 10010000b ; data read dpl0
|
|
||||||
drw0 equ 10010010b ; data read/write dpl0
|
|
||||||
drw3 equ 11110010b ; data read/write dpl3
|
|
||||||
cpl0 equ 10011010b ; code read dpl0
|
|
||||||
cpl3 equ 11111010b ; code read dpl3
|
|
||||||
|
|
||||||
D32 equ 01000000b ; 32bit segment
|
dpl0 equ 10010000b ; data read dpl0
|
||||||
G32 equ 10000000b ; page gran
|
drw0 equ 10010010b ; data read/write dpl0
|
||||||
|
drw3 equ 11110010b ; data read/write dpl3
|
||||||
|
cpl0 equ 10011010b ; code read dpl0
|
||||||
|
cpl3 equ 11111010b ; code read dpl3
|
||||||
|
|
||||||
|
D32 equ 01000000b ; 32bit segment
|
||||||
|
G32 equ 10000000b ; page gran
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;cpu_caps flags;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;cpu_caps flags;;;;;;;;;;;;;;;;
|
||||||
@ -23,7 +23,7 @@ G32 equ 10000000b ; page gran
|
|||||||
CPU_386 equ 3
|
CPU_386 equ 3
|
||||||
CPU_486 equ 4
|
CPU_486 equ 4
|
||||||
CPU_PENTIUM equ 5
|
CPU_PENTIUM equ 5
|
||||||
CPU_P6 equ 6
|
CPU_P6 equ 6
|
||||||
CPU_PENTIUM4 equ 0x0F
|
CPU_PENTIUM4 equ 0x0F
|
||||||
|
|
||||||
CAPS_FPU equ 00 ;on-chip x87 floating point unit
|
CAPS_FPU equ 00 ;on-chip x87 floating point unit
|
||||||
@ -36,7 +36,7 @@ CAPS_PAE equ 06 ;physical-address extensions
|
|||||||
CAPS_MCE equ 07 ;machine check exception
|
CAPS_MCE equ 07 ;machine check exception
|
||||||
CAPS_CX8 equ 08 ;CMPXCHG8B instruction
|
CAPS_CX8 equ 08 ;CMPXCHG8B instruction
|
||||||
CAPS_APIC equ 09 ;on-chip advanced programmable
|
CAPS_APIC equ 09 ;on-chip advanced programmable
|
||||||
; interrupt controller
|
; interrupt controller
|
||||||
; 10 ;unused
|
; 10 ;unused
|
||||||
CAPS_SEP equ 11 ;SYSENTER and SYSEXIT instructions
|
CAPS_SEP equ 11 ;SYSENTER and SYSEXIT instructions
|
||||||
CAPS_MTRR equ 12 ;memory-type range registers
|
CAPS_MTRR equ 12 ;memory-type range registers
|
||||||
@ -51,7 +51,7 @@ CAPS_CLFLUSH equ 19 ;CLFUSH instruction
|
|||||||
|
|
||||||
CAPS_DS equ 21 ;debug store
|
CAPS_DS equ 21 ;debug store
|
||||||
CAPS_ACPI equ 22 ;thermal monitor and software
|
CAPS_ACPI equ 22 ;thermal monitor and software
|
||||||
;controlled clock supported
|
;controlled clock supported
|
||||||
CAPS_MMX equ 23 ;MMX instructions
|
CAPS_MMX equ 23 ;MMX instructions
|
||||||
CAPS_FXSR equ 24 ;FXSAVE and FXRSTOR instructions
|
CAPS_FXSR equ 24 ;FXSAVE and FXRSTOR instructions
|
||||||
CAPS_SSE equ 25 ;SSE instructions
|
CAPS_SSE equ 25 ;SSE instructions
|
||||||
@ -95,29 +95,29 @@ CAPS_SVM equ 73 ;secure virual machine
|
|||||||
CAPS_ALTMOVCR8 equ 74 ;
|
CAPS_ALTMOVCR8 equ 74 ;
|
||||||
|
|
||||||
; CPU MSR names
|
; CPU MSR names
|
||||||
MSR_SYSENTER_CS equ 0x174
|
MSR_SYSENTER_CS equ 0x174
|
||||||
MSR_SYSENTER_ESP equ 0x175
|
MSR_SYSENTER_ESP equ 0x175
|
||||||
MSR_SYSENTER_EIP equ 0x176
|
MSR_SYSENTER_EIP equ 0x176
|
||||||
MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register
|
MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register
|
||||||
MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register
|
MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register
|
||||||
|
|
||||||
CR0_PE equ 0x00000001 ;protected mode
|
CR0_PE equ 0x00000001 ;protected mode
|
||||||
CR0_MP equ 0x00000002 ;monitor fpu
|
CR0_MP equ 0x00000002 ;monitor fpu
|
||||||
CR0_EM equ 0x00000004 ;fpu emulation
|
CR0_EM equ 0x00000004 ;fpu emulation
|
||||||
CR0_TS equ 0x00000008 ;task switch
|
CR0_TS equ 0x00000008 ;task switch
|
||||||
CR0_ET equ 0x00000010 ;extension type hardcoded to 1
|
CR0_ET equ 0x00000010 ;extension type hardcoded to 1
|
||||||
CR0_NE equ 0x00000020 ;numeric error
|
CR0_NE equ 0x00000020 ;numeric error
|
||||||
CR0_WP equ 0x00010000 ;write protect
|
CR0_WP equ 0x00010000 ;write protect
|
||||||
CR0_AM equ 0x00040000 ;alignment check
|
CR0_AM equ 0x00040000 ;alignment check
|
||||||
CR0_NW equ 0x20000000 ;not write-through
|
CR0_NW equ 0x20000000 ;not write-through
|
||||||
CR0_CD equ 0x40000000 ;cache disable
|
CR0_CD equ 0x40000000 ;cache disable
|
||||||
CR0_PG equ 0x80000000 ;paging
|
CR0_PG equ 0x80000000 ;paging
|
||||||
|
|
||||||
|
|
||||||
CR4_VME equ 0x0001
|
CR4_VME equ 0x0001
|
||||||
CR4_PVI equ 0x0002
|
CR4_PVI equ 0x0002
|
||||||
CR4_TSD equ 0x0004
|
CR4_TSD equ 0x0004
|
||||||
CR4_DE equ 0x0008
|
CR4_DE equ 0x0008
|
||||||
CR4_PSE equ 0x0010
|
CR4_PSE equ 0x0010
|
||||||
CR4_PAE equ 0x0020
|
CR4_PAE equ 0x0020
|
||||||
CR4_MCE equ 0x0040
|
CR4_MCE equ 0x0040
|
||||||
@ -126,20 +126,20 @@ CR4_PCE equ 0x0100
|
|||||||
CR4_OSFXSR equ 0x0200
|
CR4_OSFXSR equ 0x0200
|
||||||
CR4_OSXMMEXPT equ 0x0400
|
CR4_OSXMMEXPT equ 0x0400
|
||||||
|
|
||||||
SSE_IE equ 0x0001
|
SSE_IE equ 0x0001
|
||||||
SSE_DE equ 0x0002
|
SSE_DE equ 0x0002
|
||||||
SSE_ZE equ 0x0004
|
SSE_ZE equ 0x0004
|
||||||
SSE_OE equ 0x0008
|
SSE_OE equ 0x0008
|
||||||
SSE_UE equ 0x0010
|
SSE_UE equ 0x0010
|
||||||
SSE_PE equ 0x0020
|
SSE_PE equ 0x0020
|
||||||
SSE_DAZ equ 0x0040
|
SSE_DAZ equ 0x0040
|
||||||
SSE_IM equ 0x0080
|
SSE_IM equ 0x0080
|
||||||
SSE_DM equ 0x0100
|
SSE_DM equ 0x0100
|
||||||
SSE_ZM equ 0x0200
|
SSE_ZM equ 0x0200
|
||||||
SSE_OM equ 0x0400
|
SSE_OM equ 0x0400
|
||||||
SSE_UM equ 0x0800
|
SSE_UM equ 0x0800
|
||||||
SSE_PM equ 0x1000
|
SSE_PM equ 0x1000
|
||||||
SSE_FZ equ 0x8000
|
SSE_FZ equ 0x8000
|
||||||
|
|
||||||
SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM)
|
SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM)
|
||||||
|
|
||||||
@ -164,16 +164,16 @@ struc TSS
|
|||||||
._ebp rd 1
|
._ebp rd 1
|
||||||
._esi rd 1
|
._esi rd 1
|
||||||
._edi rd 1
|
._edi rd 1
|
||||||
._es rw 2
|
._es rw 2
|
||||||
._cs rw 2
|
._cs rw 2
|
||||||
._ss rw 2
|
._ss rw 2
|
||||||
._ds rw 2
|
._ds rw 2
|
||||||
._fs rw 2
|
._fs rw 2
|
||||||
._gs rw 2
|
._gs rw 2
|
||||||
._ldt rw 2
|
._ldt rw 2
|
||||||
._trap rw 1
|
._trap rw 1
|
||||||
._io rw 1
|
._io rw 1
|
||||||
rb 24
|
rb 24
|
||||||
._io_map_0 rb 4096
|
._io_map_0 rb 4096
|
||||||
._io_map_1 rb 4096
|
._io_map_1 rb 4096
|
||||||
}
|
}
|
||||||
@ -184,288 +184,277 @@ end virtual
|
|||||||
|
|
||||||
TSS_SIZE equ (128+8192)
|
TSS_SIZE equ (128+8192)
|
||||||
|
|
||||||
OS_BASE equ 0x80000000
|
OS_BASE equ 0x80000000
|
||||||
|
|
||||||
window_data equ (OS_BASE+0x0001000)
|
window_data equ (OS_BASE+0x0001000)
|
||||||
|
|
||||||
CURRENT_TASK equ (OS_BASE+0x0003000)
|
CURRENT_TASK equ (OS_BASE+0x0003000)
|
||||||
TASK_COUNT equ (OS_BASE+0x0003004)
|
TASK_COUNT equ (OS_BASE+0x0003004)
|
||||||
TASK_BASE equ (OS_BASE+0x0003010)
|
TASK_BASE equ (OS_BASE+0x0003010)
|
||||||
TASK_DATA equ (OS_BASE+0x0003020)
|
TASK_DATA equ (OS_BASE+0x0003020)
|
||||||
TASK_EVENT equ (OS_BASE+0x0003020)
|
TASK_EVENT equ (OS_BASE+0x0003020)
|
||||||
|
|
||||||
mouseunder equ (OS_BASE+0x0006900)
|
FLOPPY_BUFF equ (OS_BASE+0x0005000)
|
||||||
CDDataBuf equ (OS_BASE+0x0007000)
|
|
||||||
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
|
||||||
;ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused
|
|
||||||
idts equ (OS_BASE+0x000B100)
|
|
||||||
WIN_STACK equ (OS_BASE+0x000C000)
|
|
||||||
WIN_POS equ (OS_BASE+0x000C400)
|
|
||||||
FDD_BUFF equ (OS_BASE+0x000D000)
|
|
||||||
|
|
||||||
;unused ? only one reference
|
idts equ (OS_BASE+0x0007400) ; sys32.inc
|
||||||
;ENABLE_TASKSWITCH equ (OS_BASE+0x000E000)
|
|
||||||
|
|
||||||
PUTPIXEL equ (OS_BASE+0x000E020)
|
mouseunder equ (OS_BASE+0x0007900)
|
||||||
GETPIXEL equ (OS_BASE+0x000E024)
|
SB16_Status equ (OS_BASE+0x0007F00) ; <<
|
||||||
|
|
||||||
;unused ? only one reference
|
RAMDISK_FAT equ (OS_BASE+0x0008000)
|
||||||
; BANK_SWITCH equ (OS_BASE+0x000E030) ; VESA 1.2 - not used
|
FLOPPY_FAT equ (OS_BASE+0x000A000) ; fs/fat12.inc
|
||||||
|
|
||||||
;unused ? store mousepointer
|
WIN_STACK equ (OS_BASE+0x000C000)
|
||||||
;MOUSE_PICTURE equ (OS_BASE+0x000F200) ; mousedrv.inc - not used
|
WIN_POS equ (OS_BASE+0x000C400)
|
||||||
|
FDD_BUFF equ (OS_BASE+0x000D000)
|
||||||
|
|
||||||
MOUSE_VISIBLE equ (OS_BASE+0x000F204)
|
|
||||||
WIN_TEMP_XY equ (OS_BASE+0x000F300)
|
|
||||||
KEY_COUNT equ (OS_BASE+0x000F400)
|
|
||||||
KEY_BUFF equ (OS_BASE+0x000F401)
|
|
||||||
|
|
||||||
BTN_COUNT equ (OS_BASE+0x000F500)
|
KEY_COUNT equ (OS_BASE+0x000FA00)
|
||||||
BTN_BUFF equ (OS_BASE+0x000F501)
|
KEY_BUFF equ (OS_BASE+0x000FA01)
|
||||||
|
|
||||||
CPU_FREQ equ (OS_BASE+0x000F600)
|
BTN_COUNT equ (OS_BASE+0x000FB00)
|
||||||
|
BTN_BUFF equ (OS_BASE+0x000FB01)
|
||||||
|
|
||||||
;unused ? no active references
|
|
||||||
MOUSE_PORT equ (OS_BASE+0x000F604)
|
|
||||||
|
|
||||||
;unused
|
;reserved ? mouse buffer space 0xFC00-FCFF
|
||||||
PS2_CHUNK equ (OS_BASE+0x000FB00)
|
|
||||||
|
|
||||||
MOUSE_SCROLL_H equ (OS_BASE+0x000FB08)
|
|
||||||
MOUSE_X equ (OS_BASE+0x000FB0A)
|
|
||||||
MOUSE_Y equ (OS_BASE+0x000FB0C)
|
|
||||||
MOUSE_SCROLL_V equ (OS_BASE+0x000FB0E)
|
|
||||||
|
|
||||||
MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10)
|
|
||||||
COLOR_TEMP equ (OS_BASE+0x000FB30)
|
|
||||||
BTN_DOWN equ (OS_BASE+0x000FB40)
|
|
||||||
MOUSE_DOWN equ (OS_BASE+0x000FB44)
|
|
||||||
X_UNDER equ (OS_BASE+0x000FB4A)
|
|
||||||
Y_UNDER equ (OS_BASE+0x000FB4C)
|
|
||||||
ScreenBPP equ (OS_BASE+0x000FBF1)
|
|
||||||
|
|
||||||
;unused ? only one reference
|
|
||||||
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
||||||
|
|
||||||
Screen_Max_X equ (OS_BASE+0x000FE00)
|
;unused ?
|
||||||
Screen_Max_Y equ (OS_BASE+0x000FE04)
|
PS2_CHUNK equ (OS_BASE+0x000FE00)
|
||||||
BytesPerScanLine equ (OS_BASE+0x000FE08)
|
MOUSE_SCROLL_H equ (OS_BASE+0x000FE08)
|
||||||
SCR_MODE equ (OS_BASE+0x000FE0C)
|
MOUSE_X equ (OS_BASE+0x000FE0A)
|
||||||
|
MOUSE_Y equ (OS_BASE+0x000FE0C)
|
||||||
|
MOUSE_SCROLL_V equ (OS_BASE+0x000FE0E)
|
||||||
|
|
||||||
KERNEL_ALLOC_FLAG equ (OS_BASE+0x000FE70)
|
MOUSE_COLOR_MEM equ (OS_BASE+0x000FE10)
|
||||||
mmio_pcie_cfg_addr equ (OS_BASE+0x000FE74)
|
COLOR_TEMP equ (OS_BASE+0x000FE30)
|
||||||
mmio_pcie_cfg_lim equ (OS_BASE+0x000FE78)
|
BTN_DOWN equ (OS_BASE+0x000FE40)
|
||||||
mmio_pcie_cfg_pdes equ (OS_BASE+0x000FE7C)
|
MOUSE_DOWN equ (OS_BASE+0x000FE44)
|
||||||
PCIe_bus_range equ (OS_BASE+0x000FE7E)
|
X_UNDER equ (OS_BASE+0x000FE4A)
|
||||||
|
Y_UNDER equ (OS_BASE+0x000FE4C)
|
||||||
|
|
||||||
UserDMAaddr equ (OS_BASE+0x000FE80)
|
PUTPIXEL equ (OS_BASE+0x000FEB8)
|
||||||
LFBAddress equ (OS_BASE+0x000FE84)
|
GETPIXEL equ (OS_BASE+0x000FEBC)
|
||||||
BTN_ADDR equ (OS_BASE+0x000FE88)
|
ScreenBPP equ (OS_BASE+0x000FEC1)
|
||||||
MEM_AMOUNT equ (OS_BASE+0x000FE8C)
|
MOUSE_VISIBLE equ (OS_BASE+0x000FEC4)
|
||||||
|
WIN_TEMP_XY equ (OS_BASE+0x000FEC8)
|
||||||
|
CPU_FREQ equ (OS_BASE+0x000FECC)
|
||||||
|
|
||||||
SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
|
Screen_Max_X equ (OS_BASE+0x000FED0)
|
||||||
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
Screen_Max_Y equ (OS_BASE+0x000FED4)
|
||||||
|
BytesPerScanLine equ (OS_BASE+0x000FED8)
|
||||||
|
SCR_MODE equ (OS_BASE+0x000FEDC)
|
||||||
|
|
||||||
|
KERNEL_ALLOC_FLAG equ (OS_BASE+0x000FEE0)
|
||||||
|
mmio_pcie_cfg_addr equ (OS_BASE+0x000FEE4)
|
||||||
|
mmio_pcie_cfg_lim equ (OS_BASE+0x000FEE8)
|
||||||
|
mmio_pcie_cfg_pdes equ (OS_BASE+0x000FEEC)
|
||||||
|
PCIe_bus_range equ (OS_BASE+0x000FEEE)
|
||||||
|
|
||||||
|
UserDMAaddr equ (OS_BASE+0x000FEF0)
|
||||||
|
LFBAddress equ (OS_BASE+0x000FEF4)
|
||||||
|
BTN_ADDR equ (OS_BASE+0x000FEF8)
|
||||||
|
MEM_AMOUNT equ (OS_BASE+0x000FEFC)
|
||||||
|
|
||||||
|
SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
|
||||||
|
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
||||||
|
|
||||||
|
BgrDrawMode equ (OS_BASE+0x000FFE4)
|
||||||
|
BgrDataWidth equ (OS_BASE+0x000FFE8)
|
||||||
|
BgrDataHeight equ (OS_BASE+0x000FFEC)
|
||||||
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
|
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
|
||||||
BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1)
|
BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1)
|
||||||
BANK_RW equ (OS_BASE+0x000FFF2)
|
BANK_RW equ (OS_BASE+0x000FFF2)
|
||||||
MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4)
|
MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4)
|
||||||
DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5)
|
DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5)
|
||||||
DONT_SWITCH equ (OS_BASE+0x000FFFF)
|
DONT_SWITCH equ (OS_BASE+0x000FFFF)
|
||||||
|
|
||||||
TMP_STACK_TOP equ 0x006CC00
|
TMP_STACK_TOP equ 0x006CC00
|
||||||
|
|
||||||
FONT_II equ (OS_BASE+0x006DC00)
|
FONT_II equ (OS_BASE+0x006DC00)
|
||||||
FONT_I equ (OS_BASE+0x006E600)
|
FONT_I equ (OS_BASE+0x006E600)
|
||||||
|
|
||||||
sys_pgdir equ (OS_BASE+0x006F000)
|
sys_pgdir equ (OS_BASE+0x006F000)
|
||||||
|
|
||||||
DRIVE_DATA equ (OS_BASE+0x0070000)
|
DRIVE_DATA equ (OS_BASE+0x0070000)
|
||||||
|
|
||||||
SLOT_BASE equ (OS_BASE+0x0080000)
|
SLOT_BASE equ (OS_BASE+0x0080000)
|
||||||
|
|
||||||
;unused
|
SB16Buffer equ (OS_BASE+0x0090000) ; <<
|
||||||
TMP_BUFF equ (OS_BASE+0x0090000)
|
|
||||||
|
|
||||||
VGABasePtr equ (OS_BASE+0x00A0000)
|
VGABasePtr equ (OS_BASE+0x00A0000)
|
||||||
|
|
||||||
RAMDISK equ (OS_BASE+0x0100000)
|
RAMDISK equ (OS_BASE+0x0100000)
|
||||||
RAMDISK_FAT equ (OS_BASE+0x0280000)
|
|
||||||
FLOPPY_FAT equ (OS_BASE+0x0282000)
|
|
||||||
|
|
||||||
IDE_DMA equ 0x284000
|
CLEAN_ZONE equ 0x3f0000
|
||||||
|
|
||||||
BgrAuxTable equ (OS_BASE+0x0298000)
|
IDE_DMA equ 0x03F4000
|
||||||
; unused?
|
|
||||||
SB16Buffer equ (OS_BASE+0x2A0000)
|
|
||||||
SB16_Status equ (OS_BASE+0x02B0000)
|
|
||||||
|
|
||||||
BUTTON_INFO equ (OS_BASE+0x02C0000)
|
BgrAuxTable equ (OS_BASE+0x0408000)
|
||||||
RESERVED_PORTS equ (OS_BASE+0x02D0000)
|
|
||||||
IRQ_SAVE equ (OS_BASE+0x02E0000)
|
|
||||||
BOOT_VAR equ (OS_BASE+0x02f0000)
|
|
||||||
|
|
||||||
stack_data_start equ (OS_BASE+0x0300000)
|
BUTTON_INFO equ (OS_BASE+0x0430000)
|
||||||
eth_data_start equ (OS_BASE+0x0300000)
|
RESERVED_PORTS equ (OS_BASE+0x0440000)
|
||||||
stack_data equ (OS_BASE+0x0304000)
|
IRQ_SAVE equ (OS_BASE+0x0450000)
|
||||||
stack_data_end equ (OS_BASE+0x031ffff)
|
BOOT_VAR equ (OS_BASE+0x0460000)
|
||||||
resendQ equ (OS_BASE+0x0320000)
|
|
||||||
VMODE_BASE equ (OS_BASE+0x0328000)
|
|
||||||
skin_data equ (OS_BASE+0x0330000)
|
|
||||||
draw_data equ (OS_BASE+0x0338000);
|
|
||||||
|
|
||||||
BgrDrawMode equ (OS_BASE+0x033BFF4)
|
stack_data_start equ (OS_BASE+0x0470000)
|
||||||
BgrDataWidth equ (OS_BASE+0x033BFF8)
|
eth_data_start equ (OS_BASE+0x0470000)
|
||||||
BgrDataHeight equ (OS_BASE+0x033BFFC)
|
stack_data equ (OS_BASE+0x0474000)
|
||||||
|
stack_data_end equ (OS_BASE+0x048ffff)
|
||||||
|
resendQ equ (OS_BASE+0x0490000)
|
||||||
|
VMODE_BASE equ (OS_BASE+0x0498000)
|
||||||
|
skin_data equ (OS_BASE+0x04A0000)
|
||||||
|
draw_data equ (OS_BASE+0x04A8000);
|
||||||
|
|
||||||
sys_pgmap equ (OS_BASE+0x033C000)
|
|
||||||
|
|
||||||
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
sys_pgmap equ (OS_BASE+0x04B0000) ; <<
|
||||||
|
|
||||||
virtual at (OS_BASE+0x05FFF80)
|
;UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
||||||
|
|
||||||
|
virtual at (OS_BASE+0x06FFF80)
|
||||||
tss TSS
|
tss TSS
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
HEAP_BASE equ (OS_BASE+0x0800000)
|
HEAP_BASE equ (OS_BASE+0x0800000)
|
||||||
HEAP_MIN_SIZE equ 0x01000000
|
HEAP_MIN_SIZE equ 0x01000000
|
||||||
|
|
||||||
PCIe_CONFIG_SPACE equ 0xF0000000
|
PCIe_CONFIG_SPACE equ 0xF0000000
|
||||||
USER_DMA_BUFFER equ 0xFD000000 ; linear addr.
|
USER_DMA_BUFFER equ 0xFD000000 ; linear addr.
|
||||||
|
|
||||||
page_tabs equ 0xFDC00000
|
page_tabs equ 0xFDC00000
|
||||||
app_page_tabs equ 0xFDC00000
|
app_page_tabs equ 0xFDC00000
|
||||||
kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000
|
kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000
|
||||||
master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000
|
master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000
|
||||||
|
|
||||||
LFB_BASE equ 0xFE000000
|
LFB_BASE equ 0xFE000000
|
||||||
|
|
||||||
|
|
||||||
new_app_base equ 0;
|
new_app_base equ 0;
|
||||||
|
|
||||||
twdw equ 0x2000 ;(CURRENT_TASK-window_data)
|
twdw equ 0x2000 ;(CURRENT_TASK-window_data)
|
||||||
|
|
||||||
std_application_base_address equ new_app_base
|
std_application_base_address equ new_app_base
|
||||||
RING0_STACK_SIZE equ (0x2000 - 512) ;512 áàéò äëÿ êîíòåêñòà FPU
|
RING0_STACK_SIZE equ (0x2000 - 512) ;512 áàéò äëÿ êîíòåêñòà FPU
|
||||||
|
|
||||||
REG_SS equ (RING0_STACK_SIZE-4)
|
REG_SS equ (RING0_STACK_SIZE-4)
|
||||||
REG_APP_ESP equ (RING0_STACK_SIZE-8)
|
REG_APP_ESP equ (RING0_STACK_SIZE-8)
|
||||||
REG_EFLAGS equ (RING0_STACK_SIZE-12)
|
REG_EFLAGS equ (RING0_STACK_SIZE-12)
|
||||||
REG_CS equ (RING0_STACK_SIZE-16)
|
REG_CS equ (RING0_STACK_SIZE-16)
|
||||||
REG_EIP equ (RING0_STACK_SIZE-20)
|
REG_EIP equ (RING0_STACK_SIZE-20)
|
||||||
REG_EAX equ (RING0_STACK_SIZE-24)
|
REG_EAX equ (RING0_STACK_SIZE-24)
|
||||||
REG_ECX equ (RING0_STACK_SIZE-28)
|
REG_ECX equ (RING0_STACK_SIZE-28)
|
||||||
REG_EDX equ (RING0_STACK_SIZE-32)
|
REG_EDX equ (RING0_STACK_SIZE-32)
|
||||||
REG_EBX equ (RING0_STACK_SIZE-36)
|
REG_EBX equ (RING0_STACK_SIZE-36)
|
||||||
REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20
|
REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20
|
||||||
REG_EBP equ (RING0_STACK_SIZE-44)
|
REG_EBP equ (RING0_STACK_SIZE-44)
|
||||||
REG_ESI equ (RING0_STACK_SIZE-48)
|
REG_ESI equ (RING0_STACK_SIZE-48)
|
||||||
REG_EDI equ (RING0_STACK_SIZE-52)
|
REG_EDI equ (RING0_STACK_SIZE-52)
|
||||||
REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return
|
REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return
|
||||||
|
|
||||||
|
|
||||||
PG_UNMAP equ 0x000
|
PG_UNMAP equ 0x000
|
||||||
PG_MAP equ 0x001
|
PG_MAP equ 0x001
|
||||||
PG_WRITE equ 0x002
|
PG_WRITE equ 0x002
|
||||||
PG_SW equ 0x003
|
PG_SW equ 0x003
|
||||||
PG_USER equ 0x005
|
PG_USER equ 0x005
|
||||||
PG_UW equ 0x007
|
PG_UW equ 0x007
|
||||||
PG_NOCACHE equ 0x018
|
PG_NOCACHE equ 0x018
|
||||||
PG_LARGE equ 0x080
|
PG_LARGE equ 0x080
|
||||||
PG_GLOBAL equ 0x100
|
PG_GLOBAL equ 0x100
|
||||||
|
|
||||||
PG_SHARED equ 0x200
|
PG_SHARED equ 0x200
|
||||||
|
|
||||||
;;;;;;;;;;;boot time variables
|
;;;;;;;;;;;boot time variables
|
||||||
|
|
||||||
;BOOT_BPP equ 0x9000 ;byte bits per pixel
|
;BOOT_BPP equ 0x9000 ;byte bits per pixel
|
||||||
BOOT_SCANLINE equ 0x9001 ;word scanline length
|
BOOT_SCANLINE equ 0x9001 ;word scanline length
|
||||||
BOOT_VESA_MODE equ 0x9008 ;word vesa video mode
|
BOOT_VESA_MODE equ 0x9008 ;word vesa video mode
|
||||||
;;BOOT_X_RES equ 0x900A ;word X res
|
;;BOOT_X_RES equ 0x900A ;word X res
|
||||||
;;BOOT_Y_RES equ 0x900C ;word Y res
|
;;BOOT_Y_RES equ 0x900C ;word Y res
|
||||||
;;BOOT_MOUSE_PORT equ 0x9010 ;byte mouse port - not used
|
;;BOOT_MOUSE_PORT equ 0x9010 ;byte mouse port - not used
|
||||||
BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch
|
BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch
|
||||||
BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address
|
BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address
|
||||||
BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration
|
BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration
|
||||||
BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display)
|
BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display)
|
||||||
BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled
|
BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled
|
||||||
BOOT_PCI_DATA equ 0x9020 ;8bytes pci data
|
BOOT_PCI_DATA equ 0x9020 ;8bytes pci data
|
||||||
BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no
|
BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no
|
||||||
BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr
|
BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr
|
||||||
BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount
|
BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount
|
||||||
|
|
||||||
TMP_FILE_NAME equ 0
|
TMP_FILE_NAME equ 0
|
||||||
TMP_CMD_LINE equ 1024
|
TMP_CMD_LINE equ 1024
|
||||||
TMP_ICON_OFFS equ 1280
|
TMP_ICON_OFFS equ 1280
|
||||||
|
|
||||||
|
|
||||||
EVENT_REDRAW equ 0x00000001
|
EVENT_REDRAW equ 0x00000001
|
||||||
EVENT_KEY equ 0x00000002
|
EVENT_KEY equ 0x00000002
|
||||||
EVENT_BUTTON equ 0x00000004
|
EVENT_BUTTON equ 0x00000004
|
||||||
EVENT_BACKGROUND equ 0x00000010
|
EVENT_BACKGROUND equ 0x00000010
|
||||||
EVENT_MOUSE equ 0x00000020
|
EVENT_MOUSE equ 0x00000020
|
||||||
EVENT_IPC equ 0x00000040
|
EVENT_IPC equ 0x00000040
|
||||||
EVENT_NETWORK equ 0x00000080
|
EVENT_NETWORK equ 0x00000080
|
||||||
EVENT_DEBUG equ 0x00000100
|
EVENT_DEBUG equ 0x00000100
|
||||||
EVENT_EXTENDED equ 0x00000200
|
EVENT_EXTENDED equ 0x00000200
|
||||||
|
|
||||||
EV_INTR equ 1
|
EV_INTR equ 1
|
||||||
|
|
||||||
struc THR_DATA
|
struc THR_DATA
|
||||||
{
|
{
|
||||||
rb (8192-512)
|
rb (8192-512)
|
||||||
.pl0_stack:
|
.pl0_stack:
|
||||||
.fpu_state rb 512
|
.fpu_state rb 512
|
||||||
.tls_page rb 4096
|
.tls_page rb 4096
|
||||||
.pdbr rb 4096
|
.pdbr rb 4096
|
||||||
}
|
}
|
||||||
|
|
||||||
THR_DATA_SIZE equ 4096*4
|
THR_DATA_SIZE equ 4096*4
|
||||||
|
|
||||||
virtual at (OS_BASE-THR_DATA_SIZE)
|
virtual at (OS_BASE-THR_DATA_SIZE)
|
||||||
thr_data THR_DATA
|
thr_data THR_DATA
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc SYS_VARS
|
struc SYS_VARS
|
||||||
{ .bpp dd ?
|
{ .bpp dd ?
|
||||||
.scanline dd ?
|
.scanline dd ?
|
||||||
.vesa_mode dd ?
|
.vesa_mode dd ?
|
||||||
.x_res dd ?
|
.x_res dd ?
|
||||||
.y_res dd ?
|
.y_res dd ?
|
||||||
}
|
}
|
||||||
|
|
||||||
struc APPOBJ ;common object header
|
struc APPOBJ ;common object header
|
||||||
{
|
{
|
||||||
.magic dd ? ;
|
.magic dd ? ;
|
||||||
.destroy dd ? ;internal destructor
|
.destroy dd ? ;internal destructor
|
||||||
.fd dd ? ;next object in list
|
.fd dd ? ;next object in list
|
||||||
.bk dd ? ;prev object in list
|
.bk dd ? ;prev object in list
|
||||||
.pid dd ? ;owner id
|
.pid dd ? ;owner id
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
APPOBJ APPOBJ
|
APPOBJ APPOBJ
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
APP_OBJ_OFFSET equ 48
|
APP_OBJ_OFFSET equ 48
|
||||||
APP_EV_OFFSET equ 40
|
APP_EV_OFFSET equ 40
|
||||||
|
|
||||||
struc CURSOR
|
struc CURSOR
|
||||||
{
|
{
|
||||||
;common object header
|
;common object header
|
||||||
.magic dd ? ;'CURS'
|
.magic dd ? ;'CURS'
|
||||||
.destroy dd ? ;internal destructor
|
.destroy dd ? ;internal destructor
|
||||||
.fd dd ? ;next object in list
|
.fd dd ? ;next object in list
|
||||||
.bk dd ? ;prev object in list
|
.bk dd ? ;prev object in list
|
||||||
.pid dd ? ;owner id
|
.pid dd ? ;owner id
|
||||||
|
|
||||||
;cursor data
|
;cursor data
|
||||||
.base dd ? ;allocated memory
|
.base dd ? ;allocated memory
|
||||||
.hot_x dd ? ;hotspot coords
|
.hot_x dd ? ;hotspot coords
|
||||||
.hot_y dd ?
|
.hot_y dd ?
|
||||||
|
|
||||||
.list_next dd ? ;next cursor in cursor list
|
.list_next dd ? ;next cursor in cursor list
|
||||||
.list_prev dd ? ;prev cursor in cursor list
|
.list_prev dd ? ;prev cursor in cursor list
|
||||||
.dev_obj dd ? ;device depended data
|
.dev_obj dd ? ;device depended data
|
||||||
|
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
@ -476,18 +465,18 @@ end virtual
|
|||||||
|
|
||||||
struc EVENT
|
struc EVENT
|
||||||
{
|
{
|
||||||
.magic dd ? ;'EVNT'
|
.magic dd ? ;'EVNT'
|
||||||
.destroy dd ? ;internal destructor
|
.destroy dd ? ;internal destructor
|
||||||
.fd dd ? ;next object in list
|
.fd dd ? ;next object in list
|
||||||
.bk dd ? ;prev object in list
|
.bk dd ? ;prev object in list
|
||||||
.pid dd ? ;owner id
|
.pid dd ? ;owner id
|
||||||
|
|
||||||
.id dd ? ;event uid
|
.id dd ? ;event uid
|
||||||
.state dd ? ;internal flags
|
.state dd ? ;internal flags
|
||||||
.code dd ?
|
.code dd ?
|
||||||
rd 5
|
rd 5
|
||||||
.size = $ - .magic
|
.size = $ - .magic
|
||||||
.codesize = $ - .code
|
.codesize = $ - .code
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
@ -497,26 +486,26 @@ end virtual
|
|||||||
|
|
||||||
struc SMEM
|
struc SMEM
|
||||||
{
|
{
|
||||||
.bk dd ?
|
.bk dd ?
|
||||||
.fd dd ? ;+4
|
.fd dd ? ;+4
|
||||||
.base dd ? ;+8
|
.base dd ? ;+8
|
||||||
.size dd ? ;+12
|
.size dd ? ;+12
|
||||||
.access dd ? ;+16
|
.access dd ? ;+16
|
||||||
.refcount dd ? ;+20
|
.refcount dd ? ;+20
|
||||||
.name rb 32 ;+24
|
.name rb 32 ;+24
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
|
|
||||||
struc SMAP
|
struc SMAP
|
||||||
{
|
{
|
||||||
.magic dd ? ; SMAP
|
.magic dd ? ; SMAP
|
||||||
.destroy dd ? ;internal destructor
|
.destroy dd ? ;internal destructor
|
||||||
.fd dd ? ;next object in list
|
.fd dd ? ;next object in list
|
||||||
.bk dd ? ;prev object in list
|
.bk dd ? ;prev object in list
|
||||||
.pid dd ? ;owner id
|
.pid dd ? ;owner id
|
||||||
|
|
||||||
.base dd ? ;mapped base
|
.base dd ? ;mapped base
|
||||||
.parent dd ? ;SMEM
|
.parent dd ? ;SMEM
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,32 +519,32 @@ end virtual
|
|||||||
|
|
||||||
struc DLLDESCR
|
struc DLLDESCR
|
||||||
{
|
{
|
||||||
.bk dd ?
|
.bk dd ?
|
||||||
.fd dd ? ;+4
|
.fd dd ? ;+4
|
||||||
.data dd ? ;+8
|
.data dd ? ;+8
|
||||||
.size dd ? ;+12
|
.size dd ? ;+12
|
||||||
.timestamp dq ?
|
.timestamp dq ?
|
||||||
.refcount dd ?
|
.refcount dd ?
|
||||||
.defaultbase dd ?
|
.defaultbase dd ?
|
||||||
.coff_hdr dd ?
|
.coff_hdr dd ?
|
||||||
.symbols_ptr dd ?
|
.symbols_ptr dd ?
|
||||||
.symbols_num dd ?
|
.symbols_num dd ?
|
||||||
.symbols_lim dd ?
|
.symbols_lim dd ?
|
||||||
.exports dd ? ;export table
|
.exports dd ? ;export table
|
||||||
.name:
|
.name:
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
|
|
||||||
struc HDLL
|
struc HDLL
|
||||||
{
|
{
|
||||||
.fd dd ? ;next object in list
|
.fd dd ? ;next object in list
|
||||||
.bk dd ? ;prev object in list
|
.bk dd ? ;prev object in list
|
||||||
.pid dd ? ;owner id
|
.pid dd ? ;owner id
|
||||||
|
|
||||||
.base dd ? ;mapped base
|
.base dd ? ;mapped base
|
||||||
.size dd ? ;mapped size
|
.size dd ? ;mapped size
|
||||||
.refcount dd ? ;reference counter for this process and this lib
|
.refcount dd ? ;reference counter for this process and this lib
|
||||||
.parent dd ? ;DLLDESCR
|
.parent dd ? ;DLLDESCR
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -569,24 +558,24 @@ end virtual
|
|||||||
|
|
||||||
struc display_t
|
struc display_t
|
||||||
{
|
{
|
||||||
.x dd ?
|
.x dd ?
|
||||||
.y dd ?
|
.y dd ?
|
||||||
.width dd ?
|
.width dd ?
|
||||||
.height dd ?
|
.height dd ?
|
||||||
.bpp dd ?
|
.bpp dd ?
|
||||||
.vrefresh dd ?
|
.vrefresh dd ?
|
||||||
.pitch dd ?
|
.pitch dd ?
|
||||||
.lfb dd ?
|
.lfb dd ?
|
||||||
|
|
||||||
.modes dd ?
|
.modes dd ?
|
||||||
.ddev dd ?
|
.ddev dd ?
|
||||||
.connector dd ?
|
.connector dd ?
|
||||||
.crtc dd ?
|
.crtc dd ?
|
||||||
|
|
||||||
.cr_list.next dd ?
|
.cr_list.next dd ?
|
||||||
.cr_list.prev dd ?
|
.cr_list.prev dd ?
|
||||||
|
|
||||||
.cursor dd ?
|
.cursor dd ?
|
||||||
|
|
||||||
.init_cursor dd ?
|
.init_cursor dd ?
|
||||||
.select_cursor dd ?
|
.select_cursor dd ?
|
||||||
@ -602,49 +591,49 @@ end virtual
|
|||||||
|
|
||||||
struc HEAP_DATA
|
struc HEAP_DATA
|
||||||
{
|
{
|
||||||
.mutex rd 1
|
.mutex rd 1
|
||||||
.refcount rd 1
|
.refcount rd 1
|
||||||
.heap_base rd 1
|
.heap_base rd 1
|
||||||
.heap_top rd 1
|
.heap_top rd 1
|
||||||
.app_mem rd 1
|
.app_mem rd 1
|
||||||
}
|
}
|
||||||
|
|
||||||
HEAP_DATA_SIZE equ 20
|
HEAP_DATA_SIZE equ 20
|
||||||
virtual at 0
|
virtual at 0
|
||||||
HEAP_DATA HEAP_DATA
|
HEAP_DATA HEAP_DATA
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc BOOT_DATA
|
struc BOOT_DATA
|
||||||
{ .bpp dd ?
|
{ .bpp dd ?
|
||||||
.scanline dd ?
|
.scanline dd ?
|
||||||
.vesa_mode dd ?
|
.vesa_mode dd ?
|
||||||
.x_res dd ?
|
.x_res dd ?
|
||||||
.y_res dd ?
|
.y_res dd ?
|
||||||
.mouse_port dd ?
|
.mouse_port dd ?
|
||||||
.bank_switch dd ?
|
.bank_switch dd ?
|
||||||
.lfb dd ?
|
.lfb dd ?
|
||||||
.vesa_mem dd ?
|
.vesa_mem dd ?
|
||||||
.log dd ?
|
.log dd ?
|
||||||
.direct_lfb dd ?
|
.direct_lfb dd ?
|
||||||
.pci_data dd ?
|
.pci_data dd ?
|
||||||
; dd ?
|
; dd ?
|
||||||
.vrr dd ?
|
.vrr dd ?
|
||||||
.ide_base dd ?
|
.ide_base dd ?
|
||||||
.mem_amount dd ?
|
.mem_amount dd ?
|
||||||
.pages_count dd ?
|
.pages_count dd ?
|
||||||
.pagemap_size dd ?
|
.pagemap_size dd ?
|
||||||
.kernel_max dd ?
|
.kernel_max dd ?
|
||||||
.kernel_pages dd ?
|
.kernel_pages dd ?
|
||||||
.kernel_tables dd ?
|
.kernel_tables dd ?
|
||||||
|
|
||||||
.cpu_vendor dd ?
|
.cpu_vendor dd ?
|
||||||
dd ?
|
dd ?
|
||||||
dd ?
|
dd ?
|
||||||
.cpu_sign dd ?
|
.cpu_sign dd ?
|
||||||
.cpu_info dd ?
|
.cpu_info dd ?
|
||||||
.cpu_caps dd ?
|
.cpu_caps dd ?
|
||||||
dd ?
|
dd ?
|
||||||
dd ?
|
dd ?
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
@ -652,26 +641,26 @@ virtual at 0
|
|||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc MEM_STATE
|
struc MEM_STATE
|
||||||
{ .mutex rd 1
|
{ .mutex rd 1
|
||||||
.smallmap rd 1
|
.smallmap rd 1
|
||||||
.treemap rd 1
|
.treemap rd 1
|
||||||
.topsize rd 1
|
.topsize rd 1
|
||||||
.top rd 1
|
.top rd 1
|
||||||
.smallbins rd 4*32
|
.smallbins rd 4*32
|
||||||
.treebins rd 32
|
.treebins rd 32
|
||||||
}
|
}
|
||||||
|
|
||||||
struc PG_DATA
|
struc PG_DATA
|
||||||
{ .mem_amount dd ?
|
{ .mem_amount dd ?
|
||||||
.vesa_mem dd ?
|
.vesa_mem dd ?
|
||||||
.pages_count dd ?
|
.pages_count dd ?
|
||||||
.pages_free dd ?
|
.pages_free dd ?
|
||||||
.pages_faults dd ?
|
.pages_faults dd ?
|
||||||
.pagemap_size dd ?
|
.pagemap_size dd ?
|
||||||
.kernel_pages dd ?
|
.kernel_pages dd ?
|
||||||
.kernel_tables dd ?
|
.kernel_tables dd ?
|
||||||
.sys_page_dir dd ?
|
.sys_page_dir dd ?
|
||||||
.pg_mutex dd ?
|
.pg_mutex dd ?
|
||||||
}
|
}
|
||||||
|
|
||||||
;struc LIB
|
;struc LIB
|
||||||
@ -684,15 +673,15 @@ struc PG_DATA
|
|||||||
|
|
||||||
struc SRV
|
struc SRV
|
||||||
{
|
{
|
||||||
.srv_name rb 16 ;ASCIIZ string
|
.srv_name rb 16 ;ASCIIZ string
|
||||||
.magic dd ? ;+0x10 ;'SRV '
|
.magic dd ? ;+0x10 ;'SRV '
|
||||||
.size dd ? ;+0x14 ;size of structure SRV
|
.size dd ? ;+0x14 ;size of structure SRV
|
||||||
.fd dd ? ;+0x18 ;next SRV descriptor
|
.fd dd ? ;+0x18 ;next SRV descriptor
|
||||||
.bk dd ? ;+0x1C ;prev SRV descriptor
|
.bk dd ? ;+0x1C ;prev SRV descriptor
|
||||||
.base dd ? ;+0x20 ;service base address
|
.base dd ? ;+0x20 ;service base address
|
||||||
.entry dd ? ;+0x24 ;service START function
|
.entry dd ? ;+0x24 ;service START function
|
||||||
.srv_proc dd ? ;+0x28 ;user mode service handler
|
.srv_proc dd ? ;+0x28 ;user mode service handler
|
||||||
.srv_proc_ex dd ? ;+0x2C ;kernel mode service handler
|
.srv_proc_ex dd ? ;+0x2C ;kernel mode service handler
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -702,53 +691,53 @@ DRV_ENTRY equ 1
|
|||||||
DRV_EXIT equ -1
|
DRV_EXIT equ -1
|
||||||
|
|
||||||
struc COFF_HEADER
|
struc COFF_HEADER
|
||||||
{ .machine dw ?
|
{ .machine dw ?
|
||||||
.nSections dw ?
|
.nSections dw ?
|
||||||
.DataTime dd ?
|
.DataTime dd ?
|
||||||
.pSymTable dd ?
|
.pSymTable dd ?
|
||||||
.nSymbols dd ?
|
.nSymbols dd ?
|
||||||
.optHeader dw ?
|
.optHeader dw ?
|
||||||
.flags dw ?
|
.flags dw ?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struc COFF_SECTION
|
struc COFF_SECTION
|
||||||
{ .Name rb 8
|
{ .Name rb 8
|
||||||
.VirtualSize dd ?
|
.VirtualSize dd ?
|
||||||
.VirtualAddress dd ?
|
.VirtualAddress dd ?
|
||||||
.SizeOfRawData dd ?
|
.SizeOfRawData dd ?
|
||||||
.PtrRawData dd ?
|
.PtrRawData dd ?
|
||||||
.PtrReloc dd ?
|
.PtrReloc dd ?
|
||||||
.PtrLinenumbers dd ?
|
.PtrLinenumbers dd ?
|
||||||
.NumReloc dw ?
|
.NumReloc dw ?
|
||||||
.NumLinenum dw ?
|
.NumLinenum dw ?
|
||||||
.Characteristics dd ?
|
.Characteristics dd ?
|
||||||
}
|
}
|
||||||
COFF_SECTION_SIZE equ 40
|
COFF_SECTION_SIZE equ 40
|
||||||
|
|
||||||
struc COFF_RELOC
|
struc COFF_RELOC
|
||||||
{ .VirtualAddress dd ?
|
{ .VirtualAddress dd ?
|
||||||
.SymIndex dd ?
|
.SymIndex dd ?
|
||||||
.Type dw ?
|
.Type dw ?
|
||||||
}
|
}
|
||||||
|
|
||||||
struc COFF_SYM
|
struc COFF_SYM
|
||||||
{ .Name rb 8
|
{ .Name rb 8
|
||||||
.Value dd ?
|
.Value dd ?
|
||||||
.SectionNumber dw ?
|
.SectionNumber dw ?
|
||||||
.Type dw ?
|
.Type dw ?
|
||||||
.StorageClass db ?
|
.StorageClass db ?
|
||||||
.NumAuxSymbols db ?
|
.NumAuxSymbols db ?
|
||||||
}
|
}
|
||||||
CSYM_SIZE equ 18
|
CSYM_SIZE equ 18
|
||||||
|
|
||||||
struc IOCTL
|
struc IOCTL
|
||||||
{ .handle dd ?
|
{ .handle dd ?
|
||||||
.io_code dd ?
|
.io_code dd ?
|
||||||
.input dd ?
|
.input dd ?
|
||||||
.inp_size dd ?
|
.inp_size dd ?
|
||||||
.output dd ?
|
.output dd ?
|
||||||
.out_size dd ?
|
.out_size dd ?
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
|
@ -17,7 +17,7 @@ cross_order:
|
|||||||
mov edx, esi
|
mov edx, esi
|
||||||
mov esi, edi
|
mov esi, edi
|
||||||
movzx edi, byte[esp+28 + 4]
|
movzx edi, byte[esp+28 + 4]
|
||||||
sub edi, 53 ; all zeroes before
|
sub edi, 53 ; all zeroes before
|
||||||
call dword [servetable+edi*4]
|
call dword [servetable+edi*4]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ iglobal
|
|||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
dd 0 ; 62-PCI functions
|
dd 0 ; 62-PCI functions
|
||||||
dd sys_msg_board ; 63-System message board
|
dd sys_msg_board ; 63-System message board
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -100,7 +100,7 @@ iglobal
|
|||||||
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
|
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
|
||||||
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
||||||
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
||||||
dd undefined_syscall ; syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
dd undefined_syscall ; syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
||||||
dd undefined_syscall ; 25-reserved
|
dd undefined_syscall ; 25-reserved
|
||||||
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
||||||
dd undefined_syscall ; 27-reserved
|
dd undefined_syscall ; 27-reserved
|
||||||
@ -155,8 +155,8 @@ iglobal
|
|||||||
align 4
|
align 4
|
||||||
servetable3: ; Kolibri-A special service
|
servetable3: ; Kolibri-A special service
|
||||||
|
|
||||||
dd sys_rdmsr ; 0
|
dd sys_rdmsr ; 0 = read MSR
|
||||||
dd paleholder ; 1
|
dd sys_map1 ; 1 = map any page (test only)
|
||||||
dd paleholder ; 2
|
dd paleholder ; 2
|
||||||
dd sys_end ; last
|
dd sys_end ; last
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ preinit_mem:
|
|||||||
|
|
||||||
; clear [0x280000..HEAP_BASE]
|
; clear [0x280000..HEAP_BASE]
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edi,0x280000 ; 0x280000 = ramdisk FAT ?
|
mov edi, CLEAN_ZONE ; 0x280000 = ramdisk FAT ?
|
||||||
mov ecx,(HEAP_BASE-OS_BASE-0x280000) / 4
|
mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4
|
||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ preinit_mem:
|
|||||||
|
|
||||||
; save [0..0xffff]
|
; save [0..0xffff]
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
mov edi,0x2F0000 ; low mem storage area
|
mov edi,(BOOT_VAR-OS_BASE) ; low mem storage area
|
||||||
mov ecx, 0x10000 / 4
|
mov ecx, 0x10000 / 4
|
||||||
rep movsd
|
rep movsd
|
||||||
; clear [0x1000..0x0ffff]
|
; clear [0x1000..0x0ffff]
|
||||||
@ -83,20 +83,24 @@ proc init_mem
|
|||||||
mov eax, PG_LARGE+PG_SW
|
mov eax, PG_LARGE+PG_SW
|
||||||
mov cr4, ebx
|
mov cr4, ebx
|
||||||
dec [pg_data.kernel_tables-OS_BASE]
|
dec [pg_data.kernel_tables-OS_BASE]
|
||||||
|
sub [pg_data.kernel_pages -OS_BASE], 1024 ; 1 large page = 1024 ordinary pages
|
||||||
|
|
||||||
mov [edx], eax ; map first (physical) 4M bytes
|
mov [edx], eax ; map first (physical) 4M bytes
|
||||||
add edx, 4
|
add edx, 4
|
||||||
|
|
||||||
mov edi, [tmp_page_tabs]
|
mov edi, [tmp_page_tabs]
|
||||||
mov ecx, [pg_data.kernel_pages -OS_BASE] ; safety cleaning of already-zeroed space
|
mov ecx, [pg_data.kernel_pages -OS_BASE] ; map the rest of kernel space
|
||||||
xor eax, eax
|
mov eax, 0x00400000+PG_SW
|
||||||
rep stosd
|
.map_kernel_pages:
|
||||||
|
stosd
|
||||||
|
add eax, 4096
|
||||||
|
dec ecx
|
||||||
|
jnz .map_kernel_pages
|
||||||
|
|
||||||
mov ecx, [pg_data.kernel_tables-OS_BASE] ; build some PDEs to hold empty PTEs
|
mov ecx, [pg_data.kernel_tables-OS_BASE] ; build some PDEs to hold empty PTEs
|
||||||
mov eax, [tmp_page_tabs]
|
mov eax, [tmp_page_tabs]
|
||||||
or eax, PG_SW
|
or eax, PG_SW
|
||||||
mov edi, edx ; edi = sys_pgdir+0x804
|
mov edi, edx ; edi = sys_pgdir+0x804
|
||||||
|
|
||||||
.map_kernel_tabs:
|
.map_kernel_tabs:
|
||||||
stosd
|
stosd
|
||||||
add eax, 0x1000
|
add eax, 0x1000
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
;; on all copies.
|
;; on all copies.
|
||||||
;;
|
;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
include 'macros.inc'
|
include 'macros.inc'
|
||||||
|
|
||||||
$Revision$
|
$Revision$
|
||||||
@ -118,7 +118,7 @@ use16
|
|||||||
|
|
||||||
version db 'Kolibri OS version 0.7.7.0+ ',13,10,13,10,0
|
version db 'Kolibri OS version 0.7.7.0+ ',13,10,13,10,0
|
||||||
|
|
||||||
include "boot/bootstr.inc" ; language-independent boot messages
|
;include "boot/bootstr.inc" ; language-independent boot messages
|
||||||
include "boot/preboot.inc"
|
include "boot/preboot.inc"
|
||||||
|
|
||||||
include "boot/booteng.inc" ; english system boot messages
|
include "boot/booteng.inc" ; english system boot messages
|
||||||
@ -219,7 +219,7 @@ diff16 "32-bit code start ",0,$
|
|||||||
call init_BIOS32 ; (init.inc - to be removed later)
|
call init_BIOS32 ; (init.inc - to be removed later)
|
||||||
|
|
||||||
; PCIe extended config space access
|
; PCIe extended config space access
|
||||||
; call rs7xx_pcie_init ; (bus/HT.inc)
|
; call rs7xx_pcie_init ; (bus/HT.inc)
|
||||||
call fusion_pcie_init ; (bus/HT.inc)
|
call fusion_pcie_init ; (bus/HT.inc)
|
||||||
|
|
||||||
; MEMORY MODEL
|
; MEMORY MODEL
|
||||||
@ -320,33 +320,33 @@ high_code:
|
|||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
mov al, [BOOT_VAR+0x901F] ; DMA access
|
mov al, [BOOT_VAR+0x901F] ; DMA access
|
||||||
mov [allow_dma_access], al
|
mov [allow_dma_access], al
|
||||||
mov eax, 32 ; bpp
|
mov eax, 32 ; bpp
|
||||||
mov [ScreenBPP],al
|
mov [ScreenBPP],al
|
||||||
mov [_display.bpp], eax
|
mov [_display.bpp], eax
|
||||||
|
|
||||||
mov [_display.vrefresh], 60
|
mov [_display.vrefresh], 60
|
||||||
mov [_display.disable_mouse], __sys_disable_mouse
|
mov [_display.disable_mouse], __sys_disable_mouse
|
||||||
|
|
||||||
movzx eax,word [BOOT_VAR+0x900A] ; X max
|
movzx eax,word [BOOT_VAR+0x900A] ; X max
|
||||||
mov [_display.width], eax
|
mov [_display.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [Screen_Max_X],eax
|
mov [Screen_Max_X],eax
|
||||||
mov [screen_workarea.right],eax
|
mov [screen_workarea.right],eax
|
||||||
movzx eax,word [BOOT_VAR+0x900C] ; Y max
|
movzx eax,word [BOOT_VAR+0x900C] ; Y max
|
||||||
mov [_display.height], eax
|
mov [_display.height], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [Screen_Max_Y],eax
|
mov [Screen_Max_Y],eax
|
||||||
mov [screen_workarea.bottom],eax
|
mov [screen_workarea.bottom],eax
|
||||||
movzx eax,word [BOOT_VAR+0x9008] ; screen mode
|
movzx eax,word [BOOT_VAR+0x9008] ; screen mode
|
||||||
mov [SCR_MODE],eax
|
mov [SCR_MODE],eax
|
||||||
|
|
||||||
movzx eax, word[BOOT_VAR+0x9001] ; for other modes
|
movzx eax, word[BOOT_VAR+0x9001] ; for other modes
|
||||||
mov [BytesPerScanLine],ax
|
mov [BytesPerScanLine],ax
|
||||||
mov [_display.pitch], eax
|
mov [_display.pitch], eax
|
||||||
|
|
||||||
mov eax, [_display.width]
|
mov eax, [_display.width]
|
||||||
mul [_display.height]
|
mul [_display.height]
|
||||||
mov [_WinMapSize], eax
|
mov [_WinMapSize], eax
|
||||||
|
|
||||||
mov esi, BOOT_VAR+0x9080
|
mov esi, BOOT_VAR+0x9080
|
||||||
movzx ecx, byte [esi-1]
|
movzx ecx, byte [esi-1]
|
||||||
@ -405,82 +405,82 @@ v20ga32:
|
|||||||
|
|
||||||
; LOAD IDT
|
; LOAD IDT
|
||||||
|
|
||||||
call build_interrupt_table ;lidt is executed
|
call build_interrupt_table ;lidt is executed
|
||||||
|
|
||||||
call init_kernel_heap
|
call init_kernel_heap
|
||||||
stdcall kernel_alloc, RING0_STACK_SIZE+512
|
stdcall kernel_alloc, RING0_STACK_SIZE+512
|
||||||
mov [os_stack_seg], eax
|
mov [os_stack_seg], eax
|
||||||
|
|
||||||
lea esp, [eax+RING0_STACK_SIZE]
|
lea esp, [eax+RING0_STACK_SIZE]
|
||||||
|
|
||||||
mov [tss._ss0], os_stack
|
mov [tss._ss0], os_stack
|
||||||
mov [tss._esp0], esp
|
mov [tss._esp0], esp
|
||||||
mov [tss._esp], esp
|
mov [tss._esp], esp
|
||||||
mov [tss._cs],os_code
|
mov [tss._cs],os_code
|
||||||
mov [tss._ss],os_stack
|
mov [tss._ss],os_stack
|
||||||
mov [tss._ds],app_data
|
mov [tss._ds],app_data
|
||||||
mov [tss._es],app_data
|
mov [tss._es],app_data
|
||||||
mov [tss._fs],app_data
|
mov [tss._fs],app_data
|
||||||
mov [tss._gs],app_data
|
mov [tss._gs],app_data
|
||||||
mov [tss._io],128
|
mov [tss._io],128
|
||||||
;Add IO access table - bit array of permitted ports
|
;Add IO access table - bit array of permitted ports
|
||||||
mov edi, tss._io_map_0
|
mov edi, tss._io_map_0
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ecx, 2047
|
mov ecx, 2047
|
||||||
rep stosd ; access to 65504 ports granted
|
rep stosd ; access to 65504 ports granted
|
||||||
not eax ; the last 32 ports blocked
|
not eax ; the last 32 ports blocked
|
||||||
stosd
|
stosd
|
||||||
|
|
||||||
mov ax,tss0
|
mov ax,tss0
|
||||||
ltr ax
|
ltr ax
|
||||||
|
|
||||||
mov [LFBSize], 0x800000
|
mov [LFBSize], 0x800000
|
||||||
call init_LFB
|
call init_LFB
|
||||||
call init_fpu
|
call init_fpu
|
||||||
call init_malloc
|
call init_malloc
|
||||||
;-
|
;-
|
||||||
stdcall alloc_kernel_space, 0x51000
|
stdcall alloc_kernel_space, 0x51000
|
||||||
mov [default_io_map], eax
|
mov [default_io_map], eax
|
||||||
|
|
||||||
add eax, 0x2000
|
add eax, 0x2000
|
||||||
mov [ipc_tmp], eax
|
mov [ipc_tmp], eax
|
||||||
mov ebx, 0x1000
|
mov ebx, 0x1000
|
||||||
|
|
||||||
add eax, 0x40000
|
add eax, 0x40000
|
||||||
mov [proc_mem_map], eax
|
mov [proc_mem_map], eax
|
||||||
|
|
||||||
add eax, 0x8000
|
add eax, 0x8000
|
||||||
mov [proc_mem_pdir], eax
|
mov [proc_mem_pdir], eax
|
||||||
|
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov [proc_mem_tab], eax
|
mov [proc_mem_tab], eax
|
||||||
|
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov [tmp_task_pdir], eax
|
mov [tmp_task_pdir], eax
|
||||||
|
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov [tmp_task_ptab], eax
|
mov [tmp_task_ptab], eax
|
||||||
|
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov [ipc_pdir], eax
|
mov [ipc_pdir], eax
|
||||||
|
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
mov [ipc_ptab], eax
|
mov [ipc_ptab], eax
|
||||||
|
|
||||||
stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
|
stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
|
||||||
(unpack.lc+unpack.lp)))*4
|
(unpack.lc+unpack.lp)))*4
|
||||||
|
|
||||||
mov [unpack.p], eax
|
mov [unpack.p], eax
|
||||||
|
|
||||||
call init_events
|
call init_events
|
||||||
mov eax, srv.fd-SRV_FD_OFFSET
|
mov eax, srv.fd-SRV_FD_OFFSET
|
||||||
mov [srv.fd], eax
|
mov [srv.fd], eax
|
||||||
mov [srv.bk], eax
|
mov [srv.bk], eax
|
||||||
|
|
||||||
mov edi, irq_tab
|
mov edi, irq_tab
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ecx, 16
|
mov ecx, 16
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
;Set base of graphic segment to linear address of LFB
|
;Set base of graphic segment to linear address of LFB
|
||||||
mov eax,[LFBAddress] ; set for gs
|
mov eax,[LFBAddress] ; set for gs
|
||||||
@ -488,11 +488,11 @@ v20ga32:
|
|||||||
shr eax,16
|
shr eax,16
|
||||||
mov [graph_data_l+4],al
|
mov [graph_data_l+4],al
|
||||||
mov [graph_data_l+7],ah
|
mov [graph_data_l+7],ah
|
||||||
|
|
||||||
; or [KERNEL_ALLOC_FLAG], dword PG_NOCACHE
|
; or [KERNEL_ALLOC_FLAG], dword PG_NOCACHE
|
||||||
stdcall kernel_alloc, [_WinMapSize]
|
stdcall kernel_alloc, [_WinMapSize]
|
||||||
mov [_WinMapAddress], eax
|
mov [_WinMapAddress], eax
|
||||||
; xor [KERNEL_ALLOC_FLAG], dword PG_NOCACHE
|
; xor [KERNEL_ALLOC_FLAG], dword PG_NOCACHE
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
inc eax
|
inc eax
|
||||||
@ -544,11 +544,11 @@ v20ga32:
|
|||||||
out 0xA1, al
|
out 0xA1, al
|
||||||
|
|
||||||
; Enable interrupts in IDE controller
|
; Enable interrupts in IDE controller
|
||||||
mov al, 0
|
mov al, 0
|
||||||
mov dx, 0x3F6
|
mov dx, 0x3F6
|
||||||
out dx, al
|
out dx, al
|
||||||
mov dl, 0x76
|
mov dl, 0x76
|
||||||
out dx, al
|
out dx, al
|
||||||
|
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
include 'detect/disks.inc'
|
include 'detect/disks.inc'
|
||||||
@ -559,7 +559,7 @@ include 'detect/disks.inc'
|
|||||||
; READ RAMDISK IMAGE FROM HD
|
; READ RAMDISK IMAGE FROM HD
|
||||||
|
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
include 'boot/rdload.inc'
|
;include 'boot/rdload.inc'
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
; mov [dma_hdd],1
|
; mov [dma_hdd],1
|
||||||
; CALCULATE FAT CHAIN FOR RAMDISK
|
; CALCULATE FAT CHAIN FOR RAMDISK
|
||||||
@ -626,8 +626,8 @@ end if
|
|||||||
|
|
||||||
mov esi,boot_bgr
|
mov esi,boot_bgr
|
||||||
call boot_log
|
call boot_log
|
||||||
call init_background ;
|
call init_background ;
|
||||||
call calculatebackground
|
call calculatebackground
|
||||||
|
|
||||||
; SET UP OS TASK
|
; SET UP OS TASK
|
||||||
|
|
||||||
@ -654,7 +654,7 @@ end if
|
|||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
|
mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
|
||||||
mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
|
mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
|
||||||
|
|
||||||
@ -726,9 +726,9 @@ end if
|
|||||||
|
|
||||||
mov esi,boot_setmouse
|
mov esi,boot_setmouse
|
||||||
call boot_log
|
call boot_log
|
||||||
; call setmouse
|
; call setmouse
|
||||||
; mov [MOUSE_PICTURE],dword mousepointer
|
; mov [MOUSE_PICTURE],dword mousepointer
|
||||||
cli
|
cli
|
||||||
|
|
||||||
; STACK AND FDC
|
; STACK AND FDC
|
||||||
|
|
||||||
@ -752,11 +752,6 @@ end if
|
|||||||
stdcall map_page,tss._io_map_1,\
|
stdcall map_page,tss._io_map_1,\
|
||||||
[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
|
[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
|
||||||
|
|
||||||
mov ax,[OS_BASE+0x10000+bx_from_load]
|
|
||||||
cmp ax,'r1' ; if not rused ram disk - load network configuration from files {SPraid.simba}
|
|
||||||
je no_st_network
|
|
||||||
call set_network_conf
|
|
||||||
no_st_network:
|
|
||||||
|
|
||||||
call init_userDMA ; <<<<<<<<< ============== core/memory.inc =================
|
call init_userDMA ; <<<<<<<<< ============== core/memory.inc =================
|
||||||
mov esi, boot_uDMA_ok
|
mov esi, boot_uDMA_ok
|
||||||
@ -2515,8 +2510,8 @@ sys_cpuusage:
|
|||||||
stosb
|
stosb
|
||||||
|
|
||||||
; Event mask (+71)
|
; Event mask (+71)
|
||||||
mov EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
|
mov EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask]
|
||||||
stosd
|
stosd
|
||||||
|
|
||||||
pop esi
|
pop esi
|
||||||
pop edi
|
pop edi
|
||||||
@ -2891,7 +2886,7 @@ redrawscreen:
|
|||||||
pushad
|
pushad
|
||||||
push eax
|
push eax
|
||||||
|
|
||||||
xor ecx,ecx ; redraw flags for apps
|
xor ecx,ecx ; redraw flags for apps
|
||||||
newdw2:
|
newdw2:
|
||||||
|
|
||||||
inc ecx
|
inc ecx
|
||||||
@ -3236,34 +3231,34 @@ sys_putimage:
|
|||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
push edi
|
push edi
|
||||||
mov edi,[current_slot]
|
mov edi,[current_slot]
|
||||||
add dx,word[edi+APPDATA.wnd_clientbox.top]
|
add dx,word[edi+APPDATA.wnd_clientbox.top]
|
||||||
rol edx,16
|
rol edx,16
|
||||||
add dx,word[edi+APPDATA.wnd_clientbox.left]
|
add dx,word[edi+APPDATA.wnd_clientbox.left]
|
||||||
pop edi
|
pop edi
|
||||||
rol edx,16
|
rol edx,16
|
||||||
.forced: ; called from gui/skincode.inc [215]
|
.forced: ; called from gui/skincode.inc [215]
|
||||||
push esi
|
push esi
|
||||||
mov esi, ecx
|
mov esi, ecx
|
||||||
shr esi, 16 ; SizeX
|
shr esi, 16 ; SizeX
|
||||||
lea esi, [esi*2+esi] ; 3 bytes per pixel
|
lea esi, [esi*2+esi] ; 3 bytes per pixel
|
||||||
mov [img_buf_line_size], esi
|
mov [img_buf_line_size], esi
|
||||||
mov [img_draw_core_fn], draw_core_24bpp
|
mov [img_draw_core_fn], draw_core_24bpp
|
||||||
mov [img_draw_edge_fn], draw_edge_24bpp
|
mov [img_draw_edge_fn], draw_edge_24bpp
|
||||||
mov [img_bytes_per_pix], 3
|
mov [img_bytes_per_pix], 3
|
||||||
pop esi
|
pop esi
|
||||||
|
|
||||||
sys_putimage_bpp: ; only called from sys_putimage_palette
|
sys_putimage_bpp: ; only called from sys_putimage_palette
|
||||||
inc [mouse_pause]
|
inc [mouse_pause]
|
||||||
call _putimage
|
call _putimage
|
||||||
dec [mouse_pause]
|
dec [mouse_pause]
|
||||||
call [draw_pointer]
|
call [draw_pointer]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
sys_putimage_palette: ; sysFn 65
|
sys_putimage_palette: ; sysFn 65
|
||||||
; ebx = pointer to image
|
; ebx = pointer to image
|
||||||
; ecx = [xsize]*65536 + [ysize]
|
; ecx = [xsize]*65536 + [ysize]
|
||||||
; edx = [xstart]*65536 + [ystart]
|
; edx = [xstart]*65536 + [ystart]
|
||||||
@ -3277,52 +3272,52 @@ sys_putimage_palette: ; sysFn 65
|
|||||||
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
.forced:
|
.forced:
|
||||||
push eax
|
push eax
|
||||||
push esi
|
push esi
|
||||||
mov [img_palette], edi
|
mov [img_palette], edi
|
||||||
mov eax, esi
|
mov eax, esi
|
||||||
cmp eax, 32 ;>32bpp (stupid call)
|
cmp eax, 32 ;>32bpp (stupid call)
|
||||||
ja .exit
|
ja .exit
|
||||||
shr al, 3 ; 0=1bpp or solid color
|
shr al, 3 ; 0=1bpp or solid color
|
||||||
mov [img_bytes_per_pix], eax
|
mov [img_bytes_per_pix], eax
|
||||||
mov esi, [eax*4 + img_core_proc_0]
|
mov esi, [eax*4 + img_core_proc_0]
|
||||||
mov [img_draw_core_fn], esi
|
mov [img_draw_core_fn], esi
|
||||||
mov esi, [eax*4 + img_edge_proc_0]
|
mov esi, [eax*4 + img_edge_proc_0]
|
||||||
mov [img_draw_edge_fn], esi
|
mov [img_draw_edge_fn], esi
|
||||||
mov esi, ecx
|
mov esi, ecx
|
||||||
shr esi, 16 ; esi = SizeX
|
shr esi, 16 ; esi = SizeX
|
||||||
imul esi, eax
|
imul esi, eax
|
||||||
or al, al
|
or al, al
|
||||||
jnz .done
|
jnz .done
|
||||||
mov eax, [esp] ; bits per pixel
|
mov eax, [esp] ; bits per pixel
|
||||||
or al, al
|
or al, al
|
||||||
jz .done
|
jz .done
|
||||||
.1bpp:
|
.1bpp:
|
||||||
add esi, 7
|
add esi, 7
|
||||||
shr esi, 3 ; 8 pixels per byte
|
shr esi, 3 ; 8 pixels per byte
|
||||||
mov [img_draw_edge_fn], draw_edge_1bpp
|
mov [img_draw_edge_fn], draw_edge_1bpp
|
||||||
mov [img_draw_core_fn], draw_core_1bpp
|
mov [img_draw_core_fn], draw_core_1bpp
|
||||||
.done:
|
.done:
|
||||||
add esi, ebp ; + line offset
|
add esi, ebp ; + line offset
|
||||||
mov [img_buf_line_size], esi
|
mov [img_buf_line_size], esi
|
||||||
pop esi
|
pop esi
|
||||||
pop eax
|
pop eax
|
||||||
jmp sys_putimage_bpp
|
jmp sys_putimage_bpp
|
||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
img_core_proc_0 dd draw_core_0bpp
|
img_core_proc_0 dd draw_core_0bpp
|
||||||
img_core_proc_1 dd draw_core_8bpp
|
img_core_proc_1 dd draw_core_8bpp
|
||||||
img_core_proc_2 dd draw_core_16bpp
|
img_core_proc_2 dd draw_core_16bpp
|
||||||
img_core_proc_3 dd draw_core_24bpp
|
img_core_proc_3 dd draw_core_24bpp
|
||||||
img_core_proc_4 dd draw_core_32bpp
|
img_core_proc_4 dd draw_core_32bpp
|
||||||
|
|
||||||
img_edge_proc_0 dd draw_edge_0bpp
|
img_edge_proc_0 dd draw_edge_0bpp
|
||||||
img_edge_proc_1 dd draw_edge_8bpp
|
img_edge_proc_1 dd draw_edge_8bpp
|
||||||
img_edge_proc_2 dd draw_edge_16bpp
|
img_edge_proc_2 dd draw_edge_16bpp
|
||||||
img_edge_proc_3 dd draw_edge_24bpp
|
img_edge_proc_3 dd draw_edge_24bpp
|
||||||
img_edge_proc_4 dd draw_edge_32bpp
|
img_edge_proc_4 dd draw_edge_32bpp
|
||||||
|
|
||||||
end if
|
end if
|
||||||
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
@ -4150,7 +4145,7 @@ syscall_getpixel: ; GetPixel
|
|||||||
div ecx
|
div ecx
|
||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
xchg eax, ebx
|
xchg eax, ebx
|
||||||
call get_pixel ; eax - x, ebx - y
|
call get_pixel ; eax - x, ebx - y
|
||||||
mov [esp + 32], ecx
|
mov [esp + 32], ecx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -64,78 +64,80 @@
|
|||||||
; 3c dword cpu usage in cpu timer tics
|
; 3c dword cpu usage in cpu timer tics
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
; 5000 -> 68FF free (6k6)
|
; 5000 -> 73FF << FLOPPY buffer (9k) - fs/fat12.inc
|
||||||
; 6900 -> 6EFF saved picture under mouse pointer (1k5)
|
|
||||||
;
|
|
||||||
; 6F00 -> 6FFF free (256)
|
|
||||||
;
|
|
||||||
; 7000 -> 7FFF unused? CD driver (4k)
|
|
||||||
;
|
|
||||||
; 8000 -> A3FF used? FLOPPY driver (4k)
|
|
||||||
;
|
|
||||||
; A400 -> B0FF free (3k3), unused ACTIVE_PROC_STACK
|
|
||||||
|
|
||||||
; B100 -> B307 IDT for int_0x00..int_0x40
|
; 7400 -> 78ff << IDT for int_0x00..int_0x40 + reserv
|
||||||
|
|
||||||
; B308 -> BFFF free (3k3)
|
; 7900 -> 7EFF << saved picture under mouse pointer (1k5)
|
||||||
|
;
|
||||||
|
; 7F00 -> 7FFF << SB16_Status (256)
|
||||||
|
;
|
||||||
|
; XX 8000 -> BFFF free (16k) XX
|
||||||
|
; 0x80008000 -> 9FFF ramdisk fat (8k)
|
||||||
|
; 0x8000A000 -> BFFF floppy fat (8k)
|
||||||
|
|
||||||
; C000 -> C3FF window stack C000 no of windows - all in words
|
; C000 -> C3FF window stack C000 no of windows - all in words
|
||||||
; C402 -> C7FF window position in stack
|
; C402 -> C7FF window position in stack
|
||||||
; D000 -> D1FF FDC controller
|
; D000 -> D1FF FDC controller
|
||||||
; D200 -> D3FF FDC controller for Fat12
|
; D200 -> D3FF FDC controller for Fat12
|
||||||
; D400 -> DFFF free (3k)
|
; D400 -> DFFF free (3k)
|
||||||
; E000 byte multitasking started
|
|
||||||
; E020 dword putpixel address
|
; E000 -> F9FF free (6k5)
|
||||||
; E024 dword getpixel address
|
|
||||||
; E030 dword Vesa 1.2 pm bank switch address
|
; FA00 byte no of keys in buffer
|
||||||
; E034 -> F1FF free (4k5)
|
; FA01 byte 'buffer'
|
||||||
; F200 dword mousepicture -pointer
|
; FA02 -> FAFF reserved for keys
|
||||||
; F204 dword mouse appearance counter
|
|
||||||
; F208 -> F2FF free (248)
|
; FB00 byte no of buttons in buffer
|
||||||
; F300 dword x & y temp for windowmove
|
; FB01 dword 'buffer'
|
||||||
; F304 -> F3FF free (252)
|
; FB02 -> FBFF reserved for buttons
|
||||||
; F400 byte no of keys in buffer
|
|
||||||
; F401 byte 'buffer'
|
|
||||||
; F402 -> F4FF reserved for keys
|
|
||||||
; F500 byte no of buttons in buffer
|
|
||||||
; F501 dword 'buffer'
|
|
||||||
; F502 -> F5FF reserved for buttons
|
|
||||||
; F600 dword tsc / second
|
|
||||||
; F604 byte (unused?) mouse port: 1 ps2, 2 com1, 3 com2
|
|
||||||
; F605 -> FAFF free (1k2)
|
|
||||||
; FB00 -> FB0F mouse memory 00 chunk count, that includes:
|
|
||||||
; FB08 word -- mouse H-scroll
|
|
||||||
; FB0A word -- mouse x
|
|
||||||
; FB0C word -- mouse y
|
|
||||||
; FB0E word -- mouse V-scroll
|
|
||||||
; FB10 -> FB17 mouse color mem
|
|
||||||
; FB21 x move
|
|
||||||
; FB22 y move
|
|
||||||
; FB28 high bits temp
|
|
||||||
; FB30 color temp
|
|
||||||
; FB40 byte buttons down
|
|
||||||
; FB44 byte 0 mouse down -> do not draw
|
|
||||||
; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under
|
|
||||||
; FBF1 byte bits per pixel
|
|
||||||
; FC00 -> FCFE com1/ps2 buffer
|
; FC00 -> FCFE com1/ps2 buffer
|
||||||
; FCFF com1/ps2 buffer count starting from FC00
|
; FCFF com1/ps2 buffer count starting from FC00
|
||||||
|
|
||||||
; FD00 -> FDFF free (256)
|
; FD00 -> FDFF free (256)
|
||||||
; FE00 dword screen x size
|
|
||||||
; FE04 dword screen y size
|
; FE00 -> FE0F mouse memory 00 chunk count, that includes:
|
||||||
; FE08 dword screen y multiplier
|
; FE08 word -- mouse H-scroll
|
||||||
; FE0C dword screen mode
|
; FE0A word -- mouse x
|
||||||
; FE10 -> FE73 free (100)
|
; FE0C word -- mouse y
|
||||||
; FE74 dword PCIe extended (memory-mappable) config space - physical address
|
; FE0E word -- mouse V-scroll
|
||||||
; FE78 dword PCIe extended config space limit
|
|
||||||
; FE7C word number of 4M-pages needed to map PCIe config space
|
; FE10 -> FB17 mouse color mem
|
||||||
; FE7E word PCIe bus range (power-ow-two Mbytes)
|
; FE21 x move
|
||||||
; FE80 dword physical address of user-accessible static system buffer
|
; FE22 y move
|
||||||
; FE84 dword physical address of LFB
|
; FE28 high bits temp
|
||||||
; FE88 dword address of button list
|
; FE30 color temp
|
||||||
; FE8C dword memory to use
|
; FE40 byte buttons down
|
||||||
; FE90 -> FEFF free (112)
|
; FE44 byte 0 mouse down -> do not draw
|
||||||
|
; FE4A -> FE4D FE4A-B x-under - FE4C-D y-under
|
||||||
|
|
||||||
|
; FEB8 dword putpixel address
|
||||||
|
; FEBC dword getpixel address
|
||||||
|
; FEC1 byte bits per pixel
|
||||||
|
; FEC4 dword mouse appearance counter
|
||||||
|
; FEC8 dword x & y temp for windowmove
|
||||||
|
; FECC dword tsc / second
|
||||||
|
|
||||||
|
; FED0 dword screen x size
|
||||||
|
; FED4 dword screen y size
|
||||||
|
; FED8 dword screen y multiplier
|
||||||
|
; FEDC dword screen mode
|
||||||
|
|
||||||
|
; FEE4 dword PCIe extended (memory-mappable) config space - physical address
|
||||||
|
; FEE8 dword PCIe extended config space limit
|
||||||
|
; FEEC word number of 4M-pages needed to map PCIe config space
|
||||||
|
; FEEE word PCIe bus range (power-ow-two Mbytes)
|
||||||
|
|
||||||
|
; FEF0 dword physical address of user-accessible static system buffer
|
||||||
|
; FEF4 dword physical address of LFB
|
||||||
|
; FEF8 dword address of button list
|
||||||
|
; FEFC dword memory to use
|
||||||
; FF00 byte 1 = system shutdown request
|
; FF00 byte 1 = system shutdown request
|
||||||
; FF01 byte task activation request?
|
; FF01 byte task activation request?
|
||||||
|
|
||||||
|
; FFE4 -> FFEF background info
|
||||||
; FFF0 byte >0 if redraw background request from app
|
; FFF0 byte >0 if redraw background request from app
|
||||||
; FFF1 byte >0 if background changed
|
; FFF1 byte >0 if background changed
|
||||||
; FFF2 write and read bank in screen
|
; FFF2 write and read bank in screen
|
||||||
@ -143,17 +145,17 @@
|
|||||||
; FFF5 byte 1 do not draw pointer
|
; FFF5 byte 1 do not draw pointer
|
||||||
; FFFF byte do not change task for 1/100 sec.
|
; FFFF byte do not change task for 1/100 sec.
|
||||||
;
|
;
|
||||||
; 0x80010000 -> 6CBFF kernel, 32-bit run-time code (up to 371 Kb)
|
; 0x80010000 -> 6CBFF the kernel (up to 371 Kb)
|
||||||
; in the current version:
|
; in the current version:
|
||||||
; -> 00B3C 16-bit code end
|
; -> 00B3C 16-bit code end
|
||||||
; -> 00C40 16-bit data end
|
; -> 00C40 16-bit data end
|
||||||
; -> 10C40 32-bit code start
|
; -> 10C40 32-bit code start
|
||||||
; -> 2D07E 32-bit code end
|
; -> 2D07E 32-bit code end
|
||||||
; -> 30418..end_of_kernel zero-filled zone after preinit_mem
|
; -> 30418..end_of_kernel zero-filled zone after preinit_mem
|
||||||
; -> 33D63 uninitialized globals start
|
; -> 33D63 uninitialized globals start
|
||||||
; -> 3BF52 end_of_kernel
|
; -> 3BF52 end_of_kernel
|
||||||
; -> 3C000 not used (>200k)
|
; -> 3C000 not used (>200k)
|
||||||
; 0x80050000 -> 090000 zero-filled zone after preinit_mem
|
; 0x80050000 -> 090000 zero-filled zone after preinit_mem
|
||||||
; 0x8006CC00 -> 6DBFF stack at boot time (4Kb)
|
; 0x8006CC00 -> 6DBFF stack at boot time (4Kb)
|
||||||
;
|
;
|
||||||
; 0x8006DC00 -> 6E5FF basic text font II
|
; 0x8006DC00 -> 6E5FF basic text font II
|
||||||
@ -203,23 +205,29 @@
|
|||||||
; BC dword address of debug event memory
|
; BC dword address of debug event memory
|
||||||
; C0 5 dd thread debug registers: DR0,DR1,DR2,DR3,DR7
|
; C0 5 dd thread debug registers: DR0,DR1,DR2,DR3,DR7
|
||||||
;
|
;
|
||||||
; 0x80090000 -> 9FFFF tmp (64k) - unused?
|
; 0x80090000 -> 9FFFF wav device buffer (64k) ; << SB16Buffer
|
||||||
; 0x800A0000 -> AFFFF screen access area
|
; 0x800A0000 -> AFFFF screen access area << VGA legacy buffer
|
||||||
; 0x800B0000 -> FFFFF bios rest in peace -area (320k) ?
|
; 0x800B0000 -> FFFFF bios rest in peace -area (320k), << purpose unknown
|
||||||
; 0x80100000 -> 27FFFF diskette image (1m5)
|
; 0x80100000 -> 283FFF diskette image (1m5)
|
||||||
|
|
||||||
; 0x80280000 -> HEAP_BASE zero-filled zone after preinit_mem
|
; 0x80284000 -> HEAP_BASE zero-filled zone after preinit_mem
|
||||||
; 0x80280000 -> 281FFF ramdisk fat (8k)
|
|
||||||
; 0x80282000 -> 283FFF floppy fat (8k)
|
|
||||||
;
|
;
|
||||||
; 0x80284000 -> 28BFFF HDD DMA AREA (32k)
|
; 0x80284000 -> 28BFFF HDD DMA AREA (32k)
|
||||||
; 0x8028C000 -> 297FFF free (48k)
|
; 0x8028C000 -> 297FFF free (48k)
|
||||||
;
|
;
|
||||||
; 0x80298000 -> 29ffff auxiliary table for background smoothing code (32k)
|
; 0x80298000 -> 29ffff auxiliary table for background smoothing code (32k)
|
||||||
;
|
;
|
||||||
; 0x802A0000 -> 2B00ff wav device buffer (64k)
|
; 0x802A0000 -> 2Bffff free (128k)
|
||||||
; 0x802A0000 -> 2B00ff wav device status (256)
|
; 0x80328000 -> 32FFFF !vrr driver (32k)
|
||||||
; 0x802B0100 -> 2Bffff free (63k8)
|
|
||||||
|
|
||||||
|
; 0x80338000 -> 338FFF draw data - 256 entries (4k)
|
||||||
|
; 00 dword draw limit - x start
|
||||||
|
; 04 dword draw limit - y start
|
||||||
|
; 08 dword draw limit - x end
|
||||||
|
; 0C dword draw limit - y end
|
||||||
|
; 0x80339000 -> 3BFFF3 free (12k)
|
||||||
|
|
||||||
; 0x802C0000 -> 2C3fff button info (8k)
|
; 0x802C0000 -> 2C3fff button info (8k)
|
||||||
;
|
;
|
||||||
; 0000 word number of buttons
|
; 0000 word number of buttons
|
||||||
@ -242,30 +250,21 @@
|
|||||||
; dword end port
|
; dword end port
|
||||||
; dword 0
|
; dword 0
|
||||||
;
|
;
|
||||||
; 0x802E0000 -> 2EFFFF irq data area (64k)
|
; 0x80370000 -> 37FFFF irq data area (64k)
|
||||||
; 0x802F0000 -> 2FFFFF low memory save (64k)
|
; 0x80380000 -> 38FFFF low memory save (64k)
|
||||||
;
|
;
|
||||||
; 0x80300000 -> 31FFFF tcp memory (128k)
|
; 0x80390000 -> 3AFFFF tcp memory (128k)
|
||||||
; 0x80320000 -> 327FFF tcp memory (32k)
|
; 0x803B0000 -> 3B7FFF tcp memory (32k)
|
||||||
;
|
|
||||||
; 0x80328000 -> 32FFFF !vrr driver (32k)
|
|
||||||
|
|
||||||
; 0x80330000 -> 377FFF skin data (32k)
|
; 0x803B8000 -> 3BFFFF skin data (32k)
|
||||||
|
|
||||||
; 0x80338000 -> 338FFF draw data - 256 entries (4k)
|
; 0x803C0000 page map (length b = memsize shr 15)
|
||||||
; 00 dword draw limit - x start
|
; 0x803C0000 + b start of static pagetables
|
||||||
; 04 dword draw limit - y start
|
|
||||||
; 08 dword draw limit - x end
|
|
||||||
; 0C dword draw limit - y end
|
|
||||||
; 0x80339000 -> 3BFFF3 free (12k)
|
|
||||||
; 0x8033BFF4 -> 33BFFF background info
|
|
||||||
; 0x8033C000 page map (length b = memsize shr 15)
|
|
||||||
; 0x8033C000 + b start of static pagetables
|
|
||||||
|
|
||||||
; 0x803FFFFF <- no direct address translation beyond this point
|
; 0x803FFFFF <- no direct address translation beyond this point
|
||||||
; =============================================================
|
; =============================================================
|
||||||
|
|
||||||
; 0x805FF000 -> 5FFF80 TSS
|
; 0x805FF000 -> 5FFF80 TSS
|
||||||
; 0x80600000 -> 601FFF i/o maps
|
; 0x80600000 -> 601FFF i/o maps
|
||||||
|
|
||||||
; 0x80800000 -> kernel heap
|
; 0x80800000 -> kernel heap
|
||||||
|
@ -286,6 +286,7 @@ RAMDISK equ (OS_BASE+0x0100000)
|
|||||||
RAMDISK_FAT equ (OS_BASE+0x0280000)
|
RAMDISK_FAT equ (OS_BASE+0x0280000)
|
||||||
FLOPPY_FAT equ (OS_BASE+0x0282000)
|
FLOPPY_FAT equ (OS_BASE+0x0282000)
|
||||||
|
|
||||||
|
CLEAN_ZONE equ 0x284000
|
||||||
IDE_DMA equ 0x284000
|
IDE_DMA equ 0x284000
|
||||||
|
|
||||||
BgrAuxTable equ (OS_BASE+0x0298000)
|
BgrAuxTable equ (OS_BASE+0x0298000)
|
||||||
@ -311,7 +312,9 @@ BgrDrawMode equ (OS_BASE+0x033BFF4)
|
|||||||
BgrDataWidth equ (OS_BASE+0x033BFF8)
|
BgrDataWidth equ (OS_BASE+0x033BFF8)
|
||||||
BgrDataHeight equ (OS_BASE+0x033BFFC)
|
BgrDataHeight equ (OS_BASE+0x033BFFC)
|
||||||
|
|
||||||
sys_pgmap equ (OS_BASE+0x033C000)
|
BOOT_VAR equ (OS_BASE+0x0340000)
|
||||||
|
|
||||||
|
sys_pgmap equ (OS_BASE+0x0350000)
|
||||||
|
|
||||||
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved.
|
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved.
|
||||||
;; PROGRAMMING:
|
;; PROGRAMMING:
|
||||||
;; Ivan Poddubny
|
;; Ivan Poddubny
|
||||||
;; Marat Zakiyanov (Mario79)
|
;; Marat Zakiyanov (Mario79)
|
||||||
@ -19,6 +19,17 @@
|
|||||||
;; SPraid (simba)
|
;; SPraid (simba)
|
||||||
;; Hidnplayr
|
;; Hidnplayr
|
||||||
;; Alexey Teplov (<Lrz>)
|
;; Alexey Teplov (<Lrz>)
|
||||||
|
;; Rus
|
||||||
|
;; Nable
|
||||||
|
;; shurf
|
||||||
|
;; Alver
|
||||||
|
;; Maxis
|
||||||
|
;; Galkov
|
||||||
|
;; CleverMouse
|
||||||
|
;; tsdima
|
||||||
|
;; turbanoff
|
||||||
|
;; Asper
|
||||||
|
;; art_zh
|
||||||
;;
|
;;
|
||||||
;; Data in this file was originally part of MenuetOS project which is
|
;; Data in this file was originally part of MenuetOS project which is
|
||||||
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
||||||
@ -220,8 +231,8 @@ B32:
|
|||||||
; CLEAR 0x280000 - HEAP_BASE
|
; CLEAR 0x280000 - HEAP_BASE
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edi,0x280000
|
mov edi,CLEAN_ZONE
|
||||||
mov ecx,(HEAP_BASE-OS_BASE-0x280000) / 4
|
mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4
|
||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
@ -237,7 +248,7 @@ B32:
|
|||||||
; SAVE & CLEAR 0-0xffff
|
; SAVE & CLEAR 0-0xffff
|
||||||
|
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
mov edi,0x2F0000
|
mov edi,(BOOT_VAR-OS_BASE)
|
||||||
mov ecx,0x10000 / 4
|
mov ecx,0x10000 / 4
|
||||||
rep movsd
|
rep movsd
|
||||||
mov edi,0x1000
|
mov edi,0x1000
|
||||||
|
Loading…
Reference in New Issue
Block a user