<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi<div><br><blockquote type="cite"><div><span>From TextFrames.DisplayLine:</span><br><span>Display.CopyPattern(R.col, patadr, X + x, Y + y, Display.invert)</span><br><span></span><br><span>So on white background with black characters, you see exactly nothing.</span><br><span></span><br></div></blockquote>When introducing colors to the FPGA Oberon system you indeed have to do change the line above to<div>Display.CopyPattern(R.col, patadr, X+x, Y+y, Display.paint)</div><div><div><br></div><div>But even here it can happen that you don‘t see anything if you write with red font on red background...</div><div>BTW: there is some room for interpretation how to map the 0 in B/W patterns... What to do with 0 and the following modes:</div><div>- paint: leave screen or set to bg color?</div><div>- replace: leave screen or set to bg color?</div><div><br></div><div>In my color implementation „paint“ and „replace“ are treated identically and the 0 leave the screen untouched.</div><div><br></div><div><blockquote type="cite"><div><span>Is there a flexible/standard solution for these kinds of problems?</span><br></div></blockquote>If yo really want TextFrames to work with B/W and color, you have to detect the nbr of colors from Display and set the mode accordingly.</div><div><br><blockquote type="cite"><div><span>Also, is there a standard to inititialze the colors?</span><br></div></blockquote>Every OS is free to use the colors as it likes. If you port an application from Linux to Windows to macOS and the application uses absolute colors, there is no need for a standard as the application defines the colors (eg 24bit RGB)</div><div>If however the OS offers indexed colors, the application only uses indices in a color table, and the color table is NOT initialized by the application itself, then the application looks differently on the different OS.</div><div><br></div><div>I enhanced NWs original PO on FPGA from B/W to 16 indexed colors (by changing Verilog source and Display.Mod) and initialized the color table with these Master Color Values: (table 1)</div><div><a href="http://www.gno.org/pub/apple2/doc/apple/technotes/iigs/tn.iigs.063">http://www.gno.org/pub/apple2/doc/apple/technotes/iigs/tn.iigs.063</a></div><div><br></div><div><blockquote type="cite"><div><span>Frankly, I am absolutely fascinated by the compiler but less exited by the System. Sometimes I really wonder that it works at all.</span><br></div></blockquote>The fascinating bit of the Oberon System is that it is so small: A working OS <111 kB (without compiler)</div><div><br><blockquote type="cite"><div><span>From Texts.Load:</span><br><span>q.voff := ASR(LSL(bt, -24), 24);</span><br></div></blockquote><div><br></div>Thats the „standard“ way to upscale a signed 8bit vale to a signed 32bit value😊<br></div></div></div><div>It’s equivalent to</div><div>IF bt<127 THEN q.voff := bt ELSE q.voff := bt-256 END;</div><div><br></div><div>Jörg</div></body></html>