AVR Naked Steel with Lisp

There are two varieties of programmers: those that don’t use Lisp, and people who want new parenthesis keycaps each six months. Lisp is one of the ones languages you both actually love or actually hate. In the event you find it irresistible, you will have looked at ulisp, which runs on Arduino forums of the AVR and ARM selection, in addition to ESP chips, RISC-V, and others. A up to date replace permits the language to insert assembler into AVR techniques(*10*).

We almost certainly don’t want to persuade somebody studying iandroid.eu why including assembler is a great factor. It sort of feels to combine neatly with the surroundings, too, so you’ll be able to write assembler macros in Lisp, which opens up many probabilities.

In fact, the layout isn’t the similar as your lawn selection assembler. In the end, Lisp will have to stand for “quite a lot of frustrating spurious parenthesis.” Plus your code must be position-independent because you’ll by no means know the place it quite a bit.

Right here’s a easy instance:

; Biggest Commonplace Divisor
(defcode gcd (x y)
($movw 'r30 'r22)
($movw 'r22 'r24)
once more
($movw 'r24 'r30)
($sub 'r30 'r22)
($sbc 'r31 'r23)
($br 'cs switch)
($br 'ne once more)
(gcd 3287 3460)

There are extra examples at the web site(*10*), together with direct I/O sign up manipulation.

We’ve observed badges operating ulsip(*10*). In truth, regardless that, we’d be simply as pleased with Forth(*10*) and it’s more uncomplicated on our parenthesis keys.