====== NEXT (MSP340 eForth) ====== Am Beispiel des MSP340G2553 aus der Texas Instruments MSP340 Prozessorfamilie wird gezeigt, wie ein NEXT auf dieser Von-Neumann-Architektur gebaut werden kann. Richtungsweisend war hierbei die Arbeit von Ting [1], der sein eForth auf diese MCU optimiert hat. Setzt man eForth als //Direct Thread Model// auf, ist ''NEXT'' nur noch eine einzige Maschineninstruktion. mov @ip+,pc ; fetch code address into PC Das geht, weil dieser Prozessor //indirect autoincrement// Instruktionen mit den Registern machen kann: @Rn+ Und weil das ''NEXT'' nur //eine// Instruktion ist, wird diese durch ein Macro //inline// compiliert, es sind keine Sprünge nötig. .macro INEXT ;mk renamed (dollar)NEXT to INEXT - inline code for NEXT. mov @ip+,pc ; fetch code address into PC .endm eForth auf dem MSP340 ist damit schnell und verbraucht wenig Speicherplatz: 3 Cyclen, 1 Word. Das vollständige eforth belegt nur 4K Flash in der MCU. [1] https://wiki.forth-ev.de/doku.php/projects:ting_s_electronic_forth_bookshelf#eforth_v43_for_ti_launchpad_25