The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Using C Instead of ASM (https://www.pokecommunity.com/showthread.php?t=356153)

robinjea September 24th, 2015 8:42 PM

Using C Instead of ASM
 
So I wanted to ask:

1) Is it easier to use C to implement new features than ASM?
2) Would it require a mastered experience in ASM to use C in implementing new features?
3) Would anyone care to help me learn to use C in implementing new features? (Promise, I have lots and lots of innovations in my mind! :) )

Reason for asking this:

Well, I've viewed Touched's code for the Mega Evolution thingy using Code Blocks and it has piqued my interest since we're studying C in at college (1st Year Programming 1). So that's that. I just want to implement new features I have in mind without bugging anyone. :)

Blah September 25th, 2015 4:47 AM

Quote:

Originally Posted by BlackWhiteRobin (Post 8942159)
So I wanted to ask:

1) Is it easier to use C to implement new features than ASM?
2) Would it require a mastered experience in ASM to use C in implementing new features?
3) Would anyone care to help me learn to use C in implementing new features? (Promise, I have lots and lots of innovations in my mind! :) )

Reason for asking this:

Well, I've viewed Touched's code for the Mega Evolution thingy using Code Blocks and it has piqued my interest since we're studying C in at college (1st Year Programming 1). So that's that. I just want to implement new features I have in mind without bugging anyone. :)

From my experience, it's only easier if you know C. Also understanding ASM first is a good starting point, a lot of the concepts are transferable almost at a 1:1 ratio. Anyways, I would suggest to you to pick the programming language that fits the task. If you're doing something big, go with C, otherwise go with ASM. I'm unsure if you'd be able to use most of your college learnings here. Functions like fgets, printing functions, strtok and other ones from libraries you use in college will probably not work in this environment (casting is useful though, casting is an essential part of it all!).

robinjea September 25th, 2015 5:55 AM

Quote:

Originally Posted by FBI (Post 8942514)
From my experience, it's only easier if you know C. Also understanding ASM first is a good starting point, a lot of the concepts are transferable almost at a 1:1 ratio. Anyways, I would suggest to you to pick the programming language that fits the task. If you're doing something big, go with C, otherwise go with ASM. I'm unsure if you'd be able to use most of your college learnings here. Functions like fgets, printing functions, strtok and other ones from libraries you use in college will probably not work in this environment (casting is useful though, casting is an essential part of it all!).

Ohh~ Then I guess I'll stick with ASM for a bit longer but I will still do advanced readings in C though. Thanks! ^U^

GoGoJJTech September 25th, 2015 6:59 AM

I use C way more than I do ASM (although ASM is obviously necessary to know)

Poketch, title screen, intro, poffins, etc etc all are in C

Day/night music switching, drifloon appearance, swarms etc are in ASM

I hope you can see what to use and when to use it now.. it all depends on how big/tedious the task is and whether or not it'd be better to do in C (plus real programming is super fun :P)

Blah September 25th, 2015 7:46 AM

Quote:

Originally Posted by GoGoJJTech (Post 8942609)
I use C way more than I do ASM (although ASM is obviously necessary to know)

Poketch, title screen, intro, poffins, etc etc all are in C

Day/night music switching, drifloon appearance, swarms etc are in ASM

I hope you can see what to use and when to use it now.. it all depends on how big/tedious the task is and whether or not it'd be better to do in C (plus real programming is super fun :P)

They are both real programming, lol. Go fix your coin toss :D

GoGoJJTech September 25th, 2015 7:48 AM

Quote:

Originally Posted by FBI (Post 8942640)
They are both real programming, lol. Go fix your coin toss :D

ASM is what it gets compiled to. Like computer assembly..

And what's wrong with the coin toss

Blah September 25th, 2015 9:43 AM

Quote:

Originally Posted by GoGoJJTech (Post 8942641)
ASM is what it gets compiled to. Like computer assembly..

And what's wrong with the coin toss

ASM, like C, is still a programming language. The fact that C compiles to ASM doesn't mean anything. ASM is a low level programming language, which means it maps very close to processor instructions. C is just higher, but it doesn't mean anything to say X more real of a programming language than Z. When X and Z can both be proven to be programming langauges mathematically or conceptually using ASM (abstract state machines) and FSM (finite state machines). As well as turing machines.

That's the point I'm trying to bring up. I'm not sure if it was intentional, but it seemed to me like you were saying ASM wasn't a programming language incomparison to C, when they both are, equally. You can do everything you do in C with ASM, you must be able to by definition, because as you said C compiles into ASM :)


All times are GMT -8. The time now is 2:28 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.