Tutorials - SIC/XE screen

Tutorials - SIC/XE screen

Original SIC/XE computer (from the book) does not support screen. However, in the simulator we have an option to use simple text screen (as well as some other special devices).

First, get yourself acquainted with the screen and its settings. How do we write one character to the screen?

Basics

a) Print one character to the top-left corner, botton-right corner, middle of the screen etc.

Screen routines

a) Define a symbol screen, which stores the address of the screen.

b) Define also symbols scrcols and scrrows, which holds the number columns and rows, respectively.

c) You may also need symbol scrlen, which stores the total length of screen area (in bytes).

d) Write routines scrclear which clears the screen and scrfill which fills the screen with a character given in the least significant byte of the register A.

  • Challange: Try to merge both routines so that they overlap, but they each have its own entry point. Is something like this possible in high-level languages?

* Screen driver

Add also routines for writing to the screen, for example: printch, printstr, etc.

For specifying the print location there are two possiblities:

  • location is given as a parameter to the routine, or
  • introduce a cursor, where the cursor is automatically moved with a print

Last modified: Wednesday, 24 October 2018, 10:56 PM