Skip to navigation


Version analysis of MLS2

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: MLS2 Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate (S R) = XX(1 0) and (A P) = A * ALP1
Calculate the following: (S R) = XX(1 0) (A P) = A * ALP1 where ALP1 is the magnitude of the current roll angle alpha, in the range 0-31.
.MLS2 LDX XX \ Set (S R) = XX(1 0), starting with the low bytes STX R LDX XX+1 \ And then doing the high bytes STX S

Code variation 1 of 1Other (e.g. bug fix, optimisation)

There's an extra bit of code in the disc version of the MLS2 routine that has no effect.

This variation is blank in the Cassette, Disc (flight), 6502 Second Processor, Master and Electron versions.

LDX ALP1 \ This repeats the first two instructions of MLS1, which STX P \ is presumably unintentional (though it has no effect)
                        \ Fall through into MLS1 to calculate (A P) = A * ALP1