hey guys im working on a project with a loading bar i want it to be 100% text based.(get it?

)
here is the code i have, one problem. the bar goes backwards

any ideas? its probably something really obvious
Rem Project: Installer
Rem Created: Sunday, February 06, 2011
Rem ***** Main Source File *****
percent = 0
do
cls
render_menu(percent)
percent = percent + 1
wait 100
LOOP
end
function render_menu(percent)
Print "|----------------------------------------------------------------------------------------------------|"
print "| >PROGRESS< |"
if percent <10 then print "| " + str$(percent) +"%" + " |"
if percent <100 && percent >9 then print "| " + str$(percent) +"%" + " |"
if percent = 100 then print "| " + str$(percent) +"%" + " |"
print "|----------------------------------------------------------------------------------------------------|"
value2 = 100
value = percent
bar$ = "|"
repeat
bar$ = bar$ + "\"
counter = counter + 1
until counter = 100 -percent
print bar$+"|"
print "|----------------------------------------------------------------------------------------------------|"
print "| |"
Print "|----------------------------------------------------------------------------------------------------|"
ENDFUNCTION