Another good thing is that the pesky bug with the printf handling of integers has also been fixed (that was really bugging me), I had a signed integer instead of an unsigned integer as the working variable.
Next thing I would like to do is to write an intermediate console. It will read blindly from the keyboard, and write blindly to the screen. It will spinlock itself between operations. It will still have a fixed list of commands. The aim is to create an environment which will support the basic Hello World program above, which will then lead onto the development of the stdin and stdout file functionality. This will then be retro-fitted into the console to create the next version.
The console will have a console invoke function as its entry point. The keyboard handler will have to feed into a buffer. The console will spinlock until the buffer has data to process (similar to how read() will work eventually).
As I discussed previously, the hello world program will make an interrupt call to get the address of the function to be used for finding other functions. From there, the hello world program will find the "write()" system call, and will call it passing 1 (for stdout) and the string data, it will then exit
I've put together a rough skeleton of HelloWorld. The start() method uses assembly to call an interrupt and fetch EAX into a global function pointer for resolve(). It then uses resolve() to find write(), then calls main(). main() then uses write() to output the Hello World string to STDOUT (file descriptor 1).
Now all I need to do is write all the other code to underpin this ...
No comments:
Post a Comment