Core/src/sys.rs

63 lines
1.3 KiB
Rust
Raw Normal View History

2021-12-09 00:18:30 +01:00
#[link(name = "syscalls")]
extern "C" {
2024-01-12 09:39:38 +01:00
// -1
2021-12-09 14:25:28 +01:00
#[link_name = "_exit"]
2021-12-09 00:18:30 +01:00
pub fn exit() -> !;
2024-01-12 09:39:38 +01:00
// 0
2021-12-09 14:25:28 +01:00
#[link_name = "_define_window"]
2023-06-18 23:44:01 +02:00
pub fn define_window(ebx: u32, ecx: u32, edx: u32, esi: u32, edi: u32);
2024-01-12 09:39:38 +01:00
// 2
#[link_name = "_pressed_key"]
pub fn pressed_key() -> u32;
// 4
2021-12-09 14:25:28 +01:00
#[link_name = "_display_message"]
2024-01-12 09:39:38 +01:00
pub fn display_message(ebx: u32, ecx: u32, edx: u32, edi: u32);
2021-12-09 00:18:30 +01:00
// 8
#[link_name = "_define_button"]
pub fn define_button(ebx: u32, ecx: u32, edx: u32, esi: u32);
2024-01-12 09:39:38 +01:00
// 10
2021-12-09 14:25:28 +01:00
#[link_name = "_wait_event"]
2021-12-09 00:18:30 +01:00
pub fn wait_event() -> u32;
2024-01-12 09:39:38 +01:00
// 12.1
#[link_name = "_start_window_draw"]
pub fn start_window_draw();
// 12.2
#[link_name = "_end_window_draw"]
pub fn end_window_draw();
// 17
#[link_name = "_get_button_id"]
pub fn get_button_id() -> u32;
2024-01-27 22:13:35 +01:00
// 26.5
#[link_name = "_get_lang"]
pub fn get_lang() -> u32;
// 63.1
#[link_name = "_debug_write"]
pub fn _debug_write(cl: u8);
// 68.11
#[link_name = "_init_heap"]
pub fn init_heap();
// 68.12
#[link_name = "_alloc"]
pub fn alloc(size: usize) -> *const u8;
// 68.13
#[link_name = "_free"]
pub fn free(block: *const u8) -> bool;
2024-01-30 13:56:39 +01:00
// 68.19
#[link_name = "_load_dll"]
pub fn load_dll(name: *const u8) -> *const u32;
2021-12-09 00:18:30 +01:00
}