AVR Version 3.6 of uLisp now includes an AVR assembler


#1

AVR Version 3.6 of uLisp now includes an AVR assembler which allows you to generate machine-code functions, integrated with Lisp, written in AVR assembler mnemonics. For more information see AVR assembler overview.

All versions of uLisp 3.6 now also automatically turn off echo when pasting a program into the Serial Monitor. This allows you to use uLisp with a minimal Serial buffer, freeing up RAM, without the risk of errors due to buffer overflows.

Download the latest versions of uLisp here: Download uLisp.


#2

Hey David!

For my small memory boards (e.g. Adafruit Neo Trinkey) that I’m using your ARM assembler functions to blink the NeoPixels onboard. After getting all my functions onboard I do a save-image first so that all the assembler functions are saved there. After a restart and everything’s loaded fine I call my little function, clr-asm. My free memory goes from 84 to 2057. clr-asm just unbinds all the assembler instructions which, after being loaded, aren’t needed. If I need them again, I just reset and add my new code, save-image, lather, rinse, and repeat. :)

(defun clr-asm ()
       (dolist (i '(regno emit error offset $word lsl-lsr-0 add-sub-1 mov-sub-2-3
                 add-mov-4 reg-reg bx-blx str-ldr str-ldr-5 add-10
                 add-sub-11 push-pop b-cond-13 $adc $add $and $asr $b
                 $bcc $bcs $beq $bge $bgt $bhi $bhs $ble $blo $blt $bmi
                 $bne $bpl $bic $bl $blx $bx $cmn $cmp $eor $ldr $ldrb
                 $ldrh $ldrsb $ldrsh $lsl $lsr $mov $mul $mvn $neg $nop
                 $orr $push $pop $rev $rev16 $revsh $ror $sbc $str $strb
                 $sub $sxtb $sxth $tst $uxtb $uxth outclr outset dirset
                 $cpsie $cpsid cpside clr-asm))
          (makunbound i)))

FWIW!
-Rusty-


#3

Nice suggestion - thanks for sharing!