From 73fdb3cb4776ea74ac75ed86f988bac1fccf0fd2 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Sun, 17 Jan 2016 23:55:03 +0000 Subject: [PATCH] console: __stdcall function must preserve ebx register git-svn-id: svn://kolibrios.org@6067 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/libraries/console/console.asm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/programs/develop/libraries/console/console.asm b/programs/develop/libraries/console/console.asm index 30d5d2ede2..6908fb8010 100644 --- a/programs/develop/libraries/console/console.asm +++ b/programs/develop/libraries/console/console.asm @@ -17,11 +17,13 @@ START: ; evident heap initialization, because if DLL is loaded, heap is already initialized ; (if heap was not initialized, loader does this implicitly). ; So this action does nothing useful, but nothing harmful. + push ebx push 68 pop eax push 11 pop ebx int 0x40 + pop ebx or eax, -1 ret 4 @@ -31,7 +33,7 @@ START: align 4 con_init: - + pop eax pop [con.wnd_width] pop [con.wnd_height] @@ -43,7 +45,7 @@ con_init: push ebx mov [con.init_cmd],1 - + mov ecx, 4 mov eax, con.wnd_width mov edx, con.def_wnd_width @@ -154,17 +156,17 @@ con_init_check: mov ah,[con.init_cmd] test ah,ah jne cmd_init_yes - + push con.title_init_console push -1 push -1 push -1 push -1 - + call con_init - + cmd_init_yes: - + ret ; void __stdcall con_write_asciiz(const char* string); con_write_asciiz: