Skip to navigation


Drawing pixels: PX3

[Elite-A, Docked]

Name: PX3 [Show more] Type: Subroutine Category: Drawing pixels Summary: Plot a single pixel at (X, Y) within a character block
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * PIXEL calls PX3

This routine is called from PIXEL to set 1 pixel within a character block for a distant point (i.e. where the distance ZZ >= &90). See the PIXEL routine for details, as this routine is effectively part of PIXEL.
Arguments: X The x-coordinate of the pixel within the character block Y The y-coordinate of the pixel within the character block SC(1 0) The screen address of the character block T1 The value of Y to restore on exit, so Y is preserved by the call to PIXEL
.PX3 LDA TWOS,X \ Fetch a 1-pixel byte from TWOS and EOR it into SC+Y EOR (SC),Y STA (SC),Y LDY T1 \ Restore Y from T1, so Y is preserved by the routine RTS \ Return from the subroutine