| 4.6 Subroutines and the interface to "C" |
CALL, RET.
Subroutine call and return instructions in Intel's IA-32 Intel Architecture Software Developer's
ManualPUSH, POP.
Instructions for pushing values onto the stack and
removing items from the stack in Intel's IA-32 Intel Architecture Software Developer's
ManualPUSHA, POPAin Intel's IA-32 Intel Architecture Software Developer's
ManualENTER, LEAVE
In Intel's IA-32 Intel Architecture Software Developer's
Manual
#include <stdio.h>
int count;
char name[]="your-name";
int month=11, day=1, year=2004;
int main()
{
count = printf("%s CIS250 %d/%d/%d\n\n",name,month,day,year);
printf("count: %d\n",count);
return 0;
}
Turn in a printed error free listing of the assembly language programs & subprograms, and the output of your program. Include a copy of the testing that you did to verify the program was correct.
| 4.6 Subroutines and the interface to "C" |