Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 646 → Rev 647

/programs/develop/ktcc/trunk/libc/kolibrisys/_ksys_files_acces.asm
0,0 → 1,119
format ELF
 
section '.text' executable
 
include 'proc32.inc'
public _ksys_get_filesize
public _ksys_readfile
public _ksys_rewritefile
public _ksys_appendtofile
 
align 4
proc _ksys_get_filesize stdcall, filename:dword
 
xor eax,eax
mov ebx,[filename]
mov [fileinfo.subproc],dword 5
mov [fileinfo.offset_l],eax
mov [fileinfo.offset_h],eax
mov [fileinfo.size],eax
mov [fileinfo.data],dword buffer_for_info
mov [fileinfo.letter],al
mov [fileinfo.filename],ebx
 
mov eax,70
mov ebx,fileinfo
int 0x40
 
test eax,eax
jnz error_for_file_size
 
mov eax,[buffer_for_info+32] ;file size
 
error_for_file_size:
 
ret
endp
 
 
align 4
proc _ksys_readfile stdcall,filename:dword,position:dword,sizeblock:dword,buffer:dword
 
xor eax,eax
mov ebx,[position]
mov ecx,[sizeblock]
mov edx,[buffer]
mov esi,[filename]
mov [fileinfo.subproc],eax
mov [fileinfo.offset_l],ebx
mov [fileinfo.offset_h],eax
mov [fileinfo.size],ecx
mov [fileinfo.data],edx
mov [fileinfo.letter],al
mov [fileinfo.filename],esi
 
mov eax,70
mov ebx,fileinfo
int 0x40
 
ret
endp
 
align 4
proc _ksys_rewritefile stdcall,filename:dword,sizeblock:dword,data_write:dword
 
xor eax,eax
mov ebx,[sizeblock]
mov ecx,[data_write]
mov edx,[filename]
mov [fileinfo.subproc],dword 2
mov [fileinfo.offset_l],eax
mov [fileinfo.offset_h],eax
mov [fileinfo.size],ebx
mov [fileinfo.data],ecx
mov [fileinfo.letter],al
mov [fileinfo.filename],edx
 
mov eax,70
mov ebx,fileinfo
int 0x40
 
ret
endp
 
align 4
proc _ksys_appendtofile stdcall,filename:dword,pos:dword,sizeblock:dword,data_append:dword
 
xor eax,eax
mov ebx,[pos]
mov ecx,[sizeblock]
mov edx,[data_append]
mov esi,[filename]
mov [fileinfo.subproc],dword 3
mov [fileinfo.offset_l],ebx
mov [fileinfo.offset_h],eax
mov [fileinfo.size],ecx
mov [fileinfo.data],edx
mov [fileinfo.letter],al
mov [fileinfo.filename],esi
 
mov eax,70
mov ebx,fileinfo
int 0x40
 
ret
endp
 
struc FILEIO
{
.subproc rd 1
.offset_l rd 1
.offset_h rd 1
.size rd 1
.data rd 1
.letter rb 1
.filename rd 1
}
 
fileinfo FILEIO
buffer_for_info rd 11
/programs/develop/ktcc/trunk/libc/kolibrisys/backgr.asm
0,0 → 1,54
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_set_background_size,8
;arg1 - xsize
;arg2 - ysize
push ebx
mov ecx,[esp+8]
mov edx,[esp+12]
mov eax,15
mov ebx,1
int 0x40
pop ebx
ret 8
public_stdcall _ksys_write_background_mem,8
;arg1 - pos
;arg2 - color
push ebx
mov eax,15
mov ebx,2
mov ecx,[esp+8]
mov edx,[esp+12]
int 0x40
pop ebx
ret 8
public_stdcall _ksys_draw_background,0
mov edx,ebx
mov eax,15
mov ebx,3
int 0x40
mov ebx,edx
ret
public_stdcall _ksys_set_background_draw_type,4
;arg1 - type
mov edx,ebx
mov eax,15
mov ebx,4
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 4
public_stdcall _ksys_background_blockmove,12
;arg1 - source
;arg2 - position in dest
;arg3 - size
push ebx esi
mov eax,15
mov ebx,5
mov ecx,[esp+12]
mov edx,[esp+16]
mov esi,[esp+20]
int 0x40
pop esi ebx
ret 12
/programs/develop/ktcc/trunk/libc/kolibrisys/button.asm
0,0 → 1,35
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_make_button,24
;arg1 - x
;arg2 - y
;arg3 - xsize
;arg4 - ysize
;arg5 - id
;arg6 - color
push ebx esi
mov ebx,[esp+12]
shl ebx,16
mov bx,[esp+20]
mov ecx,[esp+16]
shl ecx,16
mov cx,[esp+24]
mov edx,[esp+28]
mov esi,[esp+32]
mov eax,8
int 0x40
pop esi ebx
ret 24
public_stdcall _ksys_get_button_id,0
mov eax,17
int 0x40
test al,al
jnz .no_button
shr eax,8
ret
.no_button:
xor eax,eax
dec eax
ret
/programs/develop/ktcc/trunk/libc/kolibrisys/clock.asm
0,0 → 1,15
format ELF
 
include "proc32.inc"
 
section '.text' executable
public _ksys_get_system_clock
 
align 4
proc _ksys_get_system_clock stdcall
 
mov eax,3
int 0x40
ret
 
endp
/programs/develop/ktcc/trunk/libc/kolibrisys/cofflib.asm
0,0 → 1,73
format ELF
include 'proc32.inc'
section '.text' executable
 
public _ksys_cofflib_load
public _ksys_cofflib_getproc
 
proc _ksys_cofflib_load stdcall, name:dword
 
mov eax, 68
mov ebx, 19
mov ecx, [name]
int 0x40
ret
endp
 
proc _ksys_cofflib_getproc stdcall, export:dword,name:dword
 
mov ebx,[export]
 
next_name_check:
 
mov ecx,[ebx]
test ecx,ecx
jz end_export
 
;cmp export string with name
mov esi,[name]
xor edi,edi
next_simbol_check:
 
xor eax,eax
mov al,[ecx]
test al,al
jz exit_check_simbol
 
xor edx,edx
mov dl,[esi]
cmp al,dl
je simbols_equvalent
add edi,1
jmp exit_check_simbol
simbols_equvalent:
 
;pushad
 
;mov cl,al
;mov ebx,1
;mov eax,63
;int 0x40
 
;popad
 
add ecx,1
add esi,1
jmp next_simbol_check
exit_check_simbol:
 
test edi,edi
jnz function_not_finded
mov eax,[ebx+4]
jmp end_export
function_not_finded:
 
add ebx,8
 
jmp next_name_check
 
end_export:
 
ret
endp
 
/programs/develop/ktcc/trunk/libc/kolibrisys/date.asm
0,0 → 1,7
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_get_date,0
mov eax,29
int 0x40
ret
/programs/develop/ktcc/trunk/libc/kolibrisys/debug_board.asm
0,0 → 1,56
format ELF
 
include "proc32.inc"
 
section '.text' executable
 
public _ksys_debug_out
public debug_out_str
 
align 4
proc _ksys_debug_out stdcall, c:dword
 
pushad
 
xor ecx,ecx
mov cl,byte[c]
mov ebx,1
mov eax,63
int 0x40
 
popad
 
ret
 
endp
 
align 4
proc debug_out_str stdcall, s:dword
 
pushad
mov eax,[s] ;eax=pointer to string
next_simbol_print:
 
xor ebx,ebx
mov bl,[eax]
test bl,bl
jz exit_print_str
 
cmp bl,10
jne no_new_line
mov ecx,13
stdcall _ksys_debug_out, ecx
no_new_line:
 
stdcall _ksys_debug_out, ebx
add eax,1
 
jmp next_simbol_print
 
exit_print_str:
 
popad
 
ret
endp
/programs/develop/ktcc/trunk/libc/kolibrisys/delay.asm
0,0 → 1,11
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_delay,4
;arg1 - time
mov edx,ebx
mov eax,5
mov ebx,[esp+4]
int 0x40
mov ebx,edx
ret 4
/programs/develop/ktcc/trunk/libc/kolibrisys/dga.asm
0,0 → 1,34
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_dga_get_resolution,16
;arg1 - *xres
;arg2 - *yres
;arg3 - *bpp
;arg4 - *bpscan
mov edx,ebx
mov eax,61
mov ebx,1
int 0x40
mov ebx,[esp+8]
mov [ebx],ax
mov word [ebx+2],0
shr eax,16
mov ebx,[esp+4]
mov [ebx],eax
mov eax,61
mov ebx,2
int 0x40
mov ebx,[esp+12]
mov [ebx],eax
mov eax,61
mov ebx,3
int 0x40
mov ebx,[esp+16]
mov [ebx],eax
mov ebx,edx
ret 16
/programs/develop/ktcc/trunk/libc/kolibrisys/draw_bar.asm
0,0 → 1,21
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_draw_bar,20
;arg1 - x
;arg2 - y
;arg3 - xsize
;arg4 - ysize
;arg5 - color
push ebx
mov eax,13
mov ebx,[esp+8]
shl ebx,16
mov bx,[esp+16]
mov ecx,[esp+12]
shl ecx,16
mov cx,[esp+20]
mov edx,[esp+24]
int 0x40
pop ebx
ret 20
/programs/develop/ktcc/trunk/libc/kolibrisys/draw_image.asm
0,0 → 1,21
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_putimage,20
;arg1 - x
;arg2 - y
;arg3 - xsize
;arg4 - ysize
;arg5 - image
push ebx
mov ebx,[esp+24]
mov ecx,[esp+16]
shl ecx,16
mov ecx,[esp+20]
mov ebx,[esp+8]
shl ebx,16
mov ebx,[esp+12]
mov eax,7
int 0x40
pop ebx
ret 20
/programs/develop/ktcc/trunk/libc/kolibrisys/draw_window.asm
0,0 → 1,34
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_draw_window,36
;arg1 - xcoord
;arg2 - ycoord
;arg3 - xsize
;arg4 - ysize
;arg5 - workcolor
;arg6 - type
;arg7 - captioncolor
;arg8 - windowtype
;arg9 - bordercolor
push ebp
mov ebp,esp
push ebx esi edi
mov ebx,[ebp+8]
shl ebx,16
mov bx,[ebp+16]
mov ecx,[ebp+12]
shl ecx,16
mov cx,[ebp+20]
mov edx,[ebp+28]
shl edx,24
add edx,[ebp+24]
mov esi,[ebp+36]
shl esi,24
add esi,[ebp+32]
mov edi,[ebp+40]
xor eax,eax
int 0x40
pop edi esi ebx
pop ebp
ret 36
/programs/develop/ktcc/trunk/libc/kolibrisys/event.asm
0,0 → 1,40
format ELF
 
section '.text' executable
 
public _ksys_wait_for_event_infinite
public _ksys_check_for_event
public _ksys_wait_for_event
public _ksys_set_wanted_events
 
_ksys_wait_for_event_infinite:
 
mov eax,10
int 0x40
 
ret
_ksys_check_for_event:
 
mov eax,11
int 0x40
 
ret
_ksys_wait_for_event:
 
;arg1 - time
mov eax,23
mov ebx,[esp+4]
int 0x40
 
ret 4
_ksys_set_wanted_events:
 
;arg1 - flags
mov eax,40
mov ebx,[esp+4]
int 0x40
 
ret 4
/programs/develop/ktcc/trunk/libc/kolibrisys/exit.asm
0,0 → 1,8
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_exit,0
xor eax,eax
dec eax
int 0x40
; ret
/programs/develop/ktcc/trunk/libc/kolibrisys/ipc.asm
0,0 → 1,28
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_send_message,12
;arg1 - pid
;arg2 - msg
;arg3 - size
push ebx esi
mov eax,60
mov ebx,2
mov ecx,[esp+12]
mov edx,[esp+16]
mov esi,[esp+20]
int 0x40
pop esi ebx
ret 12
public_stdcall _ksys_define_receive_area,8
;arg1 - area
;arg2 - size
push ebx
mov eax,60
mov ebx,1
mov ecx,[esp+8]
mov edx,[esp+12]
int 0x40
pop ebx
ret 8
/programs/develop/ktcc/trunk/libc/kolibrisys/irq.asm
0,0 → 1,119
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_get_irq_owner,4
;arg1 - irq
mov edx,ebx
mov eax,41
mov ebx,[esp+4]
int 0x40
mov ebx,edx
ret 4
public_stdcall _ksys_get_data_read_by_irq,12
;arg1 - irq
;arg2 - *size
;arg3 - data
mov edx,ebx
mov eax,42
mov ebx,[esp+4]
int 0x40
cmp ecx,2
jz .not_an_owner
push ecx
mov ecx,[esp+16]
test ecx,ecx
jz .ignore_data
mov [ecx],bl
.ignore_data:
mov ecx,[esp+12]
mov [ecx],eax
pop eax
mov ebx,edx
ret 12
.not_an_owner:
mov eax,2
mov ebx,edx
ret
public_stdcall _ksys_send_data_to_device,8
;arg1 - port
;arg2 - data
mov edx,ebx
mov eax,63
mov ebx,[esp+8]
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 8
public_stdcall _ksys_receive_data_from_device,8
;arg1 - port
;arg2 - data
mov edx,ebx
mov eax,43
mov ecx,[esp+4]
add ecx,0x80000000
int 0x40
mov ecx,[esp+8]
mov [ecx],bl
mov ebx,edx
ret 8
public_stdcall _ksys_program_irq,8
;arg1 - intrtable
;arg2 - irq
mov edx,ebx
mov eax,44
mov ebx,[esp+4]
mov ecx,[esp+8]
int 0x40
mov ebx,edx
ret 8
public_stdcall _ksys_reserve_irq,4
;arg1 - irq
mov edx,ebx
mov eax,45
xor ebx,ebx
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 4
public_stdcall _ksys_free_irq,4
;arg1 - irq
mov edx,ebx
mov eax,45
xor ebx,ebx
inc ebx
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 4
public_stdcall _ksys_reserve_port_area,8
;arg1 - start
;arg2 - end
push ebx
mov eax,46
xor ebx,ebx
mov ecx,[esp+8]
mov edx,[esp+12]
int 0x40
pop ebx
ret 8
public_stdcall _ksys_free_port_area,8
;arg1 - start
;arg2 - end
push ebx
mov eax,46
xor ebx,ebx
inc ebx
mov ecx,[esp+8]
mov edx,[esp+12]
int 0x40
pop ebx
ret 8
/programs/develop/ktcc/trunk/libc/kolibrisys/keyboard.asm
0,0 → 1,29
format ELF
 
include "proc32.inc"
 
section '.text' executable
 
public _ksys_get_key
public _ksys_set_keyboard_mode
 
align 4
proc _ksys_get_key stdcall
 
mov eax,2
int 0x40
ret
 
endp
 
align 4
proc _ksys_set_keyboard_mode stdcall, mode:dword
 
mov edx,ebx
mov eax,66
xor ebx,ebx
inc ebx
mov ecx,[mode]
mov ebx,edx
ret
endp
/programs/develop/ktcc/trunk/libc/kolibrisys/line.asm
0,0 → 1,21
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_line,20
;arg1 - x1
;arg2 - y1
;arg3 - x2
;arg4 - y2
;arg5 - color
push ebx
mov ebx,[esp+8]
shl ebx,16
mov bx,[esp+16]
mov ecx,[esp+12]
shl ecx,16
mov cx,[esp+20]
mov edx,[esp+24]
mov eax,38
int 0x40
pop ebx
ret 20
/programs/develop/ktcc/trunk/libc/kolibrisys/midi.asm
0,0 → 1,21
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_midi_reset,0
mov edx,ebx
mov eax,20
xor ebx,ebx
inc ebx
int 0x40
mov ebx,edx
ret
public_stdcall _ksys_midi_send,4
;arg1 - data
mov edx,ebx
mov eax,20
mov ebx,2
xor ecx,ecx
mov cl,[esp+4]
mov ebx,edx
ret 4
/programs/develop/ktcc/trunk/libc/kolibrisys/mouse.asm
0,0 → 1,25
 
format ELF
 
section '.text' executable
 
public _ksys_GetMouseXY
public _ksys_GetMouseButtonsState
 
align 4
_ksys_GetMouseXY:
 
mov eax,37
mov ebx,1
int 0x40
 
ret
 
align 4
_ksys_GetMouseButtonsState:
 
mov eax,37
mov ebx,2
int 0x40
 
ret
/programs/develop/ktcc/trunk/libc/kolibrisys/pci.asm
0,0 → 1,138
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_get_pci_version,0
mov edx,ebx
mov eax,62
xor ebx,ebx
int 0x40
movzx eax,ax
mov ebx,edx
ret
public_stdcall _ksys_get_last_pci_bus,0
mov edx,ebx
mov eax,62
xor ebx,ebx
inc ebx
int 0x40
movzx eax,al
mov ebx,edx
ret
public_stdcall _ksys_get_pci_access_mechanism,0
mov edx,ebx
mov eax,62
mov ebx,2
int 0x40
movzx eax,al
mov ebx,edx
ret
public_stdcall _ksys_pci_read_config_byte,16
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
mov edx,ebx
mov eax,62
mov bl,4
mov bh,[esp+4]
mov ch,[esp+8]
shl ch,3
add ch,[esp+12]
mov cl,[esp+16]
int 0x40
mov ebx,edx
ret 16
public_stdcall _ksys_pci_read_config_word,16
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
mov edx,ebx
mov eax,62
mov bl,5
mov bh,[esp+4]
mov ch,[esp+8]
shl ch,3
add ch,[esp+12]
mov cl,[esp+16]
int 0x40
mov ebx,edx
ret 16
public_stdcall _ksys_pci_read_config_dword,16
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
mov edx,ebx
mov eax,62
mov bl,6
mov bh,[esp+4]
mov ch,[esp+8]
shl ch,3
add ch,[esp+12]
mov cl,[esp+16]
int 0x40
mov ebx,edx
ret 16
public_stdcall _ksys_pci_write_config_byte,20
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
;arg5 - value
push ebx
mov eax,62
mov bl,8
mov bh,[esp+8]
mov ch,[esp+12]
shl ch,3
mov ch,[esp+16]
mov cl,[esp+20]
movzx edx,byte [esp+24]
int 0x40
pop ebx
ret 20
public_stdcall _ksys_pci_write_config_word,20
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
;arg5 - value
push ebx
mov eax,62
mov bl,9
mov bh,[esp+8]
mov ch,[esp+12]
shl ch,3
mov ch,[esp+16]
mov cl,[esp+20]
movzx edx,word [esp+24]
int 0x40
pop ebx
ret 20
public_stdcall _ksys_pci_write_config_dword,20
;arg1 - bus
;arg2 - dev
;arg3 - fn
;arg4 - reg
;arg5 - value
push ebx
mov eax,62
mov bl,10
mov bh,[esp+8]
mov ch,[esp+12]
shl ch,3
mov ch,[esp+16]
mov cl,[esp+20]
mov edx,[esp+24]
int 0x40
pop ebx
ret 20
/programs/develop/ktcc/trunk/libc/kolibrisys/pixel.asm
0,0 → 1,16
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_putpixel,12
;arg1 - x
;arg2 - y
;arg3 - color
push ebx
xor eax,eax
mov ebx,[esp+8]
inc eax
mov ecx,[esp+12]
mov edx,[esp+16]
int 0x40
pop ebx
ret 12
/programs/develop/ktcc/trunk/libc/kolibrisys/process.asm
0,0 → 1,16
format ELF
;include "public_stdcall.inc"
 
public _ksys_get_process_table
 
section '.text' executable
 
_ksys_get_process_table:
;arg1 - pointer to information
;arg2 - pid
mov eax,9
mov ebx,[esp+4]
mov ecx,[esp+8]
int 0x40
 
ret 8
/programs/develop/ktcc/trunk/libc/kolibrisys/screen.asm
0,0 → 1,15
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_get_screen_size,8
;arg1 - x
;arg2 - y
mov eax,14
int 0x40
mov ecx,[esp+8]
mov [ecx],ax
mov word [ecx+2],0
shr eax,16
mov ecx,[esp+4]
mov [ecx],eax
ret 8
/programs/develop/ktcc/trunk/libc/kolibrisys/skin.asm
0,0 → 1,13
format ELF
 
section '.text' executable
 
public _ksys_get_skin_height
 
_ksys_get_skin_height:
 
mov eax,48
mov ebx,4
int 0x40
 
ret
/programs/develop/ktcc/trunk/libc/kolibrisys/sound.asm
0,0 → 1,65
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksy_sound_load_block,4
;arg1 - blockptr
mov edx,ebx
mov eax,55
xor ebx,ebx
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 4
public_stdcall _ksy_sound_play_block,0
mov edx,ebx
mov eax,55
xor ebx,ebx
inc ebx
int 0x40
mov ebx,edx
ret
public_stdcall _ksy_sound_set_channels,4
;arg1 - channels
push ebx
mov eax,55
mov ebx,2
xor ecx,ecx
mov edx,[esp+8]
int 0x40
pop ebx
ret 4
public_stdcall _ksy_sound_set_data_size,4
;arg1 - data size
push ebx
mov eax,55
mov ebx,2
xor ecx,ecx
inc ecx
mov edx,[esp+8]
int 0x40
pop ebx
ret 4
public_stdcall _ksy_sound_set_frequency,4
;arg1 - frequency
push ebx
mov eax,55
mov ebx,2
mov ecx,2
mov edx,[esp+8]
int 0x40
pop ebx
ret 4
public_stdcall _ksy_sound_speaker_play,4
;arg1 - data
mov edx,ebx
mov eax,55
mov ebx,55
mov ecx,[esp+4]
int 0x40
mov ebx,edx
ret 4
/programs/develop/ktcc/trunk/libc/kolibrisys/thread.asm
0,0 → 1,33
format ELF
include "public_stdcall.inc"
section '.text' executable
extrn malloc
public_stdcall _ksys_start_thread,12
;arg1 - proc
;arg2 - stacksize
;arg3 - pid
push dword [esp+8]
call malloc
test eax,eax
jz .no_mem
push ebx
mov edx,eax
add edx,[esp+12]
mov [edx-4],dword 0
mov ecx,[esp+8]
mov ebx,1
mov eax,51
int 0x40
mov ebx,[esp+16]
test ebx,ebx
jz .no_val
mov [ebx],eax
.no_val:
mov eax,edx
sub eax,[esp+12]
pop ebx
ret 12
.no_mem:
mov ecx,[esp+12]
mov [ecx],eax
ret 12
/programs/develop/ktcc/trunk/libc/kolibrisys/window_redraw.asm
0,0 → 1,11
format ELF
include "public_stdcall.inc"
section '.text' executable
public_stdcall _ksys_window_redraw,4
;arg1 - status
mov edx,ebx
mov eax,12
mov ebx,[esp+4]
int 0x40
mov ebx,edx
ret 4
/programs/develop/ktcc/trunk/libc/kolibrisys/write_text.asm
0,0 → 1,21
format ELF
section '.text' executable
public _ksys_write_text
 
_ksys_write_text:
;arg1 - x
;arg2 - y
;arg3 - color
;arg4 - text
;arg5 - len
 
mov eax,4
mov ebx,[esp+4]
shl ebx,16
mov bx,[esp+8]
mov ecx,[esp+12]
mov edx,[esp+16]
mov esi,[esp+20]
int 0x40
 
ret 20