Hi,
I'd like to know if anybody has succeeded to simulate the AVR running amforth (
Hi,
I'd like to know if anybody has succeeded to simulate the AVR running amforth (
-- TIA & Regards, WZab
A few months ago I've reported problems related to simulation of amforth (
If anyone wants to simulate the amforth with the current version of the VMLAB, it is necessary to switch off this mechanism (only for the version used in simulation, do not do it in the version burned into the real AVR): The change has to done in file core/words/istore_nrww.asm I have done it in the way which keeps the size and location of the code unchanged (only the jump destination is modified).
The original amforth 3.5 code:
; an erase cycle is only necessary ; when changing a bit from 0 to 1 .dw XT_OVER .dw XT_OVER .dw XT_IFETCH .dw XT_INVERT .dw XT_AND .dw XT_DOCONDBRANCH .dw PFA_ISTORE_WRITE .dw XT_DUP .dw XT_SPMERASE PFA_ISTORE_WRITE: .dw XT_DUP .dw XT_SPMWRITE .dw XT_SPMRWW .dw XT_DROP .dw XT_DROP .dw XT_R_FROM .dw XT_INTRESTORE .dw XT_EXIT
The changed amforth code - simulates correctly (erase always):
; an erase cycle is only necessary ; when changing a bit from 0 to 1 .dw XT_OVER .dw XT_OVER .dw XT_IFETCH .dw XT_INVERT .dw XT_AND .dw XT_DOCONDBRANCH ; Jump to the next instruction - erase always .dw PFA_ISTORE_ERASE PFA_ISTORE_ERASE: .dw XT_DUP .dw XT_SPMERASE PFA_ISTORE_WRITE: .dw XT_DUP .dw XT_SPMWRITE .dw XT_SPMRWW .dw XT_DROP .dw XT_DROP .dw XT_R_FROM .dw XT_INTRESTORE .dw XT_EXIT
-- HTH & Regards, Wojtek
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.