Jump to content

? servers

? players online

Anybody here knows how to code assembly

Recommended Posts


  • Content Count:  833
  • Joined:  10/21/09
  • Status:  Offline

So in one of my class we have to code assembly and I'm not really good at it.

the thing I need to do is quite simple but my understanding of the language sucks

what I need to do is verify that the user enters a variable that atleast has a length of 2 and starts with a capital letter.

I tried a few things but I'm so bad I was pretty much doing jack shit. Hopefully one of you guys knows more then me and can help.

Link to comment

  • Content Count:  833
  • Joined:  10/21/09
  • Status:  Offline

Well what CPU is this for? You need to know the ISA before you can do anything.

 

I don't know what you mean by that but I use virtual box on a debian operating system

I also use yasm to compile the program if that can help.

Edited by fanatiik
Link to comment

  • Content Count:  2167
  • Joined:  07/14/10
  • Status:  Offline

For machine code and assembly language there is a fixed set of instructions available to the processor. The registry will also not be the same between processors ect.

Link to comment

  • Content Count:  469
  • Joined:  02/11/09
  • Status:  Offline

Man it's been a long time since my computer organization class that involved assembly language coding. I remember having to do a double linked list with sentinel nodes in assembly that was due 3 days later and only count 1/25th of our final grade(typical homework assignment value) I was one of 6 people in the 30 person class to do it.

---------------------------------------------------------

 

Now as for your question:

 

After some quick googling yasm appears to use the nasm langauge.

 

This link has someone trying to find the length of a given string(though it is a help site because his isn't working):

assembly - Length of a string using NASM - Stack Overflow

 

Use that then compare the value to the number 2.

 

Then the should be a way to at the very least go letter by letter checking to make sure it isn't a capitol.

Is is A? Is it B? Is it C?

Link to comment

  • Content Count:  833
  • Joined:  10/21/09
  • Status:  Offline

I looked up on google and I use intel x86 processor architecture

also thanks renegade that code looks quite simple to understand i'll get into it more deeply tomorow as of now I don't feel like coding :/

Link to comment

Reply to Thread

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...