Hello, I are struggle with the buffer: As you can see I create two array’s. I expect that when I initialize this I can read the value. It's not true. As you can see, values are overwritten. Am I doing something wrong?
Cheers, Jan \ Segment byte maps for numbers 0 to 9 10 buffer: Segment_Map_Digit \ Byte maps to select digit 1 to 4 4 buffer: SEGMENT_SELECT : Segment_Map_Digit@ cells Segment_Map_Digit + c@ ; : Segment_Map_Digit! cells Segment_Map_Digit + c! ; : SEGMENT_SELECT@ cells SEGMENT_SELECT + c@ ; : SEGMENT_SELECT! cells SEGMENT_SELECT + c! ; : initSegment_Map_Digit \ Segment byte maps for numbers 0 to 9 $c0 0 Segment_Map_Digit! $f9 1 Segment_Map_Digit! $a4 2 Segment_Map_Digit! $b0 3 Segment_Map_Digit! $99 4 Segment_Map_Digit! $92 5 Segment_Map_Digit! $82 6 Segment_Map_Digit! $f8 7 Segment_Map_Digit! $80 8 Segment_Map_Digit! $90 9 Segment_Map_Digit! \ Byte maps to select digit 1 to 4 $f1 0 SEGMENT_SELECT! $f2 1 SEGMENT_SELECT! $f4 2 SEGMENT_SELECT! $f8 3 SEGMENT_SELECT! ; Result : (ATmega328P)> : test 10 0 do i Segment_Map_Digit@ . cr loop ; ok (ATmega328P)> initSegment_Map_Digit ok (ATmega328P)> hex test C0 F9 A4 B0 99 F1 F2 F4 F8 90 ok _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel