Skip to navigation

Elite on the BBC Micro

Dashboard: DOT (Electron version)

Name: DOT [View in context] Type: Subroutine [Compare versions] Category: Dashboard Summary: Draw a dot on the compass
Arguments: COMX The screen pixel x-coordinate of the dot COMY The screen pixel y-coordinate of the dot COMC The thickness of the dot: * &F0 = a double-height dot in white, for when the object in the compass is in front of us * &FF = a single-height dot in white, for when the object in the compass is behind us
.DOT LDA COMY \ Set Y1 = COMY, the y-coordinate of the dot STA Y1 LDA COMX \ Set X1 = COMX, the x-coordinate of the dot STA X1 LDA COMC \ Set A = COMC, the thickness of the dot CMP #&F0 \ If COMC is &F0 then the dot is in front of us and we BNE CPIX2 \ want to draw a double-height dot, so if it isn't &F0 \ jump to CPIX2 to draw a single-height dot \ Otherwise fall through into CPIX4 to draw a double- \ height dot