#INCLUDE <c64start.c65>
#INCLUDE <c64defs.c65>

GOTO start


FUNC setmulti
  BYTE b
  b = PEEK $d011
  b = b | 32
  POKE $d011 , b

  b = PEEK $d016
  b = b | 16
  POKE $d016 , b

  b = PEEK $d018
  b = b & %11110000
  b = b | 8
  POKE $d018 , b

FEND


FUNC fillmem({WORD start_addr @ $fa} {WORD end_addr @ $fc} {BYTE value})

  WHILE start_addr <= end_addr
    POKE start_addr , value
    start_addr++
  WEND

FEND


FUNC main

  setmulti()

  WORD CONST screen = $0400
  
  fillmem(screen, screen+999, $12)
  fillmem(colorram, colorram+999, $03)
  
  POKE $d021 , 0

  WHILE 1
    fillmem($2000, $3fff, %00011011)
    fillmem($2000, $3fff, %01101100)
    fillmem($2000, $3fff, %10110001)
    fillmem($2000, $3fff, %11000110)
  WEND

FEND


LABEL start

main()
