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
Diff: plEarlz.h
- Revision:
- 9:4211d638b2e9
- Parent:
- 8:f356684767ef
- Child:
- 16:370b9e559f92
--- a/plEarlz.h Sat Sep 22 04:14:01 2012 +0000 +++ b/plEarlz.h Wed Sep 26 04:12:57 2012 +0000 @@ -2,7 +2,7 @@ #define PLEARLZ_H #define MAXSTACK 64 -#define MAXCALLS 32 +#define MAXTEMPSTACK 64 #define MAXLINELENGTH 128 #define DICTIONARYSTEP 4 //how much memory to reserve when doing a reallocation for resizing #define CODEBLOCKSTEP 16 @@ -21,8 +21,10 @@ BranchTrue, //argument is 16 bit vaddress BranchFalse, //argument is 16bit vaddress Branch, + PushTemp, //pops from stack and pushes onto the temporary stack + PopTemp, //pushes onto stack from temporary stack Push, //argument is 32bit number - Pop, //trashes top value on stack + Drop, //trashes top value on stack Call, //call. argument is WORD entry pointer in dictionary CallInt, //call internal argument is function pointer Add, @@ -40,10 +42,12 @@ 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, + Store, + Swap, 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. + Pick, //takes an integer position from the stack. Goes that many slots back in the stack and peeks at the value, and then pushes it on the top of the stack Ret //exit };