Space Invaders Base Snippet

; [...]
 
L21E4:  LD      A,($4E44)       ; read PLAYER X Position
        LD      E,A             ; X-Coordinate = ($4E44) [based on player input]
        LD      A,$00           ; MAGIC = PLOP
        LD      B,$06           ; Y Pattern Size = 6 bytes
        LD      C,$03           ; X Pattern Size = 3 bytes
        LD      D,$54           ; Y-Coordinate = 84
        LD      HL,BASE         ; point at 12x6 Player's BASE Pattern
        SYSTEM  WRIT            ; UPI WRITe with sizes provided
 
; [...]
 
; Player BASE 3 Bytes by 6 Rows (note: ALL are 4-color) Pattern
BASE :  DB      $00,$C0,$00     ; . . . . 3 . . . . . . .
        DB      $00,$C0,$00     ; . . . . 3 . . . . . . .
        DB      $03,$F0,$00     ; . . . 3 3 3 . . . . . .
        DB      $0F,$FC,$00     ; . . 3 3 3 3 3 . . . . .
        DB      $0F,$FC,$00     ; . . 3 3 3 3 3 . . . . .
        DB      $0F,$FC,$00     ; . . 3 3 3 3 3 . . . . .
 
; [...]

Code Discussion

[…]

Output