Quote:
extern getchar,putchar
global main
main:
call getchar
cmp eax,-1
jz done
cmp eax,0xA
jz main
push eax
call putchar
pop eax
jmp main
done:
ret
I'm not big on files and such... but won't leaving the CR's in the file cause problems? I know that leaving the LF's in does because string.replace('\n',' ') did not behave properly. It did remove all the cr's though, near as I could tell. I probably wanted a "replaceAll()" there as well. There was the problem with my string.replaceAll("\\u000D\\u000A",""). I'm not sure that the expression catches and replaces what I want it to. I'm guessing that the line feeds are really the important part as most built in printers will not actually CR to the begining of the line during the print phase.
Anway, /nerdspeak off
Thanks for the perl though.