Am 04.06.2011 um 11:22 schrieb pito: > Hi, for debugging/educative purposes I'd like to monitor the > activity of the inner interpreter. The idea is it to have an led > switched on/off when running through the interpreter, so I can see > the interpreter interprets words and the program is running. > Moreover, I can maesure the processes with oscope. > Now the Q: where is the best place to place the led_on and led_off > within the inner interpreter to get as much as possible info? P.
Set A=portaddress, b=bit to toggle bits with sbi ... cbi pair. Place it in the DO_EXECUTE part of inner interpreter as shown below. You get a short positive pulse of constant width followed by a low gap indicating the time amforth spends elsewhere. Michael DO_EXECUTE: sbi A,b ; Set bit in I/O register, 2 cycles <--- movw zl, wl ; 1 cycles readflashcell temp0,temp1 ; 8 cycles (see your *.lst file) movw zl, temp0 ; 1 cycles cbi A,b ; Clear bit in I/O register, 2 cycles. <--- ijmp ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Amforth-devel mailing list Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel