Disclosed are heterocyclic dibenzo-dioxonin derivative compounds of formula (I) for use as antiviral agents, wherein the variables R1-R6 and p are as described in the specification. Also disclosed are pharmaceutical compositions and methods of treating or preventing viral infection in a host by the use of these compounds, either alone or in combination with other pharmaceutically active agents. Further disclosed are methods of preparing such compounds. These compounds inhibits the replication of HCV by targeting a protein of the viral genome and are suitable for treating or preventing infection caused by an RNA-containing virus, particularly hepatitis C virus.