Category: Embedded Development

PLAIN – Math & Expressions

We have so far demonstrated PLAIN Assembly with little difference to an actual 3.gen language. We will see the low-level assembly – instruction by instruction – a bit more as we dig into math and expressions. As we are an assembler we need to maintain a principle of 1:1 between code and actual instructions. The…

Read the full article

PLAIN – Module

PLAIN VM consist of multiple Modules. A Module have it’s own unique name, easyIPC Object map, Stack and can execute independently from other Modules. One Module can interact with other Modules or call them on blocking/non-blocking schemes. All code in PLAIN Assembly must be part of a module and a module start execution with the first…

Read the full article

PLAIN – Events 2

Events and state engine support is a key feature in PLAIN where we do things different. It basically convert the entire application into a state engine where processing is top-down based on events. I am not sure how much of this I want to support directly in the VM, but I will Experiment a bit.…

Read the full article

PLAIN – Events

Events have so far only been a mechanism in the high level language, but I want to support it in the assembly. Events are as mentioned return conditions. We create functions with multiple exit paths where each exit is a “return” with its own event code and separate list of return parameters. To enable this…

Read the full article

PLAIN – User Instructions

PLAIN can map an ADC value as a easyIPC object and access it directly. The design here should be recognizable for anyone that have used Modbus or CANopen in the past. Modbus, as an example, can map its registers into easyIPC registers. We do however also support User instructions. As we add modules that enable…

Read the full article

PLAIN – Basic Assembly Instructions

This is from my current implementation that focused on proof of concept. The list is basic instructions that will be reviewed and described in more details later.                         uint16_t Op_NOP(uint16_t in, uint8_t length);                         uint16_t Op_Move(uint16_t in, uint8_t length);                         uint16_t Op_Add(uint16_t in, uint8_t length);                         uint16_t Op_Sub(uint16_t in, uint8_t length);                         uint16_t Op_Div(uint16_t in,…

Read the full article

PLAIN – Virtual Machine

Languages like Java C# etc all use a virtual machine. This is a software package that need to start and interpret some kind assembly code. Languages like C/C++ compile into native assembly code that is much faster, but also tied to the hardware it run’s on. A virtual machine have the advantage that we extend…

Read the full article