I'd like to know, how to make a windowed system, I.e not a windows clone , no multitasking just prohibit the program from taking the whole screen, and draw a border around it. You may say that it would require multitasking, I plan to do it like this :
1) Start the Program
2) Let it take over the whole screen
3) CATCH IT! AND HALT THE BACKGROUND WORK SINCE WE DON'T HAVE MUTITASKING
4) Restart the OS Shell after the program ends......
Any better ideas
Also does anybody has some docs to help with this
Does the Wiki have an article about this?
P.S My OS is CLI based (Didn't care to implement a TUI or a GUI)
I don't ask code cause it would be cheating, docs that could help me with this,
Help would be appreciated
Some ideas for,windowed system....
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Some ideas for,windowed system....
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: Some ideas for,windowed system....
i made a system with video game once, all application can have an init/alloc , then run func without main loop, or based on pure system of events like gtk, the goal is not to have main loop in the application.
it's called cooperative mode, if you want to have several app without multi tasking
i have made a start of windowed system, it's purely event based,i want everything to be event based in the os as much as possible, no block , poll or main loop when possible, but also programs are not responsible for the rendering, but just for telling the window system what to render in which container, so it's easier to have it working in this way
it can be also full screen and mono tasking (at cpu level) , without having to reset everything to launch a new module or app
it's called cooperative mode, if you want to have several app without multi tasking
i have made a start of windowed system, it's purely event based,i want everything to be event based in the os as much as possible, no block , poll or main loop when possible, but also programs are not responsible for the rendering, but just for telling the window system what to render in which container, so it's easier to have it working in this way
it can be also full screen and mono tasking (at cpu level) , without having to reset everything to launch a new module or app
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Some ideas for,windowed system....
So have any idea or docs to help me?
Does the wiki contain anything like that???
Does the wiki contain anything like that???
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: Some ideas for,windowed system....
you can find some idea in cooperative multitasking, not sure there is overall documentation to how to implement cooperative multitasking system, but you can find some idea of implementation
dos program were working like that, even on lot of older computers, with only fullscreen, or some semi multitask who can run application in full screen and return to desktop, but there is no standard way to do this, it's very system specific implementation each time
If you run it without multitasking, you don't have to catch it or halt the background, just transfer the execution control to the code of the program, and there is no background work unless with interupts, and the program return the execution to the system/shell after it exits
dos program were working like that, even on lot of older computers, with only fullscreen, or some semi multitask who can run application in full screen and return to desktop, but there is no standard way to do this, it's very system specific implementation each time
If you run it without multitasking, you don't have to catch it or halt the background, just transfer the execution control to the code of the program, and there is no background work unless with interupts, and the program return the execution to the system/shell after it exits
Re: Some ideas for,windowed system....
Provide an OS print function user mode programs can call. Instead of having a screen, say, 80 characters wide, your virtual screen would be 78 characters wide, giving you room for a border on the left and right. Do the same for the height.sid123 wrote:I'd like to know, how to make a windowed system, I.e not a windows clone , no multitasking just prohibit the program from taking the whole screen, and draw a border around it.
If you insist on letting it take over the whole screen, what I said above won't work. Give it a segment that it thinks is the video segment. Keep track of when it writes to it, and copy that info to the video memory, making sure to stay within your borders.sid123 wrote: 2) Let it take over the whole screen
If you're not multitasking, the OS only has to keep track of 1 running program. When that program is done running it should call the OS and tell it so; the OS can then mark the memory it's using as being free and return to the CLI.sid123 wrote: 4) Restart the OS Shell after the program ends......
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Some ideas for,windowed system....
So does that mean, the video segement will have to be redefined, printf, putchar and other video functions will have to be re written for the Apps.....?
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)