These old 297/298 are not very good compared to what you can get these days. (Drv8825, TB6600 etc). Old half/full step tech from the 80's. I used to build these many years ago.
Mach3 outputs step/direction signals from a computer parallel port. Within the mach3 port config screen, you can choose which parallel port output pin is step and direction. On the l297 chip, the clock is step input and the cw/ccw is direction.