You can do a nice shaking effect changing the VGA offset (some weird and obscure VGA register). This is easily done with this piece of code (by Piptol, slightly modified by na_th_an):
duration% = 25600
FOR x% = 1 TO duration%
OUT &H3D4, 8: OUT &H3D5, x%
Of course, adjust duration% to fit your needs.