hey. i'm flattered to have your opinions on my stuff :bounce:
well, you see, my life is all about invention -- although until recenly, i havent been inventing anything that has not been inveted yet. that the nature of things, when you're living in a century where everyone invents a squared wheel of his own.
so... i invented message queues a while ago, when i was trying to write a game, in which game scripts would run on the game engine, only that it needed too much mem, and doing all the 32x32 graphics freaked me out. so i tossed it out of the window. and now i'm doing "low level" stuff again, which i like the most. i'm planning on making a real os one day, that runs programs in a vm, not directly on the cpu, thus a system crash is practically impossible. by the way, that is :wink: . i'm getting carried away a lot. and since i'm planning this will be "my last word" in the qb scene, i'm putting a little effort into it.
by the way, i improved my "multitaskingability"... the instruction-slicing didnt work well. now it works perfectly. one trap runs when i press ENTER and the other when i press SPACE, and the best thing -- each trap executes only 3 instructions per cycles, and resumes where it was left. works smooth. of course a more reasonable instructions per cycle rate would be somewhere around 100... but i'm wondering at what level should i share - at the owner level or at the trap level?
if you looked carefully at the code, you'd have seen "owners". owner 1 is reserved to the system, while the rest of the owners are customizable. in other words, an owner is like a process, only that it's meant to used solely to group traps, i.e., loading an owner will set up all the traps for that owner, the system will direct user input at the active owner, and when you unload an owner - all of its traps are uninstalled as well. when the system loads an owner, it sends it the MSG_APP_INIT. the owner must have a trap for that message, which serves as the entry point to the "application". but i'm getting carried away again :???: .
of course the system handles system-messages on its own, and no trap can trap a system message before the system. maybe i'll create hooks for that -- which will have the ability to eat a system message before the system does so, and thus mask out certain messages. but i dont see a real need for that, at this point. my traps and owners should be enough.
as for installing virtual device drivers... well, that is harder. first, it will require hooks. second, my system uses ugl's keyboard's handler, and because and qb is qb... and my "os" is a "virtual os", i couldnt perform machine code in traps. it's too dangerous, too powerful, and too imposiible. so what i could do is write a trap that check's ugl keyboard state. only that would require direct memory reading... risky and complex... but mostly, inefficient.
also, in the final version, there will be no instruction like VMI_CLS or VMI_DISPLAY -- they will be system-destined messages. but i havent implemented VMI_SEND yet, so...
plus, i'm getting this feeling i should restart vema. i think it got a little too crowded. so perhaps i'll redesign it with hooks, more efficient execution engine, and perhaps a "virtual hardware interface".
i dont know what you meant exactly by "system call interface (with calls such as read, write and exec) ", so i'd like it if you explain a little more. but assuming i got it right, this is how i'll implement a keyboard vdd:
the system would have a write/read interface, where you tell the system the device ID, and the system reads/writes what you want. that way, when i perform a loop that READs DEVICE_KEYBOARD at a given index, the system will return the value of the "device" (keyboard state) at the given index. this will surely be inefficient, but what the heck 8)
also - since the system also uses messages for that, why is it any different if a driver sends those messages? i just need someone to send messages when needed... dont care who does that
... and, since i'm not gonna have directx for vema - are drivers necessary?
Quote:(with calls such as read, write and exec)
so i see how a interface with read/write is helpful, but what is exec? what do i execute on a device?
thanksies.
[Flexibal>