Assembly, lol

Random irrelevance that just didn't fit into other forums. Talk about anything.

Moderator: Talkative People

Post Reply
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Assembly, lol

Post by Falco Girgis »

I just got assigned my first assembly homework assignment:
CPE321 wrote:Here's your first SRC programming assignment, due October 9, 2008. Submit
your assignment by email not later than midnight on the due date.

Write a SRC subroutine and the main program to call it that counts the
number of upper case, lower case, and non-alphabetic characters in a string.
Your subroutine should accept one argument, a pointer to the string in
register r0, and should return three values...

1) the number of upper case characters in r4,
2) the number of lower case characters in r5,
3) the number of non-alphabetic characters on the stack.

When the subroutine returns, your main program should pop the third return
result from the stack into register r6.

I will not be answering student email Wednesday, October 8, 2008.
Start early! Procrastination will be your doom!
Over half the class is electrical engineers (as opposed to computer engineers), so the minute we left RAM/cache design and started assembly, they all started to freak out. Poor guys, they're all so lost and confused. The class got harder for them and easier for me.

This'll seriously just take a few minutes to do. I enjoy my low level programming classes.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Assembly, lol

Post by dandymcgee »

I tried to learn Assembly once... once. :cry:
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: Assembly, lol

Post by MarauderIIC »

I don't know any of it. =)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Assembly, lol

Post by Falco Girgis »

MarauderIIC wrote:I don't know any of it. =)
CS and CPE pretty much overlap with the C/++, but then CS guys go off and take all of these algorithm, data structure, and advanced OO classes while we go the opposite direction and take a bunch of super low level microprocessor classes.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Assembly, lol

Post by dandymcgee »

Maybe I'll try and learn it again some time.

@Gyrovorbis - How do YOU program in assembly? What editor/compiler do you use? I know there's some sort of assembly debugger built into windows if you type debug in the run prompt, but I only get the basic concept of how assembly even works.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
sparda
Chaos Rift Junior
Chaos Rift Junior
Posts: 291
Joined: Tue Sep 23, 2008 3:54 pm

Re: Assembly, lol

Post by sparda »

You can program (intel) assembly in VS2008/2005, easy. Just keep in mind that the syntax conforms
to that of the MASM(32) assembler, which sucks big fat balls if you ask me. I suggest you stick to GNU's
GAS assembler, as its much better in my opinion.

In any case, Just include a file to your project with the .asm extension. Then right click on the solutions menu,
select "custom build rules" and then check the box that specifies the microsoft micro assembler and
you're ready to go. Of course, if you want the benefit of ".asm" syntax highlighting then using the VS2008/2005 IDE
is a no-go, since that is not available. I suggest you use separate software for that, namely Notepad++. I also use ConTEXT. You can download both for free, just google them.
User avatar
Willshire The Mad
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 49
Joined: Sat Oct 04, 2008 12:09 pm
Current Project: Some basic flash projects for school
Favorite Gaming Platforms: X-Box 360 for now
Location: Clarkshell
Contact:

Re: Assembly, lol

Post by Willshire The Mad »

*blood shoots from eyes, ears, nose, and mouth*

I think I will stick with creating pretty pictures.
Spork
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Assembly, lol

Post by dandymcgee »

Willshire The Mad wrote:*blood shoots from eyes, ears, nose, and mouth*

I think I will stick with creating pretty pictures.
If I had that skill in the first place I probably would too :P.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply