Using the CRT unit in a console program -- GoToXY(24,80) scrolls up. lazarus / 21-General ---------------------------------------------------------------------- Curt Carpenter · 2025-08-21 02:13 I'm using linux/ubuntu and the CRT unit in a console program.  The terminal accessed with CRT iprovides 24 lines with 80 characters per line.  If I execute Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i GoToXY(24,80); //Wrong -- should be 80,24 as marcov noted! write('X');  the terminal displays an X on line 24, column 80, but it also causes the terminal to scroll up one line.  Is there a way to defeat the scrolling action?  It's been a long time since I played with the CRT unit -- I'm sure this is an ancient problem, but I can't remember the solution.  Hoping someone here remembers it ---------------------------------------------------------------------- marcov · 2025-08-21 06:56 Not really (and it is gotoxy(80,24) btw).  Typically if you want to do fullscreen drawing, the video unit is recommended. ---------------------------------------------------------------------- cdbc · 2025-08-21 07:14 Hi Curt I fiddled with 'crt' a while ago, you're welcome to have my findings... I do seem to remember, having the terminal-window 1 line bigger than the "crt-viewport" to avoid the scrolling... Attached you'll find some stuff to play with eta: for the demo to run un-garbled, you'll have to make your terminal window 97x31 cols/lines...  Regards Benny ---------------------------------------------------------------------- Curt Carpenter · 2025-08-21 15:05 Quote from: marcov on August 21, 2025, 08:56:44 amNot really (and it is gotoxy(80,24) btw).  Typically if you want to do fullscreen drawing, the video unit is recommended. Yes, (80,24) -- sorry.  I'll look into the video unit. ---------------------------------------------------------------------- Curt Carpenter · 2025-08-21 15:08 Quote from: cdbc on August 21, 2025, 09:14:58 amHi Curt I fiddled with 'crt' a while ago, you're welcome to have my findings... I do seem to remember, having the terminal-window 1 line bigger than the "crt-viewport" to avoid the scrolling... Attached you'll find some stuff to play with eta: for the demo to run un-garbled, you'll have to make your terminal window 97x31 cols/lines...  Regards Benny I'll look at the code Benny, thanks.  Had forgotten how much fun it was to work with a text-only CRT screen! ---------------------------------------------------------------------- marcov · 2025-08-21 15:43 Quote from: Curt Carpenter on August 21, 2025, 05:05:14 pmQuote from: marcov on August 21, 2025, 08:56:44 amNot really (and it is gotoxy(80,24) btw).  Typically if you want to do fullscreen drawing, the video unit is recommended. Yes, (80,24) -- sorry.  I'll look into the video unit. There is a tetris in the FPC demoes, and of course the turbo/free vision (including the textmode IDE) also uses it. ---------------------------------------------------------------------- Warfley · 2025-08-21 15:50 You can also check out my LazTermUtils library, you can take a look at the color example, which prints the whole screen at like 60-100 fps (on linux, on windows only 30, because the windows terminal is very slow). So you can use it to make games if you want to 😅 https://github.com/Warfley/LazTermUtils/blob/master/example/Colortest. lpr