A project to implement a console using the Mbed using VGA for video output and a PS/2 keyboard for the input. The eventual goal is to also include tools for managing SD cards, and a semi-self-hosting programming environment.

Dependencies:   PS2_MbedConsole fastlib SDFileSystem vga640x480g_mbedconsole lightvm mbed

MbedConsole is a cool little project to have a self-contained computer all on an Mbed. So far it has VGA and PS/2 support and can stand alone without a computer powering it. Next planned features are SD card support and a lightweight programmable VM complete with a file editor and self-hosted assembler.

You can view additional details about it at http://earlz.net/tags/mbedconsole

Revision:
7:2ac6752d47d2
Parent:
6:a4dff59ef214
Child:
8:f356684767ef
--- a/plEarlz.h	Fri Sep 21 04:53:45 2012 +0000
+++ b/plEarlz.h	Sat Sep 22 03:00:55 2012 +0000
@@ -37,8 +37,10 @@
     Ceq,
     Cneq,
     LoadStr, //argument is variable length string ending with 0. Pushes address onto stack
-    Load, //pushes the value pointed to by the argument
-    Store, //pops a value and stores it in the memory pointed to by the argument
+    LoadConst, //pushes the value pointed to by the argument
+    StoreConst, //pops a value and stores it in the memory pointed to by the argument
+    Load, //same as above, except the address is popped first. 
+    Store, 
     New, //pushes a pointer to free memory for an integer
     NewVar, //pushes a pointer to memory. Size is specified by argument
     Delete, //pops a pointer and frees it. 
@@ -62,6 +64,17 @@
     } value;
 } WordKey;
 
+/**
+BranchTarget tracks branches/labels. 
+When a beginning conditional/looping structure is found, it adds a branch target to the list with `target` set to point to the relevant branch target in codeblock
+When an ending structure is found, it replaces the branch target(which starts at -1) with the actual branch address,
+**/
+typedef struct TargetNode
+{
+    volatile uint16_t* target;
+    volatile TargetNode* previous; //previous instead of next because we're going to "destroy" this list in reverse
+} BranchTarget;  
+
 extern ErrorType pl_error;
 
 int pl_shell();