flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Only two problems...

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
proveren



Joined: 24 Jul 2004
Posts: 68
Location: Bulgaria
proveren 02 Aug 2005, 10:48
There are only 2 things that annoy me in MenuetOS:
1. This awful flickering of the mouse cursor. I have not looked at the source of MeOS, but I don't think it would be much work to synchronize the redrawing of the cursor with the area being redrawn to avoid the flickering.
2. Lack of three simple controls - single line edit, multiple line edit, scroll bar. It is funny to see how every single app tries to tackle inputting text and scrolling.

Other than that, I think MeOS it is great! Cool
Post 02 Aug 2005, 10:48
View user's profile Send private message Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 02 Aug 2005, 12:58
Another one - the window borders (while dragging the window to another place) are flickering too. I see that OS redraws border slowly (2 GHz CPU). Maybe we must reduce rendering of this box by redrawing it only if mouse button released or cursor moved more than 3-5 pixels (not every mickey).(generalise cursor movement)
Post 02 Aug 2005, 12:58
View user's profile Send private message ICQ Number Reply with quote
proveren



Joined: 24 Jul 2004
Posts: 68
Location: Bulgaria
proveren 05 Aug 2005, 10:00
So, i started coding edit controls, but guess what, I got discouraged. I don't think that it needs them so badly. This OS is getting developed in the wrong way. There is no memory allocation function, yet there are several functions for sound output, different window styles, button styles, etc. Don't get me wrong, but for example in order to support its nice look, every icon from the desktop has its own thread. Why? Because at some point it could be clicked and the rotation animation has to show up. Sorry, for being so harsh, but visual appearance is the last stage of developing an useful OS. First develop a simple shell, then claim that this is the assembly OS.
Post 05 Aug 2005, 10:00
View user's profile Send private message Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7 05 Aug 2005, 12:20
take memory management from linux.. Wink
Post 05 Aug 2005, 12:20
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu 05 Aug 2005, 14:39
1)Removing the flicker requires a double buffer Wink
2)Get GUI controls from SolarOS (also an ASM OS)
3)I can not belive that Menuet was able to survive so long without memory allocation functions... is this true? Oh anyway you can copy a very simple allocation scheme from SolarOS again.
Post 05 Aug 2005, 14:39
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 05 Aug 2005, 15:18
Would it not be quicker to just rename solar to MenuetOS Wink
Post 05 Aug 2005, 15:18
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu 05 Aug 2005, 16:47
Nope because they have conceptual diffrences and targets...

But since they are both full ASM OSes they can colaborate more to their both benefit Wink
Post 05 Aug 2005, 16:47
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 05 Aug 2005, 18:05
I was only joking, i think both OS's are a Great achievement, it's not until you try and make your own OS that you know how hard it to get a hobby OS running on lots of PC that are suppose to be standard.
Post 05 Aug 2005, 18:05
View user's profile Send private message Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 05 Aug 2005, 18:41
"1)Removing the flicker requires a double buffer"
That's the best solution (but memory killing)
Memory management.... heh. Yes, Linux has great manager. But there is too much opportunities(i mean it has complicated code). We can take some concepts only to fit MEOS.
Post 05 Aug 2005, 18:41
View user's profile Send private message ICQ Number Reply with quote
proveren



Joined: 24 Jul 2004
Posts: 68
Location: Bulgaria
proveren 06 Aug 2005, 14:06
I did not look at the source of MeOS thoroughly (spelling?). I don't know about double buffer, isn't it already present? I mean only the cursor flickers, nothing else (I have no SVGA knowledge at all).

I think that the Sysfuncs idea has to be changed drastically - it looks unprofessional, the x*65536+y thing - is odd. Also, with good designed code passing the parameters by registers than by stack has not more than 0,00001 % percent improvement in speed. Doing it that way also simplifies implementing other languages.
Post 06 Aug 2005, 14:06
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 08 Aug 2005, 14:23
The problem is thatpassing by stack NEEDS better designed code - likeyou said - but passing by registers doesn't need that much effort.

Passing by registers has one disadvantage - it depends on available registers, because eax is taken by interrupt and esp by stack. Then again, good code can compensate that Very Happy.

Passing by stack has the following disadvantages:
1) Its slow -=> push [constantOrRegister] is random as seen from CPU. The BTB and other optimizations don't work on random read/write because when you push a value then the CPU needs to READ from that address, WRITE to esp and CHANGE esp address. Later when the values are passed to subproc, it has to READ from memory again and after what it does - also clean the stack.
2) Its complicated -=> The pushed values and count of them need to be remembered. Another register (ebp) is wasted to retain stack and you have even less registers to do the job meaning more memory access and wiser register usage. Every value has to be calculated from [ebp+something] and you don't have meaningful aliases or even register names to help you.
3) ITS COMPLICATED Very Happy
Try reading proc when you know what registers it takes in and gives out - you know exactly only by looking, what it does to these registers. Now push all your values to stack and try reading the memory aliases. You don't know what mov edi,[ebp+8] or sub eax,[ebp+24] mean by just looking at the documentation. You have to take into account the +4 to esp that the call makes and this is too confusing and errorprone.
Post 08 Aug 2005, 14:23
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 08 Aug 2005, 15:58
By the way: imagine. You transfer parameters through the registers. When OS start performing function, it needs free registers. So, parameters in registers SAVED IN STACK anyway. But i like parameters transfered through registers too...
Post 08 Aug 2005, 15:58
View user's profile Send private message ICQ Number Reply with quote
proveren



Joined: 24 Jul 2004
Posts: 68
Location: Bulgaria
proveren 09 Aug 2005, 09:59
Exactly my point, Night Rider Smile , some functions need 3-4 registers, obviously you would need to push and later pop values when you pass the desired parameters.
Post 09 Aug 2005, 09:59
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 09 Aug 2005, 12:14
Ok, lets agree on some middle way.
When you call some lowlevel API like SetPixel then every pixel can remain the same though you can use i.e. eax,ebx for co-ordinates and ecx for colour etc. You will not write to them.
If your API needs more than some critical 7-8 registers then of course you should immediately use stack not bothering about the minimum amount of registers.

One other thing: What I hated in C was the @$£€@€ I had to go through when I wanted to return more than one value. In assembly you can use all available registers to return values and maybe even seemingly infinite stack Very Happy

I hope you understand my posts and see that I'm not a "fan" of register passing but I'm for it when it can save you precious clocks Wink
Post 09 Aug 2005, 12:14
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 09 Aug 2005, 17:42
Well the kernel woudn't necessarily have to save the registers on the stack would it? I assume MenuetOS uses a TSS, or some sort of process state table?
Post 09 Aug 2005, 17:42
View user's profile Send private message AIM Address Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 10 Aug 2005, 19:21
Madis731, yes you are right, but there is a lot of situations where 5-7 registers needed, and API interface must be solid, not multi-variant.

THEWizardGenius: " Well the kernel woudn't necessarily have to save the registers on the stack would it?". No, we are talking about other registers saving. Imagine, you call some long function and parameters are in eax,ebx,ecx and edx. This procedure needs registers too, yes? But it needs values in eax ebx ecx edx passed from user's program. So these values are stored somewhere and registers are used by routine. We are !!!!not!!!! talking about saving task state while switching between processes. Situation is different.
Post 10 Aug 2005, 19:21
View user's profile Send private message ICQ Number Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 11 Aug 2005, 01:31
Oh I see. You're talking about when the procedure sends the registers, not when the system call needs to use some registers. Well I definitely think the MenuetOS API's are written stupidly, but there is no way to change them without changing backward compatibilty.
Post 11 Aug 2005, 01:31
View user's profile Send private message AIM Address Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 11 Aug 2005, 12:24
Quote:

You're talking about when the procedure sends the registers, not when the system call needs to use some registers.

Ha! again nope. We are talking about system call, when sustem function needs PARAMETERS passed in registers, and it needs same BLANK registers to perform operations.
Post 11 Aug 2005, 12:24
View user's profile Send private message ICQ Number Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 11 Aug 2005, 17:00
My point exactly. I'm asking why a system function can't use the registers as they are. It doesn't have to save the registers, as the registers are saved in the TSS. So when it uses the registers, then it checks TSS of the program that called the system call, and there they are, as they were. System calls don't need to save registers, because this is already done, in the TSS, when the system call is made, correct?
Post 11 Aug 2005, 17:00
View user's profile Send private message AIM Address Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 11 Aug 2005, 18:58
I'm sorry. I did not look very well MEOS code. If when syscall occures, task swith has performed, then yes. But for example, my OS does not change TR when syscall occurs.
Post 11 Aug 2005, 18:58
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.