• Hi Gordon,

    Running this code:

    // Flashtest
    
    function gen_256() {
        var i;
        var str='';
        for(i=0;i<256;i++) {
            str+='X';
        }
        return(str);
    }
    
    var bytes256=gen_256();
    var f = require("Flash");
    var freeFlash = process.memory().flash_start + 511*1024;
    console.log(f.getPage(freeFlash));
    console.log('LEN:'+bytes256.length);
    f.erasePage(freeFlash);
    console.log('Nr.1, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.2, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.3, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.4, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.5, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.6, at '+freeFlash);
    f.write(bytes256, freeFlash);
    freeFlash+=256;
    console.log('Nr.7, at '+freeFlash);
    f.write(bytes256, freeFlash);
    
About

Avatar for Sacha @Sacha started