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

GOTO start


FUNC sethires
  BYTE b
  b = PEEK $d011
  b = b | 32 //enable bitmap mode
  POKE $d011 , b

  b = PEEK $d018
  b = b & %11110000
  b = b | 8 //enable bitmap mode
  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

  sethires()

  WORD CONST screen = $0400

  fillmem(screen, screen+1000, $cf)

  WHILE 1

    fillmem($2000, $3fff, %00000001)
    fillmem($2000, $3fff, %00000010)
    fillmem($2000, $3fff, %00000100)
    fillmem($2000, $3fff, %00001000)
    fillmem($2000, $3fff, %00010000)
    fillmem($2000, $3fff, %00100000)
    fillmem($2000, $3fff, %01000000)
    fillmem($2000, $3fff, %10000000)

  WEND

FEND


LABEL start

main()
