How to loop and increment a value in a dos batch file

the code below is basically a for loop that continues until a counter reaches a value..

@echo off
:: turn off echo
set /a var=1
:: initialize a numeric variable and set it to 1
:: a label to define the start of the loop
if %var% gtr 254 goto :END
:: the if test the variable and if it is > 254 (gtr) it sends the code to the label END
echo %var%
::return current value to screen
set /a var+=1
::increment counter
goto LOOP
::go back to the top of the loop and increment the number again.