Skip to navigation

Elite on the BBC Micro

Version analysis of FAROF2

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

Code variations between these versions are shown below.

Name: FAROF2 Type: Subroutine Category: Maths (Geometry) Summary: Compare x_hi, y_hi and z_hi with A
Compare x_hi, y_hi and z_hi with A, and set the C flag if all three <= A, otherwise clear the C flag. Returns: C flag Set if x_hi <= A and y_hi <= A and z_hi <= A Clear otherwise (i.e. if any one of them are bigger than A)
.FAROF2

Code variation 1 of 2A variation in the labels only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Electron

Flight, 6502SP, Master

CMP INWK+1 \ If A < x_hi, C will be clear so jump to MA34 to BCC MA34 \ return from the subroutine with C clear, otherwise \ C will be set so move on to the next one CMP INWK+4 \ If A < y_hi, C will be clear so jump to MA34 to BCC MA34 \ return from the subroutine with C clear, otherwise \ C will be set so move on to the next one
CMP INWK+1 \ If A < x_hi, C will be clear so jump to FA1 to BCC FA1 \ return from the subroutine with C clear, otherwise \ C will be set so move on to the next one CMP INWK+4 \ If A < y_hi, C will be clear so jump to FA1 to BCC FA1 \ return from the subroutine with C clear, otherwise \ C will be set so move on to the next one
 CMP INWK+7             \ If A < z_hi, C will be clear, otherwise C will be set

Code variation 2 of 2A variation in the labels only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Electron

Flight, 6502SP, Master

.MA34
.FA1
 RTS                    \ Return from the subroutine

RSS Feed