/contrib/C_Layer/ASM/Makefile |
---|
0,0 → 1,7 |
FASM = fasm |
all: $(patsubst %.asm,%.obj,$(wildcard *.asm)) |
mv $^ ../OBJ/ |
%.obj: %.asm |
$(FASM) $< $% |
/contrib/C_Layer/ASM/loadboxlib.asm |
---|
0,0 → 1,141 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.init' code ; Keep this line before includes or GCC messes up call addresses |
include '../../../programs/proc32.inc' |
include '../../../programs/macros.inc' |
purge section,mov,add,sub |
include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../../programs/system/run/trunk/txtbut.inc' |
include '../../../programs/dll.inc' |
public init_boxlib as '_init_boxlib_asm' |
public editbox_key as '_editbox_key@4' |
public press_key as '_press_key' |
;;; Returns 0 on success. -1 on failure. |
proc init_boxlib |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
;; Wrapper to handle edit_box_key function for editboxes. |
;; Call this baby from C (refer kolibri_editbox.h for details) |
editbox_key: |
mov [oldebp], ebp ;Save ebp because GCC is crazy for it otherwise. |
pop ebp ;Save return address in ebp. Stack top is param now. |
mov eax, dword [press_key] |
call [edit_box_key] ; The pointer we passed should be on the stack already. |
push ebp ;push the return address back to stack |
mov ebp, [oldebp] |
ret |
oldebp dd ? |
press_key dd ? |
@IMPORT: |
library lib_boxlib, 'box_lib.obj' |
import lib_boxlib, \ |
edit_box_draw, 'edit_box' , \ |
edit_box_key, 'edit_box_key' , \ |
edit_box_mouse, 'edit_box_mouse', \ |
edit_box_set_text, 'edit_box_set_text' , \ |
init_checkbox2, 'init_checkbox2' , \ |
check_box_draw2, 'check_box_draw2' , \ |
check_box_mouse2, 'check_box_mouse2' , \ |
option_box_draw, 'option_box_draw' , \ |
option_box_mouse, 'option_box_mouse' , \ |
scroll_bar_vertical_draw, 'scrollbar_ver_draw' , \ |
scroll_bar_vertical_mouse, 'scrollbar_ver_mouse' , \ |
scroll_bar_horizontal_draw, 'scrollbar_hor_draw' , \ |
scroll_bar_horizontal_mouse, 'scrollbar_hor_mouse' , \ |
dinamic_button_draw, 'dbutton_draw' , \ |
dinamic_button_mouse, 'dbutton_mouse' , \ |
menu_bar_draw, 'menu_bar_draw' , \ |
menu_bar_mouse, 'menu_bar_mouse' , \ |
menu_bar_activate, 'menu_bar_activate' , \ |
fb_draw_panel, 'filebrowser_draw' , \ |
fb_mouse, 'filebrowser_mouse' , \ |
fb_key, 'filebrowser_key' , \ |
tl_data_init, 'tl_data_init' , \ |
tl_data_clear, 'tl_data_clear' , \ |
tl_info_clear, 'tl_info_clear' , \ |
tl_key, 'tl_key' , \ |
tl_mouse, 'tl_mouse' , \ |
tl_draw, 'tl_draw' , \ |
tl_info_undo, 'tl_info_undo' , \ |
tl_info_redo, 'tl_info_redo' , \ |
tl_node_add, 'tl_node_add' , \ |
tl_node_set_data, 'tl_node_set_data' , \ |
tl_node_get_data, 'tl_node_get_data' , \ |
tl_node_delete, 'tl_node_delete' , \ |
tl_cur_beg, 'tl_cur_beg' , \ |
tl_cur_next, 'tl_cur_next' , \ |
tl_cur_perv, 'tl_cur_perv' , \ |
tl_node_close_open, 'tl_node_close_open' , \ |
tl_node_lev_inc, 'tl_node_lev_inc' , \ |
tl_node_lev_dec, 'tl_node_lev_dec' , \ |
tl_node_move_up, 'tl_node_move_up' , \ |
tl_node_move_down, 'tl_node_move_down' , \ |
tl_node_poi_get_info, 'tl_node_poi_get_info' , \ |
tl_node_poi_get_next_info, 'tl_node_poi_get_next_info' , \ |
tl_node_poi_get_data, 'tl_node_poi_get_data' , \ |
tl_save_mem, 'tl_save_mem' , \ |
tl_load_mem, 'tl_load_mem' , \ |
tl_get_mem_size, 'tl_get_mem_size' , \ |
path_show_prepare, 'pathshow_prepare' , \ |
path_show_draw, 'pathshow_draw' , \ |
ted_but_sumb_upper, 'ted_but_sumb_upper' , \ |
ted_but_sumb_lover, 'ted_but_sumb_lover' , \ |
ted_but_convert_by_table, 'ted_but_convert_by_table' , \ |
ted_can_save, 'ted_can_save' , \ |
ted_clear, 'ted_clear' , \ |
ted_delete, 'ted_delete' , \ |
ted_draw, 'ted_draw' , \ |
ted_init, 'ted_init' , \ |
ted_init_scroll_bars, 'ted_init_scroll_bars' , \ |
ted_init_syntax_file, 'ted_init_syntax_file' , \ |
ted_is_select, 'ted_is_select' , \ |
ted_key, 'ted_key' , \ |
ted_mouse, 'ted_mouse' , \ |
ted_open_file, 'ted_open_file' , \ |
ted_save_file, 'ted_save_file' , \ |
ted_text_add, 'ted_text_add' , \ |
ted_but_select_word, 'ted_but_select_word' , \ |
ted_but_cut, 'ted_but_cut' , \ |
ted_but_copy, 'ted_but_copy' , \ |
ted_but_paste, 'ted_but_paste' , \ |
ted_but_undo, 'ted_but_undo' , \ |
ted_but_redo, 'ted_but_redo' , \ |
ted_but_reverse, 'ted_but_reverse' , \ |
ted_but_find_next, 'ted_but_find_next' , \ |
ted_text_colored, 'ted_text_colored' , \ |
frame_draw, 'frame_draw' , \ |
progressbar_draw,'progressbar_draw' , \ |
progressbar_progress, 'progressbar_progress' |
public edit_box_draw as '_edit_box_draw' |
public edit_box_key as '_edit_box_key' |
public edit_box_mouse as '_edit_box_mouse' |
public check_box_draw2 as '_check_box_draw2' |
public check_box_mouse2 as '_check_box_mouse2' |
public progressbar_draw as '_progressbar_draw' |
public progressbar_progress as '_progressbar_progress' |
public frame_draw as '_frame_draw' |
/contrib/C_Layer/ASM/loadbuf2d.asm |
---|
0,0 → 1,94 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.init' code ; Keep this line before includes or GCC messes up call addresses |
include '../../../programs/proc32.inc' |
include '../../../programs/macros.inc' |
purge section,mov,add,sub |
include '../../../programs/dll.inc' |
public init_buf2d as '_init_buf2d_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_buf2d |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_buf2d, 'buf2d.obj' |
import lib_buf2d, \ |
buf2d_create, 'buf2d_create' , \ |
buf2d_clear, 'buf2d_clear' , \ |
buf2d_draw, 'buf2d_draw' , \ |
buf2d_delete, 'buf2d_delete', \ |
buf2d_rotate, 'buf2d_rotate', \ |
buf2d_resize, 'buf2d_resize', \ |
buf2d_line, 'buf2d_line', \ |
buf2d_line_sm, 'buf2d_line_sm', \ |
buf2d_rect_by_size, 'buf2d_rect_by_size', \ |
buf2d_filled_rect_by_size, 'buf2d_filled_rect_by_size', \ |
buf2d_circle, 'buf2d_circle', \ |
buf2d_img_hdiv2, 'buf2d_img_hdiv2', \ |
buf2d_img_wdiv2, 'buf2d_img_wdiv2', \ |
buf2d_conv_24_to_8, 'buf2d_conv_24_to_8', \ |
buf2d_conv_24_to_32, 'buf2d_conv_24_to_32', \ |
buf2d_bit_blt, 'buf2d_bit_blt', \ |
buf2d_bit_blt_transp, 'buf2d_bit_blt_transp', \ |
buf2d_bit_blt_alpha, 'buf2d_bit_blt_alpha', \ |
buf2d_curve_bezier, 'buf2d_curve_bezier', \ |
buf2d_convert_text_matrix, 'buf2d_convert_text_matrix', \ |
buf2d_draw_text, 'buf2d_draw_text', \ |
buf2d_crop_color, 'buf2d_crop_color', \ |
buf2d_offset_h, 'buf2d_offset_h', \ |
buf2d_flood_fill, 'buf2d_flood_fill', \ |
buf2d_set_pixel, 'buf2d_set_pixel', \ |
buf2d_get_pixel, 'buf2d_get_pixel', \ |
buf2d_flip_h, 'buf2d_flip_h', \ |
buf2d_flip_v, 'buf2d_flip_v', \ |
buf2d_filter_dither, 'buf2d_filter_dither' |
public buf2d_create as '_buf2d_create_asm' |
public buf2d_clear as '_buf2d_clear' |
public buf2d_draw as '_buf2d_draw' |
public buf2d_delete as '_buf2d_delete' |
public buf2d_rotate as '_buf2d_rotate' |
public buf2d_resize as '_buf2d_resize' |
public buf2d_line as '_buf2d_line' |
public buf2d_line_sm as '_buf2d_line_sm' |
public buf2d_rect_by_size as '_buf2d_rect_by_size' |
public buf2d_filled_rect_by_size as '_buf2d_filled_rect_by_size' |
public buf2d_circle as '_buf2d_circle' |
public buf2d_img_hdiv2 as '_buf2d_img_hdiv2' |
public buf2d_img_wdiv2 as '_buf2d_img_wdiv2' |
public buf2d_conv_24_to_8 as '_buf2d_conv_24_to_8' |
public buf2d_conv_24_to_32 as '_buf2d_conv_24_to_32' |
public buf2d_bit_blt as '_buf2d_bit_blt' |
public buf2d_bit_blt_transp as '_buf2d_bit_blt_transp' |
public buf2d_bit_blt_alpha as '_buf2d_bit_blt_alpha' |
public buf2d_curve_bezier as '_buf2d_curve_bezier_asm' |
public buf2d_convert_text_matrix as '_buf2d_convert_text_matrix' |
public buf2d_draw_text as '_buf2d_draw_text' |
public buf2d_crop_color as '_buf2d_crop_color' |
public buf2d_offset_h as '_buf2d_offset_h' |
public buf2d_flood_fill as '_buf2d_flood_fill' |
public buf2d_set_pixel as '_buf2d_set_pixel' |
public buf2d_get_pixel as '_buf2d_get_pixel' |
public buf2d_flip_h as '_buf2d_flip_h' |
public buf2d_flip_v as '_buf2d_flip_v' |
public buf2d_filter_dither as '_buf2d_filter_dither' |
/contrib/C_Layer/ASM/loadhttp.asm |
---|
0,0 → 1,64 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.flat' code ; Keep this line before includes or GCC messes up call addresses |
include 'struct.inc' |
include 'proc32.inc' |
include 'macros.inc' |
purge section,mov,add,sub |
include 'network.inc' |
include 'http.inc' |
include 'dll.inc' |
virtual at 0 |
http_msg http_msg |
end virtual |
public init_network as '_init_network_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_network |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_http, 'http.obj' |
import lib_http, \ |
HTTP_get , 'get' , \ |
HTTP_head , 'head' , \ |
HTTP_post , 'post' , \ |
HTTP_find_header_field , 'find_header_field' , \ |
HTTP_send , 'send' , \ |
HTTP_receive , 'receive' , \ |
HTTP_disconnect , 'disconnect' , \ |
HTTP_free , 'free' , \ |
HTTP_escape , 'escape' , \ |
HTTP_unescape , 'unescape' |
public HTTP_get as '_http_get_asm' |
public HTTP_head as '_http_head_asm' |
public HTTP_post as '_http_post_asm' |
public HTTP_find_header_field as '_http_find_header_field_asm' |
public HTTP_send as '_http_send_asm' |
public HTTP_receive as '_http_receive_asm' |
public HTTP_disconnect as '_http_disconnect_asm' |
public HTTP_free as '_http_free_asm' |
public HTTP_escape as '_http_escape_asm' |
public HTTP_unescape as '_http_unescape_asm' |
/contrib/C_Layer/ASM/loadkmenu.asm |
---|
0,0 → 1,68 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.init' code ; Keep this line before includes or GCC messes up call addresses |
include '../../../programs/proc32.inc' |
include '../../../programs/macros.inc' |
purge section,mov,add,sub |
include '../../../programs/dll.inc' |
public init_kmenu as '_init_kmenu_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_kmenu |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_kmenu, 'kmenu.obj' |
import lib_kmenu, \ |
kmainmenu_draw, 'kmainmenu_draw' , \ |
kmainmenu_dispatch_cursorevent, 'kmainmenu_dispatch_cursorevent' , \ |
kmainmenu_get_height, 'kmainmenu_get_height', \ |
ksubmenu_new, 'ksubmenu_new' , \ |
ksubmenu_delete, 'ksubmenu_delete' , \ |
ksubmenu_draw, 'ksubmenu_draw' , \ |
ksubmenu_add, 'ksubmenu_add' , \ |
ksubmenu_set_items_margin, 'ksubmenu_set_items_margin' , \ |
ksubmenu_set_items_padding, 'ksubmenu_set_items_padding' , \ |
kmenuitem_new, 'kmenuitem_new' , \ |
kmenuitem_delete, 'kmenuitem_delete' , \ |
kmenuitem_draw, 'kmenuitem_draw' , \ |
kmenuitem_get_preffered_width, 'kmenuitem_get_preffered_width' , \ |
kmenuitem_get_preffered_height, 'kmenuitem_get_preffered_height' , \ |
kmenu_set_font, 'kmenu_set_font' , \ |
kmenu_init, 'kmenu_init' |
public kmainmenu_draw as '_kmainmenu_draw' |
public kmainmenu_dispatch_cursorevent as '_kmainmenu_dispatch_cursorevent' |
public kmainmenu_get_height as '_kmainmenu_get_height' |
public ksubmenu_new as '_ksubmenu_new' |
public ksubmenu_delete as '_ksubmenu_delete' |
public ksubmenu_draw as '_ksubmenu_draw' |
public ksubmenu_add as '_ksubmenu_add' |
public ksubmenu_set_items_margin as '_ksubmenu_set_items_margin' |
public ksubmenu_set_items_padding as '_ksubmenu_set_items_padding' |
public kmenuitem_new as '_kmenuitem_new' |
public kmenuitem_new as '_kmenuitem__submenu_new' |
public kmenuitem_delete as '_kmenuitem_delete' |
public kmenuitem_draw as '_kmenuitem_draw' |
public kmenuitem_get_preffered_width as '_kmenuitem_get_preffered_width' |
public kmenuitem_get_preffered_height as '_kmenuitem_get_preffered_height' |
public kmenu_set_font as '_kmenu_set_font' |
public kmenu_init as '_kmenu_init' |
/contrib/C_Layer/ASM/loadlibimg.asm |
---|
0,0 → 1,78 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.init' code ; Keep this line before includes or GCC messes up call addresses |
include '../../../programs/proc32.inc' |
include '../../../programs/macros.inc' |
purge section,mov,add,sub |
include '../../../programs/dll.inc' |
public init_libimg as '_init_libimg_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_libimg |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_libimg, 'libimg.obj' |
import lib_libimg, \ |
libimg_init, 'lib_init' , \ |
img_is_img, 'img_is_img' , \ |
img_info, 'img_info' , \ |
img_from_file, 'img_from_file', \ |
img_to_file, 'img_to_file', \ |
img_from_rgb, 'img_from_rgb', \ |
img_to_rgb, 'img_to_rgb', \ |
img_to_rgb2, 'img_to_rgb2', \ |
img_decode, 'img_decode', \ |
img_encode, 'img_encode', \ |
img_create, 'img_create', \ |
img_destroy, 'img_destroy', \ |
img_destroy_layer, 'img_destroy_layer', \ |
img_count, 'img_count', \ |
img_lock_bits, 'img_lock_bits', \ |
img_unlock_bits, 'img_unlock_bits', \ |
img_flip, 'img_flip', \ |
img_flip_layer, 'img_flip_layer', \ |
img_rotate, 'img_rotate', \ |
img_rotate_layer, 'img_rotate_layer', \ |
img_draw, 'img_draw' |
public libimg_init as '_libimg_init' |
; public img_is_img as '_img_is_img' |
;public img_info as '_img_info' |
;public img_from_file as '_img_from_file' |
;public img_to_file as '_img_to_file' |
;public img_from_rgb as '_img_from_rgb' |
public img_to_rgb as '_img_to_rgb' |
public img_to_rgb2 as '_img_to_rgb2' |
public img_decode as '_img_decode' |
public img_encode as '_img_encode' |
public img_create as '_img_create' |
public img_destroy as '_img_destroy' |
public img_destroy_layer as '_img_destroy_layer' |
public img_count as '_img_count' |
;public img_lock_bits as '_img_lock_bits' |
;public img_unlock_bits as '_img_unlock_bits' |
public img_flip as '_img_flip' |
public img_flip_layer as '_img_flip_layer' |
public img_rotate as '_img_rotate' |
public img_rotate_layer as '_img_rotate_layer' |
public img_draw as '_img_draw' |
/contrib/C_Layer/ASM/loadlibini.asm |
---|
0,0 → 1,54 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.flat' code ; Keep this line before includes or GCC messes up call addresses |
;include 'struct.inc' |
include '../../../programs/proc32.inc' |
include '../../../programs/macros.inc' |
purge section,mov,add,sub |
include '../../../programs/dll.inc' |
public init_libini as '_init_libini_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_libini |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_libini, 'libini.obj' |
import lib_libini, \ |
LIBINI_enum_sections , 'ini_enum_sections' , \ |
LIBINI_enum_keys , 'ini_enum_keys' , \ |
LIBINI_get_str , 'ini_get_str' , \ |
LIBINI_get_int , 'ini_get_int' , \ |
LIBINI_get_color , 'int_get_color' , \ |
LIBINI_get_shortcut , 'int_get_shortcut' , \ |
LIBINI_set_str , 'ini_set_str' , \ |
LIBINI_set_int , 'ini_set_int' , \ |
LIBINI_set_color , 'ini_set_color' |
public LIBINI_enum_sections as '_LIBINI_enum_sections' |
public LIBINI_enum_keys as '_LIBINI_enum_keys' |
public LIBINI_get_str as '_LIBINI_get_str' |
public LIBINI_get_int as '_LIBINI_get_int' |
public LIBINI_get_color as '_LIBINI_get_color' |
public LIBINI_set_str as '_LIBINI_set_str' |
public LIBINI_set_int as '_LIBINI_set_int' |
/contrib/C_Layer/ASM/loadproclib.asm |
---|
0,0 → 1,45 |
format coff |
use32 ; Tell compiler to use 32 bit instructions |
section '.init' code ; Keep this line before includes or GCC messes up call addresses |
include 'proc32.inc' |
include 'macros.inc' |
purge section,mov,add,sub |
include 'dll.inc' |
public init_proclib as '_init_proclib_asm' |
;;; Returns 0 on success. -1 on failure. |
proc init_proclib |
mcall 68,11 |
stdcall dll.Load, @IMPORT |
test eax, eax |
jnz error |
mov eax, 0 |
ret |
error: |
mov eax, -1 |
ret |
endp |
@IMPORT: |
library lib_boxlib, 'proc_lib.obj' |
import lib_boxlib, \ |
OpenDialog_init, 'OpenDialog_init' , \ |
OpenDialog_start, 'OpenDialog_start' , \ |
ColorDialog_init, 'ColorDialog_init' , \ |
ColorDialog_start, 'ColorDialog_start' |
public OpenDialog_init as '_OpenDialog_init' |
public OpenDialog_start as '_OpenDialog_start' |
public ColorDialog_init as '_ColorDialog_init' |
public ColorDialog_start as '_ColorDialog_start' |