Skip to navigation

Aviator on the BBC Micro

Flight model: UpdateFlightModel (Part 3 of 4)

Name: UpdateFlightModel (Part 3 of 4) [Show more] Type: Subroutine Category: Flight model Summary: Process the undercarriage, brake, flaps and fire keys Deep dive: The key logger
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.umod11 LDX #4 \ Process the undercarriage or brake keys, if pressed JSR ProcessOtherKeys BEQ umod13 \ If neither are being pressed, jump to umod13 to check \ for the next set of key presses BMI umod12 \ If the brake key is being pressed, then the returned \ value is 128, so jump to umod12 JSR IndicatorU \ The undercarriage key is being pressed, so update the \ undercarriage indicator JMP umod13 \ Jump to umod13 to check for the next set of key \ presses .umod12 JSR IndicatorB \ The brake key is being pressed, so update the brakes \ indicator .umod13 LDX #5 \ Process the flaps or fire keys, if pressed JSR ProcessOtherKeys BEQ umod15 \ If neither are being pressed, jump to umod15 to check \ for the next set of key presses BMI umod14 \ If the fire key is being pressed, then the returned \ value is 128, so jump to umod14 JSR IndicatorF \ The flaps key is being pressed, so update the flaps \ indicator JMP umod15 \ Jump to umod15 to check for the next set of key \ presses .umod14 JSR FireGuns \ The fire key is being pressed, so call FireGuns