0
How do All Homework Assignments Helps you with your homework?
Idea shared by Delora Hughes - April 4 at 7:17 AM
Proposed
Simple calculations in Assembly Language Programming: Many assembly language assignments are designed to teach you the fundamentals of Programming In Assembly Language and just involve simple arithmetic operations and bit-wise logical ones. The assignments don’t involve you calling functions but instead concentrate on simple loops or conditionals. In assembly, you operate on values in registers and can store the results in memory, or keep it in a register if you still need the value. For example, imagine you have to convert from Fahrenheit to Celsius you might write c = (f – 32) / 9 * 5 in C code, but you have to divide it into single operations in assembly language. So you would load the value off into a register, then subtract the immediate value of 32, then divide the result by 9 and finally multiply the value by 5.
Calling functions: You won’t get far writing everything in a single function in Assembly Language Programming, so you will need to write code that uses multiple functions. http://allhomeworkassignments.com/ helps you to deal with it When you deal with multiple functions you need to consider how to transfer variables to and from functions. The normal convention is to pass the first few arguments using registers and then use the stack for the rest of them, and the stack is also used to reserve space for local variables. You will normally use prolog and epilog code to deal with setting a stack frame for the function, although you can use slightly different code on a leaf function. Depending on the processor you may need to save the address from which the function was called, this is automatic on x86 processor but not on RISC processors.
Input and Output: Normally in Assembly Language Assignment you need to create the data yourself using the assembler, but in the real world, you need to take input from the keyboard and output it to the screen. Depending on the emulator/system you use there may be an operating system call or trap to read in an integer value or string and to display a value or string but you may have to deal with interrupts and reading from a register to get the current key value and build up the value yourself and write to memory addresses to update the screen. Assembly Language Programming is very low level and may operate below the operating system (especially if you are writing the operating system). Even when there are functions to read from the keyboard and output to the screen, your own methods have extra facilities not provided by the built-in ones.
Hexadecimal and Binary arithmetic: The first Assembly Language Assignment may not involve actual programming, but instead converting between decimal, hexadecimal, and binary. If you are dealing with logical operations such as and, or, xor and not then dealing with values in binary makes much more sense. Converting between binary and hex is very easy as each hex digit corresponds to 4 binary digits, and only depends on the actual value so F is always 1111 no matter where it appears. The only complication when converting between decimal and hexadecimal is when you are dealing with negative numbers as the length of the value changes the negative position (assuming 2’s complement). Hex displays make output line up neatly as if you are outputting byte values you use 2 hex digits instead of 0-255 which varies in length.

Reply to Thread