🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Yet another post about Epoch

Published February 10, 2009
Advertisement
Spent the last couple of hours putting together an assembler for the VM bytecode format. This converts nice assembly language like this:

00DE4DD8 PUSH_INT 000DE4D58 PUSH 00DE43A0 INVOKE 00DD8D3000DE5090 WRITE hInstance00DE5D98 PUSH_INT 000DE5DF8 PUSH_STR 13 ScribbleClass00DE5918 PUSH_STR 0 00DE5D50 PUSH_INT 600DE5B20 PUSH_INT 000DE5BD0 PUSH_INT 3251200DE5C80 PUSH 00DE5618 INVOKE 00DDE3A800DE5A70 PUSH_INT 000DE5490 PUSH 00DE58D0 READ hInstance00DE5820 PUSH_INT 000DE5678 PUSH_INT 000DE5EB8 BINDFUNC mywndproc00DE5238 PUSH_INT 000DE5288 PUSH 00DE4F70 SIZEOF wndclass00DE55D0 PUSH_INT 300DE4EC8 WRITE wc00DE5740 PUSH 00DE4CF8 READ wc00DE0310 INVOKE 00DD972000DE61F8 PUSH_INT 000DE5CC8 PUSH_STR 13 ScribbleClass00DE6178 PUSH_STR 8 Scribble00DE6500 PUSH_INT 1356595200DE6548 PUSH_INT -214748364800DE62A0 PUSH_INT 000DE6610 PUSH_INT -214748364800DE6480 PUSH_INT 000DE60C8 PUSH_INT 000DE6110 PUSH_INT 000DE6590 PUSH 00DE6740 READ hInstance00DE63C0 PUSH_INT 000DE62E8 PUSH 00DE6408 INVOKE 00DDAE4800DE6898 WRITE hwnd00DE68E0 PUSH 00DE6928 READ hwnd00DE6A48 PUSH_INT 500DE69E0 INVOKE 00DDC2F8


... into a thoroughly unintelligible blob of binary.

Next up comes the disassembler which can convert back from the binary to a text format. This is intended to accomplish two things: first, to provide a way to validate the output of the assembler, and secondly, to allow people to reverse engineer Epoch programs for themselves.


The goal of all this binary mucking about is pretty simple: I'm going to design an .EXE stub that contains this binary code in a data segment. The stub simply loads the VM DLL, feeds it the binary, and sits back to enjoy the ride. Once the handover from the .EXE itself into the VM occurs, everything becomes 100% Epoch controlled.

This will, to put it simply, let you make .EXEs from Epoch programs. The only external thing they will require is the Fugue VM DLL, plus of course any libraries in use.


There's still a long way to go here; the binary code format cannot actually be executed yet, as the VM currently expects all of its programs in source form.

As soon as this .EXE stuff works, I'll start packaging R5. This is looking to be the single most radical update to the language yet. After the release, I plan to start working on an Epoch IDE, which makes it more convenient to write Epoch programs. More on that later; at the moment my brain is a bit cooked [smile]

(And yes, the IDE will be built entirely in Epoch.)
Previous Entry Epoch, again.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement