Hello AmForth-ers,
Can somebody give me good reasons why we should not convert words/*.asm
implementations (as much as possible) from VM assembly to AVR
assembly.
For example:
; ( a-addr1 -- a-addr2 )
; Arithmetics
; add the size of an address-unit to a-addr1
VE_CELLPLUS:
.dw $ff05
.db "cell+",0
.dw VE_HEAD
.set VE_HEAD = VE_CELLPLUS
Current implementation:
=======================
XT_CELLPLUS:
.dw DO_COLON
PFA_CELLPLUS:
.if CELLSIZE == 2 ;
.dw XT_1PLUS
.dw XT_1PLUS
.else
.dw XT_DOLITERAL
.dw CELLSIZE
.dw XT_PLUS
.endif
.dw XT_EXIT
Suggested implementation:
=========================
XT_CELLPLUS: .dw pc + 1
adiw tosl, CELLSIZE
jmp_ DO_NEXT
There are two good reasons to prefer the AVR implementation:
1. Speed (10x faster?)
2. Ease of debugging through the Studio.
Comments? [flames :-)]
Thanks, Enoch.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel