This is sort of a do my HW for me thread and I realize assembly language isn't tremendously popular. I've got a pain in the ass assignment I've been working on for a few days with some help from the instructor and doing hours of googling for sample code from other programs. If I can get at least 50-60% of the work, would anyone here mind helping?
Well that's a little vague. I'm familiar with assembly language but it could be really easy or a huge pain in the ass depending on the assignment is.
well here's the prompt. the assignment is a fair pain in the ass. i won't sugar coat it, lol. Your assignment is to write an assembly language program that asks the user for a signed integer, adds 1 to the number and then prints the original number and the result after adding 1. You must write the code to input and output the number and result yourself, remember that you only have the instructions to input and output strings, so you will have to convert a string to a signed integer, and a numeric integer back to a string. This will include a way to read a string, convert to int value, and then convert int value back to string and write it. Remember to check for a positive or negative sign. Adding 1 should work with both positive and negative answers. You must use the int 80h instruction to get the inputs and outputs. Attached is an example program that prompts for an integer, reads it as a string of characters, and writes it back to the screen
So you just have to convert the string to a number, add one, and convert the number back to a string. That sounds pretty easy. I used to do some x86 assembly years ago. Upload your code somewhere and I will take a look and help you out.
I found this http://www.daniweb.com/code/snippet251688.html. I am familiar with Turbo Assembler. This code looks a little different than what I remember. One thing you could do is write the function in C. Then use GCC to compile it to assembly. Then refactor it down to the bare essentials.
Well if it sounds easy to you, I'm slightly relieved lol. I'll work on my code a little bit more and in about an hour I'll upload it to pastebin or one of those code-sharing template sites. Thanks a lot for any help you could give.
ok. I quit. my eyes burn from the computer screen, allergies have caused me to rub my eye sockets dry adding to my misery, and hours of googling have proven fairly fruitless. here my attempt at the code so far for anyone that can help: http://pastebin.org/129089 useful links (somewhat for the push/pop stack part): http://homepages.ius.edu/rwisman/C431/html/Chapter6.htm http://www.daniweb.com/forums/thread122171.html#
Line 81 jiggyjiggy: That should be changed to getfunky: jiggyjiggy is a subclass of getfunky. getfunky is much more robust.