Well, North (the poster of the assembly code) -- called my argument.So, just to be clear, you submitted a "challenge" with no intent to actually follow through.
You have a smartphone, computer, and writing implements, so you do have the ability to follow through.
I agree with MMcLaren's conclusion (post #56).
John
Here we see absolute and complete proof of the premise of post #56.Well, North (the poster of the assembly code) -- called my argument.
He stated that the C compiler outputs the same assembly code for general syntax.
This was my argument. To support it I would need enthusiasm, time and self-motivation.
Which I don't have.
Why don't you write the argument in word and pdf it?Here we see absolute and complete proof of the premise of post #56.
Troll. Final answer.
(Aside: stop feeding the troll.)
how does that relate to OPs question?I haven't made a dollar since 2005.
I am not armed enough on this smart phone to be able to write an paper unless I go pen to paper to computer then to smart phone.
It would take me forever.
Oh I can talk straight up and down 'robotic' too.how does that relate to OPs question?
I have quoted OPs post and wrote two excerpts.Oh I can talk straight up and down 'robotic' too.
The OP is learning plenty ...
For starters he is learning that there is no need for assembly language since the C compiler outputs basically the same that an fluent assembly programmer would write.
But there are exceptions where an highly skilled programmer cpuld better the compiler.
Yeah well that comes with years of experience. Passion and dedication.I have quoted OPs post and wrote two excerpts.
He did not ask about assembler. He wrote he's using Micro C, and asks about techniques to write efficient code.
How about answering OPs question: How to write efficient code, assumed using mikro C. Anything else is trolling.Yeah well that comes with years of experience. Passion and dedication.
I cannot help the OP to write an Pacman video game in one para of text.
It takes years to get good with it.
O.KHow about answering OPs question: How to write efficient code, assumed using mikro C. Anything else is trolling.
I doubt this is much useful and I doubt this is based on profound experience.O.K
a. Think in tiny steps. Break the problem down into as many pieces as possible.
b. Hardcode data where possible. Avoid having to compute maths.
c. Avoid repeated code. If this if that (would one IF condition in an loop work?)
d. Assign yourself projects / goals. Keep at it until you win.
e. The use of the 'switch' statement in C is an excellent way to structure your algorithms.
Well, code just happens. You either can or cannot write algorithms.I doubt this is much useful and I doubt this is based on profound experience.
Using some BRA instruction and then ADD instructionWhat would this look like in assembly?Rich (BB code):If (alpha == 1) { delta += 1; }
by Aaron Carman
by Duane Benson
by Jake Hertz