Skip to navigation

Elite on the BBC Micro and NES

Keyboard: ZEKTRAN

[6502 Second Processor version]

Name: ZEKTRAN [Show more] Type: Subroutine Category: Keyboard Summary: Reset the key logger buffer at KTRAN
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: * BR1 (Part 1 of 2) calls ZEKTRAN * TITLE calls ZEKTRAN
.ZEKTRAN LDX #11 \ We use the first 12 bytes of the key logger buffer at \ KTRAN, so set a loop counter accordingly LDA #0 \ We want to zero the key logger buffer, so set A % 0 .ZEKLOOP STA KTRAN,X \ Reset the X-th byte of the key logger buffer to 0 DEX \ Decrement the loop counter BPL ZEKLOOP \ Loop back until we have zeroed bytes #11 through #0 RTS \ Return from the subroutine RTS \ This instruction has no effect as we already returned \ from the subroutine