pic
pic copied to clipboard
A native compiler for 8-bit PIC micro controllers written in Common Lisp.
The following code iterates DO-SOMETHING for 256 times, because loop syntax is compiled to a DECFSZ instruction and the result decrementing zero becomes 255. ``` (loop 0 (do-something)) ``` How...
The dead code elimination phase is to be introduced within the compiler phases for optimization.
The inlining phase is to be introduced within the compiler phases for optimization.
**Situation** The language's `loop` form, currently implemented as a PIC macro, is compiled into instructions including `SUBWF`, `BTFSC` and a recursive function call. For example, the following expression: ``` (loop...
Use OPTIMA instead of CL-PATTERN because the auther says it is deprecated now.
**Situation** The compiler's output assembly is for PIC12F683 micro controller. **Problem** Rewriting `program-compile` function is needed to output assemblies for micro controllers other than PIC12F683. **Goal** Providing APIs to identify...
The constant folding phase is to be introduced within the compiler phases for optimization.
**Situation** A predefined PIC macro `progn` is expanded into a series of let bindings. The return values of its containing expressions are bound to temporal variables, which are never referenced....