ASSEMBLY!

Apr 21, 2010 at 2:44 PM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6213
Age: 38
Celtic Minstrel said:
This would apply if Cave Story were written in assembly.
*facepalm*
 
Apr 22, 2010 at 12:54 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Re: Cave Story Officially RELEASED for WiiWare

andwhyisit said:
*facepalm*

Andwhyisit that you facepalm?
 
Apr 22, 2010 at 1:42 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6213
Age: 38
Re: Cave Story Officially RELEASED for WiiWare

S. P. Gardebiter said:
Andwhyisit that you facepalm?
Assembly is a representation of the instructions specific to the macine in question assigned to different 8-bit values (bytes) within the binary data. By nature all programs are written in assembly, whether intended or not. Hence why Celtic Minstrel's declaration that cave story was written in C++ and not assembly inspired me to facepalm.
 
Apr 22, 2010 at 2:11 AM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Sep 16, 2009
Location:
Posts: 519
Re: Cave Story Officially RELEASED for WiiWare

Wouldn't you say it's written in c++ and compiled into assembly?
 
Apr 22, 2010 at 2:55 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Re: Cave Story Officially RELEASED for WiiWare

which is what cm meant. the c++ source could be compiled into any architecture of assembly, whether x86 for PC, or something else for wiii. If it was originally written in x86, this process would not work.

andwhyisit, your facepalm is misplaced.
 
Apr 22, 2010 at 4:43 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6213
Age: 38
Re: Cave Story Officially RELEASED for WiiWare

I do believe that the source code was ported to the wii since pixel did back the project.

Vercci said:
Wouldn't you say it's written in c++ and compiled into assembly?
The compiler writes machine code no?
 
Apr 22, 2010 at 4:49 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Re: Cave Story Officially RELEASED for WiiWare

andwhyisit said:
The compiler writes machine code no?

And machine code is assembly no? (or rather, assembly is the representation of machine code)
 
Apr 28, 2010 at 8:09 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Re: Cave Story Officially RELEASED for WiiWare

andwhyisit said:
Assembly is a representation of the instructions specific to the macine in question assigned to different 8-bit values (bytes) within the binary data. By nature all programs are written in assembly, whether intended or not. Hence why Celtic Minstrel's declaration that cave story was written in C++ and not assembly inspired me to facepalm.
Not really. Assembly is a human-readable representation of the machine code, yes (plus comments, labels, and I think named variables), but not all programs are written in assembly. To say a program is written in assembly is to say that the programmer explicitly used assembly when writing the program. A program written in C++ is not written in assembly. I suspect most compilers even skip outputting assembly (unless specifically asked to) and just compile directly to machine code.

So, no. Cave Story was not written in assembly. Super Mario Bros, sure, but not Cave Story.

GIRakaCHEEZER said:
And machine code is assembly no? (or rather, assembly is the representation of machine code)
The second statement is technically correct, yes. As previously mentioned, though, assembly supports some stuff that machine code does not in order to make it even more human-readable (labels, variables, comments...).
 
Apr 29, 2010 at 12:30 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Re: Cave Story Officially RELEASED for WiiWare

Why would a compiler ever output read-able assembly code? They would only output machine code. Assembly is simply an abstraction of machine code (so humans can read it), like C++ is an abstraction of assembly (so humans don't have to work in assembly).
 
Apr 29, 2010 at 12:51 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Re: Cave Story Officially RELEASED for WiiWare

The main difference between the two is that any machine code can be turned into assembly, no hassle, whereas turning assembly into c is neigh impossible.
 
Apr 29, 2010 at 4:39 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6213
Age: 38
Re: Cave Story Officially RELEASED for WiiWare

Celtic Minstrel said:
Not really. Assembly is a human-readable representation of the machine code,
Those hexadecimal pairs that you edit in a hex editor are by that same definition a human-readable representation of the machine code as well.

And just to give you something to think about, I have written assembly directly into a hex editor on several occasions. :rolleyes:
 
Apr 30, 2010 at 11:07 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Re: Cave Story Officially RELEASED for WiiWare

@ andwhy;
Woot woot. Assembly hacking thru hex editors is badass. Did it myself once.
 
May 1, 2010 at 1:47 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Re: Cave Story Officially RELEASED for WiiWare

Code that edits itself by storing hex values to ram is more badass, but whatever.
 
May 3, 2010 at 2:10 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Re: Cave Story Officially RELEASED for WiiWare

carrotlord said:
Why would a compiler ever output read-able assembly code? They would only output machine code. Assembly is simply an abstraction of machine code (so humans can read it), like C++ is an abstraction of assembly (so humans don't have to work in assembly).
Exactly. Generally, a compiler would output machine code. However, most compilers do have an option to output assembly instead, I think. I know GCC does.

Lace said:
The main difference between the two is that any machine code can be turned into assembly, no hassle, whereas turning assembly into c is neigh impossible.
Nigh impossible, perhaps, but not completely impossible. There exist reasonable decompilers. I suspect they probably work best on code that was originally compiled from the target language, though, since then they could hunt for idioms used by that compiler.

andwhyisit said:
Those hexadecimal pairs that you edit in a hex editor are by that same definition a human-readable representation of the machine code as well.
Uh, no. First of all, hexadecimal is merely a way to represent numbers, not code. (The fact that the numbers represent code is an entirely separate matter.) Second, which is more human-readable: 'mov eax, eap' or 32 45 76 ? (Made-up example; probably not even valid.)

andwhyisit said:
And just to give you something to think about, I have written assembly directly into a hex editor on several occasions. ;)
Oh sure, it can be done. That doesn't make it human-readable.
 
May 4, 2010 at 12:35 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Re: Cave Story Officially RELEASED for WiiWare

Celtic Minstrel said:
Uh, no. First of all, hexadecimal is merely a way to represent numbers, not code. (The fact that the numbers represent code is an entirely separate matter.) Second, which is more human-readable: 'mov eax, eap' or 32 45 76 ? (Made-up example; probably not even valid.)

Oh sure, it can be done. That doesn't make it human-readable.

I don't understand what you're trying to get at.

1. You said that hexadecimal represents numbers, not code.
2. Second, you said that numbers represent code, but then claimed that was irrelevant.

In other terms:

1. a = b != c
2. But b = c, and that's not relevant.
What?

----
Although hex numbers are hard to read, they are not impossible to read for humans. To an HLL programmer, assembly is "hard to read". To a non-programmer, any type of programming language would be "hard to read".

It's all relative. You could spend your time memorizing the hex values instead of the instructions. You would not even need to learn the instructions.

$90 = No operation
$50 = Push EAX onto the stack
$99 = Convert doubleword to quadword

Etc.
 
May 4, 2010 at 1:19 AM
Senior Member
"Huzzah!"
Join Date: Nov 23, 2009
Location: Outside of the core, not willing to progress.
Posts: 205
Re: Cave Story Officially RELEASED for WiiWare

Celtic Minstrel said:
Oh sure, it can be done. That doesn't make it human-readable.

Oh but of course it does! Just convert to binary, carry the 5's, pass go and then collect $200!
 
May 4, 2010 at 2:03 AM
Banned
"Bleep, Bloop, Bleep, Bloop"
Join Date: Mar 1, 2009
Location:
Posts: 1586
Age: 28
Re: Cave Story Officially RELEASED for WiiWare

Celtic Minstrel said:
Oh sure, it can be done. That doesn't make it human-readable.

But has anyone really been far even as decided to use even go want to do look more like?
 
May 4, 2010 at 2:16 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Re: Cave Story Officially RELEASED for WiiWare

Fire1052 said:
But has anyone really been far even as decided to use even go want to do look more like?

You’ve got to be kidding me. I’ve been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It’s just common sense. [/trainwreck of english grammar] Memes...



Also hexadecimal is human readable. It was made to be easier to read than binary after all. I'm sure there's a handful of people who can read assembly in pure hexadecimal, since assembly didn't always exist after all.
 
May 4, 2010 at 2:20 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Re: Cave Story Officially RELEASED for WiiWare

Nops, adding, subracting, pushing, popping, int3-ing, and returning I can all do in hex. So human readable.

Also, I really have no clue what GIR or fire said due to significant loss of grammar. Even I'm never that bad. :/
 
May 4, 2010 at 2:24 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Re: Cave Story Officially RELEASED for WiiWare

Lace said:
Nops, adding, subracting, pushing, popping, int3-ing, and returning I can all do in hex. So human readable.

Jeez, who CAN'T read nops? It's just "90", and it's easy to spot them in hacked code since they often appear in herds.
 
Top