How to update text in real time?

In this example, I update the text with texture.needsUpdate = true;

CPU simulation 8Bit

see CPU-Simulation-8Bit line 3456

function canvasSet( texture, ctx, bgr, w, h, txt ) {
 
    ctx.fillStyle = bgr; 
    ctx.fillRect( 0, 0, w, h );
    ctx.fillStyle = dGray;
    ctx.textAlign = "left";
    ctx.textBaseline = "middle";
    ctx.font = 'bold 80px Courier';     
    ctx.fillText(  txt, 0, h / 2 );    
    texture.needsUpdate = true;
    
}