Kodewerx
https://www.kodewerx.org/forum/

Assembly Beautifier
https://www.kodewerx.org/forum/viewtopic.php?f=11&t=5956
Page 1 of 1

Author:  Hextator [ Sun Aug 10, 2008 6:54 pm ]
Post subject:  Assembly Beautifier

....................................................................................................................................................................................................................................................................................Enjoy - http://pastebin.com/f7ff980ee

Author:  A_Random_Person [ Thu Aug 14, 2008 11:30 am ]
Post subject:  Re: Assembly Beautifier

Hm... C++?

Author:  Hextator [ Thu Aug 14, 2008 5:45 pm ]
Post subject: 

No, it's written in FORTRAN.

Compile it and throw an assembly script on it. See what happens.

Funny thing, I designed it for MIPS, tested it with ARM, and have no idea what it does with shit like x86.

Author:  A_Random_Person [ Thu Aug 14, 2008 5:49 pm ]
Post subject:  Re: Assembly Beautifier

Compiles fine in C++ >_> don't be a smartass zeld.. XD

Author:  Parasyte [ Sat Aug 16, 2008 8:09 pm ]
Post subject:  Re: Assembly Beautifier

"Assembly script?" I think your semantics are broken.

Author:  REDSOXROX [ Sun Aug 17, 2008 5:11 pm ]
Post subject:  Re: Assembly Beautifier

I compiled it in C++, works great.

Author:  A_Random_Person [ Mon Aug 18, 2008 9:36 am ]
Post subject:  Re: Assembly Beautifier

Eh I tried it on a 100 Line code in assembly >_> took forever. rofl.

Author:  Hextator [ Mon Aug 18, 2008 12:21 pm ]
Post subject: 

It has bugs. That's why I released the source.

If it gets stuck like that it's because it's trying to add new line characters to the file and can't stop. You have to end it yourself after a few seconds when that happens and delete all those extra new line characters.

Author:  HyperHacker [ Tue Aug 26, 2008 11:22 pm ]
Post subject:  Re: Assembly Beautifier

Parasyte wrote:
"Assembly script?" I think your semantics are broken.
Did you see the goto in there? >_> Watch out man, the raptors are coming for you now.

Author:  Parasyte [ Wed Aug 27, 2008 8:49 pm ]
Post subject:  Re: Assembly Beautifier

Yes. Bad coding practices never escape the watchful eye of a hacker that's been doing this crap for years. But sometimes, they don't care.

Author:  cracker [ Thu Sep 11, 2008 6:07 pm ]
Post subject:  Re: Assembly Beautifier

DOS text files will work fine but for Windows text files there is a crlf instead of the non-Windows lf that the program doesn't like.

A minor change to the source corrects this:

#ifdef WIN32
#define RETURN_CHAR 0xD
#else
#define RETURN_CHAR 0xA
#endif
.
.
.
247. if (inputChar[0] == RETURN_CHAR)

Author:  Hextator [ Thu Sep 11, 2008 7:40 pm ]
Post subject: 

I was under the impression that it wouldn't make a difference because I didn't open the file in binary mode.

The program does fudge up and your fix probably keeps it from doing that, but I thought the whole point of text mode was to handle newline characters properly. Otherwise there's no difference between the modes that I've seen.

Author:  cracker [ Fri Sep 12, 2008 5:01 am ]
Post subject:  Re: Assembly Beautifier

Yeah I'm not sure why it doesn't work as it should either. I've run into this problem a few times when parsing text from a file. What's really strange is how an feof never occurs if you don't use the workaround on Windows formatted text.

Edit: Found this page while searching for the bug. Does a good job at showing why feof usage isn't always the best method of testing for the end of a file.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/