Essence » Blog

Writing a Simple Text Editor

 — 3 weeks ago
I recently decided to make a version of "Notepad" for my OS, and it's mostly done now.
To take a deeper look into using the OS's API, I'll walk you through how you could recreate the program.
(Note: the API is still under constant revision, so any information presented in this blog could change at any time...)

We can start by creating a manifest file. The build system should automatically find it.
Let's add a definition for the program.

text_editor/text_editor.manifest
1
2
3
4
[program]
name = "Text Editor";
shortName = "text_editor";
systemMessageCallback = ProcessSystemMessage;


This specifies ...
Read More →


Plans

 — 2 months, 1 week ago
Although I can't remember exactly when I started this project, it was approximately 11 months ago.
Which means we're approaching the 1st year anniversary of development!

By the first anniversary I want to get the OS running on real hardware.
The things I still need to do for this are:
  • AHCI driver (the old one was buggy)
  • Proper VBE graphics mode selection
  • GPT partition table support
  • Possibly EFI booting?
  • Fixing whatever bugs we find!!

That's a worryingly long list, especially as I'm a bit busy this week.
But hopefully I'll manage to get something working ...
Read More →


Hello, world!

 — 3 months, 1 week ago
Let's take a look at what it takes to write a simple "Hello, world!" GUI program for my operating system.

First, we need to write a manifest file.
All we need to do is declare the properties for our main window, and how to build the program.

hello_world/hello_world.manifest
1
2
3
4
5
6
[build]
output = "Hello World.esx";
source = "hello_world/main.cpp";

[window mainWindow]
title = "Hello, world!";


Then, we write the program itself.

hello_world/main.cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19 ...
Read More →


The Filesystem, Version 1

 — 4 months, 1 week ago
The Filesystem, Version 1

What is a filesystem?

As far as your drive is concerned, there is no such thing as a "file" or "folder".
Drives divide up their space into equally-sized sectors, 512 bytes each.

(This number, 512 bytes, originates from the sector size on floppy disks.
Modern drives have larger sectors behind the scenes.
However, drivers send commands to the drive controllers with a precision of 512-byte blocks.
As far as the filesystem driver should be considered, sectors are 512 bytes each.)

This isn't very useful for users.
They want to have hierachical folders which contain files ...
Read More →