flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > I have a few questions

Author
Thread Post new topic Reply to topic
cmm_asm



Joined: 29 Sep 2004
Posts: 8
cmm_asm
I was wondering what it would take to get optimization like sse/mmx/hyper threading in menuetos. I was also wondering what it would take to get a decent video player in menuetos. How hard would these things be. I was planning on learning asm in farther detail than I have. Please show me where to go to get the best tutorials, and i might be able to help. It would be fun to get this OS beyond thr hobby stage, and make a deesktop replacement out of it. Anything is better than windows.
Post 05 May 2005, 14:28
View user's profile Send private message Reply with quote
bloglite



Joined: 21 Feb 2004
Posts: 109
Location: East Tennessee U.S.A.
bloglite
Some of what you want is CPU specific and can be implemented with opcodes for that cpu but the best compatibility is @ x86 level.

Check the wiki for menuet specific ASM examples:

Also study the ASM listings for current apps. Great stuff (ASCL) < cool

There is also an area where you can put your ideas for improvements.

More ASM programs/programmers will surely help in the long run.

Big collection of ASM Listings in NEW Archive Distro.

~22.8M Everything MenuetOS

http://www.wemakeitbig.com/meos/ez05.iso
Post 05 May 2005, 14:57
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
http://flatassembler.net/docs.php?article=manual
Reading this makes sence to me. I must admit I haven't read it through but this isn't the point. It's meant for reference and this way it is the best.

MMX,SSE(1,2,...) are also listed there and there is no problem writing code to MenuetOS in these instructions -- 2 problems though:
1) compatibility with 386
2) to gain compatibility, additional code must beintroduced

HT is easy to make when multitasking/threading is introduced - only code to detect P4 HT is needed.
http://www.tommesani.com/ is one funny-looking program and they ask money too Very Happy, but you can get most of optimizations done with it. Though I could do much better on my own. If you don't have time to think then you can input your program there.
Post 06 May 2005, 12:04
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
cmm_asm



Joined: 29 Sep 2004
Posts: 8
cmm_asm
I think that by adding these optimizations, code can be put in to detect these things in the processor, added to boot-up or in setup program, and can be added as seperate kernel modules
Post 06 May 2005, 13:02
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
This would be fun and useful so people with newer processors can really "see" their advantage Smile
Post 07 May 2005, 11:04
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius
I don't have HT though so you would have to make two MOS's: one with HT and one without. Or you can detect it in startup, but to implement two versions would be very complicated for you. If you change MOS so it requires HT this would be too bad, then I cannot use MOS anymore.

But I do have MMX and SSE and I think I have SSE2 (not sure). Probably most people have that. I would like to at least have these optimizations, and maybe a seperate HT version could be implemented. But if MOS is compatible with 386 or 486 this will not work.
Post 09 Jun 2005, 19:03
View user's profile Send private message AIM Address Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Its simple to know - PIII has SSE, P4 has SSE2 and beginning from Prescott - SSE3 also Smile
MMX has been around from Pentiums...

implementing HT can't be so bad - windows detects number of processors but does NOT *REQUIRE* explicitly that you *HAVE* a multi-processor system. Now concerning MenuetOS you don't have to reinstall it every time you want to change between HT/non-HT because you install it every time anyway Very Happy (like booting from FD, CD, DVD, USB, ...)

MMX/SSE(1,2,3,...) are just gadgets that are meant to be detected and used NOT explicitly required. I wouldn't like the thought that you MUST have a SSE2 or MMX+ to run any OS.
Post 10 Jun 2005, 09:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
halyavin



Joined: 21 Aug 2004
Posts: 42
halyavin
You CAN'T use fpu/mmx/sse/sse2 instructions in kernel. It is restriction of MenuetOS - it save fpu/mmx context only for applications Confused .
Post 11 Jun 2005, 06:25
View user's profile Send private message Visit poster's website Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 212
Location: Budapest, Hungary
Endre
That's the problem with assembly language. It's not enough to add a compiler switch and the compiler compiles your code with te wished extended instruction set. You have to wite several instances of the given code part manually. One for the plain x86 instruction set and the others for the different extensions. By using conditional compilation you can compile your application or the kernel itself for your favorite platform. For that only human resource is needed.
Post 11 Jun 2005, 10:41
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Halayavin: Kernel itself in NOT a multitasking environment so you don't have to save context. Just take care of EMMS and that float is clear and everything will be alright.

Endre: YES FASM really is under a MB, but BIG C/#/++ compilers have all these variants already included - if we get a codebase as big as this - we can also add/delete sections as we wish or as our CPU requests. We just haven't gone that far...yet?
Post 11 Jun 2005, 15:01
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
halyavin



Joined: 21 Aug 2004
Posts: 42
halyavin
Kernel IS multitasking - several system functions can being executed simultaneosly. So you need save fpu/mmx/sse context for each system handler. But now there is place only for saving context for applications.
Post 11 Jun 2005, 18:20
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
If so then how many simultaneous tasks are we talking about - maybe we could issue the context saver from applications to the kernel!?
Post 12 Jun 2005, 12:00
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.