Skip to navigation


Dashboard: DOT

[6502 Second Processor version, I/O processor]

Name: DOT [Show more] Type: Subroutine Category: Dashboard Summary: Implement the #DOdot command (draw a dash on the compass)
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * OSWVECS calls DOT

Arguments: OSSC(1 0) A parameter block as follows: * Byte #2 = The screen pixel x-coordinate of the dash * Byte #3 = The screen pixel x-coordinate of the dash * Byte #4 = The colour of the dash
.DOT LDY #2 \ Fetch byte #2 from the parameter block (the dash's LDA (OSSC),Y \ x-coordinate) and store it in X1 STA X1 INY \ Fetch byte #3 from the parameter block (the dash's LDA (OSSC),Y \ y-coordinate) and store it in X1 STA Y1 INY \ Fetch byte #3 from the parameter block (the dash's LDA (OSSC),Y \ colour) and store it in COL STA COL CMP #WHITE2 \ If the dash's colour is not white, 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 white, which is in front of us, \ so fall through into CPIX4 to draw a double-height \ dash in the compass