/kernel/branches/Kolibri-acpi/const.inc |
---|
203,9 → 203,6 |
WIN_POS equ (OS_BASE+0x000C400) |
FDD_BUFF equ (OS_BASE+0x000D000) |
;unused ? only one reference |
ENABLE_TASKSWITCH equ (OS_BASE+0x000E000) |
PUTPIXEL equ (OS_BASE+0x000E020) |
GETPIXEL equ (OS_BASE+0x000E024) |
286,7 → 283,6 |
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) |
312,10 → 308,8 |
BgrDataWidth equ (OS_BASE+0x033BFF8) |
BgrDataHeight equ (OS_BASE+0x033BFFC) |
BOOT_VAR equ (OS_BASE+0x0340000) |
sys_pgmap equ (OS_BASE+0x033C000) |
sys_pgmap equ (OS_BASE+0x0350000) |
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
virtual at (OS_BASE+0x05FFF80) |
/kernel/branches/Kolibri-acpi/core/apic.inc |
---|
8,7 → 8,7 |
IRQ_RESERVE = 24 ; 16 or 24 |
iglobal |
IRQ_COUNT dd 24 |
IRQ_COUNT dd 16 |
endg |
uglobal |
45,8 → 45,8 |
APIC_init: |
mov dword[APIC], 0 |
; jmp .no_apic ; NO APIC |
; bt [cpu_caps], CAPS_APIC |
; jnc .no_apic |
bt [cpu_caps], CAPS_APIC |
jnc .no_apic |
; Check for MP table |
;..... |
96,12 → 96,6 |
call LAPIC_init |
mov dword[APIC], 0xffffffff |
mov al, 0x70 |
out 0x22, al |
mov al, 1 |
out 0x23, al |
; mov dword[irq_type_to_set], IRQ_TYPE_APIC |
.no_apic: |
ret |
/kernel/branches/Kolibri-acpi/core/dll.inc |
---|
17,9 → 17,6 |
align 4 |
proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword |
pushfd |
cli |
push ebx |
mov ebx, [irq] ;irq num |
49,12 → 46,10 |
stdcall enable_irq, [irq] |
pop ebx |
mov eax, 1 |
popfd |
ret |
.err: |
pop ebx |
xor eax, eax |
popfd |
ret |
endp |
105,7 → 100,7 |
jmp .main |
} |
irq_serv_h 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15 |
irq_serv_h 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12 |
; I don`t known how to use IRQ_RESERVE |
if IRQ_RESERVE > 16 |
123,26 → 118,6 |
cmp [v86_irqhooks+eax*8], 0 |
jnz v86_irq |
cmp al, 6 |
jnz @f |
push eax |
call [fdc_irq_func] |
pop eax |
@@: |
cmp al, 14 |
jnz @f |
push eax |
call [irq14_func] |
pop eax |
@@: |
cmp al, 15 |
jnz @f |
push eax |
call [irq15_func] |
pop eax |
@@: |
mov ebx, [irq_tab+eax*4] |
test ebx, ebx |
jz .exit |
/kernel/branches/Kolibri-acpi/core/sys32.inc |
---|
46,9 → 46,11 |
else |
dd p_irq3, p_irq4 ;??? íåñòûêîâêà |
end if |
dd irq_serv.irq_5, irq_serv.irq_6, irq_serv.irq_7 |
dd irq_serv.irq_5, p_irq6, irq_serv.irq_7 |
dd irq_serv.irq_8, irq_serv.irq_9, irq_serv.irq_10 |
dd irq_serv.irq_11, irq_serv.irq_12, irqD, irq_serv.irq_14, irq_serv.irq_15 |
dd irq_serv.irq_11, irq_serv.irq_12 |
dd irq13 |
dd p_irq14,p_irq15 |
; I don`t known how to use IRQ_RESERVE |
if IRQ_RESERVE > 16 |
dd irq_serv.irq_16 |
206,14 → 208,6 |
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
; bl - error vector |
show_error_parameters: |
cmp bl, 0x06 |
jnz .no_ud |
push ebx |
mov ebx, ud_user_message |
mov ebp, notifyapp |
call fs_execute_from_sysdir_param |
pop ebx |
.no_ud: |
mov edx,[TASK_BASE] ;not scratched below |
DEBUGF 1, "K : Process - forced terminate PID: %x\n", [edx+TASKDATA.pid] |
cmp bl, 0x08 |
/kernel/branches/Kolibri-acpi/core/memory.inc |
---|
1426,7 → 1426,7 |
mov ebx, [size] |
dec ebx |
mov eax, 0xFFFFFFFF |
mov edx, 0x00000000 |
mov edx, 0x0000000F |
sub eax, ebx |
sbb edx, 0 |
or eax, 0x800 |
/kernel/branches/Kolibri-acpi/core/peload.inc |
---|
322,10 → 322,8 |
unmap_pages, 'UnmapPages', \ ; eax, ecx |
sys_msg_board_str, 'SysMsgBoardStr', \ |
get_timer_ticks, 'GetTimerTicks', \ |
get_stack_base, 'GetStackBase', \ |
delay_hs, 'Delay', \ ; ebx |
set_mouse_data, 'SetMouseData', \ ; |
set_keyboard_data, 'SetKeyboardData' ; gcc fastcall |
set_mouse_data, 'SetMouseData' |
/kernel/branches/Kolibri-acpi/core/exports.inc |
---|
75,9 → 75,6 |
szSleep db 'Sleep',0 |
szGetTimerTicks db 'GetTimerTicks',0 |
szGetDisplay db 'GetDisplay',0 |
szSetScreen db 'SetScreen',0 |
szStrncat db 'strncat',0 |
szStrncpy db 'strncpy',0 |
szstrncmp db 'strncmp',0 |
150,9 → 147,6 |
dd szSleep , delay_ms |
dd szGetTimerTicks , get_timer_ticks |
dd szGetDisplay , get_display |
dd szSetScreen , set_screen |
dd szStrncat , strncat |
dd szStrncpy , strncpy |
dd szstrncmp , strncmp |
/kernel/branches/Kolibri-acpi/core/syscall.inc |
---|
193,7 → 193,6 |
dd file_system_lfn ; 70-Common file system interface, version 2 |
dd syscall_window_settings ; 71-Window settings |
dd sys_sendwindowmsg ; 72-Send window message |
dd blit_32 ; blitter; |
times 255 - ( ($-servetable2) /4 ) dd undefined_syscall |
dd sys_end ; -1-end application |
/kernel/branches/Kolibri-acpi/core/taskman.inc |
---|
48,7 → 48,6 |
fs_execute_from_sysdir: |
xor ebx, ebx |
fs_execute_from_sysdir_param: |
xor edx, edx |
mov esi, sysdir_path |
1167,13 → 1166,4 |
ret |
endp |
align 4 |
get_stack_base: |
mov eax,[current_slot] |
mov eax,[eax+APPDATA.pl0_stack] |
ret |
include "debug.inc" |
/kernel/branches/Kolibri-acpi/data32.inc |
---|
98,12 → 98,6 |
read_firstapp db '/sys/' |
firstapp db 'LAUNCHER',0 |
notifyapp db '@notify',0 |
if lang eq ru |
ud_user_message db '訡ª : ¥¯®¤¤¥à¦¨¢ ¥¬ ï ¨áâàãªæ¨ï ¯à®æ¥áá®à ',0 |
else |
ud_user_message db 'Error: unsupported processor instruction',0 |
end if |
char db '/sys/FONTS/CHAR.MT',0 |
char2 db '/sys/FONTS/CHAR2.MT',0 |
/kernel/branches/Kolibri-acpi/kernel.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. |
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved. |
;; PROGRAMMING: |
;; Ivan Poddubny |
;; Marat Zakiyanov (Mario79) |
19,17 → 19,6 |
;; 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 |
231,8 → 220,8 |
; CLEAR 0x280000 - HEAP_BASE |
xor eax,eax |
mov edi,CLEAN_ZONE |
mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4 |
mov edi,0x280000 |
mov ecx,(HEAP_BASE-OS_BASE-0x280000) / 4 |
cld |
rep stosd |
248,7 → 237,7 |
; SAVE & CLEAR 0-0xffff |
xor esi, esi |
mov edi,(BOOT_VAR-OS_BASE) |
mov edi,0x2F0000 |
mov ecx,0x10000 / 4 |
rep movsd |
mov edi,0x1000 |
616,8 → 605,6 |
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15) |
; they are used: when partitions are scanned, hd_read relies on timer |
call unmask_timer |
stdcall enable_irq, 12 |
stdcall enable_irq, 1 |
stdcall enable_irq, 14 |
stdcall enable_irq, 15 |
634,14 → 621,11 |
call Parser_params |
if ~ defined extended_primary_loader |
; ramdisk image should be loaded by extended primary loader if it exists |
; READ RAMDISK IMAGE FROM HD |
;!!!!!!!!!!!!!!!!!!!!!!! |
include 'boot/rdload.inc' |
;!!!!!!!!!!!!!!!!!!!!!!! |
end if |
; mov [dma_hdd],1 |
; CALCULATE FAT CHAIN FOR RAMDISK |
796,9 → 780,6 |
mov [CPU_FREQ],eax ; save tsc / sec |
; mov ebx, 1000000 |
; div ebx |
; ¢®®¡é¥-â® ¯à®¨§¢®¤¨â¥«ì®áâì ¢ ¤ ®¬ ª®ªà¥â®¬ ¬¥á⥠|
; ᮢ¥à襮 ¥ªà¨â¨ç , ® çâ®¡ë § âªãâì «î¡¨â¥«¥© |
; ®¯â¨¬¨§¨àãîé¨å ª®¬¯¨«ïâ®à®¢ ... |
mov edx, 2251799814 |
mul edx |
shr edx, 19 |
979,7 → 960,7 |
end if |
; START MULTITASKING |
;-=-=-=-=-=-=- START MULTITASKING -=-=-=-=-=-=-=-=- |
; A 'All set - press ESC to start' messages if need |
if preboot_blogesc |
2794,10 → 2775,6 |
mov al, [ecx+window_data+WDATA.fl_wstate] |
stosb |
; Event mask (+71) |
mov EAX, dword [ECX+CURRENT_TASK+TASKDATA.event_mask] |
stosd |
pop esi |
pop edi |
5074,7 → 5051,6 |
yes_shutdown_param: |
cli |
if ~ defined extended_primary_loader |
mov eax, kernel_file ; load kernel.mnt to 0x7000:0 |
push 12 |
pop esi |
5087,9 → 5063,8 |
mov edi,OS_BASE+0x40000 |
mov ecx,1000 |
rep movsb |
end if |
mov esi, BOOT_VAR ; restore 0x0 - 0xffff |
mov esi,OS_BASE+0x2F0000 ; restore 0x0 - 0xffff |
mov edi, OS_BASE |
mov ecx,0x10000/4 |
cld |
/kernel/branches/Kolibri-acpi/kernel32.inc |
---|
144,7 → 144,7 |
.ev_count_ dd ? ;unused ;+20 |
.exc_handler dd ? ;+24 |
.except_mask dd ? ;+28 |
.pl0_stack dd ? ;+32 |
.pl0_stack dd ? ;unused ;+32 |
.heap_base dd ? ;+36 |
.heap_top dd ? ;+40 |
.cursor dd ? ;+44 |
250,7 → 250,6 |
include "video/vesa12.inc" ; Vesa 1.2 functions |
include "video/vesa20.inc" ; Vesa 2.0 functions |
include "video/blitter.inc" ; |
include "video/vga.inc" ; VGA 16 color functions |
include "video/cursors.inc" ; cursors functions |
/kernel/branches/Kolibri-acpi/bus/pci/pci32.inc |
---|
569,9 → 569,9 |
cmp ebp, 1 ; PCI_FUNCTION_ID |
jnz .not_PCI_BIOS_PRESENT |
mov edx, 'PCI ' |
mov al, [BOOT_VAR + 0x9020] |
mov bx, [BOOT_VAR + 0x9022] |
mov cl, [BOOT_VAR + 0x9021] |
mov al, [OS_BASE+0x2F0000 + 0x9020] |
mov bx, [OS_BASE+0x2F0000 + 0x9022] |
mov cl, [OS_BASE+0x2F0000 + 0x9021] |
xor ah, ah |
jmp .return_abcd |
/kernel/branches/Kolibri-acpi/drivers/imports.inc |
---|
90,6 → 90,4 |
strchr,\ |
strrchr,\ |
\ |
LFBAddress,\ |
GetDisplay,\ |
SetScreen |
LFBAddress |
/kernel/branches/Kolibri-acpi/drivers/sb16/sb16.asm |
---|
7,7 → 7,7 |
format MS COFF |
include 'CONFIG.INC' |
include 'config.inc' |
;structs---------------------------------------------------------- |
struc IOCTL |
33,7 → 33,7 |
section '.flat' code readable align 16 |
include 'SB16.INC' |
include 'sb16.inc' |
;------------------------------------------------------------------------------- |
proc START stdcall, state:dword |
/kernel/branches/Kolibri-acpi/drivers/infinity.asm |
---|
55,7 → 55,6 |
DEV_PLAY equ 1 |
DEV_STOP equ 2 |
DEV_CALLBACK equ 3 |
DEV_GET_POS equ 9 |
struc IOCTL |
{ .handle dd ? |
160,65 → 159,14 |
output equ IOCTL.output |
out_size equ IOCTL.out_size |
align 4 |
srv_calls dd service_proc.srv_getversion ; 0 |
dd service_proc.snd_create_buff ; 1 |
dd service_proc.snd_destroy_buff ; 2 |
dd service_proc.snd_setformat ; 3 |
dd service_proc.snd_getformat ; 4 |
dd service_proc.snd_reset ; 5 |
dd service_proc.snd_setpos ; 6 |
dd service_proc.snd_getpos ; 7 |
dd service_proc.snd_setbuff ; 8 |
dd service_proc.snd_out ; 9 |
dd service_proc.snd_play ; 10 |
dd service_proc.snd_stop ; 11 |
dd service_proc.snd_setvolume ; 12 |
dd service_proc.snd_getvolume ; 13 |
dd service_proc.snd_setpan ; 14 |
dd service_proc.snd_getpan ; 15 |
dd service_proc.snd_getbuffsize ; 16 |
dd service_proc.snd_getfreespace ; 17 |
dd service_proc.snd_settimebase ; 18 |
dd service_proc.snd_gettimestamp ; 19 |
srv_calls_end: |
proc service_proc stdcall, ioctl:dword |
mov edi, [ioctl] |
mov eax, [edi+io_code] |
cmp eax, (srv_calls_end-srv_calls)/4 |
ja .fail |
cmp eax, SND_DESTROY_BUFF |
jb @F |
; cmp [edi+inp_size], 4 |
; jb .fali |
mov ebx, [edi+input] |
mov edx, [ebx] |
cmp [edx+STREAM.magic], 'WAVE' |
jne .fail |
cmp [edx+STREAM.size], STREAM.sizeof |
jne .fail |
@@: |
jmp [srv_calls+eax*4] |
.fail: |
mov eax, -1 |
ret |
align 4 |
.srv_getversion: |
cmp eax, SRV_GETVERSION |
jne @F |
mov eax, [edi+output] |
cmp [edi+out_size], 4 |
jne .fail |
226,9 → 174,9 |
mov [eax], dword API_VERSION |
xor eax, eax |
ret |
align 4 |
.snd_create_buff: |
@@: |
cmp eax, SND_CREATE_BUFF |
jne @F |
mov ebx, [edi+input] |
stdcall CreateBuffer,[ebx],[ebx+4] |
mov edi, [ioctl] |
236,20 → 184,30 |
mov ecx, [ecx] |
mov [ecx], ebx |
ret |
@@: |
mov ebx, [edi+input] |
mov edx, [ebx] |
align 4 |
.snd_destroy_buff: |
cmp [edx+STREAM.magic], 'WAVE' |
jne .fail |
cmp [edx+STREAM.size], STREAM_SIZE |
jne .fail |
cmp eax, SND_DESTROY_BUFF |
jne @F |
mov eax, edx |
call DestroyBuffer |
call DestroyBuffer ;edx= stream |
ret |
align 4 |
.snd_setformat: |
@@: |
cmp eax, SND_SETFORMAT |
jne @F |
stdcall SetFormat, edx,[ebx+4] |
ret |
@@: |
cmp eax, SND_GETFORMAT |
jne @F |
align 4 |
.snd_getformat: |
movzx eax, word [edx+STREAM.format] |
mov ecx, [edi+output] |
mov ecx, [ecx] |
256,19 → 214,19 |
mov [ecx], eax |
xor eax, eax |
ret |
align 4 |
.snd_reset: |
@@: |
cmp eax, SND_RESET |
jne @F |
stdcall ResetBuffer,edx,[ebx+4] |
ret |
align 4 |
.snd_setpos: |
@@: |
cmp eax, SND_SETPOS |
jne @F |
stdcall SetBufferPos,edx,[ebx+4] |
ret |
align 4 |
.snd_getpos: |
@@: |
cmp eax, SND_GETPOS |
jne @F |
stdcall GetBufferPos, edx |
mov edi, [ioctl] |
mov ecx, [edi+output] |
275,48 → 233,34 |
mov ecx, [ecx] |
mov [ecx], ebx |
ret |
align 4 |
.snd_setbuff: |
@@: |
cmp eax, SND_SETBUFF |
jne @F |
mov eax, [ebx+4] |
stdcall set_buffer, edx,eax,[ebx+8],[ebx+12] |
ret |
align 4 |
.snd_out: |
mov eax, [ebx+4] |
stdcall wave_out, edx,eax,[ebx+8] |
ret |
align 4 |
.snd_play: |
stdcall play_buffer, edx,[ebx+4] |
ret |
align 4 |
.snd_stop: |
stdcall stop_buffer, edx |
ret |
align 4 |
.snd_setvolume: |
@@: |
cmp eax, SND_SETVOLUME |
jne @F |
stdcall SetBufferVol,edx,[ebx+4],[ebx+8] |
ret |
@@: |
cmp eax, SND_GETVOLUME |
jne @F |
align 4 |
.snd_getvolume: |
mov eax, [edi+output] |
mov ecx, [eax] |
mov eax, [eax+4] |
stdcall GetBufferVol,edx,ecx,eax |
ret |
align 4 |
.snd_setpan: |
@@: |
cmp eax, SND_SETPAN |
jne @F |
stdcall SetBufferPan,edx,[ebx+4] |
ret |
align 4 |
.snd_getpan: |
@@: |
cmp eax, SND_GETPAN |
jne @F |
mov eax, [edx+STREAM.pan] |
mov ebx, [edi+output] |
mov ebx, [ebx] |
323,9 → 267,28 |
mov [ebx], eax |
xor eax, eax |
ret |
@@: |
cmp eax, SND_OUT |
jne @F |
align 4 |
.snd_getbuffsize: |
mov eax, [ebx+4] |
stdcall wave_out, edx,eax,[ebx+8] |
ret |
@@: |
cmp eax, SND_PLAY |
jne @F |
stdcall play_buffer, edx,[ebx+4] |
ret |
@@: |
cmp eax, SND_STOP |
jne @F |
stdcall stop_buffer, edx |
ret |
@@: |
cmp eax, SND_GETBUFFSIZE |
jne @F |
mov eax, [edx+STREAM.in_size] |
mov ecx, [edi+output] |
mov ecx, [ecx] |
332,9 → 295,10 |
mov [ecx], eax |
xor eax, eax |
ret |
@@: |
cmp eax, SND_GETFREESPACE |
jne @F |
align 4 |
.snd_getfreespace: |
test [edx+STREAM.format], PCM_OUT |
jz .fail |
343,73 → 307,12 |
mov [ecx], ebx |
xor eax, eax |
ret |
align 4 |
.snd_settimebase: |
cmp [edi+inp_size], 12 |
jne .fail |
mov eax, [ebx] |
mov ebx, [ebx+4] |
mov dword [edx+STREAM.time_base], eax |
mov dword [edx+STREAM.time_base+4], ebx |
xor eax, eax |
ret |
.snd_gettimestamp: |
cmp [edi+out_size], 8 |
jne .fail |
pushfd |
cli |
xor ebx, ebx |
push 48 |
push ebx ; local storage |
cmp [edx+STREAM.flags], SND_STOP |
je @F |
mov eax, esp |
push edx |
push edi |
push 4 ;.out_size |
push eax ;.output |
push ebx ;.inp_size |
push ebx ;.input |
push DEV_GET_POS ;.code |
push dword [hSound] ;.handle |
mov eax, esp |
stdcall ServiceHandler, eax |
add esp, 6*4 |
pop edi |
pop edx |
test eax, eax |
jz @F |
mov dword [esp], 0 ; clear offset |
@@: |
mov edi, [edi+output] |
emms |
fild qword [edx+STREAM.time_stamp] |
fiadd dword [esp] ; primary buffer offset |
fidiv dword [esp+4] ; total_samples / frequency |
fadd qword [edx+STREAM.time_base] |
fstp qword [edi] |
add esp, 8 |
popfd |
xor eax, eax |
.fail: |
or eax, -1 |
ret |
endp |
restore handle |
restore io_code |
restore input |
449,7 → 352,7 |
call GetPid |
mov ebx, eax |
mov eax, STREAM.sizeof |
mov eax, STREAM_SIZE |
call CreateObject |
test eax, eax |
509,6 → 412,7 |
mov [edi+STREAM.in_base], eax |
mov [edi+STREAM.in_size], ecx |
add eax, 128 |
; sub ecx, 128 |
mov [edi+STREAM.in_wp], eax |
mov [edi+STREAM.in_rp], eax |
mov [edi+STREAM.in_count], 0 |
539,22 → 443,13 |
stdcall AllocKernelSpace, dword 128*1024 |
mov edi, [str] |
xor ebx, ebx |
mov [edi+STREAM.out_base], eax |
mov [edi+STREAM.out_wp], eax |
mov [edi+STREAM.out_rp], eax |
mov [edi+STREAM.out_count], ebx |
mov [edi+STREAM.out_count], 0 |
add eax, 64*1024 |
mov [edi+STREAM.out_top], eax |
mov dword [edi+STREAM.time_base], ebx |
mov dword [edi+STREAM.time_base+4], ebx |
mov dword [edi+STREAM.time_stamp], ebx |
mov dword [edi+STREAM.time_stamp+4], ebx |
mov dword [edi+STREAM.last_ts], ebx |
stdcall AllocPages, dword 64/4 |
mov edi, [str] |
mov ebx, [edi+STREAM.out_base] |
593,7 → 488,7 |
mov [ebx+STREAM.magic], 'WAVE' |
mov [ebx+STREAM.destroy], DestroyBuffer.destroy |
mov [ebx+STREAM.size], STREAM.sizeof |
mov [ebx+STREAM.size], STREAM_SIZE |
mov [ebx+STREAM.flags], SND_STOP |
pushf |
962,26 → 857,6 |
ret |
endp |
proc minw stdcall, arg1:dword, arg2:dword |
mov ax, word [arg1] |
cmp ax, word [arg2] |
jle @f |
mov eax, [arg2] |
@@: |
ret |
endp |
proc maxw stdcall, arg1:dword, arg2:dword |
mov ax, word [arg1] |
cmp ax, word [arg2] |
jge @f |
mov eax, [arg2] |
@@: |
ret |
endp |
proc set_vol_param stdcall, l_vol:dword,r_vol:dword,pan:dword |
locals |
_600 dd ? |
995,34 → 870,31 |
lea ebx, [state] |
fnsave [ebx] |
stdcall minw, [l_vol], [vol_max] |
stdcall maxw, eax, [vol_min] |
mov [l_vol], eax |
mov [edx+STREAM.l_vol], eax |
stdcall minw, [r_vol], [vol_max+4] |
stdcall maxw, eax, [vol_min+4] |
mov [r_vol], eax |
mov [edx+STREAM.r_vol], eax |
movq mm0, qword [l_vol] |
pminsw mm0, qword [vol_max] |
pmaxsw mm0, qword [vol_min] |
movq qword [l_vol], mm0 |
movq qword [edx+STREAM.l_vol], mm0 |
stdcall minw, [pan], [pan_max] |
stdcall maxw, eax, [vol_min] |
mov [edx+STREAM.pan], eax |
movd mm1,[pan] |
pminsw mm1, qword [pan_max] |
pmaxsw mm1, qword [vol_min] |
movd [edx+STREAM.pan], mm1 |
cmp word [edx+STREAM.pan], 0 |
jl @f |
jl @F |
mov ebx, [l_vol] |
sub ebx, eax |
stdcall minw, ebx, [vol_max] |
stdcall maxw, eax, [vol_min] |
mov [l_vol], eax |
psubsw mm0,mm1 |
pminsw mm0, qword [vol_max] |
pmaxsw mm0, qword [vol_min] |
movd [l_vol],mm0 |
jmp .calc_amp |
@@: |
mov ebx, [r_vol] |
add ebx, [pan] |
stdcall minw, ebx, [vol_max+4] |
stdcall maxw, eax, [vol_min+4] |
mov [r_vol], eax |
punpckhdq mm0,mm0 |
paddsw mm0,mm1 |
pminsw mm0, qword [vol_max] |
pmaxsw mm0, qword [vol_min] |
movd [r_vol], mm0 |
.calc_amp: |
emms |
fild word [l_vol] |
1063,7 → 935,6 |
ret 0 |
endp |
align 4 |
proc GetBufferVol stdcall, str:dword,p_lvol:dword,p_rvol:dword |
1168,7 → 1039,7 |
cmp [ebx+STREAM.magic], 'WAVE' |
jne .next |
cmp [ebx+STREAM.size], STREAM.sizeof |
cmp [ebx+STREAM.size], STREAM_SIZE |
jne .next |
cmp [ebx+STREAM.flags], SND_PLAY; |
1237,7 → 1108,7 |
cmp [edi+STREAM.magic], 'WAVE' |
jne .next |
cmp [edi+STREAM.size], STREAM.sizeof |
cmp [edi+STREAM.size], STREAM_SIZE |
jne .next |
cmp [edi+STREAM.flags], SND_PLAY; |
/kernel/branches/Kolibri-acpi/drivers/mixer.asm |
---|
29,7 → 29,7 |
and eax, -16 ;must be 16b aligned |
call FpuSave |
call update_streams |
call update_stream |
.mix: |
lea eax, [mix_list] |
call do_mix_list |
87,7 → 87,7 |
endp |
align 4 |
proc update_streams |
proc update_stream |
locals |
stream_index dd ? |
event rd 6 |
98,10 → 98,6 |
mov edx, [stream_index] |
mov esi, [play_list+edx*4] |
add dword [esi+STREAM.time_stamp], 4096 |
adc dword [esi+STREAM.time_stamp+4], 0 |
mov dword [esi+STREAM.last_ts], 0 |
mov eax, [esi+STREAM.out_rp] |
cmp eax, [esi+STREAM.out_top] |
jb @f |
/kernel/branches/Kolibri-acpi/drivers/sceletone.asm |
---|
16,6 → 16,10 |
include 'proc32.inc' |
include 'imports.inc' |
OS_BASE equ 0; |
new_app_base equ 0x60400000 |
PROC_BASE equ OS_BASE+0x0080000 |
struc IOCTL |
{ .handle dd ? |
.io_code dd ? |
/kernel/branches/Kolibri-acpi/drivers/sound.asm |
---|
138,7 → 138,6 |
DEV_SET_MASTERVOL equ 6 |
DEV_GET_MASTERVOL equ 7 |
DEV_GET_INFO equ 8 |
DEV_GET_POS equ 9 |
struc AC_CNTRL ;AC controller base class |
{ .bus dd ? |
334,7 → 333,46 |
mov esi, msgDone |
call SysMsgBoardStr |
stdcall AttachIntHandler, 17, ac97_irq, dword 0 |
if IRQ_REMAP |
pushf |
cli |
mov ebx, [ctrl.int_line] |
in al, 0xA1 |
mov ah, al |
in al, 0x21 |
test ebx, ebx |
jz .skip |
bts ax, bx ;mask old line |
.skip |
bts ax, IRQ_LINE ;mask new ine |
out 0x21, al |
mov al, ah |
out 0xA1, al |
;remap IRQ |
stdcall PciWrite8, 0, 0xF8, 0x61, IRQ_LINE |
mov dx, 0x4d0 ;8259 ELCR1 |
in al, dx |
bts ax, IRQ_LINE |
out dx, al ;set level-triggered mode |
mov [ctrl.int_line], IRQ_LINE |
popf |
mov esi, msgRemap |
call SysMsgBoardStr |
end if |
mov eax, VALID_IRQ |
mov ebx, [ctrl.int_line] |
mov esi, msgInvIRQ |
bt eax, ebx |
jnc .fail_msg |
mov eax, ATTCH_IRQ |
mov esi, msgAttchIRQ |
bt eax, ebx |
jnc .fail_msg |
stdcall AttachIntHandler, ebx, ac97_irq, dword 0 |
.reg: |
stdcall RegService, sz_sound_srv, service_proc |
ret |
415,21 → 453,6 |
mov ebx, [edi+output] |
stdcall get_master_vol, ebx |
ret |
@@: |
cmp eax, DEV_GET_POS |
jne @F |
mov ebx, 8192 |
mov edx, 0x18 |
xor eax, eax |
call [ctrl.ctrl_read16] |
sub ebx, eax |
shr ebx, 1 |
mov edx, [edi+output] |
mov [edx], ebx |
xor eax, eax |
ret |
;@@: |
; cmp eax, DEV_GET_INFO |
; jne @F |
457,22 → 480,6 |
call SysMsgBoardStr |
end if |
mov edx, CTRL_STAT |
call [ctrl.ctrl_read32] |
push eax |
test eax, 0x40 |
jnz .do_intr |
test eax, eax |
jz .done |
mov edx, CTRL_STAT |
call [ctrl.ctrl_write32] |
jmp .done |
.do_intr: |
mov edx, PCM_OUT_CR_REG |
mov al, 0x10; 0x10 |
call [ctrl.ctrl_write8] |
506,21 → 513,17 |
mov ebx, dword [buff_list+eax*4] |
cmp [ctrl.user_callback], 0 |
je .done |
je @f |
stdcall [ctrl.user_callback], ebx |
.done: |
pop eax |
and eax, 0x40 |
mov edx, CTRL_STAT |
call [ctrl.ctrl_write32] |
@@: |
ret |
.skip: |
mov edx, PCM_OUT_CR_REG |
mov ax, 0x11 ;0x1D |
call [ctrl.ctrl_write8] |
jmp .done |
ret |
endp |
align 4 |
773,8 → 776,6 |
and eax, 0xFF |
mov [ctrl.cfg_reg], eax |
mov [ctrl.user_callback], 0 |
call [ctrl.ctrl_setup] |
xor eax, eax |
inc eax |
/kernel/branches/Kolibri-acpi/drivers/main.inc |
---|
91,8 → 91,6 |
SND_GETPAN equ 15 |
SND_GETBUFFSIZE equ 16 |
SND_GETFREESPACE equ 17 |
SND_SETTIMEBASE equ 18 |
SND_GETTIMESTAMP equ 19 |
struc STREAM |
{ |
115,23 → 113,6 |
.out_count dd ? |
.out_top dd ? ;16*4 |
.in_base dd ? |
.in_size dd ? |
.in_wp dd ? |
.in_rp dd ? |
.in_count dd ? |
.in_free dd ? |
.in_top dd ? |
align 8 |
.time_base dq ? |
.time_stamp dq ? |
.last_ts dd ? |
.notify_event dd ? |
.notify_id dd ? |
.r_size dd ? |
.r_dt dd ? |
.r_silence dd ? |
144,9 → 125,19 |
.l_amp_f dd ? ;float point left |
.r_amp_f dd ? ;float point right |
.sizeof: |
.in_base dd ? |
.in_size dd ? |
.in_wp dd ? |
.in_rp dd ? |
.in_count dd ? |
.in_free dd ? |
.in_top dd ? |
.notify_event dd ? |
.notify_id dd ? |
} |
STREAM_SIZE equ 36*4 |
FD_OFFSET equ 24 |
virtual at 0 |
/kernel/branches/Kolibri-acpi/hid/keyboard.inc |
---|
94,34 → 94,12 |
pop eax |
ret |
align 4 |
set_keyboard_data: |
movzx eax,word[TASK_COUNT] ; top window process |
movzx eax,word[WIN_POS+eax*2] |
shl eax,8 |
mov al,[SLOT_BASE+eax+APPDATA.keyboard_mode] |
mov [keyboard_mode],al |
mov eax, ecx |
push ebx |
push esi |
push edi |
push ebp |
call send_scancode |
pop ebp |
pop edi |
pop esi |
pop ebx |
ret |
align 4 |
irq1: |
; save_ring3_context |
; mov ax, os_data |
; mov ds, ax |
; mov es, ax |
movzx eax,word[TASK_COUNT] ; top window process |
movzx eax,word[WIN_POS+eax*2] |
130,9 → 108,6 |
mov [keyboard_mode],al |
in al,0x60 |
send_scancode: |
mov [keyboard_data],al |
; ch = scancode |
335,6 → 310,11 |
.exit.irq1: |
mov [check_idle_semaphore],5 |
; mov al,0x20 ; ready for next irq |
; out 0x20,al |
; restore_ring3_context |
; iret |
ret |
set_lights: |
/kernel/branches/Kolibri-acpi/hid/mousedrv.inc |
---|
292,20 → 292,21 |
add ecx,eax |
add ecx, [_WinMapAddress] |
mov eax, [CURRENT_TASK] |
cmp al, [ecx] |
movzx ebx, byte [ecx] |
cmp eax,ebx |
je yes_mouse_disable |
cmp al, [ecx+16] |
movzx ebx, byte [ecx+16] |
cmp eax,ebx |
je yes_mouse_disable |
add ebx, 10 |
cmp ebx, [Screen_Max_Y] |
jae no_mouse_disable |
mov ebx,[Screen_Max_X] |
inc ebx |
imul ebx,10 |
add ecx,ebx |
cmp al, [ecx] |
movzx ebx, byte [ecx] |
cmp eax,ebx |
je yes_mouse_disable |
cmp al, [ecx+16] |
movzx ebx, byte [ecx+16] |
cmp eax,ebx |
je yes_mouse_disable |
jmp no_mouse_disable |
yes_mouse_disable: |
/kernel/branches/Kolibri-acpi/fs/iso9660.inc |
---|
67,11 → 67,9 |
jne .IDE_Channel_2 |
.IDE_Channel_1: |
mov [IDE_Channel_1],0 |
sti |
ret |
.IDE_Channel_2: |
mov [IDE_Channel_2],0 |
sti |
ret |
uglobal |
/kernel/branches/Kolibri-acpi/blkdev/hd_drv.inc |
---|
49,12 → 49,6 |
; Read through BIOS? |
cmp [hdpos], 0x80 |
jae .bios |
; hd_read_{dma,pio} use old ATA with 28 bit for sector number |
cmp eax, 0x10000000 |
jb @f |
inc [hd_error] |
jmp return_01 |
@@: |
; DMA read is permitted if [allow_dma_access]=1 or 2 |
cmp [allow_dma_access], 2 |
ja .nodma |
241,8 → 235,6 |
align 4 |
cache_write_pio: |
cmp dword[esi],0x10000000 |
jae .bad |
; call disable_ide_int |
call wait_for_hd_idle |
303,9 → 295,6 |
pop esi ecx |
ret |
.bad: |
inc [hd_error] |
ret |
save_hd_wait_timeout: |
697,9 → 686,6 |
write_cache_chain: |
cmp [hdpos], 0x80 |
jae bd_write_cache_chain |
mov eax,[cache_chain_ptr] |
cmp dword[eax],0x10000000 |
jae .bad |
push esi |
mov eax, IDE_descriptor_table |
mov edx,eax |
793,9 → 779,6 |
jnz hd_write_error_dma |
pop esi |
ret |
.bad: |
inc [hd_error] |
ret |
uglobal |
IDEContrRegsBaseAddr dw ? |
933,9 → 916,7 |
mov [ebx+v86_regs.eflags], 20200h |
mov esi, [sys_v86_machine] |
mov ecx, 0x502 |
push fs |
call v86_start |
pop fs |
and [bios_hdpos], 0 |
pop edi esi ecx ebx |
movzx edx, byte [OS_BASE + 512h] |
/kernel/branches/Kolibri-acpi/blkdev/cd_drv.inc |
---|
239,10 → 239,10 |
in AL,DX |
test AL,80h ;ñîñòîÿíèå ñèãíàëà BSY |
jnz @@WaitDevice0 |
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ |
jz @@WaitDevice0 |
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR |
jnz @@Err6 |
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ |
jz @@WaitDevice0 |
; Ïîñëàòü ïàêåòíóþ êîìàíäó |
cli |
mov DX,[ATABasePortAddr] |
282,10 → 282,10 |
in AL,DX |
test AL,80h ;ñîñòîÿíèå ñèãíàëà BSY |
jnz @@WaitDevice1 |
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ |
jz @@WaitDevice1 |
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR |
jnz @@Err6_temp |
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ |
jz @@WaitDevice1 |
; Ïðèíÿòü áëîê äàííûõ îò êîíòðîëëåðà |
mov EDI,[CDDataBuf_pointer] ;0x7000 ;CDDataBuf |
; Çàãðóçèòü àäðåñ ðåãèñòðà äàííûõ êîíòðîëëåðà |
/kernel/branches/Kolibri-acpi/docs/sysfuncr.txt |
---|
1,4 → 1,4 |
Kolibri 0.7.7.0 |
Kolibri 0.7.5.0+ |
®¬¥à äãªæ¨¨ ¯®¬¥é ¥âáï ¢ ॣ¨áâà eax. |
맮¢ á¨á⥬®© äãªæ¨¨ ®áãé¥á⢫ï¥âáï ª®¬ ¤®© "int 0x40". |
354,7 → 354,6 |
* ¡¨â 0 (¬ ᪠1): ®ª® ¬ ªá¨¬¨§¨à®¢ ® |
* ¡¨â 1 (¬ ᪠2): ®ª® ¬¨¨¬¨§¨à®¢ ® ¢ ¯ ¥«ì § ¤ ç |
* ¡¨â 2 (¬ ᪠4): ®ª® á¢ñàãâ® ¢ § £®«®¢®ª |
* +71 = +0x47: dword: ¬ ᪠ᮡë⨩ |
¬¥ç ¨ï: |
* «®âë 㬥àãîâáï á 1. |
* ®§¢à é ¥¬®¥ § 票¥ ¥ ¥áâì ®¡é¥¥ ç¨á«® ¯®â®ª®¢, ¯®áª®«ìªã |
384,7 → 383,7 |
ᮡá⢥® à ¡®âã, ¨ ¢à¥¬¥¨ ¯à®áâ®ï ¢ ®¦¨¤ ¨¨ ¯à¥àë¢ ¨ï |
(ª®â®à®¥ ¬®¦® ¯®«ãç¨âì ¢ë§®¢®¬ ¯®¤äãªæ¨¨ 4 äãªæ¨¨ 18). |
* ç¨ ï á® á«®â 2, à §¬¥é îâáï ®¡ëçë¥ ¯à¨«®¦¥¨ï. |
* ¡ëçë¥ ¯à¨«®¦¥¨ï à §¬¥é îâáï ¢ ¯ ¬ï⨠¯® ¤à¥áã 0 |
* ¡ëçë¥ ¯à¨«®¦¥¨ï à §¬¥é îâáï ¢ ¯ ¬ï⨠¯® ¤à¥áã 0x0 |
(ª®áâ â ï¤à std_application_base_address). |
«®¦¥¨ï ¥ ¯à®¨á室¨â, ¯®áª®«ìªã ã ª ¦¤®£® ¯à®æ¥áá ᢮ï |
â ¡«¨æ áâà ¨æ. |
848,12 → 847,12 |
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï |
âàãªâãà ¡ãä¥à : |
db a,b,c,d ¤«ï ¢¥àᨨ a.b.c.d |
db 0: § १¥à¢¨à®¢ ® |
db UID_xxx: ®¤® ¨§ UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2 |
dd REV - ®¬¥à svn-ॢ¨§¨¨ ï¤à |
«ï ï¤à Kolibri 0.7.7.0+: |
db 0,7,7,0 |
db 0 |
dd 1675 |
«ï ï¤à Kolibri 0.7.1.0: |
db 0,7,1,0 |
db 2 |
dd 638 |
====================================================================== |
====================== ãªæ¨ï 18, ¯®¤äãªæ¨ï 14 ===================== |
1678,16 → 1677,64 |
* ecx = 㪠§ â¥«ì ¡ãä¥à |
* edx = à §¬¥à ¡ãä¥à |
®§¢à é ¥¬®¥ § 票¥: |
* eax = - 1 ®é¨¡ª , ¯ ¯ª ⥪ã饣® ¯®â®ª ¨¬¥¥â ¤«¨ã ¡®«¥¥ 祬 4096 ᨬ¢®«®¢. |
* eax = ¤«¨ ¨¬¥¨ ⥪ã饩 ¯ ¯ª¨ (¢ª«îç ï § ¢¥àè î騩 0) |
¬¥ç ¨ï: |
* ᫨ à §¬¥à ¡ãä¥à ¥¤®áâ â®ç® ¤«ï ª®¯¨à®¢ ¨ï ¢á¥£® ¨¬¥¨, |
ª®¯¨àãîâáï ⮫쪮 ¯¥à¢ë¥ (edx-1) ¡ ©â ¨ ¢ ª®æ¥ áâ ¢¨âáï |
§ ¢¥àè î騩 0. |
* ® 㬮«ç ¨î, ⥪ãé ï ¯ ¯ª ¤«ï ¯®â®ª - "/rd/1". |
* ਠᮧ¤ ¨¨ ¯à®æ¥áá /¯®â®ª ⥪ãé ï ¯ ¯ª á«¥¤ã¥âáï ®â |
த¨â¥«ï. |
ª®¯¨àãîâáï ⮫쪮 ¯¥à¢ë¥ (edx-1) ¡ ©â |
¨ ¢ ª®æ¥ áâ ¢¨âáï § ¢¥àè î騩 0. |
====================================================================== |
================ ãªæ¨ï 32 - 㤠«¨âì ä ©« á à ¬¤¨áª . =============== |
====================================================================== |
à ¬¥âàë: |
* eax = 32 - ®¬¥à äãªæ¨¨ |
* ebx = 㪠§ â¥«ì ¨¬ï ä ©« |
®§¢à é ¥¬®¥ § 票¥: |
* eax = 0 - ãᯥè®; ¨ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë |
¬¥ç ¨ï: |
* â äãªæ¨ï ãáâ ५ ; äãªæ¨ï 58 ¯®§¢®«ï¥â ¢ë¯®«ïâì |
⥠¦¥ ¤¥©á⢨ï á à áè¨à¥ë¬¨ ¢®§¬®¦®áâﬨ. |
* ¥ªãé ï ॠ«¨§ æ¨ï ¢®§¢à é ¥â ⮫쪮 § 票ï 0(ãᯥå) ¨ |
5(ä ©« ¥ ©¤¥). |
* ¬ï ä ©« ¤®«¦® ¡ëâì «¨¡® ¢ ä®à¬ ⥠8+3 ᨬ¢®«®¢ (¯¥à¢ë¥ |
8 ᨬ¢®«®¢ - ᮡá⢥® ¨¬ï, ¯®á«¥¤¨¥ 3 - à áè¨à¥¨¥, |
ª®à®âª¨¥ ¨¬¥ ¨ à áè¨à¥¨ï ¤®¯®«ïîâáï ¯à®¡¥« ¬¨), |
«¨¡® ¢ ä®à¬ ⥠8.3 ᨬ¢®«®¢ "FILE.EXT"/"FILE.EX " |
(¨¬ï ¥ ¡®«¥¥ 8 ᨬ¢®«®¢, â®çª , à áè¨à¥¨¥ 3 ᨬ¢®« , |
¤®¯®«¥®¥ ¯à¨ ¥®¡å®¤¨¬®á⨠¯à®¡¥« ¬¨). |
¬ï ä ©« ¤®«¦® ¡ëâì § ¯¨á ® § £« ¢ë¬¨ ¡ãª¢ ¬¨. |
¢¥àè î騩 ᨬ¢®« á ª®¤®¬ 0 ¥ 㦥 (¥ ASCIIZ-áâப ). |
* â äãªæ¨ï ¥ ¯®¤¤¥à¦¨¢ ¥â ¯ ¯®ª à ¬¤¨áª¥. |
====================================================================== |
=============== ãªæ¨ï 33 - § ¯¨á âì ä ©« à ¬¤¨áª. =============== |
====================================================================== |
à ¬¥âàë: |
* eax = 33 - ®¬¥à äãªæ¨¨ |
* ebx = 㪠§ â¥«ì ¨¬ï ä ©« |
* ecx = 㪠§ â¥«ì ¤ ë¥ ¤«ï § ¯¨á¨ |
* edx = ç¨á«® ¡ ©â ¤«ï § ¯¨á¨ |
* á«¥¤ã¥â ãáâ ¢«¨¢ âì esi=0 |
®§¢à é ¥¬®¥ § 票¥: |
* eax = 0 - ãᯥè®, ¨ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë |
¬¥ç ¨ï: |
* â äãªæ¨ï ãáâ ५ ; äãªæ¨ï 70 ¯®§¢®«ï¥â ¢ë¯®«ïâì |
⥠¦¥ ¤¥©á⢨ï á à áè¨à¥ë¬¨ ¢®§¬®¦®áâﬨ. |
* ᫨ 㪠§ âì ¥ã«¥¢®¥ § 票¥ ¢ esi ¨ à ¬¤¨áª¥ 㦥 ¥áâì |
㪠§ ë© ä ©«, â® ¡ã¤¥â ᮧ¤ ¥éñ ®¤¨ ä ©« á ⥬ ¦¥ ¨¬¥¥¬. |
* ¯à®â¨¢®¬ á«ãç ¥ ä ©« ¯¥à¥§ ¯¨áë¢ ¥âáï. |
* ¬ï ä ©« ¤®«¦® ¡ëâì «¨¡® ¢ ä®à¬ ⥠8+3 ᨬ¢®«®¢ |
(¯¥à¢ë¥ 8 ᨬ¢®«®¢ - ᮡá⢥® ¨¬ï, ¯®á«¥¤¨¥ 3 - à áè¨à¥¨¥, |
ª®à®âª¨¥ ¨¬¥ ¨ à áè¨à¥¨ï ¤®¯®«ïîâáï ¯à®¡¥« ¬¨), |
«¨¡® ¢ ä®à¬ ⥠8.3 ᨬ¢®«®¢ "FILE.EXT"/"FILE.EX " |
(¨¬ï ¥ ¡®«¥¥ 8 ᨬ¢®«®¢, â®çª , à áè¨à¥¨¥ 3 ᨬ¢®« , |
¤®¯®«¥®¥ ¯à¨ ¥®¡å®¤¨¬®á⨠¯à®¡¥« ¬¨). |
¬ï ä ©« ¤®«¦® ¡ëâì § ¯¨á ® § £« ¢ë¬¨ ¡ãª¢ ¬¨. |
¢¥àè î騩 ᨬ¢®« á ª®¤®¬ 0 ¥ 㦥 (¥ ASCIIZ-áâப ). |
* â äãªæ¨ï ¥ ¯®¤¤¥à¦¨¢ ¥â ¯ ¯®ª à ¬¤¨áª¥. |
====================================================================== |
============ ãªæ¨ï 35 - ¯à®ç¨â âì 梥â â®çª¨ íªà ¥. ============ |
====================================================================== |
à ¬¥âàë: |
1811,7 → 1858,7 |
------------------ ®¤äãªæ¨ï 7 - ¤ ë¥ ¯à®ªàã⪨ ------------------- |
à ¬¥âàë: |
* eax = 37 - ®¬¥à äãªæ¨¨ |
* ebx = 7 - ®¬¥à ¯®¤äãªæ¨¨ |
* ebx = 6 - ®¬¥à ¯®¤äãªæ¨¨ |
®§¢à é ¥¬®¥ § 票¥: |
* eax = [horizontal offset]*65536 + [vertical offset] |
¬¥ç ¨ï: |
3243,6 → 3290,63 |
ᯨ᮪ ¢â®àëå ¤®«¦¥ ¡ëâì 㪠§ ¢ ¤®ªã¬¥â 樨 ¯® ãáâனáâ¢ã. |
====================================================================== |
====================== ãªæ¨ï 62, ¯®¤äãªæ¨ï 11 ===================== |
== ¨æ¨ «¨§¨à®¢ âì ¯®«ì§®¢ ⥫ì᪨© / á ®â®¡à ¦¥¨¥¬ ¯ ¬ïâì == |
====================================================================== |
à ¬¥âàë: |
* eax = 62 - ®¬¥à äãªæ¨¨ |
* bl = 11 - ®¬¥à ¯®¤äãªæ¨¨ |
* cx = ¤à¥á PCI-ãáâனá⢠|
®§¢à é ¥¬®¥ § 票¥: |
* eax = -1 - ¤®áâ㯠ª PCI § ¯à¥éñ; |
* eax = -2 - ¤®áâ㯠ª MMIO-¡«®ª ¬ ãáâனá⢠¥ à §à¥èñ; |
* eax = -3 - ®è¨¡ª ««®ª 樨 ¯®«ì§®¢ ⥫ì᪮© ¤¨. ¯ ¬ïâ¨; ¨ ç¥ |
* eax = à §¬¥à ¤®áâ㯮© ¤¨ ¬¨ç¥áª®© ¯ ¬ïâ¨. |
¬¥ç ¨ï: |
* ।¢ à¨â¥«ì® ¤®«¦¥ ¡ëâì à §à¥èñ ¨§ª®ã஢¥¢ë© ¤®áâ㯠ª PCI |
¤«ï ¯à¨«®¦¥¨© ¯®¤äãªæ¨¥© 12 äãªæ¨¨ 21. |
* ¤à¥á PCI-ãáâனá⢠¤®«¦¥ ᮢ¯ ¤ âì á á¨á⥬®© ¯¥à¥¬¥®© |
mmio_pci_addr |
====================================================================== |
====================== ãªæ¨ï 62, ¯®¤äãªæ¨ï 12 ===================== |
== 뤥«¨âì ¤¨ ¯ §® «¨¥©ëå ¤à¥á®¢ ¤«ï ¯®«ì§®¢ ⥫ì᪮£® MMIO == |
====================================================================== |
à ¬¥âàë: |
* eax = 62 - ®¬¥à äãªæ¨¨ |
* bl = 12 - ®¬¥à ¯®¤äãªæ¨¨ |
* bh = ®¬¥à BAR-ॣ¨áâà ¢ ª®ä¨£ãà 樮®© §®¥ PCI |
* ecx = à §¬¥à MMIO-¡«®ª (¢ ¡ ©â å) |
* edx = ᬥ饨¥ ®â®á¨â¥«ì® ç « MMIO-¡«®ª (¢ 4K-áâà ¨æ å!) |
®§¢à é ¥¬®¥ § 票¥: |
* eax = -1 - ¤®áâ㯠ª PCI § ¯à¥éñ; |
* eax = -2 - ¥¢¥àë© ®¬¥à BAR-ॣ¨áâà ; |
* eax = -3 - BAR ¥ ᮤ¥à¦¨â ¤à¥á IO; |
* eax = -4 - BAR ¤à¥áã¥â ¯®àâë IO; |
* eax = -5 - ®è¨¡ª ««®ª 樨; ¨ ç¥ |
* eax = ç «ìë© ¤à¥á MMIO ¢ ¤à¥á®¬ ¯à®áâà á⢥ ¯à¨«®¦¥¨ï. |
¬¥ç ¨ï: |
* ।¢ à¨â¥«ì® ¤®«¦¥ ¡ëâì à §à¥èñ ¨§ª®ã஢¥¢ë© ¤®áâ㯠ª PCI |
¤«ï ¯à¨«®¦¥¨© ¯®¤äãªæ¨¥© 12 äãªæ¨¨ 21. |
* ¤à¥á PCI-ãáâனá⢠§ ¤ ¥âáï á¨á⥬®© ¯¥à¥¬¥®© mmio_pci_addr. |
* ।®áâ ¢«¥ë© ¤¨ ¯ §® «¨¥©ëå ¤à¥á®¢ ¤®«¦¥ ®á¢®¡®¦¤ âìáï |
¯®á।á⢮¬ ¢ë§®¢ äãªæ¨¨ 62:13 |
====================================================================== |
====================== ãªæ¨ï 62, ¯®¤äãªæ¨ï 13 ===================== |
== ᢮¡®¤¨âì ¤¨ ¯ §® «¨¥©ëå ¤à¥á®¢ ¯®«ì§®¢ ⥫ì᪮£® MMIO == |
====================================================================== |
à ¬¥âàë: |
* eax = 62 - ®¬¥à äãªæ¨¨ |
* bl = 12 - ®¬¥à ¯®¤äãªæ¨¨ |
* ecx = ç «ìë© ¤à¥á ®á¢®¡®¦¤ ¥¬®£® MMIO-¡«®ª ¢ ¤à¥á®¬ |
¯à®áâà á⢥ ¯à¨«®¦¥¨ï |
®§¢à é ¥¬®¥ § 票¥: |
* eax = 1 - ¡«®ª ãá¯¥è® ®á¢®¡®¦¤¥; |
¬¥ç ¨ï: |
* ।¢ à¨â¥«ì® ¯à¨«®¦¥¨î ¤®«¦¥ ¡ëâì ¢ë¤¥«¥ uMMIO-¡«®ª (fn62:12) |
====================================================================== |
================ ãªæ¨ï 63 - à ¡®â á ¤®áª®© ®â« ¤ª¨. =============== |
====================================================================== |
®áª ®â« ¤ª¨ ¯à¥¤áâ ¢«ï¥â ᮡ®© á¨áâ¥¬ë© ¡ãä¥à ( 4096 ¡ ©â), |
3355,6 → 3459,7 |
====================================================================== |
¥¦¨¬ ¢¢®¤ ¢«¨ï¥â १ã«ìâ âë çâ¥¨ï ª« ¢¨è äãªæ¨¥© 2. |
ਠ§ £à㧪¥ ¯à®£à ¬¬ë ¤«ï ¥ñ ãáâ ¢«¨¢ ¥âáï ASCII-०¨¬ ¢¢®¤ . |
᫨ ¢ë§ë¢ ¥âáï ¥áãé¥áâ¢ãîé ï ¯®¤äãªæ¨ï ¢®§¢à é ¥âáï ¢ eax=-1. |
-------- ®¤äãªæ¨ï 1 - ãáâ ®¢¨âì ०¨¬ ¢¢®¤ á ª« ¢¨ âãàë. --------- |
à ¬¥âàë: |
3597,8 → 3702,8 |
¨«¨ ¯®¤äãªæ¨¥© 20. |
====================================================================== |
====================== ãªæ¨ï 68, ¯®¤äãªæ¨ï 14 ===================== |
====== ¦¨¤ âì ¯®«ã票ï ᨣ « ®â ¤àã£¨å ¯à¨«®¦¥¨©/¤à ©¢¥à®¢. ===== |
==================== ãªæ¨ï 68, ¯®¤äãªæ¨ï 14 ======================= |
===== ¦¨¤ âì ¯®«ã票ï ᨣ « , ®â ¤àã£¨å ¯à¨«®¦¥¨©/¤à ©¢¥à®¢. ===== |
====================================================================== |
à ¬¥âàë: |
* eax = 68 - ®¬¥à äãªæ¨¨ |
3605,7 → 3710,6 |
* ebx = 14 - ®¬¥à ¯®¤äãªæ¨¨ |
* ecx = 㪠§ â¥«ì ¡ãä¥à ¤«ï ¨ä®à¬ 樨 (24 ¡ ©â ) |
®§¢à é ¥¬®¥ § 票¥: |
* eax à §àãè ¥âáï |
* ¡ãä¥à, ª®â®àë© ãª §ë¢ ¥â ecx, ᮤ¥à¦¨â á«¥¤ãîéãî ¨ä®à¬ æ¨î: |
* +0: dword: ¨¤¥â¨ä¨ª â®à ¯®á«¥¤ãîé¨å ¤ ëå ᨣ « |
* +4: ¤ ë¥ ¯à¨ï⮣® ᨣ « (20 ¡ ©â), ä®à¬ â ª®â®àëå |
3612,6 → 3716,12 |
®¯à¥¤¥«ï¥âáï ¯¥à¢ë¬ dword-®¬ |
====================================================================== |
== ãªæ¨ï 68, ¯®¤äãªæ¨ï 15 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© FPU. = |
====================================================================== |
¤ «¥ (¢ ⥪ã饩 ॠ«¨§ 樨 ¯à®áâ® ¢®§¢à é ¥â 0) |
ᯮ«ì§®¢ âì ¯®¤äãªæ¨¨ 24, 25 |
====================================================================== |
=========== ãªæ¨ï 68, ¯®¤äãªæ¨ï 16 - § £à㧨âì ¤à ©¢¥à. =========== |
====================================================================== |
à ¬¥âàë: |
3650,6 → 3760,12 |
* ।¢ à¨â¥«ì® ¤®«¦¥ ¡ëâì ¯®«ãç¥ åí¤« ¤à ©¢¥à ¯®¤äãªæ¨¥© 16. |
====================================================================== |
== ãªæ¨ï 68, ¯®¤äãªæ¨ï 18 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© SSE. = |
====================================================================== |
¤ «¥ (¢ ⥪ã饩 ॠ«¨§ 樨 ¯à®áâ® ¢®§¢à é ¥â 0) |
ᯮ«ì§®¢ âì ¯®¤äãªæ¨¨ 24, 25 |
====================================================================== |
============= ãªæ¨ï 68, ¯®¤äãªæ¨ï 19 - § £à㧨âì DLL. ============= |
====================================================================== |
à ¬¥âàë: |
3744,7 → 3860,7 |
®¡« á⨠¯ ¬ïâ¨. |
====================================================================== |
==== ãªæ¨ï 68, ¯®¤äãªæ¨ï 24 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票©. === |
==== ãªæ¨ï 68, ¯®¤äãªæ¨ï 24 - ãáâ ®¢¨âì ®¡à ¡®â稪 ¨áª«î票© === |
====================================================================== |
à ¬¥âàë: |
* eax = 68 - ®¬¥à äãªæ¨¨ |
3755,26 → 3871,26 |
* eax = ¤à¥á áâ ண® ®¡à ¡®â稪 ¨áª«î票© (0, ¥á«¨ ¥ ãáâ ®¢«¥) |
* ebx = ¬ ᪠áâ ண® ®¡à ¡®â稪 ¨áª«î票© |
¬¥ç ¨ï: |
* ®¬¥à ¡¨â ¢ ¬ ᪥ ¨áª«î票© ᮮ⢥âáâ¢ã¥â ®¬¥à㠨᪫îç¥¨ï ¯® |
ᯥæ¨ä¨ª 樨 ¯à®æ¥áá®à (Intel-PC). ª, ¯à¨¬¥à, ¨áª«î票ï |
FPU ¨¬¥îâ ®¬¥à 16 (#MF), SSE - 19 (#XF). |
* ®¬¥à ¡¨â ¢ ¬ ᪥ ¨áª«î票© ᮮ⢥âáâ¢ãîâ ®¬¥à㠨᪫îç¥¨ï ¯® |
ᯥæ¨ä¨ª 樨 ¯à®æ¥áá®à (Intel-PC). ª ¯à¨¬¥à, ¨áª«î票ï FPU |
¨¬¥îâ ®¬¥à 16 (#MF), SSE - 19 (#XF). |
* ¤ ®© ॠ«¨§ 樨 ¨£®à¨àã¥âáï § ¯à®á ¯¥à¥å¢ ⠨᪫î票ï 7 |
- á¨á⥬ ®¡à ¡ âë¢ ¥â #NM á ¬®áâ®ï⥫ì®. |
* ®«ì§®¢ ⥫ì᪨© ®¡à ¡®â稪 ¯®«ãç ¥â ®¬¥à ¨áª«îç¥¨ï ¯ à ¬¥â஬ |
¢ á⥪¥. ®íâ®¬ã ¯à ¢¨«ìë© ¢ë室 ¨§ ®¡à ¡®â稪 : RET 4. ®§¢à â |
¯à¨ í⮬ ¯à®¨§¢®¤¨âáï ª®¬ ¤ã, ¢ë§¢ ¢èãî ¨áª«î票¥. |
* ਠ¯¥à¥¤ ç¥ ã¯à ¢«¥¨ï ®¡à ¡®â稪㠨᪫î票© á¡à áë¢ ¥âáï |
* ਠ¯¥à¥¤ ç¥ ã¯à ¢«¥¨ï ®¡à ¡®â稪㠨᪫î票©, á¡à áë¢ ¥âáï |
ᮮ⢥âáâ¢ãî騩 ¡¨â ¢ ¬ ᪥ ¨áª«î票©. ®§¨ª®¢¥¨¥ í⮣® ¦¥ |
¨áª«îç¥¨ï ¢¯®á«¥¤á⢨¨ ¯à¨¢¥¤ñâ ª 㬮«ç «ì®© ®¡à ¡®âª¥ â ª®¢®£®. |
¨¬¥®: ª § ¢¥à襨î à ¡®âë ¯à¨«®¦¥¨ï ¢ ®âáãâá⢨¨ ®â« ¤ç¨ª , |
¯à¨®áâ ®¢ª á 㢥¤®¬«¥¨¥¬ ®â« ¦¨¢ î饣® ¯à¨«®¦¥¨ï ¨ ç¥. |
* ®á«¥ § ¢¥àè¥¨ï ªà¨â¨ç¥áª¨å ¤¥©á⢨© ¢ ®¡à ¡®â稪¥ ¯®«ì§®¢ ⥫ï |
¨áª«îç¥¨ï ¢ ¯®á«¥¤á⢨¨ - ¯à¨¢¥¤¥â ª default-®¡à ¡®âª¥ â ª®¢®£®. |
¨¬¥®: ª § ¢¥à襨î à ¡®âë ¯à¨«®¦¥¨ï, ¨«¨ ¯à¨®áâ ®¢ª¥ á |
®â¨ä¨ª 樥© ®â« ¦¨¢ î饬㠯ਫ®¦¥¨î. |
* ®á«¥ § ¢¥àè¥¨ï ªà¨â¨ç¥áª¨å ¤¥©á⢨© ¢ ®¡à ¡®â稪¥ ¯®«ì§®¢ ⥫ï, |
¢®ááâ ®¢«¥¨¥ ¡¨â ¬ ᪨ ¤ ®£® ¨áª«îç¥¨ï ¬®¦® ᤥ« âì |
¯®¤äãªæ¨¥© 25. ¡à®á ä« £®¢ ¨áª«î票© ¢ ¬®¤ã«ïå FPU ¨ XMM â ª¦¥ |
¢®§« £ ¥âáï ®¡à ¡®â稪 ¯®«ì§®¢ ⥫ï. |
¯®¤äãªæ¨¥© 25. ¡à®á ä« £®¢ ¨áª«î票© ¢ ¬®¤ã«ïå FPU ¨ XMM - |
â ª¦¥ ¢®§« £ ¥âáï ®¡à ¡®â稪 ¯®«ì§®¢ ⥫ï. |
====================================================================== |
= ãªæ¨ï 68, ¯®¤äãªæ¨ï 25 - ¨§¬¥¨âì á®áâ®ï¨¥ ªâ¨¢®á⨠ᨣ « . = |
= ãªæ¨ï 68, ¯®¤äãªæ¨ï 25 - ¨§¬¥¥¨¥ á®áâ®ï¨ï ªâ¨¢®á⨠ᨣ « = |
====================================================================== |
à ¬¥âàë: |
* eax = 68 - ®¬¥à äãªæ¨¨ |
3782,11 → 3898,10 |
* ecx = ®¬¥à ᨣ « |
* edx = § 票¥ ãáâ ¢«¨¢ ¥¬®© ªâ¨¢®á⨠(0/1) |
®§¢à é ¥¬®¥ § 票¥: |
* eax = -1 - § ¤ ¥¢¥àë© ®¬¥à ᨣ « |
* ¨ ç¥ eax = áâ ஥ § 票¥ ªâ¨¢®á⨠ᨣ « (0/1) |
* eax = áâ ஥ § 票¥ ªâ¨¢®á⨠ᨣ « (0/1) |
¬¥ç ¨ï: |
* ⥪ã饩 ॠ«¨§ 樨 ¨§¬¥ï¥âáï ⮫쪮 ¬ ᪠¯®«ì§®¢ ⥫ì᪮£® |
®¡à ¡®â稪 ¨áª«î票©, ãáâ ®¢«¥®£® ¯®¤äãªæ¨¥© 24. ਠí⮬ |
®¡à ¡®â稪 ¨áª«î票©, ãáâ ®¢«¥®£® ¯®¤äãªæ¨¥© 24. ਠí⮬, |
®¬¥à ᨣ « ᮮ⢥âáâ¢ã¥â ®¬¥à㠨᪫î票ï. |
====================================================================== |
4089,10 → 4204,6 |
* '/hd0/2/menuet/pics/tanzania.bmp',0 |
* '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
* '/sys/MySuperApp.ini',0 |
ª¦¥ äãªæ¨ï ¯®¤¤¥à¦¨¢ ¥â ®â®á¨â¥«ìë¥ ¨¬¥ . ᫨ ¯ãâì ç¨ ¥âáï |
¥ á '/', â® ® áç¨â ¥âáï ®â®á¨â¥«ì® ⥪ã饩 ¯ ¯ª¨. ®«ãç¨âì ¨«¨ |
ãáâ ®¢¨âì ⥪ãéãî ¯ ¯ªã ¬®¦® á ¯®¬®éìî á¨áäãªæ¨¨ 30. |
®áâã¯ë¥ ¯®¤äãªæ¨¨: |
* ¯®¤äãªæ¨ï 0 - ç⥨¥ ä ©« |
* ¯®¤äãªæ¨ï 1 - ç⥨¥ ¯ ¯ª¨ |
/kernel/branches/Kolibri-acpi/docs/sysfuncs.txt |
---|
1,4 → 1,4 |
SYSTEM FUNCTIONS of OS Kolibri 0.7.7.0 |
SYSTEM FUNCTIONS of OS Kolibri 0.7.5.0 |
Number of the function is located in the register eax. |
The call of the system function is executed by "int 0x40" command. |
347,7 → 347,6 |
* bit 0 (mask 1): window is maximized |
* bit 1 (mask 2): window is minimized to panel |
* bit 2 (mask 4): window is rolled up |
* +71 = +0x47: dword: event mask |
Remarks: |
* Slots are numbered starting from 1. |
* Returned value is not a total number of threads, because there |
377,8 → 376,8 |
and idle time in waiting for interrupt (which can be got by call |
to subfunction 4 of function 18). |
* Beginning from slot 2, the normal applications are placed. |
* The normal applications are placed in memory at the address |
0 (kernel constant 'std_application_base_address'). |
* Applications are placed in memory at the address 0x0 |
(kernel constant 'std_application_base_address'). |
There is no intersection, as each process has its own page table. |
* At creation of the thread it is assigned the slot |
in the system table and identifier (Process/Thread IDentifier = |
845,12 → 844,12 |
* function does not return value |
Structure of the buffer: |
db a,b,c,d for version a.b.c.d |
db 0: reserved |
db UID_xxx: one of UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2 |
dd REV - kernel SVN revision number |
For Kolibri 0.7.7.0+ kernel: |
db 0,7,7,0 |
db 0 |
dd 1675 |
For Kolibri 0.7.1.0 kernel: |
db 0,7,0,0 |
db 2 |
dd 638 |
====================================================================== |
======= Function 18, subfunction 14 - wait for screen retrace. ======= |
1659,11 → 1658,58 |
Remarks: |
* If the buffer is too small to hold all data, only first (edx-1) |
bytes are copied and than terminating 0 is inserted. |
* By default, current folder for the thread is "/rd/1". |
* At process/thread creation the current folder will be inherited |
from the parent. |
====================================================================== |
=============== Function 32 - delete file from ramdisk. ============== |
====================================================================== |
Parameters: |
* eax = 32 - function number |
* ebx = pointer to the filename |
Returned value: |
* eax = 0 - success; otherwise file system error code |
Remarks: |
* This function is obsolete; function 58 allows to fulfill |
the same operations with the extended possibilities. |
* The current implementation returns only values 0(success) and |
5(file not found). |
* The filename must be either in the format 8+3 characters |
(first 8 characters - name itself, last 3 - extension, |
the short names and extensions are supplemented with spaces), |
or in the format 8.3 characters "FILE.EXT"/"FILE.EX " |
(name no more than 8 characters, dot, extension 3 characters |
supplemented if necessary by spaces). |
The filename must be written with capital letters. The terminating |
character with code 0 is not necessary (not ASCIIZ-string). |
* This function does not support folders on the ramdisk. |
====================================================================== |
================ Function 33 - write file to ramdisk. ================ |
====================================================================== |
Parameters: |
* eax = 33 - function number |
* ebx = pointer to the filename |
* ecx = pointer to data for writing |
* edx = number of bytes for writing |
* should be set esi=0 |
Returned value: |
* eax = 0 - success, otherwise file system error code |
Remarks: |
* This function is obsolete; function 70 allows to fulfil |
the same operations with extended possibilities. |
* If esi contains non-zero value and selected file already exists, |
one more file with the same name will be created. |
* Otherwise file will be overwritten. |
* The filename must be either in the format 8+3 characters |
(first 8 characters - name itself, last 3 - extension, |
the short names and extensions are supplemented with spaces), |
or in the format 8.3 characters "FILE.EXT"/"FILE.EX " |
(name no more than 8 characters, dot, extension 3 characters |
supplemented if necessary by spaces). |
The filename must be written with capital letters. The terminating |
character with code 0 is not necessary (not ASCIIZ-string). |
* This function does not support folders on the ramdisk. |
====================================================================== |
======= Function 35 - read the color of a pixel on the screen. ======= |
====================================================================== |
Parameters: |
3215,6 → 3261,59 |
in the device documentation. |
====================================================================== |
===================== Function 62, subfunction 11 ==================== |
== Initialize user-accessible MMIO channel == |
====================================================================== |
Parameters: |
* eax = 62 - function |
* bl = 11 - subfunction |
* cx = PCI-address (bbbbbbbb dddddfff) |
Returns: |
* eax = -1 - PCI access not granted; |
* eax = -2 - no user MMIO access to this PCI address; |
* eax = -3 - memory allocation error; otherwise |
* eax = available user heap size. |
Remarks: |
* Low-level PCI access must be allowed (fn21:12) |
* PCI-address should correspond the system var [mmio_pci_addr] |
====================================================================== |
===================== Function 62, subfunction 12 ==================== |
== Request user-accessible MMIO address space == |
====================================================================== |
Parameters: |
* eax = 62 - function |
* bl = 12 - subfunction |
* bh = BAR number in PCI configuration space |
* ecx = MMIO-block size needed (bytes) |
* edx = MMIO-offset (number of whole 4Kb-pages!) |
Returns: |
* eax = -1 - user PCI access denied; |
* eax = -2 - invalid BAR number; |
* eax = -3 - BAR contains no valid IO addres; |
* eax = -4 - BAR addresses IO ports; |
* eax = -5 - dynamic allocation error; otherwise |
* eax = MMIO start address (in application's linear space). |
Remarks: |
* Low-level PCI access must be allowed (fn21:12) |
* The system var [mmio_pci_addr] sets the actual PCI-address |
* The granted MMIO addresses should be released after use (fn62:13) |
====================================================================== |
===================== Function 62, subfunction 13 ==================== |
== Release a block of user MMIO addresses == |
====================================================================== |
à ¬¥âàë: |
* eax = 62 - function |
* bl = 12 - subfunction |
* ecx = MMIO start address (in application's linear space). |
Returns: |
* eax = 1 if the block is successfully released; |
* eax = 0 in case of reallocation error; |
Remarks: |
* A valid uMMIO block should exist at this address (fn62:12) |
====================================================================== |
============== Function 63 - work with the debug board. ============== |
====================================================================== |
The debug board is the global system buffer (with the size |
3322,6 → 3421,7 |
====================================================================== |
The input mode influences results of reading keys by function 2. |
When a program loads, ASCII input mode is set for it. |
If subfunction is not support then eax=-1. |
-------------- Subfunction 1 - set keyboard input mode. -------------- |
Parameters: |
3570,7 → 3670,7 |
====================================================================== |
===================== Function 68, subfunction 14 ==================== |
============ Wait for signal from another program/driver. ============ |
====== Waiting delivering of signal from another program/driver ====== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
3578,11 → 3678,17 |
* ecx = pointer to the buffer for information (24 bytes) |
Returned value: |
* buffer pointed to by ecx contains the following information: |
* +0: dword: identifier for following data of signal |
* +4: dword: data of signal (20 bytes), format of which is defined |
by the first dword |
* +0: dword: identifier for underlying data of signal |
* +4: data of signal (20 bytes), format of which is defining by |
first dword |
====================================================================== |
====== Function 68, subfunction 15 - set FPU exception handler. ====== |
====================================================================== |
Deleted (in current implementation only 0 is returned). |
Using subfunctions 24, 25 is true. |
====================================================================== |
============= Function 68, subfunction 16 - load driver. ============= |
====================================================================== |
Parameters: |
3614,7 → 3720,11 |
* +16 = +0x10: dword: pointer to output data |
* +20 = +0x14: dword: size of output data |
Returned value: |
* eax = determined by driver |
* eax = error code |
0 - successful call |
-1 - any error. |
-2, -3, -4, etc. reserved for kernel error codes |
1, 2, 3, etc driver specific error codes |
Remarks: |
* Function codes and the structure of input/output data |
are defined by driver. |
3621,6 → 3731,12 |
* Previously one must obtain driver handle by subfunction 16. |
====================================================================== |
====== Function 68, subfunction 18 - set SSE exception handler. ====== |
====================================================================== |
Deleted (in current implementation only 0 is returned). |
Using subfunctions 24, 25 is true. |
====================================================================== |
=============== Function 68, subfunction 19 - load DLL. ============== |
====================================================================== |
Parameters: |
3659,92 → 3775,36 |
the new and old sizes. |
====================================================================== |
======== Function 68, subfunction 22 - open named memory area. ======= |
====== Function 68, subfunction 24 - set new exceptions handler ====== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 22 - subfunction number |
* ecx = area name. Maximum of 31 characters with terminating zero |
* edx = area size in bytes for SHM_CREATE and SHM_OPEN_ALWAYS |
* esi = flags for open and access: |
* SHM_OPEN = 0x00 - open existing memory area. If an area |
with such name does not exist, the function |
will return error code 5. |
* SHM_OPEN_ALWAYS = 0x04 - open existing or create new |
memory area. |
* SHM_CREATE = 0x08 - create new memory area. If an area |
with such name already exists, the function |
will return error code 10. |
* SHM_READ = 0x00 - only read access |
* SHM_WRITE = 0x01 - read and write access |
Returned value: |
* eax = pointer to memory area, 0 if error has occured |
* if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS): |
edx = 0 - success, otherwise - error code |
* if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS): |
edx = error code (if eax=0) or area size in bytes |
Error codes: |
* E_NOTFOUND = 5 |
* E_ACCESS = 10 |
* E_NOMEM = 30 |
* E_PARAM = 33 |
Remarks: |
* Before this call one must initialize process heap by call to |
subfunction 11. |
* If a new area is created, access flags set maximal rights |
for other processes. An attempt from other process to open |
with denied rights will fail with error code E_ACCESS. |
* The process which has created an area always has write access. |
====================================================================== |
======= Function 68, subfunction 23 - close named memory area. ======= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 23 - subfunction number |
* ecx = area name. Maximum of 31 characters with terminating zero |
Returned value: |
* eax destroyed |
Remarks: |
* A memory area is physically freed (with deleting all data and |
freeing physical memory), when all threads which have opened |
this area will close it. |
* When thread is terminating, all opened by it areas are closed. |
====================================================================== |
======== Function 68, subfunction 24 - set exception handler. ======== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 24 - subfunction number |
* ecx = address of the new exception handler |
* edx = the mask of handled exceptions |
* edx = the mask of processing exceptions |
Returned value: |
* eax = address of the old exception handler (0, if it was not set) |
* ebx = the old mask of handled exceptions |
* ebx = the old mask of exception handler |
Remarks: |
* Bit number in mask of exceptions corresponds to exception number |
in CPU-specification (Intel-PC). For example, FPU exceptions have |
number 16 (#MF), and SSE exceptions - 19 (#XF). |
* The current implementation ignores the inquiry for hook of 7 |
exception - the system handles #NM by its own. |
* The exception handler is called with exception number as first |
(and only) stack parameter. So, correct exit from the handler is |
RET 4. It returns to the instruction, that caused the exception, |
for faults, and to the next instruction for traps (see |
classification of exceptions in CPU specification). |
* When user handler receives control, the corresponding bit in |
the exception mask is cleared. Raising this exception |
in consequence leads to default handling, that is, |
terminating the application in absence of debugger or |
suspend with notification of debugger otherwise. |
* After user handler completes critical operations, it can set |
the corresponding bit in the exception mask with subfunction 25. |
Also user handler is responsible for clearing exceptions flags in |
FPU and/or SSE. |
* Bit number in mask of exceptions is correspond to exception number |
by CPU-specification (Intel-PC). For example, FPU-exception have |
number 16 (#MF), and SSE-exception - 19 (#XF) |
* The current implementation ignore the inquiry for hook of 7 |
exception - system process #NM by one's own. |
* User handler get exception number in stack parameter. So, correct |
exit from handler is: RET 4. Return from handler is to the same |
instruction, that was cause the exception |
* When control is transfering to user handler, corresponding bit in |
exception mask is clearing. Rising this exception in consequence |
- reduce to default-handling. Exactly: terminating the application, |
or suspending with debug-notify to owner. |
* After completion of critical operations in user handler, it may be |
rising corresponding bit in exception mask by using subfunction 25 |
Clearing exceptions flags in FPU and/or XMM modules - is |
responsibility of user handler too. |
====================================================================== |
====== Function 68, subfunction 25 - set FPU exception handler. ====== |
==== Function 68, subfunction 25 - change state of signal activity === |
====================================================================== |
Parameters: |
* eax = 68 - function number |
3752,15 → 3812,14 |
* ecx = signal number |
* edx = value of activity (0/1) |
Returned value: |
* eax = -1 - invalid signal number |
* otherwise eax = old value of activity for this signal (0/1) |
* eax = value of old activity for this signal (0/1) |
Remarks: |
* In current implementation only mask for user excepton handler, |
which has been previously set by subfunction 24, |
is changed. Signal number corresponds to exception number. |
* In current implementation, it is changed only exception mask for |
user exception handler, wich was previously set by subfunction 24. |
At that, number of signal correspond to exception number. |
====================================================================== |
====================== Function 69 - debugging. ====================== |
====================== Fucntion 69 - debugging. ====================== |
====================================================================== |
A process can load other process as debugged by set of corresponding |
bit by call to subfunction 7 of function 70. |
4052,10 → 4111,6 |
* '/hd0/2/menuet/pics/tanzania.bmp',0 |
* '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 |
* '/sys/MySuperApp.ini',0 |
Also function supports relative names. If the path begins not |
with '/', it is considered relative to a current folder. To get or |
set a current folder, use the function 30. |
Available subfunctions: |
* subfunction 0 - read file |
* subfunction 1 - read folder |
/kernel/branches/Kolibri-acpi/video/blitter.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/network/eth_drv/drivers/r6040.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/network/eth_drv/drivers/rtl8139.inc |
---|
323,14 → 323,14 |
out dx, al |
; 32k Rxbuffer, unlimited dma burst, no wrapping, no rx threshold |
; accept broadcast packets, accept physical match packets |
mov eax, RTL8139_RX_CONFIG |
mov ax, RTL8139_RX_CONFIG |
add edx, RTL8139_REG_RXCONFIG - RTL8139_REG_COMMAND |
out dx, eax |
out dx, ax |
; 1024 bytes DMA burst, total retries = 16 + 8 * 16 = 144 |
mov eax, (RTL8139_TX_MXDMA shl RTL8139_BIT_TX_MXDMA) \ |
mov ax, (RTL8139_TX_MXDMA shl RTL8139_BIT_TX_MXDMA) \ |
or (RTL8139_TXRR shl RTL8139_BIT_TXRR) |
add edx, RTL8139_REG_TXCONFIG - RTL8139_REG_RXCONFIG |
out dx, eax |
out dx, ax |
; enable auto negotiation |
add edx, RTL8139_REG_BMCR - RTL8139_REG_TXCONFIG |
in ax, dx |
/kernel/branches/Kolibri-acpi/network/eth_drv/ethernet.inc |
---|
103,7 → 103,6 |
include "drivers/pcnet32.inc" |
include "drivers/rtl8169.inc" |
include "drivers/forcedeth.inc" |
include "drivers/r6040.inc" |
; PCICards |
; ======== |
129,25 → 128,25 |
dd 0x802910ec, rtl8029_probe, rtl8029_reset, rtl8029_poll, rtl8029_transmit, 0 |
;dd 0x813910ec, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x813810ec, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x12111113, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x13601500, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x13604033, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x13001186, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x13401186, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0xab0613d1, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0xa1171259, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0xa11e1259, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0xab0614ea, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0xab0714ea, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x123411db, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x91301432, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x101202ac, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x0106018a, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x1211126c, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x81391743, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
;dd 0x8139021b, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x813910ec, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable ; tested by hidnplayr: works ok |
dd 0x813810ec, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x12111113, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable ; tested by hidnplayr: works ok |
dd 0x13601500, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x13604033, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x13001186, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x13401186, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0xab0613d1, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0xa1171259, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0xa11e1259, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0xab0614ea, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0xab0714ea, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x123411db, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x91301432, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x101202ac, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x0106018a, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x1211126c, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x81391743, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x8139021b, rtl8139_probe, rtl8139_reset, rtl8139_poll, rtl8139_transmit, rtl8139_cable |
dd 0x816810ec, rtl8169_probe, rtl8169_reset, rtl8169_poll, rtl8169_transmit, 0 |
dd 0x816910ec, rtl8169_probe, rtl8169_reset, rtl8169_poll, rtl8169_transmit, 0 |
189,12 → 188,18 |
dd 0x450010b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0 |
dd 0x09001039, SIS900_probe, SIS900_reset, SIS900_poll, SIS900_transmit, 0 |
dd 0x70161039, SIS900_probe, SIS900_reset, SIS900_poll, SIS900_transmit, 0 |
dd 0x20001022, pcnet32_probe, pcnet32_reset, pcnet32_poll, pcnet32_xmit, 0 |
dd 0x26251022, pcnet32_probe, pcnet32_reset, pcnet32_poll, pcnet32_xmit, 0 |
dd 0x20011022, pcnet32_probe, pcnet32_reset, pcnet32_poll, pcnet32_xmit, 0 |
;dd 0x08031516, mtd80x_probe, mtd80x_reset, mtd80x_poll, mtd80x_transmit, mtd80x_cable |
; following cards are untested |
dd 0x70161039, SIS900_probe, SIS900_reset, SIS900_poll, SIS900_transmit, 0 |
;dd 0x08001516, mtd80x_probe, mtd80x_reset, mtd80x_poll, mtd80x_transmit, mtd80x_cable |
;dd 0x08911516, mtd80x_probe, mtd80x_reset, mtd80x_poll, mtd80x_transmit, mtd80x_cable |
dd 0x006610de, forcedeth_probe, forcedeth_reset, forcedeth_poll, forcedeth_transmit, forcedeth_cable ; nVidia Corporation nForce2 Ethernet Controller |
dd 0x01c310de, forcedeth_probe, forcedeth_reset, forcedeth_poll, forcedeth_transmit, forcedeth_cable ; not tested |
dd 0x00D610de, forcedeth_probe, forcedeth_reset, forcedeth_poll, forcedeth_transmit, forcedeth_cable ; not tested |
236,8 → 241,6 |
dd 0x0ab310de, forcedeth_probe, forcedeth_reset, forcedeth_poll, forcedeth_transmit, forcedeth_cable ; not tested |
dd 0x0d7d10de, forcedeth_probe, forcedeth_reset, forcedeth_poll, forcedeth_transmit, forcedeth_cable ; not tested |
dd 0x604017F3, r6040_probe, r6040_reset, r6040_poll, r6040_transmit, 0 |
rb PCICARDS_ENTRY_SIZE ; end of list marker, do not remove |
endg |
/kernel/branches/Kolibri-acpi/boot/parsers.inc |
---|
File deleted |
/kernel/branches/Kolibri-acpi/boot/bootcode.inc |
---|
91,7 → 91,6 |
inc si |
cmp si, 10 |
jb @b |
sayerr_badsect: |
mov si, badsect |
sayerr_plain: |
call printplain |
146,120 → 145,9 |
;========================================================================= |
include 'bootvesa.inc' ;Include source for boot vesa |
if defined extended_primary_loader |
include 'parsers.inc' |
end if |
start_of_code: |
if defined extended_primary_loader |
; save data from primary loader |
mov word [cs:bootcallback], si |
mov word [cs:bootcallback+2], ds |
push cs |
pop ds |
mov [bootdevice], ax |
mov [bootfs], bx |
; set up stack |
mov ax, 3000h |
mov ss, ax |
mov sp, 0EC00h |
; try to load configuration file |
mov ax, 1 |
mov di, config_file_struct |
call [bootcallback] |
cld |
push cs |
pop es |
; bx=0 - ok, bx=1 - part of file loaded, assume this is ok |
cmp bx, 1 |
ja .config_bad |
; configuration file was loaded, parse |
; if length is too big, use first 0FFFFh bytes |
test dx, dx |
jz @f |
mov ax, 0FFFFh |
@@: |
; ds:si will be pointer to current data, dx = limit |
xchg ax, dx |
push 4000h |
pop ds |
xor si, si |
.parse_loop: |
; skip spaces |
cmp si, dx |
jae .parse_done |
lodsb |
cmp al, ' ' |
jbe .parse_loop |
dec si |
; loop over all possible configuration values |
mov bx, config_file_variables |
.find_variant: |
; get length |
mov cx, [es:bx] |
; zero length = end of list |
jecxz .find_newline |
; skip over length |
inc bx |
inc bx |
mov di, bx |
; skip over string |
add bx, cx |
; test whether we have at least cx symbols left |
mov ax, cx |
add ax, si |
jc .next_variant1 |
cmp ax, dx |
jae .next_variant1 |
; save current position |
push si |
; compare strings |
repz cmpsb |
jnz .next_variant2 |
; strings are equal; look for "=" with possible spaces before and after |
@@: |
cmp si, dx |
jae .next_variant2 |
lodsb |
cmp al, ' ' |
jbe @b |
cmp al, '=' |
jnz .next_variant2 |
; ok, we found the true variant |
; ignore saved position on the stack |
pop ax |
; call the parser |
call word [es:bx] |
; line parsed, find next |
.find_newline: |
cmp si, dx |
jae .parse_done |
lodsb |
cmp al, 13 |
jz .parse_loop |
cmp al, 10 |
jz .parse_loop |
jmp .find_newline |
.next_variant2: |
; continue to the next variant, restoring current position |
pop si |
.next_variant1: |
; continue to the next variant |
; skip over the parser |
inc bx |
inc bx |
jmp .find_variant |
.parse_done: |
.config_bad: |
; set up segment registers |
push cs |
pop ds |
else |
cld |
; \begin{diamond}[02.12.2005] |
; if bootloader sets ax = 'KL', then ds:si points to loader block |
cmp ax, 'KL' |
287,7 → 175,6 |
pop ds |
push cs |
pop es |
end if |
; set videomode |
mov ax, 3 |
491,7 → 378,6 |
apm_end: |
_setcursor d80x25_top_num, 0 |
if ~ defined extended_primary_loader |
;CHECK current of code |
cmp [cfgmanager.loader_block], -1 |
jz noloaderblock |
501,7 → 387,6 |
jnz sayerr |
push 0 |
pop es |
end if |
noloaderblock: |
; DISPLAY VESA INFORMATION |
519,9 → 404,7 |
; d) preboot_device = from what boot? |
; determine default settings |
if ~ defined extended_primary_loader |
mov [.bSettingsChanged], 0 |
end if |
;.preboot_gr_end: |
mov di, preboot_device |
529,12 → 412,6 |
; set it to use this preloaded image |
cmp byte [di], 0 |
jnz .preboot_device_inited |
if defined extended_primary_loader |
inc byte [di] |
cmp byte [bootdevice], 'f' ; floppy? |
jz .preboot_device_inited |
inc byte [di] |
else |
cmp [.loader_block], -1 |
jz @f |
les bx, [.loader_block] |
545,7 → 422,6 |
@@: |
; otherwise, set [preboot_device] to 1 (default value - boot from floppy) |
mov byte [di], 1 |
end if |
.preboot_device_inited: |
; following 4 lines set variables to 1 if its current value is 0 |
cmp byte [di+preboot_dma-preboot_device], 1 |
590,11 → 466,7 |
mov si, preboot_device_msg |
call print |
mov al, [preboot_device] |
if defined extended_primary_loader |
and eax, 3 |
else |
and eax, 7 |
end if |
mov si, [preboot_device_msgs+eax*2] |
call printplain |
.show_remarks: |
681,18 → 553,12 |
_setcursor 15,0 |
mov si, bdev |
call print |
if defined extended_primary_loader |
mov bx, '12' |
else |
mov bx, '14' |
end if |
call getkey |
mov [preboot_device], al |
_setcursor 13,0 |
.d: |
if ~ defined extended_primary_loader |
mov [.bSettingsChanged], 1 |
end if |
call clear_vmodes_table ;clear vmodes_table |
jmp .printcfg |
.change_a: |
806,14 → 672,10 |
virtual at novesa |
.oldtimer dd ? |
.starttime dd ? |
if ~ defined extended_primary_loader |
.bSettingsChanged db ? |
end if |
.timer dd ? |
end virtual |
if ~ defined extended_primary_loader |
.loader_block dd -1 |
end if |
.gettime: |
mov ah, 0 |
int 1Ah |
830,11 → 692,7 |
pushad |
call .gettime |
sub eax, [.starttime] |
if defined extended_primary_loader |
sub ax, [preboot_timeout] |
else |
sub ax, 18*5 |
end if |
jae .timergo |
neg ax |
add ax, 18-1 |
890,7 → 748,6 |
mov si, loading_msg |
call print |
_setcursor 15,0 |
if ~ defined extended_primary_loader |
cmp [.bSettingsChanged], 0 |
jz .load |
cmp [.loader_block], -1 |
931,7 → 788,6 |
call printplain |
_setcursor 15,0 |
.load: |
end if |
; \end{diamond}[02.12.2005] |
; ASK GRAPHICS MODE |
960,7 → 816,7 |
mov [boot_dev], al |
; GET MEMORY MAP |
include '../detect/biosmem.inc' |
include 'detect/biosmem.inc' |
; READ DISKETTE TO MEMORY |
1111,7 → 967,6 |
mov dx, 0x3f2 |
mov al, 0 |
out dx, al |
sayerr_memmove: |
mov si, memmovefailed |
jmp sayerr_plain |
@@: |
1290,40 → 1145,6 |
mov al, 0 |
out dx, al |
if defined extended_primary_loader |
cmp [boot_dev], 1 |
jne no_sys_from_primary |
; load kolibri.img using callback from primary loader |
and word [movedesc + 24 + 2], 0 |
mov byte [movedesc + 24 + 4], 10h |
; read in blocks of 64K until file is fully loaded |
mov ax, 1 |
.repeat: |
mov di, image_file_struct |
call [bootcallback] |
push cs |
pop ds |
push cs |
pop es |
cmp bx, 1 |
ja sayerr_badsect |
push bx |
mov si, movedesc |
and word [si + 16 + 2], 0 |
mov byte [si + 16 + 4], 4 |
mov ah, 87h |
mov cx, 8000h |
int 15h |
pop bx |
test ah, ah |
jnz sayerr_memmove |
inc byte [si + 24 + 4] |
test bx, bx |
jz no_sys_from_primary |
mov ax, 2 |
jmp .repeat |
no_sys_from_primary: |
end if |
; SET GRAPHICS |
/kernel/branches/Kolibri-acpi/boot/booteng.inc |
---|
40,15 → 40,11 |
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0 |
if defined extended_primary_loader |
bdev db "Load ramdisk from [1-floppy; 2-C:\kolibri.img (FAT32);" |
db 13,10,186," " |
db "3-use preloaded ram-image from kernel restart;" |
db 13,10,186," " |
db "4-create blank image]: ",0 |
else |
bdev db "Load ramdisk from [1-floppy; 2-kolibri.img]: ",0 |
end if |
probetext db 13,10,13,10,186," Use standart graphics mode? [1-yes, " |
db "2-probe bios (Vesa 3.0)]: ",0 |
;memokz256 db 13,10,186," RAM 256 Mb",0 |
92,22 → 88,14 |
;readonly_msg db " only for reading",13,10,0 |
vrrm_msg db " [c] Use VRR:",0 |
preboot_device_msg db " [d] Floppy image: ",0 |
if defined extended_primary_loader |
preboot_device_msgs dw 0,pdm1,pdm2,0 |
pdm1 db "real floppy",13,10,0 |
pdm2 db "C:\kolibri.img (FAT32)",13,10,0 |
else |
preboot_device_msgs dw 0,pdm1,pdm2,pdm3 |
pdm1 db "real floppy",13,10,0 |
pdm2 db "C:\kolibri.img (FAT32)",13,10,0 |
pdm3 db "use already loaded image",13,10,0 |
pdm4 db "create blank image",13,10,0 |
end if |
loading_msg db "Loading KolibriOS...",0 |
if ~ defined extended_primary_loader |
save_quest db "Remember current settings? [y/n]: ",0 |
loader_block_error db "Bootloader data invalid, I cannot continue. Stopped.",0 |
end if |
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0 |
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0 |
/kernel/branches/Kolibri-acpi/boot/bootet.inc |
---|
50,15 → 50,11 |
;mem_model db 13,10,186," Motherboard memory [1-16 Mb / 2-32 Mb / " |
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0 |
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0 |
if defined extended_primary_loader |
bdev db "Paigalda mäluketas [1-diskett; 2-kolibri.img]: ",0 |
else |
bdev db "Paigalda mäluketas [1-diskett; 2-C:\kolibri.img (FAT32);" |
db 13,10,186," " |
db "3-kasuta eellaaditud mäluketast kerneli restardist;" |
db 13,10,186," " |
db "4-loo tühi pilt]: ",0 |
end if |
probetext db 13,10,13,10,186," Kasuta standartset graafika reziimi? [1-jah, " |
db "2-leia biosist (Vesa 3.0)]: ",0 |
;memokz256 db 13,10,186," RAM 256 Mb",0 |
103,22 → 99,14 |
;readonly_msg db " ainult lugemiseks",13,10,0 |
vrrm_msg db " [c] Kasuta VRR:",0 |
preboot_device_msg db " [d] Disketi kujutis: ",0 |
if defined extended_primary_loader |
preboot_device_msgs dw 0,pdm1,pdm2,0 |
pdm1 db "reaalne diskett",13,10,0 |
pdm2 db "kolibri.img",13,10,0 |
else |
preboot_device_msgs dw 0,pdm1,pdm2,pdm3 |
pdm1 db "reaalne diskett",13,10,0 |
pdm2 db "C:\kolibri.img (FAT32)",13,10,0 |
pdm3 db "kasuta juba laaditud kujutist",13,10,0 |
pdm4 db "loo tühi pilt",13,10,0 |
end if |
loading_msg db "Laadin KolibriOS...",0 |
if ~ defined extended_primary_loader |
save_quest db "Jäta meelde praegused seaded? [y/n]: ",0 |
loader_block_error db "Alglaaduri andmed vigased, ei saa jätkata. Peatatud.",0 |
end if |
remark1 db "Default values were selected to match most of configurations, but not all.",0 |
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0 |
/kernel/branches/Kolibri-acpi/boot/bootge.inc |
---|
55,15 → 55,11 |
;mem_model db 13,10,186," Hauptspeicher [1-16 Mb / 2-32 Mb / " |
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0 |
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0 |
if defined extended_primary_loader |
bdev db "Lade die Ramdisk von [1-Diskette; 2-kolibri.img]: ",0 |
else |
bdev db "Lade die Ramdisk von [1-Diskette; 2-C:\kolibri.img (FAT32);" |
db 13,10,186," " |
db "3-benutze ein bereits geladenes Kernel image;" |
db 13,10,186," " |
db "4-create blank image]: ",0 |
end if |
probetext db 13,10,13,10,186," Nutze Standardgrafikmodi? [1-ja, " |
db "2-BIOS Test (Vesa 3.0)]: ",0 |
;memokz256 db 13,10,186," RAM 256 Mb",0 |
108,22 → 104,14 |
;readonly_msg db " fur Lesen",13,10,0 |
vrrm_msg db " [c] Nutze VRR:",0 |
preboot_device_msg db " [d] Diskettenimage: ",0 |
if defined extended_primary_loader |
preboot_device_msgs dw 0,pdm1,pdm2,0 |
pdm1 db "Echte Diskette",13,10,0 |
pdm2 db "kolibri.img",13,10,0 |
else |
preboot_device_msgs dw 0,pdm1,pdm2,pdm3 |
pdm1 db "Echte Diskette",13,10,0 |
pdm2 db "C:\kolibri.img (FAT32)",13,10,0 |
pdm3 db "Nutze bereits geladenes Image",13,10,0 |
pdm4 db "create blank image",13,10,0 |
end if |
loading_msg db "Lade KolibriOS...",0 |
if ~ defined extended_primary_loader |
save_quest db "Aktuelle Einstellungen speichern? [y/n]: ",0 |
loader_block_error db "Bootloader Daten ungueltig, Kann nicht fortfahren. Angehalten.",0 |
end if |
remark1 db "Default values were selected to match most of configurations, but not all.",0 |
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0 |
/kernel/branches/Kolibri-acpi/boot/bootru.inc |
---|
33,15 → 33,11 |
db 186," 1024*768>800*600 ¨ 800*600>640*480) [1-¤ , 2-¥â]: ",0 |
;ask_dma db "ᯮ«ì§®¢ âì DMA ¤«ï ¤®áâ㯠ª HDD? [1-¤ , 2-⮫쪮 ç⥨¥, 3-¥â]: ",0 |
ask_bd db "®¡ ¢¨âì ¤¨áª¨, ¢¨¤¨¬ë¥ ç¥à¥§ BIOS ¢ ०¨¬¥ V86? [1-¤ , 2-¥â]: ",0 |
if defined extended_primary_loader |
bdev db " £à㧨âì ®¡à § ¨§ [1-¤¨áª¥â ; 2-kolibri.img ¨§ ¯ ¯ª¨ § £à㧪¨]: ",0 |
else |
bdev db " £à㧨âì ®¡à § ¨§ [1-¤¨áª¥â ; 2-C:\kolibri.img (FAT32);" |
db 13,10,186," " |
db "3-¨á¯®«ì§®¢ âì 㦥 § £àã¦¥ë© ®¡à §;" |
db 13,10,186," " |
db "4-ᮧ¤ âì ç¨áâë© ®¡à §]: ",0 |
end if |
prnotfnd db "訡ª - ¨¤¥®à¥¦¨¬ ¥ ©¤¥.",0 |
not386 db "訡ª - ॡã¥âáï ¯à®æ¥áá®à 386+.",0 |
fatalsel db "訡ª - ë¡à ë© ¢¨¤¥®à¥¦¨¬ ¥ ¯®¤¤¥à¦¨¢ ¥âáï.",0 |
71,22 → 67,14 |
readonly_msg db " ⮫쪮 ç⥨¥",13,10,0 |
vrrm_msg db " [c] ᯮ«ì§®¢ ¨¥ VRR:",0 |
preboot_device_msg db " [d] ¡à § ¤¨áª¥âë: ",0 |
if defined extended_primary_loader |
preboot_device_msgs dw 0,pdm1,pdm2,0 |
pdm1 db " áâ®ïé ï ¤¨áª¥â ",13,10,0 |
pdm2 db "kolibri.img ¨§ ¯ ¯ª¨ § £à㧪¨",13,10,0 |
else |
preboot_device_msgs dw 0,pdm1,pdm2,pdm3,pdm4 |
pdm1 db " áâ®ïé ï ¤¨áª¥â ",13,10,0 |
pdm2 db "C:\kolibri.img (FAT32)",13,10,0 |
pdm3 db "¨á¯®«ì§®¢ âì 㦥 § £àã¦¥ë© ®¡à §",13,10,0 |
pdm4 db "ᮧ¤ âì ç¨áâë© ®¡à §",13,10,0 |
end if |
loading_msg db "¤ñâ § £à㧪 KolibriOS...",0 |
if ~ defined extended_primary_loader ; saving not supported in this case |
save_quest db " ¯®¬¨âì ⥪ã騥 áâனª¨? [y/n]: ",0 |
loader_block_error db "訡ª ¢ ¤ ëå ç «ì®£® § £àã§ç¨ª , ¯à®¤®«¦¥¨¥ ¥¢®§¬®¦®.",0 |
end if |
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿ ',13,10,0 |
/kernel/branches/Kolibri-acpi/boot/bootvesa.inc |
---|
314,11 → 314,7 |
cmp word [es:si+6],0x13 |
je .no_vesa_0x13 |
if defined extended_primary_loader |
mov di,config_file_variables |
else |
mov di,loader_block_error |
end if |
movzx eax,word[es:si+0] |
mov ecx,10 |
call int2strnz |
331,11 → 327,7 |
movzx eax,word[es:si+8] |
call int2strnz |
mov dword[es:di],0x00000d0a |
if defined extended_primary_loader |
mov si,config_file_variables |
else |
mov si,loader_block_error |
end if |
push ds |
push es |
pop ds |
352,34 → 344,9 |
ret |
;----------------------------------------------------------------------------- |
check_first_parm: |
if defined extended_primary_loader |
mov cx, [number_vm] |
jcxz .novbemode |
mov si, modes_table |
.findvbemode: |
cmp [es:si+6], cx |
jnz @f |
cmp word [es:si+8],32 |
je .ok_found_mode |
cmp word [es:si+8],24 |
je .ok_found_mode |
@@: add si,size_of_step |
cmp word [es:si],-1 |
jnz .findvbemode |
.novbemode: |
mov ax, [x_save] |
test ax, ax |
jz .zerro |
mov bx, [y_save] |
mov si, modes_table |
call .loops |
test ax, ax |
jz .ok_found_mode |
else |
mov si,word [preboot_graph] |
test si,si |
jnz .no_zero ;if no zero |
end if |
.zerro: |
; mov ax,modes_table |
; mov word [cursor_pos],ax |
407,7 → 374,6 |
jz .ok_found_mode |
mov si,modes_table |
if ~ defined extended_primary_loader |
jmp .ok_found_mode |
428,7 → 394,6 |
; jb .zerro ;check on correct if bellow |
; cmp ax,word [end_cursor] |
; ja .zerro ;check on correct if anymore |
end if |
.ok_found_mode: |
mov word [home_cursor],si |
/kernel/branches/Kolibri-acpi/boot/preboot.inc |
---|
30,9 → 30,6 |
;!!!! 0 - autodetect !!!! |
preboot_blogesc = 0 ; start immediately after bootlog |
preboot_biosdisk db 0 ; use V86 to access disks through BIOS (1-yes, 2-no) |
if defined extended_primary_loader |
preboot_timeout dw 5*18 ; timeout in 1/18th of second for config settings screen |
end if |
if $>0x200 |
ERROR: prebooting parameters must fit in first sector!!! |
/kernel/branches/Kolibri-acpi/boot/shutdown.inc |
---|
98,10 → 98,8 |
jmp $ |
no_apm_off: |
if ~ defined extended_primary_loader ; kernel restarting is not supported |
dec ax ; 3 = reboot |
jnz restart_kernel ; 4 = restart kernel |
end if |
push 0x40 |
pop ds |
mov word[0x0072],0x1234 |
152,7 → 150,6 |
;!!!!!!!!!!!!!!!!!!!!!!!! |
ret |
if ~ defined extended_primary_loader |
restart_kernel: |
mov ax,0x0003 ; set text mode for screen |
208,5 → 205,5 |
mov si, kernel_restart_bootblock |
mov ax, 'KL' |
jmp 0x1000:0000 |
end if |
/kernel/branches/Kolibri-acpi/bootloader/boot_fat12.asm |
---|
194,17 → 194,17 |
mov ax,0e2eh ; ah=0eh (teletype), al='.' |
xor bh,bh |
int 10h |
pop bx |
writesec: |
; convert cluster number to sector number |
mov ax,bp ; data cluster to read |
sub ax,2 |
xor dx,dx |
mov dl,byte [BPB_SecPerClus+boot_program] |
mul dx |
xor bx,bx |
mov bl,byte [BPB_SecPerClus+boot_program] |
mul bx |
add ax,word [data_start+boot_program] |
pop bx |
writesec: |
call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector) |
patchhere: |
mov ah,2 ; ah=2 (read) |
267,7 → 267,7 |
push cs |
pop ds |
mov byte [patchhere+1+boot_program], 3 ; change ah=2 to ah=3 |
mov bp,[cluster1st+boot_program] |
mov ax,[cluster1st+boot_program] |
push 1000h |
pop es |
xor bx,bx |
/kernel/branches/Kolibri-acpi/data16.inc |
---|
22,12 → 22,10 |
dd 0 |
dw 0 |
if ~ defined extended_primary_loader ; restart from memory is not supported in extended primary loader cfg |
kernel_restart_bootblock: |
db 1 ; version |
dw 1 ; floppy image is in memory |
dd 0 ; cannot save parameters |
end if |
; table for move to extended memory (int 15h, ah=87h) |
align 8 |
55,36 → 53,3 |
db 0x00,0x00,0x0,0x00,0x00,0x00,0x0,0x0 |
db 0x00,0x00,0x0,0x00,0x00,0x00,0x0,0x0 |
if defined extended_primary_loader |
; look in PrimaryLoader.txt for the description |
bootdevice dw 0 ; ax from primary loader |
bootfs dw 0 ; bx from primary loader |
bootcallback dd 0 ; ds:si from primary loader |
; data for configuration file loading, look in PrimaryLoader.txt |
config_file_struct: |
dw 0, 4000h ; load to 4000:0000 |
dw 16 ; read no more than 16*4K = 64K |
db 'config.ini',0 |
; data for configuration file parsing |
macro config_variable string,parser |
{ |
local len |
len dw 0 |
db string |
store word $ - len - 2 at len |
dw parser |
} |
config_file_variables: |
config_variable 'timeout', parse_timeout |
config_variable 'resolution', parse_resolution |
config_variable 'vbemode', parse_vbemode |
config_variable 'vrr', parse_vrr |
config_variable 'biosdisks', parse_biosdisks |
config_variable 'imgfrom', parse_imgfrom |
dw 0 |
; data for image file loading, look in PrimaryLoader.txt |
image_file_struct: |
dw 0, 4000h ; load to 4000:0000 |
dw 16 ; read no more than 16*4K = 64K |
db 'kolibri.img',0 |
end if |