fanatiik Posted March 31, 2013 Content Count: 833 Joined: 10/21/09 Status: Offline Share Posted March 31, 2013 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
Moo Moo Viking Posted April 1, 2013 Content Count: 1070 Joined: 02/13/10 Status: Offline Share Posted April 1, 2013 Learn to code | Codecademy try this. if you don't use it. Link to comment
Moo Moo Viking Posted April 1, 2013 Content Count: 1070 Joined: 02/13/10 Status: Offline Share Posted April 1, 2013 Learn to code | Codecademy try this. if you don't use it. Link to comment
Dirk Posted April 1, 2013 Content Count: 2167 Joined: 07/14/10 Status: Offline Share Posted April 1, 2013 Well what CPU is this for? You need to know the ISA before you can do anything. Link to comment
fanatiik Posted April 1, 2013 Content Count: 833 Joined: 10/21/09 Status: Offline Share Posted April 1, 2013 (edited) 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 April 1, 2013 by fanatiik Link to comment
Dirk Posted April 1, 2013 Content Count: 2167 Joined: 07/14/10 Status: Offline Share Posted April 1, 2013 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
ReneGade Posted April 1, 2013 Content Count: 469 Joined: 02/11/09 Status: Offline Share Posted April 1, 2013 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
Bob Loblaw Posted April 1, 2013 Content Count: 3697 Joined: 01/07/09 Status: Offline Share Posted April 1, 2013 Are you using MIPS assembly language? Link to comment
Tweezy Posted April 1, 2013 Content Count: 3791 Joined: 08/08/09 Status: Offline Share Posted April 1, 2013 What is your CPU Architecture? I'm doing this atm at university. Link to comment
fanatiik Posted April 1, 2013 Content Count: 833 Joined: 10/21/09 Status: Offline Share Posted April 1, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now