Page 1 of 1

Assembly, lol

Posted: Thu Oct 02, 2008 2:41 pm
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.

Re: Assembly, lol

Posted: Thu Oct 02, 2008 2:52 pm
by dandymcgee
I tried to learn Assembly once... once. :cry:

Re: Assembly, lol

Posted: Thu Oct 02, 2008 2:53 pm
by MarauderIIC
I don't know any of it. =)

Re: Assembly, lol

Posted: Thu Oct 02, 2008 2:55 pm
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.

Re: Assembly, lol

Posted: Thu Oct 02, 2008 2:57 pm
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.

Re: Assembly, lol

Posted: Thu Oct 02, 2008 10:16 pm
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.

Re: Assembly, lol

Posted: Sun Oct 05, 2008 3:53 am
by Willshire The Mad
*blood shoots from eyes, ears, nose, and mouth*

I think I will stick with creating pretty pictures.

Re: Assembly, lol

Posted: Sun Oct 05, 2008 10:56 am
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.