start button done need some help with stop please

Hi guys girls can some one help tell me how and where i would need to put a press button to stop stepper motor i’ve got the code to go press button stepper motor steps until it finishes all steps press button at end of the process repeats but now i need to Stop the stepper motor in-case instead of letting it end its process thanks for taking a look i’m an old dog learning new trixs and its hard so go easy on me

//Semi Auto Coil Winder using Easy Driver V4.4 ARDUINO UNO V3 SMD////THIS IS MY EXPERIMENT I KNOW NOTHING ABOUT ARDUINO CODE // 
//ITS THROWN TOGETHER I'M STILL LEARNING BUT WORKS FOR MY USE //


int button =7;                 //Button Pin 7
int dirpin = 3;               // Pin 3 connected to dir of easy driver board  
int steppin = 12;             // pin 12 connected to Step of easy driver board
int val = 0;



void setup() {


  Serial.begin(9600);
  pinMode(button, INPUT);
  pinMode(dirpin, OUTPUT);
  pinMode(steppin, OUTPUT);
}
void loop()
{
  val = digitalRead(button);         //
  if (val == HIGH)
  {
    int i;

    digitalWrite(dirpin, HIGH);     // Set the direction  LOW CW HIGH CCW.

    delay(0);                       // delay when the Stepper motor starts moving milliseconds ie Press Release button wait
                                    // 1000 milliseconds Stepper Motor Moves
    Serial.println(">>");
    for (i = 0; i<32000; i++)       //  0-32000 STEPS 32000 microsteps = 20 FULL ROTATIONS ANY MORE THAN 32000
                                    // MICROSTEPS STEPPER MOTOR KEEPS GOING NEVER STOPS UNTIL RESET BY ARDUINO
                                    // So I need to keep  NUMBER OF MICROSTEPS 32000 OR BELOW.
    {
      digitalWrite(steppin, HIGH);  // This LOW to HIGH change is what creates the
      
      digitalWrite(steppin, LOW);   // "Rising Edge" so the easydriver knows when to step.
      
      delayMicroseconds(900);      // DelayMicroseconds MY Stepper Motor max speed at 150 microseconds 
                                   // but has no torque anything beyond 150 Microseconds stepper motor stalles 
    }                              //  For More Torque less speed longer the delayMicroseconds 400

  }
}

Something like this perhaps…

    for (i = 0; i<32000; i++)       //  0-32000 STEPS 32000 microsteps = 20 FULL ROTATIONS ANY MORE THAN 32000
                                    // MICROSTEPS STEPPER MOTOR KEEPS GOING NEVER STOPS UNTIL RESET BY ARDUINO
                                    // So I need to keep  NUMBER OF MICROSTEPS 32000 OR BELOW.
    {
      digitalWrite(steppin, HIGH);  // This LOW to HIGH change is what creates the
      
      digitalWrite(steppin, LOW);   // "Rising Edge" so the easydriver knows when to step.
      
      delayMicroseconds(900);      // DelayMicroseconds MY Stepper Motor max speed at 150 microseconds 
                                   // but has no torque anything beyond 150 Microseconds stepper motor stalles 
                                   //  For More Torque less speed longer the delayMicroseconds 400

      val = digitalRead(button);         //Read switch again
      if (val == HIGH)
      {
        break; // Exit from for loop.
      }
    }

You might need to look at debouncing the switch.