From: Martin B. <mar...@t-...> - 2018-12-06 19:03:41
|
Daag Jan, see below ... Hope it helps! Regards Martin BTW You'r marching through 1009 * 16 words in memory - is that what you want? Am Donnerstag, 6. Dezember 2018, 19:46:33 CET schrieb Jan Kromhout via Amforth-devel: > Hello, > > I have make a buffer, after loading the program I aspect that all locations > will be zero. When take a look there are some places with values! > > **** /Users/jankromhout/Documents/amforth-6.7/tools > (ATmega328P)> clearBuffer > ok > (ATmega328P)> .Buffer > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 12288 56 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > After clearing the locations there will be values on some locations. > > What do I wrong? > > Cheers, > > Jan > > > > marker --SSD1306-- > > > \ size of display for memory buffer > 128 constant SSD1306_LCDWIDTH > 64 constant SSD1306_LCDHEIGHT > > SSD1306_LCDHEIGHT SSD1306_LCDWIDTH * 8 / constant BUFFERSIZE > > BUFFERSIZE 2 * buffer: buffer > > : buffer! > > buffer + ! > ; > > : buffer@ > > buffer + @ > ; > > \ display buffer inhoud > > : .Buffer > > [ 1024 15 - ] literal 0 do [ buffersize 2 * 16 / ] literal 0 do > 16 0 do > j i + buffer@ . J 16 * i + buffer@ > loop > cr > 16 +loop > ; > > : clearBuffer > > 1024 0 do > 0 i buffer! > loop > ; > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Getippt im 9-Fingersystem von mir selbst. |