1

Sometimes my cursor gets lost in a muck of text in the scrollback buffer, or I have graphics created with calls like GrLine(,100,100,200,150); that I would like to clear.

What command or system call clears the screen? I've tried reset, clear, and cls and DCClear (Device Context - Clear) sets my screen to black.

Evan Carroll
  • 9,518

1 Answers1

4

There are two methods of clearing the screen,

  • Typing $CL$ and then ENTER, or executing function that prints that sequence such as DocClear; as defined in Adam/DolDoc/DocRecalcLib.HC.Z
  • Running DCFill; to clear things drawn to the screen such as the Gr. DCFill; is defined in Adam/Gr/GrDC.HC.Z. This essentially fills (DCFill;) the device context (DC) with transparent pixels.

Alternatively you can reinitialize a new terminal, replacing your old one this can be done a few ways.

  • DocTermNew;, all functions call DocTermNew; which replaces your terminal with another process. This is defined in Adam/DolDoc/DolDoc.HC.Z.
  • User;, which is defined in Kernel/KTask.HC.Z
  • Term initializers in the form of SrvStartUp; and UserStartUp; both of which are defined in HomeSys.HC.Z (all of these wrap with

    • SrvStartUp; is the bare minimal to initialize the text screen.
    • UserStartUp; essentially does a SrvStartUp; and puts ./Doc/Start.DD onto the screen, and runs Dir;
Evan Carroll
  • 9,518