Hello Mark, so you found the subtle difference between @ and c@, congrats! :-)
Mark Roth writes: > So because of grabbing a word it seems that I was bringing in the PINB > register as well that had a value in it. So that is where the extra bits > came from. > > : cylon >> $ff ddra c! 1 porta c! >> begin 40 ms >> 7 0 do porta c@ 2* porta c! 40 ms loop >> 7 0 do porta c@ 2/ porta c! 40 ms loop >> key? until ; > > > So this works exactly as I wanted it to. I am really starting to understand > the value of interactive debugging by just running each line to see what is > going on. Once I looked at the stack while stepping it made > perfect sense. Numbers: Over time I have adopted the style to prefix each and every number except for 0 and 1. I have been in the situation too often, that base was not 10 like expected but rather 16. >: cylon > $ff ddra c! 1 porta c! > begin #40 ms > #7 0 do porta c@ 2* porta c! #40 ms loop > #7 0 do porta c@ 2/ porta c! #40 ms loop > key? until ; Number output >> It's a common display situation in Forth. Leading zeros aren't display, >> even when they exist. /Very often/ I use " u0.r " for exactly this reason. Cheers, Erich -- May the Forth be with you ... _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel