From: Enoch <ix...@ho...> - 2013-06-06 19:37:37
|
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. |