From the course: Advanced C Programming: Integrating C and Assembly Language

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Solution: Build an assembly program

Solution: Build an assembly program

- [Instructor] Here is my solution to this chapter's challenge. I would say 95% of this code consists of functions copied from other exercise files, which I hope you did as well. Either using my own functions or functions you have written for other assembly projects. The data section contains a lot of copy and paste, save for the prompts string and result string each of which are null terminated. The bss section contains the input buffer where the age value input by the user is stored. The age storage which is one quad word, though it could really be a byte unless you're really, really old. And the output buffer which stores the string representation of the value after adding 10. The main part of the code proceeds sequentially, the prompt string is output, input is fetched. A test is performed at line 48 to confirm that bogus data was not returned. If so the program exits. Otherwise the age value is increased by 10 at…

Contents