All the PWM-capable pins will be used for other things in my final
design, so no need for this in my application.
2XYC din
2XYD dout
2XYE ain
-2XYF aout
+2XYF
v[x], v[y]+n
3XYn ldb
rjmp exec_din
rjmp exec_dout
rjmp exec_ain
- rjmp exec_aout
+ rjmp exec_nop
branch_dispatch_jumptable:
rjmp exec_jtab
rjmp _dispatch_done_writeback_reg
-exec_aout:
- ; Restrict operand to 0-f
- ldi r25, 0x0f
- and r10, r25
-
- ; TODO: PWM output
- rjmp _dispatch_done
-
-
exec_ldb:
; Load byte
movw ZL, r10
.dw (0x2 << 12) | (@0 << 8) | (@1 << 4) | (0xe)
.endmacro
-.macro T_AOUT
- .if @0 < 0 || @0 > 0xf
- .error "Tortoise Bytecode: invalid variable register"
- .endif
- .if @1 < 0 || @1 > 0xf
- .error "Tortoise Bytecode: immediate value outside 4-bit range"
- .endif
- .dw (0x2 << 12) | (@0 << 8) | (@1 << 4) | (0xf)
-.endmacro
-
.macro T_NEG
T_NOT @0
T_ADDS @0, 1