Skip to navigation

Elite on the BBC Micro and NES

Drawing the screen: CLYNS

[Acorn Electron version]

Name: CLYNS [Show more] Type: Subroutine Category: Drawing the screen Summary: Clear the bottom three text rows of the mode 4 screen
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * EQSHP calls CLYNS * hy6 calls CLYNS * qv calls CLYNS * TITLE calls CLYNS * TT219 calls CLYNS * hm calls via SC5 * SCAN calls via SC5

This routine clears some space at the bottom of the screen and moves the text cursor to column 1, row 21. Specifically, it zeroes the following screen locations: &7507 to &75F0 &7607 to &76F0 &7707 to &77F0 which clears the three bottom text rows of the mode 4 screen (rows 21 to 23), clearing each row from text column 1 to 30 (so it doesn't overwrite the box border in columns 0 and 32, or the last usable column in column 31).
Returns: A A is set to 0 Y Y is set to 0
Other entry points: SC5 Contains an RTS
.CLYNS JSR BORDER \ Redraw the space view's border, which removes it \ from the screen LDX #&71 \ Call LYN with X = &71 to clear the screen from page JSR LYN \ &71 to page &75, which clears the bottom three lines \ of the screen JSR BORDER \ Redraw the space view's border LDA #20 \ Move the text cursor to row 20, near the bottom of STA YC \ the screen JSR TT67 \ Print a newline, which will move the text cursor down \ a line (to row 21) and back to column 1 LDY #1 \ Move the text cursor to column 1 STY XC DEY \ Set Y = 0, so the subroutine returns with this value TYA .SC5 RTS \ Return from the subroutine