Skip to navigation


Dashboard: DOT

[Commodore 64 version]

Name: DOT [Show more] Type: Subroutine Category: Dashboard Summary: Draw a dash on the compass
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * COMPAS calls DOT * SP2 calls DOT

Arguments: COMX The screen pixel x-coordinate of the dash COMY The screen pixel y-coordinate of the dash COMC The colour and thickness of the dash: * #YELLOW = a double-height dash in yellow, for when the object in the compass is in front of us * #GREEN = a single-height dash in green, for when the object in the compass is behind us
.DOT LDA COMY ; Set Y1 = COMY, the y-coordinate of the dash STA Y1 LDA COMX ; Set X1 = COMX, the x-coordinate of the dash STA X1 LDA COMC ; Set COL = COMC, the mode 5 colour byte for the dash STA COL CMP #YELLOW ; If the dash's colour is not yellow, jump to CPIX2 to BNE CPIX2 ; draw a single-height dash in the compass, as it is ; showing that the planet or station is behind us ; Otherwise the dash is yellow, which is in front of us, ; so fall through into CPIX4 to draw a double-height ; dash in the compass