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
16 0 do
j i + buffer@ .
loop
cr
16 +loop
;

: clearBuffer
  1024 0 do
    0 i buffer!
  loop
;
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to