programs/testing: Post-SVN tidy (#430)

- Move source code from `trunk` into root directory for each program.
- Update build files and ASM include paths. Add SPDX license header where appropriate.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.

(Work towards [#75](#75), point 3)

Reviewed-on: #430
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
This commit was merged in pull request #430.
This commit is contained in:
2026-04-20 16:30:09 +00:00
committed by Burer
parent 8a0329cee8
commit f5735e54f4
55 changed files with 1600 additions and 1572 deletions
+6 -6
View File
@@ -418,25 +418,25 @@ tup.append_table(img_files, {
{"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"},
{"CROPFLAT", VAR_PROGS .. "/system/cropflat/cropflat"},
{"CPU", VAR_PROGS .. "/system/cpu/cpu"},
{"CPUID", VAR_PROGS .. "/testing/cpuid/trunk/CPUID"},
{"CPUID", VAR_PROGS .. "/testing/cpuid/CPUID"},
{"DOCPACK", VAR_PROGS .. "/system/docpack/docpack"},
{"DEFAULT.SKN", VAR_SKINS .. "/../skins/Leency/Shkvorka/Shkvorka.skn"},
{"DISPTEST", VAR_PROGS .. "/testing/disptest/trunk/disptest"},
{"DISPTEST", VAR_PROGS .. "/testing/disptest/disptest"},
{"END", VAR_PROGS .. "/system/end/light/end"},
{"ESKIN", VAR_PROGS .. "/system/eskin/eskin"},
{"FSPEED", VAR_PROGS .. "/testing/fspeed/fspeed"},
{"GMON", VAR_PROGS .. "/system/gmon/gmon"},
{"HDD_INFO", VAR_PROGS .. "/system/hdd_info/hdd_info"},
{"KBD", VAR_PROGS .. "/testing/kbd/trunk/kbd"},
{"KBD", VAR_PROGS .. "/testing/kbd/kbd"},
{"KPACK", VAR_PROGS .. "/other/kpack/trunk/kpack"},
{"LAUNCHER", VAR_PROGS .. "/system/launcher/launcher"},
{"LOADDRV", VAR_PROGS .. "/system/loaddrv/loaddrv"},
{"MAGNIFY", VAR_PROGS .. "/system/magnify/magnify"},
{"MGB", VAR_PROGS .. "/testing/mgb/trunk/mgb"},
{"MGB", VAR_PROGS .. "/testing/mgb/mgb"},
{"MOUSEMUL", VAR_PROGS .. "/system/mousemul/mousemul"},
{"MADMOUSE", VAR_PROGS .. "/other/madmouse/madmouse"},
{"MYKEY", VAR_PROGS .. "/system/MyKey/MyKey"},
{"PCIDEV", VAR_PROGS .. "/testing/pcidev/trunk/PCIDEV"},
{"PCIDEV", VAR_PROGS .. "/testing/pcidev/PCIDEV"},
{"RDSAVE", VAR_PROGS .. "/system/rdsave/rdsave"},
{"RTFREAD", VAR_PROGS .. "/other/rtfread/rtfread"},
{"SEARCHAP", VAR_PROGS .. "/system/searchap/searchap"},
@@ -444,7 +444,7 @@ tup.append_table(img_files, {
{"SETUP", VAR_PROGS .. "/system/setup/setup"},
{"SKINCFG", VAR_PROGS .. "/system/skincfg/skincfg"},
{"TERMINAL", VAR_PROGS .. "/system/terminal/terminal"},
{"TEST", VAR_PROGS .. "/testing/protection/trunk/test"},
{"TEST", VAR_PROGS .. "/testing/protection/test"},
{"TINYPAD", VAR_PROGS .. "/develop/tinypad/tinypad"},
{"TINFO", VAR_PROGS .. "/system/tinfo/tinfo"},
{"TIMER", VAR_PROGS .. "/other/Timer/Timer"},
+5 -5
View File
@@ -60,19 +60,19 @@ fasm system\calendar\calendar.asm %BIN%\calendar
fasm system\board\board.asm %BIN%\develop\board
rem fasm system\commouse\trunk\commouse.asm %BIN%\commouse
fasm system\cpu\cpu.asm %BIN%\cpu
rem fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
fasm testing\cpuid\cpuid.asm %BIN%\cpuid
fasm system\skincfg\skincfg.asm %BIN%\skincfg
fasm system\docpack\docpack.asm %BIN%\docpack
fasm system\end\end.asm %BIN%\end
fasm system\gmon\gmon.asm %BIN%\gmon
fasm system\icon\icon.asm %BIN%\icon
rem fasm system\kbd\trunk\kbd.ASM %BIN%\kbd
fasm testing\kbd\kbd.ASM %BIN%\kbd
fasm system\launcher\launcher.asm %BIN%\launcher
fasm system\menu\menu.asm %BIN%\@menu
rem fasm system\mgb\trunk\mgb.asm %BIN%\mgb
fasm testing\mgb\mgb.asm %BIN%\mgb
fasm system\mousemul\mousemul.asm %BIN%\mousemul
fasm system\taskbar\TASKBAR.ASM %BIN%\@TASKBAR
rem fasm system\pcidev\trunk\pcidev.asm %BIN%\pcidev
fasm testing\pcidev\pcidev.asm %BIN%\pcidev
rem fasm system\RB\trunk\@RB.ASM %BIN%\@RB
fasm system\rdsave\rdsave.asm %BIN%\rdsave
fasm system\run\run.asm %BIN%\run
@@ -238,7 +238,7 @@ fasm develop\heed\heed.asm %BIN%\nightbuild\heed
fasm develop\tinypad\tinypad.asm %BIN%\nightbuild\tinypad
fasm system\skincfg\skincfg.asm %BIN%\nightbuild\skincfg
fasm system\hdd_info\hdd_info.asm %BIN%\nightbuild\hdd_info
rem fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
fasm testing\mgb\mgb.asm %BIN%\nightbuild\mgb
fasm system\rdsave\rdsave.asm %BIN%\nightbuild\rdsave
fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
@@ -1,3 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
;******************************************************************************
; project name: CPUID *
; platform: KolibriOS, x86 (IA-32), x86-64 achitectures *
@@ -15,8 +18,7 @@
; your changes to the maintainer or make about post changes *
; at forum http://board.kolibrios.org/viewtopic.php?f=42&t=594*
;-----------------------------------------------------------------------------*
; English comments *
;------------------------------------------------------------------------------
use32
org 0x0
db 'MENUET01'
@@ -28,10 +30,10 @@ use32
dd 0x0
dd path
include '..\..\..\develop\libraries\box_lib\load_lib.mac'
include '..\..\..\macros.inc'
include '../../../gui_patterns.inc'
include '../../../KOSfuncs.inc'
include '../../develop/libraries/box_lib/load_lib.mac'
include '../../macros.inc'
include '../../gui_patterns.inc'
include '../../KOSfuncs.inc'
include 'lang.inc' ; Language support for locales: it_IT, en_US.
include 'draw.inc'
include 'brand.inc' ; brand ID decoding
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

Before

Width:  |  Height:  |  Size: 920 B

After

Width:  |  Height:  |  Size: 920 B

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 734 B

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 858 B

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 679 B

Before

Width:  |  Height:  |  Size: 882 B

After

Width:  |  Height:  |  Size: 882 B

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 610 B

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,3 +1,8 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;------------------------------------------------------------------------------
; Display Test for KolibriOS
;------------------------------------------------------------------------------
@@ -13,12 +18,12 @@
; <--- include all MeOS stuff --->
include "lang.inc" ; Language support for locales: ru_RU (CP866), en_US.
include "../../../macros.inc"
include "../../macros.inc"
; <--- start of MenuetOS application --->
MEOS_APP_START
;include "..\..\..\debug.inc"
;include "../../debug.inc"
; <--- start of code --->
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,4 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
; Kolibri Bus Disconnect
; Test for bus disconnect
;
@@ -6,7 +11,7 @@
;
;
include '..\..\..\macros.inc'
include '../../macros.inc'
include 'lang.inc' ; Language support for locales: it_IT, en_US.
memsize = 1000h
@@ -613,4 +618,3 @@ I_END:
sc system_colors
val_hdd dd ?
val_sgd dd ?
@@ -1,135 +1,138 @@
;; CPU latency test -- Art J ;;
use32 ;
org 0x0 ;
db 'MENUET01' ;
dd 0x01 ;
dd START ;
dd I_END ;
dd 0x4000 ;
dd 0x4000 ;
dd 0x0 ;
dd 0x0 ;
include '..\..\..\macros.inc' ;
START:
call draw_win
rdtsc
main_loop:
mov ecx, eax ; ecx = previous timestamp
rdtsc ; new timestamp
cmp eax, ecx
jb main_loop ; tsc overflow?
mov ebx, eax ;
sub ebx, ecx ; net clocks
cmp ebx, [max]
jb @f
mov [max], ebx
; mcall 13, 200*65536+60, 500*65536+20, 0x00EEEEEEEE
; mcall 47, 0x800A0001, max, 200*65536+501
@@:
push ebx
fldlg2 ; lg(2)
fild dword[esp]
fyl2x
fimul [yscale]
fistp dword[esp]
pop ebx ; ebx = lg(time/100) * yscale
sub ebx, [yscale]
sub ebx, [yscale]
jb main_loop
cmp ebx, 512
ja main_loop
mov edx, [ebx*4+data_]
inc edx
mov [ebx*4+data_], edx
push edx
fld qword[xscale]
fild dword[esp]
fyl2x
fistp dword[esp]
pop edx ; edx = log2(counts) * xscale
cmp edx, 300
jge main_loop
shl ebx, 12 ; 1 line = 1024 pixels
add ebx, 1024*4*30 + 17*4
mov dword[ebx + edx*4 + 0xFE000000], 0x00703030
jmp main_loop
;------------------------------------------------
draw_win:
;------------------------------------------------
mcall 12, 1
mcall 0, 300, 590, 0x14BAA6A0,,title
; -----------------------------------------------------------------
mov ecx, [yscale]
shl ecx, 16
mov cx, word[yscale]
mov [ytick], ecx
mcall 38, 16*65536+16, 30*65536+530, 0
mov cx, 30
@@:
mcall , 14*65536+16
add ecx, [ytick]
cmp cx, 512
jb @b
mcall 4, 0x00100230, 0x80000000, advise
mov eax, 47
mov ebx, 0x00010000
mov ecx, 2
mov edx, 7*65536+30
mov esi, 0
@@:
mcall
add dx, word[yscale]
inc ecx
cmp dx, 512
jb @b
mcall 40, 0xC0000000 ; ignore sys messages
mcall 12, 2
ret
align 4
;-------------------------------------------------
data_ dd 512 dup 1 ; hysto
max dd 0
xscale dq 7.2
yscale dd 80
ytick dd 0
title db ' Latency test ',0
advise db 'Use CPU process manager to close this window)',0
I_END: ; end of program
rd 256
align 256
st_0:
; SPDX-License-Identifier: NOASSERTION
;
; CPU latency test -- Art J
use32 ;
org 0x0 ;
db 'MENUET01' ;
dd 0x01 ;
dd START ;
dd I_END ;
dd 0x4000 ;
dd 0x4000 ;
dd 0x0 ;
dd 0x0 ;
include '../../macros.inc' ;
START:
call draw_win
rdtsc
main_loop:
mov ecx, eax ; ecx = previous timestamp
rdtsc ; new timestamp
cmp eax, ecx
jb main_loop ; tsc overflow?
mov ebx, eax ;
sub ebx, ecx ; net clocks
cmp ebx, [max]
jb @f
mov [max], ebx
; mcall 13, 200*65536+60, 500*65536+20, 0x00EEEEEEEE
; mcall 47, 0x800A0001, max, 200*65536+501
@@:
push ebx
fldlg2 ; lg(2)
fild dword[esp]
fyl2x
fimul [yscale]
fistp dword[esp]
pop ebx ; ebx = lg(time/100) * yscale
sub ebx, [yscale]
sub ebx, [yscale]
jb main_loop
cmp ebx, 512
ja main_loop
mov edx, [ebx*4+data_]
inc edx
mov [ebx*4+data_], edx
push edx
fld qword[xscale]
fild dword[esp]
fyl2x
fistp dword[esp]
pop edx ; edx = log2(counts) * xscale
cmp edx, 300
jge main_loop
shl ebx, 12 ; 1 line = 1024 pixels
add ebx, 1024*4*30 + 17*4
mov dword[ebx + edx*4 + 0xFE000000], 0x00703030
jmp main_loop
;------------------------------------------------
draw_win:
;------------------------------------------------
mcall 12, 1
mcall 0, 300, 590, 0x14BAA6A0,,title
; -----------------------------------------------------------------
mov ecx, [yscale]
shl ecx, 16
mov cx, word[yscale]
mov [ytick], ecx
mcall 38, 16*65536+16, 30*65536+530, 0
mov cx, 30
@@:
mcall , 14*65536+16
add ecx, [ytick]
cmp cx, 512
jb @b
mcall 4, 0x00100230, 0x80000000, advise
mov eax, 47
mov ebx, 0x00010000
mov ecx, 2
mov edx, 7*65536+30
mov esi, 0
@@:
mcall
add dx, word[yscale]
inc ecx
cmp dx, 512
jb @b
mcall 40, 0xC0000000 ; ignore sys messages
mcall 12, 2
ret
align 4
;-------------------------------------------------
data_ dd 512 dup 1 ; hysto
max dd 0
xscale dq 7.2
yscale dd 80
ytick dd 0
title db ' Latency test ',0
advise db 'Use CPU process manager to close this window)',0
I_END: ; end of program
rd 256
align 256
st_0:
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
File diff suppressed because it is too large Load Diff
@@ -1,3 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
;***************************************************************
; project name: PCI Device Enumeration
; target platform: KolibriOS
@@ -29,10 +32,10 @@
dd file_name ; I_Param
dd path ; APPLICATION PATH
;-----------------------------------------------------------------------------
include 'lang.inc' ;language support
include '../../../KOSfuncs.inc'
include '../../../macros.inc'
include '../../../load_lib.mac'
include 'lang.inc' ; Language support for locales: it_IT, en_US
include '../../KOSfuncs.inc'
include '../../macros.inc'
include '../../load_lib.mac'
;-----------------------------------------------------------------------------
@use_library ; load_lib macro
;-----------------------------------------------------------------------------
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,205 +1,210 @@
;-------------------------------------------------------------------------------
;
; PROTECTION TEST
;
;-------------------------------------------------------------------------------
; last update: 07/03/2014
; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: Optimisations and code refactoring.
; Reducing the consumption of RAM, 4 KB instead of 64 KB.
; Translation into Russian.
;---------------------------------------------------------------------
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd IM_END ; memory for app
dd stack_top ; esp
dd 0x0 ; I_Param
dd 0x0 ; I_Icon
;-------------------------------------------------------------------------------
include '../../../macros.inc'
include 'lang.inc'
;-------------------------------------------------------------------------------
START: ; start of execution
red: ; redraw
call draw_window ; at first, draw the window
;-------------------------------------------------------------------------------
still:
mcall 10 ; wait here for event
cmp eax,1 ; redraw request ?
jz red
cmp eax,3 ; button in buffer ?
jz button
cmp eax,2 ; key in buffer ?
jnz still
;-------------------------------------------------------------------------------
key:
mcall 2 ; just read it and ignore
jmp still
;-------------------------------------------------------------------------------
button:
mcall 17
cmp ah,1 ; button id=1 ?
jnz noclose
mcall -1 ; close this program
;-------------------------------------------------------------------------------
noclose:
cmp ah,2
jnz notest2
cli
;-------------------------------------------------------------------------------
notest2:
cmp ah,3
jnz notest3
sti
;-------------------------------------------------------------------------------
notest3:
cmp ah,4
jnz notest4
mov [0x10000],byte 1
;-------------------------------------------------------------------------------
notest4:
cmp ah,5
jnz notest5
jmp dword 0x10000
;-------------------------------------------------------------------------------
notest5:
cmp ah,6
jnz notest6
mov esp,0
push eax
;-------------------------------------------------------------------------------
notest6:
cmp ah,7
jnz notest7
in al,0x60
;-------------------------------------------------------------------------------
notest7:
cmp ah,8
jnz still
out 0x60,al
jmp still
;-------------------------------------------------------------------------------
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
;-------------------------------------------------------------------------------
draw_window:
;mcall 48,3,sys_colors,40
mcall 12,1
mcall 0,<200,370>,<200,295>,0x14FFFFFF,,tlabel
mcall 8, <36,15>, <88,15>, 2, 0x6888B8
.newb:
mcall
add ecx,26*65536
inc edx
cmp edx,9
jb .newb
cld
mov ebx,26*65536+37 ; draw info text with function 4
mov ecx,0x10000000
mov edx,text
mov esi,40
mov eax,4
.newline:
mcall
add ebx,13
add edx,40
cmp [edx],byte 'x'
jnz .newline
mcall 12,2 ; function 12:tell os about windowdraw
ret
;-------------------------------------------------------------------------------
; DATA AREA
;-------------------------------------------------------------------------------
if lang eq it_IT
text:
db 'Il programma usa 0x1000 byte di memoria '
db ' '
db 'Open debug board for rezult information '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
else if lang eq ru_RU
text:
db 'Приложение использует 0x1000 байт памяти'
db ' '
db 'Открыть BOARD для просмотра результата '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
else
text:
db 'Application uses 0x1000 bytes of memory '
db ' '
db 'Open debug board for result information '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
end if
;-------------------------------------------------------------------------------
if lang eq it_IT
tlabel:
db 'Kolibri prova di protezione',0
else if lang eq ru_RU
tlabel:
db 'Kolibri проверка защиты ядра',0
else
tlabel:
db 'Kolibri protection test',0
end if
;-------------------------------------------------------------------------------
I_END:
;-------------------------------------------------------------------------------
align 4
rb 256
stack_top:
;-------------------------------------------------------------------------------
IM_END:
;-------------------------------------------------------------------------------
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
;-------------------------------------------------------------------------------
;
; PROTECTION TEST
;
;-------------------------------------------------------------------------------
; last update: 07/03/2014
; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: Optimisations and code refactoring.
; Reducing the consumption of RAM, 4 KB instead of 64 KB.
; Translation into Russian.
;---------------------------------------------------------------------
use32
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd IM_END ; memory for app
dd stack_top ; esp
dd 0x0 ; I_Param
dd 0x0 ; I_Icon
;-------------------------------------------------------------------------------
include '../../macros.inc'
include 'lang.inc' ; Language support for locales: it_IT, ru_RU (CP866), en_US
;-------------------------------------------------------------------------------
START: ; start of execution
red: ; redraw
call draw_window ; at first, draw the window
;-------------------------------------------------------------------------------
still:
mcall 10 ; wait here for event
cmp eax,1 ; redraw request ?
jz red
cmp eax,3 ; button in buffer ?
jz button
cmp eax,2 ; key in buffer ?
jnz still
;-------------------------------------------------------------------------------
key:
mcall 2 ; just read it and ignore
jmp still
;-------------------------------------------------------------------------------
button:
mcall 17
cmp ah,1 ; button id=1 ?
jnz noclose
mcall -1 ; close this program
;-------------------------------------------------------------------------------
noclose:
cmp ah,2
jnz notest2
cli
;-------------------------------------------------------------------------------
notest2:
cmp ah,3
jnz notest3
sti
;-------------------------------------------------------------------------------
notest3:
cmp ah,4
jnz notest4
mov [0x10000],byte 1
;-------------------------------------------------------------------------------
notest4:
cmp ah,5
jnz notest5
jmp dword 0x10000
;-------------------------------------------------------------------------------
notest5:
cmp ah,6
jnz notest6
mov esp,0
push eax
;-------------------------------------------------------------------------------
notest6:
cmp ah,7
jnz notest7
in al,0x60
;-------------------------------------------------------------------------------
notest7:
cmp ah,8
jnz still
out 0x60,al
jmp still
;-------------------------------------------------------------------------------
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
;-------------------------------------------------------------------------------
draw_window:
;mcall 48,3,sys_colors,40
mcall 12,1
mcall 0,<200,370>,<200,295>,0x14FFFFFF,,tlabel
mcall 8, <36,15>, <88,15>, 2, 0x6888B8
.newb:
mcall
add ecx,26*65536
inc edx
cmp edx,9
jb .newb
cld
mov ebx,26*65536+37 ; draw info text with function 4
mov ecx,0x10000000
mov edx,text
mov esi,40
mov eax,4
.newline:
mcall
add ebx,13
add edx,40
cmp [edx],byte 'x'
jnz .newline
mcall 12,2 ; function 12:tell os about windowdraw
ret
;-------------------------------------------------------------------------------
; DATA AREA
;-------------------------------------------------------------------------------
if lang eq it_IT
text:
db 'Il programma usa 0x1000 byte di memoria '
db ' '
db 'Open debug board for rezult information '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
else if lang eq ru_RU
text:
db 'Приложение использует 0x1000 байт памяти'
db ' '
db 'Открыть BOARD для просмотра результата '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
else
text:
db 'Application uses 0x1000 bytes of memory '
db ' '
db 'Open debug board for result information '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x'
end if
;-------------------------------------------------------------------------------
if lang eq it_IT
tlabel:
db 'Kolibri prova di protezione',0
else if lang eq ru_RU
tlabel:
db 'Kolibri проверка защиты ядра',0
else
tlabel:
db 'Kolibri protection test',0
end if
;-------------------------------------------------------------------------------
I_END:
;-------------------------------------------------------------------------------
align 4
rb 256
stack_top:
;-------------------------------------------------------------------------------
IM_END:
;-------------------------------------------------------------------------------