From dae828a296ed659b71b0dc86efb8af15a342f846 Mon Sep 17 00:00:00 2001 From: Doczom Date: Sat, 26 Nov 2022 21:52:16 +0000 Subject: [PATCH] KBD: fixing a program crash on unsupported devices git-svn-id: svn://kolibrios.org@9885 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/testing/kbd/trunk/kbd.ASM | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/programs/testing/kbd/trunk/kbd.ASM b/programs/testing/kbd/trunk/kbd.ASM index fd91b45c83..82e8cf2b0d 100644 --- a/programs/testing/kbd/trunk/kbd.ASM +++ b/programs/testing/kbd/trunk/kbd.ASM @@ -39,6 +39,26 @@ START: no_params: call find_north_bridg + test dword[bd_id], -1 ; check zero + jnz drawwindow + +controller_not_found: + push .notify + dec esp + push 0 + push 0 + push .error_message + push 0 + push dword 7 ;SSF_START_APP + + mcall 70, esp + add esp, 6*4 + 1 + mcall -1 +.error_message: + db '"KBD\nController not found" -tdE',0 +.notify: + db '/sys/@notify',0 + drawwindow: mov eax,48 mov ebx,3 @@ -549,6 +569,9 @@ check_parameters: boot_bd_enable: call find_north_bridg + test dword[bd_id], -1 ; check zero + jz controller_not_found + call set_bd_stat mcall -1