/kernel/branches/Kolibri-A/trunk/boot/bootcode.inc |
---|
20,7 → 20,7 |
; |
;========================================================================== |
if 0 |
putchar: |
; in: al=character |
mov ah, 0Eh |
61,6 → 61,8 |
call setcursor |
} |
end if |
boot_read_floppy: |
push si |
xor si, si |
78,11 → 80,9 |
ret |
sayerr_plain: |
call printplain |
jmp $ |
sayerr: |
call print |
jmp $ |
173,38 → 173,6 |
xor di, di |
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: |
push 0 |
268,16 → 236,6 |
mov [es:0x9044], ax ; Save APM Version |
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 |
xor bx, bx |
int 0x15 |
291,7 → 249,6 |
mov [es:0x9054], dx |
apm_end: |
_setcursor d80x25_top_num, 0 |
;CHECK current of code |
cmp [cfgmanager.loader_block], -1 |
298,7 → 255,6 |
jz noloaderblock |
les bx, [cfgmanager.loader_block] |
cmp byte [es:bx], 1 |
mov si, loader_block_error |
jnz sayerr |
push 0 |
pop es |
344,22 → 300,11 |
cmp byte [di+preboot_biosdisk-preboot_device], 1 |
adc byte [di+preboot_biosdisk-preboot_device], 0 |
_setcursor 7,0 |
mov si, space_msg |
call printplain |
; pop ax ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ?? |
jmp .continue |
.loader_block dd -1 |
.continue: |
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 |
.loadc: |
367,11 → 312,6 |
.cont: |
push cs |
pop ds |
mov si, space_msg |
mov byte [si+80], 0 |
_setcursor 15,0 |
call printplain |
_setcursor 15,0 |
.load: |
; ASK GRAPHICS MODE |
406,8 → 346,6 |
cmp [boot_dev],0 |
jne no_sys_on_floppy |
mov si,diskload |
call print |
xor ax, ax ; reset drive |
xor dx, dx |
int 0x13 |
464,17 → 402,8 |
inc ch |
cmp ch, 80 |
jae ok_sys_on_floppy |
pusha |
mov al, ch |
shr ch, 2 |
add al, ch |
aam |
xchg al, ah |
add ax, '00' |
mov si, pros |
mov [si], ax |
call printplain |
popa |
jmp .a1 |
.nocd: |
; no - read only used sectors from floppy |
704,11 → 633,6 |
aam |
xchg al, ah |
add ax, '00' |
mov si, pros |
cmp [si], ax |
jz @f |
mov [si], ax |
call printplain |
@@: |
popa |
inc di |
717,10 → 641,6 |
pop bx ; clear stack |
ok_sys_on_floppy: |
mov si, backspace2 |
call printplain |
mov si, okt |
call printplain |
no_sys_on_floppy: |
xor ax, ax ; reset drive |
xor dx, dx |
/kernel/branches/Kolibri-A/trunk/boot/booteng.inc |
---|
14,19 → 14,19 |
$Revision$ |
d80x25_bottom: |
db 186,' KolibriOS is based on MenuetOS and comes with ABSOLUTELY ' |
db 'NO WARRANTY ',186 |
db 186,' See file COPYING for details ' |
db ' ',186 |
line_full_bottom |
d80x25_bottom_num = 3 |
;d80x25_bottom: |
; db 186,' KolibriOS is based on MenuetOS and comes with ABSOLUTELY ' |
; db 'NO WARRANTY ',186 |
; db 186,' See file COPYING for details ' |
; db ' ',186 |
; line_full_bottom |
;d80x25_bottom_num = 3 |
msg_apm db " APM x.x ", 0 |
vervesa db "Version of Vesa: Vesa x.x",13,10,0 |
;msg_apm db " APM x.x ", 0 |
;vervesa db "Version of Vesa: Vesa x.x",13,10,0 |
;novesa db "Display: EGA/CGA",13,10,0 |
s_vesa db "Version of VESA: " |
.ver db "?.?",13,10,0 |
;s_vesa db "Version of VESA: " |
; .ver db "?.?",13,10,0 |
;gr_mode db "Select a videomode: ",13,10,0 |
48,11 → 48,11 |
;btns db "Fatal - Can't determine color depth.",0 |
;badsect db 13,10,186," Fatal - Bad sector. Replace floppy.",0 |
;memmovefailed db 13,10,186," Fatal - Int 0x15 move failed.",0 |
okt db " ... OK" |
linef db 13,10,0 |
diskload db "Loading diskette: 00 %",8,8,8,8,0 |
pros db "00" |
backspace2 db 8,8,0 |
;okt db " ... OK" |
;linef db 13,10,0 |
;diskload db "Loading diskette: 00 %",8,8,8,8,0 |
;pros db "00" |
;backspace2 db 8,8,0 |
boot_dev db 0 ; 0=floppy, 1=hd |
;start_msg db "Press [abcd] to change settings, press [Enter] to continue booting",13,10,0 |
;time_msg db " or wait " |
61,6 → 61,6 |
;current_cfg_msg db "cfgmanager.printcfg reached",13,10,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 |
loader_block_error db "Invalid boot data",0 |
;loader_block_error db "Invalid boot data",0 |
/kernel/branches/Kolibri-A/trunk/boot/bootvesa.inc |
---|
115,7 → 115,6 |
;------------------------------------------------------- |
print_vesa_info: |
_setcursor 5,2 |
mov [es:vi.VESASignature],'VBE2' |
mov ax,0x4F00 |
136,23 → 135,7 |
jb $ |
.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 |
;----------------------------------------------------------------------------- |
224,6 → 207,7 |
test si,si |
jnz .no_zero ;if no zero |
.zerro: |
mov word[preboot_graph], ax |
mov ax,1024 |
mov bx,768 |
295,32 → 279,8 |
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: |
push 0 ;0;x1000 |
pop es |
/kernel/branches/Kolibri-A/trunk/boot/preboot.inc |
---|
34,5 → 34,5 |
if $>0x200 |
ERROR: prebooting parameters must fit in first sector!!! |
end if |
hdsysimage db 'KOLIBRI IMG' ; load from |
image_save db 'KOLIBRI IMG' ; save to |
;hdsysimage db 'KOLIBRI IMG' ; load from |
;image_save db 'KOLIBRI IMG' ; save to |
/kernel/branches/Kolibri-A/trunk/bus/pci/pci32.inc |
---|
428,6 → 428,24 |
stdcall user_free, ebx |
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 |
align 4 |
/kernel/branches/Kolibri-A/trunk/const.inc |
---|
194,78 → 194,74 |
TASK_DATA equ (OS_BASE+0x0003020) |
TASK_EVENT equ (OS_BASE+0x0003020) |
mouseunder equ (OS_BASE+0x0006900) |
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) |
FLOPPY_BUFF equ (OS_BASE+0x0005000) |
;unused ? only one reference |
;ENABLE_TASKSWITCH equ (OS_BASE+0x000E000) |
idts equ (OS_BASE+0x0007400) ; sys32.inc |
PUTPIXEL equ (OS_BASE+0x000E020) |
GETPIXEL equ (OS_BASE+0x000E024) |
mouseunder equ (OS_BASE+0x0007900) |
SB16_Status equ (OS_BASE+0x0007F00) ; << |
;unused ? only one reference |
; BANK_SWITCH equ (OS_BASE+0x000E030) ; VESA 1.2 - not used |
RAMDISK_FAT equ (OS_BASE+0x0008000) |
FLOPPY_FAT equ (OS_BASE+0x000A000) ; fs/fat12.inc |
;unused ? store mousepointer |
;MOUSE_PICTURE equ (OS_BASE+0x000F200) ; mousedrv.inc - not used |
WIN_STACK equ (OS_BASE+0x000C000) |
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) |
BTN_BUFF equ (OS_BASE+0x000F501) |
KEY_COUNT equ (OS_BASE+0x000FA00) |
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 |
PS2_CHUNK equ (OS_BASE+0x000FB00) |
;reserved ? mouse buffer space 0xFC00-FCFF |
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) |
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) |
;unused ? |
PS2_CHUNK equ (OS_BASE+0x000FE00) |
MOUSE_SCROLL_H equ (OS_BASE+0x000FE08) |
MOUSE_X equ (OS_BASE+0x000FE0A) |
MOUSE_Y equ (OS_BASE+0x000FE0C) |
MOUSE_SCROLL_V equ (OS_BASE+0x000FE0E) |
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) |
MOUSE_COLOR_MEM equ (OS_BASE+0x000FE10) |
COLOR_TEMP equ (OS_BASE+0x000FE30) |
BTN_DOWN equ (OS_BASE+0x000FE40) |
MOUSE_DOWN equ (OS_BASE+0x000FE44) |
X_UNDER equ (OS_BASE+0x000FE4A) |
Y_UNDER equ (OS_BASE+0x000FE4C) |
;unused ? only one reference |
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) |
PUTPIXEL equ (OS_BASE+0x000FEB8) |
GETPIXEL equ (OS_BASE+0x000FEBC) |
ScreenBPP equ (OS_BASE+0x000FEC1) |
MOUSE_VISIBLE equ (OS_BASE+0x000FEC4) |
WIN_TEMP_XY equ (OS_BASE+0x000FEC8) |
CPU_FREQ equ (OS_BASE+0x000FECC) |
Screen_Max_X equ (OS_BASE+0x000FE00) |
Screen_Max_Y equ (OS_BASE+0x000FE04) |
BytesPerScanLine equ (OS_BASE+0x000FE08) |
SCR_MODE equ (OS_BASE+0x000FE0C) |
Screen_Max_X equ (OS_BASE+0x000FED0) |
Screen_Max_Y equ (OS_BASE+0x000FED4) |
BytesPerScanLine equ (OS_BASE+0x000FED8) |
SCR_MODE equ (OS_BASE+0x000FEDC) |
KERNEL_ALLOC_FLAG equ (OS_BASE+0x000FE70) |
mmio_pcie_cfg_addr equ (OS_BASE+0x000FE74) |
mmio_pcie_cfg_lim equ (OS_BASE+0x000FE78) |
mmio_pcie_cfg_pdes equ (OS_BASE+0x000FE7C) |
PCIe_bus_range equ (OS_BASE+0x000FE7E) |
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+0x000FE80) |
LFBAddress equ (OS_BASE+0x000FE84) |
BTN_ADDR equ (OS_BASE+0x000FE88) |
MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
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) |
BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1) |
BANK_RW equ (OS_BASE+0x000FFF2) |
284,45 → 280,38 |
SLOT_BASE equ (OS_BASE+0x0080000) |
;unused |
TMP_BUFF equ (OS_BASE+0x0090000) |
SB16Buffer equ (OS_BASE+0x0090000) ; << |
VGABasePtr equ (OS_BASE+0x00A0000) |
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) |
; unused? |
SB16Buffer equ (OS_BASE+0x2A0000) |
SB16_Status equ (OS_BASE+0x02B0000) |
IDE_DMA equ 0x03F4000 |
BUTTON_INFO equ (OS_BASE+0x02C0000) |
RESERVED_PORTS equ (OS_BASE+0x02D0000) |
IRQ_SAVE equ (OS_BASE+0x02E0000) |
BOOT_VAR equ (OS_BASE+0x02f0000) |
BgrAuxTable equ (OS_BASE+0x0408000) |
stack_data_start equ (OS_BASE+0x0300000) |
eth_data_start equ (OS_BASE+0x0300000) |
stack_data equ (OS_BASE+0x0304000) |
stack_data_end equ (OS_BASE+0x031ffff) |
resendQ equ (OS_BASE+0x0320000) |
VMODE_BASE equ (OS_BASE+0x0328000) |
skin_data equ (OS_BASE+0x0330000) |
draw_data equ (OS_BASE+0x0338000); |
BUTTON_INFO equ (OS_BASE+0x0430000) |
RESERVED_PORTS equ (OS_BASE+0x0440000) |
IRQ_SAVE equ (OS_BASE+0x0450000) |
BOOT_VAR equ (OS_BASE+0x0460000) |
BgrDrawMode equ (OS_BASE+0x033BFF4) |
BgrDataWidth equ (OS_BASE+0x033BFF8) |
BgrDataHeight equ (OS_BASE+0x033BFFC) |
stack_data_start equ (OS_BASE+0x0470000) |
eth_data_start equ (OS_BASE+0x0470000) |
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 |
end virtual |
/kernel/branches/Kolibri-A/trunk/core/syscall.inc |
---|
155,8 → 155,8 |
align 4 |
servetable3: ; Kolibri-A special service |
dd sys_rdmsr ; 0 |
dd paleholder ; 1 |
dd sys_rdmsr ; 0 = read MSR |
dd sys_map1 ; 1 = map any page (test only) |
dd paleholder ; 2 |
dd sys_end ; last |
/kernel/branches/Kolibri-A/trunk/init.inc |
---|
18,8 → 18,8 |
; clear [0x280000..HEAP_BASE] |
xor eax,eax |
mov edi,0x280000 ; 0x280000 = ramdisk FAT ? |
mov ecx,(HEAP_BASE-OS_BASE-0x280000) / 4 |
mov edi, CLEAN_ZONE ; 0x280000 = ramdisk FAT ? |
mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4 |
cld |
rep stosd |
35,7 → 35,7 |
; save [0..0xffff] |
xor esi, esi |
mov edi,0x2F0000 ; low mem storage area |
mov edi,(BOOT_VAR-OS_BASE) ; low mem storage area |
mov ecx, 0x10000 / 4 |
rep movsd |
; clear [0x1000..0x0ffff] |
83,20 → 83,24 |
mov eax, PG_LARGE+PG_SW |
mov cr4, ebx |
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 |
add edx, 4 |
mov edi, [tmp_page_tabs] |
mov ecx, [pg_data.kernel_pages -OS_BASE] ; safety cleaning of already-zeroed space |
xor eax, eax |
rep stosd |
mov ecx, [pg_data.kernel_pages -OS_BASE] ; map the rest of kernel space |
mov eax, 0x00400000+PG_SW |
.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 eax, [tmp_page_tabs] |
or eax, PG_SW |
mov edi, edx ; edi = sys_pgdir+0x804 |
.map_kernel_tabs: |
stosd |
add eax, 0x1000 |
/kernel/branches/Kolibri-A/trunk/kernel.asm |
---|
118,7 → 118,7 |
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/booteng.inc" ; english system boot messages |
559,7 → 559,7 |
; READ RAMDISK IMAGE FROM HD |
;!!!!!!!!!!!!!!!!!!!!!!! |
include 'boot/rdload.inc' |
;include 'boot/rdload.inc' |
;!!!!!!!!!!!!!!!!!!!!!!! |
; mov [dma_hdd],1 |
; CALCULATE FAT CHAIN FOR RAMDISK |
752,11 → 752,6 |
stdcall map_page,tss._io_map_1,\ |
[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 ================= |
mov esi, boot_uDMA_ok |
/kernel/branches/Kolibri-A/trunk/memmap.inc |
---|
64,78 → 64,80 |
; 3c dword cpu usage in cpu timer tics |
; |
; |
; 5000 -> 68FF free (6k6) |
; 6900 -> 6EFF saved picture under mouse pointer (1k5) |
; 5000 -> 73FF << FLOPPY buffer (9k) - fs/fat12.inc |
; 7400 -> 78ff << IDT for int_0x00..int_0x40 + reserv |
; 7900 -> 7EFF << saved picture under mouse pointer (1k5) |
; |
; 6F00 -> 6FFF free (256) |
; 7F00 -> 7FFF << SB16_Status (256) |
; |
; 7000 -> 7FFF unused? CD driver (4k) |
; |
; 8000 -> A3FF used? FLOPPY driver (4k) |
; |
; A400 -> B0FF free (3k3), unused ACTIVE_PROC_STACK |
; XX 8000 -> BFFF free (16k) XX |
; 0x80008000 -> 9FFF ramdisk fat (8k) |
; 0x8000A000 -> BFFF floppy fat (8k) |
; B100 -> B307 IDT for int_0x00..int_0x40 |
; B308 -> BFFF free (3k3) |
; C000 -> C3FF window stack C000 no of windows - all in words |
; C402 -> C7FF window position in stack |
; D000 -> D1FF FDC controller |
; D200 -> D3FF FDC controller for Fat12 |
; D400 -> DFFF free (3k) |
; E000 byte multitasking started |
; E020 dword putpixel address |
; E024 dword getpixel address |
; E030 dword Vesa 1.2 pm bank switch address |
; E034 -> F1FF free (4k5) |
; F200 dword mousepicture -pointer |
; F204 dword mouse appearance counter |
; F208 -> F2FF free (248) |
; F300 dword x & y temp for windowmove |
; F304 -> F3FF free (252) |
; 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 |
; E000 -> F9FF free (6k5) |
; FA00 byte no of keys in buffer |
; FA01 byte 'buffer' |
; FA02 -> FAFF reserved for keys |
; FB00 byte no of buttons in buffer |
; FB01 dword 'buffer' |
; FB02 -> FBFF reserved for buttons |
; FC00 -> FCFE com1/ps2 buffer |
; FCFF com1/ps2 buffer count starting from FC00 |
; FD00 -> FDFF free (256) |
; FE00 dword screen x size |
; FE04 dword screen y size |
; FE08 dword screen y multiplier |
; FE0C dword screen mode |
; FE10 -> FE73 free (100) |
; FE74 dword PCIe extended (memory-mappable) config space - physical address |
; FE78 dword PCIe extended config space limit |
; FE7C word number of 4M-pages needed to map PCIe config space |
; FE7E word PCIe bus range (power-ow-two Mbytes) |
; FE80 dword physical address of user-accessible static system buffer |
; FE84 dword physical address of LFB |
; FE88 dword address of button list |
; FE8C dword memory to use |
; FE90 -> FEFF free (112) |
; FE00 -> FE0F mouse memory 00 chunk count, that includes: |
; FE08 word -- mouse H-scroll |
; FE0A word -- mouse x |
; FE0C word -- mouse y |
; FE0E word -- mouse V-scroll |
; FE10 -> FB17 mouse color mem |
; FE21 x move |
; FE22 y move |
; FE28 high bits temp |
; FE30 color temp |
; FE40 byte buttons down |
; 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 |
; FF01 byte task activation request? |
; FFE4 -> FFEF background info |
; FFF0 byte >0 if redraw background request from app |
; FFF1 byte >0 if background changed |
; FFF2 write and read bank in screen |
143,7 → 145,7 |
; FFF5 byte 1 do not draw pointer |
; 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: |
; -> 00B3C 16-bit code end |
; -> 00C40 16-bit data end |
203,14 → 205,12 |
; BC dword address of debug event memory |
; C0 5 dd thread debug registers: DR0,DR1,DR2,DR3,DR7 |
; |
; 0x80090000 -> 9FFFF tmp (64k) - unused? |
; 0x800A0000 -> AFFFF screen access area |
; 0x800B0000 -> FFFFF bios rest in peace -area (320k) ? |
; 0x80100000 -> 27FFFF diskette image (1m5) |
; 0x80090000 -> 9FFFF wav device buffer (64k) ; << SB16Buffer |
; 0x800A0000 -> AFFFF screen access area << VGA legacy buffer |
; 0x800B0000 -> FFFFF bios rest in peace -area (320k), << purpose unknown |
; 0x80100000 -> 283FFF diskette image (1m5) |
; 0x80280000 -> HEAP_BASE zero-filled zone after preinit_mem |
; 0x80280000 -> 281FFF ramdisk fat (8k) |
; 0x80282000 -> 283FFF floppy fat (8k) |
; 0x80284000 -> HEAP_BASE zero-filled zone after preinit_mem |
; |
; 0x80284000 -> 28BFFF HDD DMA AREA (32k) |
; 0x8028C000 -> 297FFF free (48k) |
217,9 → 217,17 |
; |
; 0x80298000 -> 29ffff auxiliary table for background smoothing code (32k) |
; |
; 0x802A0000 -> 2B00ff wav device buffer (64k) |
; 0x802A0000 -> 2B00ff wav device status (256) |
; 0x802B0100 -> 2Bffff free (63k8) |
; 0x802A0000 -> 2Bffff free (128k) |
; 0x80328000 -> 32FFFF !vrr driver (32k) |
; 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) |
; |
; 0000 word number of buttons |
242,25 → 250,16 |
; dword end port |
; dword 0 |
; |
; 0x802E0000 -> 2EFFFF irq data area (64k) |
; 0x802F0000 -> 2FFFFF low memory save (64k) |
; 0x80370000 -> 37FFFF irq data area (64k) |
; 0x80380000 -> 38FFFF low memory save (64k) |
; |
; 0x80300000 -> 31FFFF tcp memory (128k) |
; 0x80320000 -> 327FFF tcp memory (32k) |
; |
; 0x80328000 -> 32FFFF !vrr driver (32k) |
; 0x80390000 -> 3AFFFF tcp memory (128k) |
; 0x803B0000 -> 3B7FFF tcp memory (32k) |
; 0x80330000 -> 377FFF skin data (32k) |
; 0x803B8000 -> 3BFFFF skin data (32k) |
; 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) |
; 0x8033BFF4 -> 33BFFF background info |
; 0x8033C000 page map (length b = memsize shr 15) |
; 0x8033C000 + b start of static pagetables |
; 0x803C0000 page map (length b = memsize shr 15) |
; 0x803C0000 + b start of static pagetables |
; 0x803FFFFF <- no direct address translation beyond this point |
; ============================================================= |
/kernel/trunk/const.inc |
---|
286,6 → 286,7 |
RAMDISK_FAT equ (OS_BASE+0x0280000) |
FLOPPY_FAT equ (OS_BASE+0x0282000) |
CLEAN_ZONE equ 0x284000 |
IDE_DMA equ 0x284000 |
BgrAuxTable equ (OS_BASE+0x0298000) |
311,8 → 312,10 |
BgrDataWidth equ (OS_BASE+0x033BFF8) |
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) |
virtual at (OS_BASE+0x05FFF80) |
/kernel/trunk/kernel.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; |
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved. |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. |
;; PROGRAMMING: |
;; Ivan Poddubny |
;; Marat Zakiyanov (Mario79) |
19,6 → 19,17 |
;; SPraid (simba) |
;; Hidnplayr |
;; 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 |
;; distributed under the terms of GNU GPL. It is modified and redistributed as |
220,8 → 231,8 |
; CLEAR 0x280000 - HEAP_BASE |
xor eax,eax |
mov edi,0x280000 |
mov ecx,(HEAP_BASE-OS_BASE-0x280000) / 4 |
mov edi,CLEAN_ZONE |
mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4 |
cld |
rep stosd |
237,7 → 248,7 |
; SAVE & CLEAR 0-0xffff |
xor esi, esi |
mov edi,0x2F0000 |
mov edi,(BOOT_VAR-OS_BASE) |
mov ecx,0x10000 / 4 |
rep movsd |
mov edi,0x1000 |