Equivalent for PORTB in Arduino Mega 2560
This code sends a pulse on pin PB0, which on the Uno is equivalent to
digital 8. On the Mega, digital 8 is PH5, thus you would write

PORTH |= _BV(PH5);
PORTH &amp;= ~_BV(PH5);


The equivalence between the Arduino pins and the AVR pins is provided in
the official
documentation, but
there are nicer versions at pighixxx.com:


Uno pinout
Mega pinout