Op amp circuit attached.  I use a cheap PC supply for +/-5V and 12V into VEMS box.  D0 and D1 are 5V logic parallel port pins.  I made my pulse 1/20 of the pulse to pulse period.  Codes looks something like
 
out &H378,0            ;LPT1 data 0 and 1 low for init
out &H378,1            ;pulse down
delay period/40
out &H378,2            ;pulse up
delay period/40
out &H378,0            ;back to zero
delay period            ;hang around until the next pulse
 
Insert pulse pattern by repetition (12-1, 60-2,,,,)

 

As for the code, most mortals can not pull off real time stuff in Windows.  You just can not control the overhead.  There is a bit of pulse shifting in interpreted basic (QB) DOS running at higher rpm settings (shorter delay loops, thus any additions are more apparent) for non-compiled code.  Mostly it is not a problem unless you have a lot of teeth on the "wheel" and high rpm.  When this happens, any DOS overhead becomes a larger percentage of the period between pulses (because the period is so small).