Page 1 of 2
Analize the code
Posted: Mon Apr 20, 2009 11:23 pm
by angel
I would like to analize the code. What version do you recommend me?
Could I run kolibrios on text mode?
Thanks
Re: Analize the code
Posted: Tue Apr 21, 2009 6:28 am
by <Lrz>
1) You can get last vesion on svn. See
http://kolibrios.org/?p=SVN&kind=dir&loc=/kernel.
2) You cannot run KolibriOS on text mode. The KolibriOS is run only graphical mode.
Re: Analize the code
Posted: Tue Apr 21, 2009 6:58 am
by Albom
1) the latest version is recomended
2) you could run KolibriOS in a text mode by modifying the kernel.

But there is no application that works in this mode...

Re: Analize the code
Posted: Tue Apr 21, 2009 3:23 pm
by angel
2) you could run KolibriOS in a text mode by modifying the kernel.

But there is no application that works in this mode...

Could your shell be execute?
http://kolibrios.org/?p=SVN&kind=dir&lo ... stem/shell
From there, Could graphic mode be executed?

Like the old MS-DOS and Windows 3.11, Could it be possible?
Thanks

Re: Analize the code
Posted: Tue Apr 21, 2009 6:57 pm
by Albom
I wrote there are no KolibriOS application that works in text mode! (some applications like AC97 may run, but nobody tested it)
MS-DOS and Windows 3.11 applications will not be executed of course! It's KolibriOS!
The Shell will not be executed also (it uses console.obj library that works in graphical mode). But you could rewrite the library and then the Slell will probably run.
You could try the text mode kernel and the launcher by Serge:
download/file.php?id=642
Re: Analize the code
Posted: Tue Apr 21, 2009 9:29 pm
by angel
I have tried to compile into windows and I've got the next bug:
C:\kolibri\dos2009>fasm launcher.asm
flat assembler version 1.67.38 (1372519 kilobytes memory)
proc32.inc [2]:
$Revision: 750 $
error: invalid name.
Thanks

Re: Analize the code
Posted: Tue Apr 21, 2009 10:56 pm
by hidnplayr
you may comment this line out (prefix it with a ; ) you dont need it.
The problem is caused by that fact that you're not using macros.inc, or an old version of it.
Re: Analize the code
Posted: Tue Apr 21, 2009 11:10 pm
by Galkov
May be "
the problem is caused by that fact" that
we have different version of macros.inc on SVN

for example, in
svn/programs branch ...
Re: Analize the code
Posted: Tue Apr 21, 2009 11:26 pm
by hidnplayr
the version in /programs should be most up-to-date
Re: Analize the code
Posted: Thu Apr 23, 2009 2:30 am
by angel
I've changed the launcher.asm program:
It must wait to push a key and it rewrites "hello word!", but this doesn't work.
.exit:
mov ah, 08h
int 21h
jmp start
Do you know where the bug is?
Thanks

Re: Analize the code
Posted: Thu Apr 23, 2009 6:39 am
by Albom
It isn't a bug, it is your stupidity. KolibriOS is not MS-DOS!!! Don't use it's (0x21) interrupt!
Re: Analize the code
Posted: Thu Apr 23, 2009 8:14 am
by Mario
Albom
Ai-Yai-Yai! Insult not good!
Re: Analize the code
Posted: Thu Apr 23, 2009 8:20 am
by s1n
Re: Analize the code
Posted: Fri Apr 24, 2009 2:41 am
by angel
A possible solution is this:
include 'macros.inc'
include 'proc32.inc'
use32
db 'MENUET01'
dd 1
dd start
dd i_end
dd mem
dd mem
dd 0
dd 0
align 4
start:
mov eax, 73
int 0x40
mov [txt_mem], eax
mov edi, eax
mov ecx, 40*25
mov eax, 0x07000700
cld
rep stosd
xor eax, eax
xor esi, esi
xor edi, edi
mov ebx, 1280
mov ecx, 1024
mov edx, 0x01000000
int 0x40
mov ebx,-1 ; row
again:
add ebx, 1 ; row
cmp ebx, 24
je clear
mov eax, 1 ; column
mov esi, msg_hello
pusha
call txt_out
popa
;read key
mov eax,10 ; wait here for event
mcall ; do it
mov eax,2 ; just read it and ignore
mcall ; do it
;end read key
jmp again
mov edi, 480
add edi, [txt_mem]
mov eax, 10
int 0x40
@@:
mov eax, 10
int 0x40
cmp eax, 2
jne @B
int 0x40
cmp eax, 1
je @B
cmp al, 2
je @B
mov al, ah
mov ah, 0x07
stosw
jmp @B
.exit:
mov eax, -1
int 0x40
align 4
txt_out:
mov edi, [txt_mem]
lea edi, [edi+eax*2]
lea ebx, [ebx+ebx*4]
shl ebx, 5
add edi, ebx
mov ax, 0x0700
@@:
lodsb
test al, al
jz .done
stosw
jmp @B
.done:
ret
clear:
mov ebx, -1
clear1: add ebx, 1 ; row
mov eax, 1 ; column
mov esi, msg_white
pusha
call txt_out
popa
cmp ebx, 24
jne clear1
ret
msg_hello db 'Hello world !', 0
msg_white db ' ', 0
f dd 1
i_end:
align 4
txt_mem rd 1
align 16
rb 2048 ;stack
mem:
Thanks

Re: Analize the code
Posted: Fri Apr 24, 2009 8:57 am
by Mario
angel
Only one comment - if you try to write a virus, you do not have to rely on our assistance.
Actually I do not understand your goal - what you are trying to do?