aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/2spirw.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/2spirw.asm')
-rw-r--r--amforth-6.5/avr8/words/2spirw.asm19
1 files changed, 19 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/2spirw.asm b/amforth-6.5/avr8/words/2spirw.asm
new file mode 100644
index 0000000..a7064da
--- /dev/null
+++ b/amforth-6.5/avr8/words/2spirw.asm
@@ -0,0 +1,19 @@
+; ( n1 -- n2 )
+; MCU
+; SPI exchange of 2 bytes, high byte first
+VE_2SPIRW:
+ .dw $ff05
+ .db "!@spi",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_2SPIRW
+XT_2SPIRW:
+ .dw PFA_2SPIRW
+PFA_2SPIRW:
+ push tosl
+ mov tosl, tosh
+ call_ do_spirw
+ mov tosh, tosl
+ pop tosl
+ call_ do_spirw
+ jmp_ DO_NEXT
+