Skip to navigation

BBC Micro Elite

Utility routines: CLYNS

Name: CLYNS [View in context] Type: Subroutine Category: Utility routines Summary: Clear the bottom three text rows of the mode 4 screen
Clear some space at the bottom of the screen and move the text cursor to column 1, row 21. Specifically, this 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
.CLYNS LDA #20 \ Move the text cursor to row 20, near the bottom of STA YC \ the screen LDA #&75 \ Set the two-byte value in SC to &7507 STA SC+1 LDA #7 STA SC JSR TT67 \ Print a newline, which will move the text cursor down \ a line (to row 21) and back to column 1 LDA #0 \ Call LYN to clear the pixels from &7507 to &75F0 JSR LYN INC SC+1 \ Increment SC+1 so SC points to &7607 JSR LYN \ Call LYN to clear the pixels from &7607 to &76F0 INC SC+1 \ Increment SC+1 so SC points to &7707 INY \ Move the text cursor to column 1 (as LYN sets Y to 0) STY XC \ Fall through into LYN to clear the pixels from &7707 \ to &77F0