I haven't used screens since I first used Forth with my 6511AQ chips teamed up to a 3" floppy for development back in the 80's. However, I recently decided I needed config files in my Forth but I wanted an easy way to edit them on the target board via an ANSI terminal or via VGA. So I decided to write a simple screen editor that I called SED which just handled one sector at a time which in SD cards is 512 bytes. That worked well and I thought I can also edit raw sectors as well as memory and Flash etc. But then I thought I could also edit source code too if I made it larger than a sector, although 1k seemed a bit small, I settled with 2k display of 64 wide by 32 lines with an option for 4k buffers to handle the 4k page erase sizes of SPI Flash. When I edit memory or sectors it displays the hex bytes instead of characters.
This works really well over serial terminals or via VGA display on my embedded systems and I can toggle screen sizes for wider displays although there is no real need. Some mentioned having room for comments on the right but in recent years I have made a shift to having comments mostly on their own rows just above the code, since Forth source can have a line full of swaps and drops and other code, and it is handy to track this sometimes with positional comments.
So here are a few lines from a config file that I have added a few lines of source code to with comments just to illustrate that this is so much better for Forth vs the messy comment columns that only seem to line up for assembly code. The .< at the end of each indicates a CR is added, just to make it more text file like and easy to process as normal input. I use --- as a comment alias simply because it clearly separates code and comments and doesn't look like other non-comment symbols.
BTW - when it comes to "w i d e screens", I can set my target board's VGA mode to 1920x1080 and a 5x7 font can fit 320 characters on each line! But that is too wide.
Code:
FILE: CONFIG 2048 x64 10:45:37
0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
00000: OWNER: PETER JAKACKI .<
00040: BOARD: P2D2r4 .<
00080: SPLASH: MINION .<
000C0: SOUND: TAQOZUP .<
00100: SYSTEM: TAQOZ DEMO .<
00140: NOTES: Testing SED sector text editor for config .<
00180: .<
001C0: .<
00200: --- display the clock in the top right corner .<
00240: pri CLOCK 63 1 XY QTIME@ .AS" ##:##:## " ; .<
00280: --- display the ruler as hex digits/char or bytes/hex .<
002C0: pri RULER CRLF 8 SPACES tw FOR I >N .H NEXT .<
00300: tw 16 = IF 16 FOR SPACE I .BYTE NEXT THEN ; .<
00340: --- display header - reset term - plain - clear .<
00380: pri HEADER OFF CURSOR 15 EMIT PLAIN CLS HDRS .<
003C0: tw 8 + SPACES CR .<
00400: --- FILE: SED.BLK ... 2048 x64 ... 10:45:37 .<
00440: PRINT" FILE: " file$ PRINT$ 3 SPACES .<
00480: SECTOR? IF SPACE @FILE .L THEN SIZE CLOCK ; .<
004C0: .<
00500: .<