Don't use libc malloc/free from assembler code.

This commit is contained in:
Ivan Baravy 2020-02-21 02:23:12 +03:00
parent e5ad82ffd5
commit 2a4cfff503
2 changed files with 1 additions and 14 deletions

View File

@ -250,4 +250,5 @@ extern uint32_t *kos_lfb_base;
extern uint16_t *kos_win_stack;
extern uint16_t *kos_win_pos;
extern disk_t disk_list;
#endif

View File

@ -3,9 +3,6 @@ format ELF
__DEBUG__ = 1
__DEBUG_LEVEL__ = 1
extrn 'malloc' as libc_malloc
extrn 'free' as libc_free
public disk_add
public disk_del
public disk_list
@ -273,21 +270,10 @@ endp
proc alloc_page
ret
push ecx edx
mov eax, 0x1000
ccall libc_malloc
pop edx ecx
ret
endp
proc alloc_pages _cnt
ret
push ecx edx
mov eax, [_cnt]
shl eax, 12
ccall libc_malloc
pop edx ecx
ret
endp
proc sys_msg_board