Is there a assembly for idiots or dummies out there?

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
chrono31
New Member
Posts: 4
Joined: Sun Jul 12, 2009 10:09 pm

Is there a assembly for idiots or dummies out there?

Post by chrono31 »

Ive been reading the tutorial on assembly in the forum all day and Im so fried. I dont understand it. Maybe Im just stupid... Im very computer inclined
and know my way around it. But this stuff..... I wanna learn it really bad..
Is there a simpler way to learn assembly language?

Im very interested in learning assembly language and everything about
Zsnes.. Im not a quitter but assembly language seems impossible..

Thanks for any help.
Im sure you get this alot and you just sluff it off and say read the tuts
etc..... I wish I was as smart as some of the devs on here...

Thanks Again
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Post by Thristian »

Assembly language is what computers run on at the very lowest levels, therefore it's the simplest and most long-winded kind of programming. You say you're "very computer inclined", but there's a world of difference between "I can remember what all the Windows control panels do" (which already makes you more skilled than, say, 80% of the population) and knowing enough about your computer's architecture to do anything useful with assembly language.

If you've never programmed before, building something like ZSNES out of assembly is like building a skyscraper from lego.

If you've never programmed before, I strongly recommend starting with a language where it's more obvious how what you type in relates to what you get out - I'd recommend JavaScript because it's really easy to make a program that does something flashy and obvious like turning the page red, or Python because although it was designed for teaching people how to program it comes with tools for doing a lot of cool stuff.
Rashidi
Trooper
Posts: 515
Joined: Fri Aug 18, 2006 2:45 pm

Post by Rashidi »

i would recomend you learn flowchart, first.

if you aim for assembly knowledge, i discourage java programming since it omited the 'goto' statement, as un-coditional jump / branching is common usages in assembly.

* raise flame shield against anti-goto flock *
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

A jump instruction is necessary in ASM since it's an atomic language.

However, a good ASM programmer will avoid abusing them and work his best not to make a jump depend (condition or destination, whatever) on a very-recently-changed variable.

@chrono: for starters, you want to master the concept of pointers. Second, you want to learn the architecture of the cpu you'll code for.
Once you have that, it's mostly a matter of having a reference page for all the instructions.

ASM fits like a glove to minds attuned to linear algorithms (and yes, I consider SIMD linear thinking).
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Rashidi wrote: * raise flame shield against anti-goto flock *
http://www.ecn.purdue.edu/ParaMount/pap ... 87goto.pdf
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Nested loops are the only case where Goto is required. That's because most* languages don't let the programmer specify the target loop of "break" or "continue" statements.

*i.e. I'm not aware of any that do
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

creaothceann wrote: *i.e. I'm not aware of any that do
Java.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Aha, thanks. :o
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

Knowledge of CPU assembly language would come more naturally if you had a foundation of Digital Logic.

Simple stuff like AND, NOT, and OR.
Combinations leading into Half and Full Adders, data selectors, etc.
Looking at sequential logic, like Flip-Flops, that can remember things that happened previously.
Knowledge of an adder and a flip flop leading to a synchronous counter.
Going then into simple Mealy and Moore state machines.
Then looking at what RAM is (theoretically a 2D array of flip flops).
Decoding and Encoding, demultiplexing, concept of addressing.
Higher concepts of what a chunk of data can represent (a character, a number, a command). The so-called Byte.

Create a monstrosity where:

Counter starts sequentially flinging bytes from RAM into a state machine with a tacked on decoder to activate different basic logic functions or adders on these chunks of data (operations). Store not just the result of the operation but characteristics about it, like flag if it was zero, or a carry occurred from addition. Operations can also look at these flags, and even affect the counter. Read paragraph again.

There's your CPU in a too-short description. Don't even bother with assembly without having digital circuit knowledge.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

whicker wrote:Don't even bother with assembly without having digital circuit knowledge.
I would say the exact opposite, don't bother with circuits before learning assembly. At least that's what I did, learned assembly logic back when I was a little kid, then took a circuit course, where everyone else was having a hard time, and it all made sense to me.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

The classic top down vs. bottom up approach. Which one is better? It probably depends on how you learn as an individual. I tend to be a bottom up type of guy myself. I think it provides a more thorough understanding of everything.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Nightcrawler wrote:The classic top down vs. bottom up approach. Which one is better? It probably depends on how you learn as an individual. I tend to be a bottom up type of guy myself. I think it provides a more thorough understanding of everything.
The question is "really?".

You don't walk into hardware or software development completely clueless. You've already used a light switch, you've already seen digits using 8 LEDs on digital watches, so when you see hardware stuff, the wheels are already turning in your head as to how what you're learning relates to what you already know.

You're not going pure bottom up.

Since we're all starting from a higher point in the chain, I think it makes sense to learn another step or two before going to the bottom most level, and then from there you go bottom up filling in all the blanks.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
funkyass
"God"
Posts: 1128
Joined: Tue Jul 27, 2004 11:24 pm

Post by funkyass »

Electrical Engineering!
Does [Kevin] Smith masturbate with steel wool too?

- Yes, but don’t change the subject.
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

Nach wrote:
Nightcrawler wrote:The classic top down vs. bottom up approach. Which one is better? It probably depends on how you learn as an individual. I tend to be a bottom up type of guy myself. I think it provides a more thorough understanding of everything.
The question is "really?".

You don't walk into hardware or software development completely clueless. You've already used a light switch, you've already seen digits using 8 LEDs on digital watches, so when you see hardware stuff, the wheels are already turning in your head as to how what you're learning relates to what you already know.

You're not going pure bottom up.

Since we're all starting from a higher point in the chain, I think it makes sense to learn another step or two before going to the bottom most level, and then from there you go bottom up filling in all the blanks.
True. We're always attempting to fill in the gaps between levels we already know or are exposed to and expanding from there. Furthermore, the 'bottom' certainly varies. Where is the bottom? The component level? The substrate level? The electron level? The atomic level? God? Aliens?
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

Nightcrawler wrote: True. We're always attempting to fill in the gaps between levels we already know or are exposed to and expanding from there. Furthermore, the 'bottom' certainly varies. Where is the bottom? The component level? The substrate level? The electron level? The atomic level? God? Aliens?
Ones and Zeroes, man. Light and dark, black and white, on and off, Ying and Yang. It's all just ones and zeroes...
byuu

Post by byuu »

The classic top down vs. bottom up approach. Which one is better? It probably depends on how you learn as an individual.
I agree with this part. I learned top down because it's what worked for me.
* raise flame shield against anti-goto flock *
Only sheep blindly follow the ranting of celebrities who tell them things like "tool X is evil". Everything has its uses.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Talking about that, bsnes is evil.

Use skittles instead.

Nightcrawler wrote:Where is the bottom? The component level? The substrate level? The electron level? The atomic level? God? Aliens?
42

Seeing as most spintronic effects aren't even properly described by current quantum physics laws, the actual answer is 'none of the above', of course.

Scientific research has been locked in a top-to-bottom methodology for some time now.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

grinvader wrote:
Nightcrawler wrote:Where is the bottom? The component level? The substrate level? The electron level? The atomic level? God? Aliens?
42
Madonna would probably say the dolphins were, oh about

thirty off.
Post Reply