Question: 1. In a C program to be compiled and run on your HCS08SH8 microcontroller, the following statements appear before your main program (main ). Describe
1. In a C program to be compiled and run on your HCS08SH8 microcontroller, the following statements appear before your main program ("main "). Describe how they would (presumably) be allocated in memory, and the contents of memory at those addresses. Show a diagram. (20 points) char c = 'A'; short x = -129; long y = 0x12345678; short *px = &x; void main (void) { 2. The following "putch" function in C needs to be hand coded into assembly language. Give the function in assembly. On "entry" the value of c is in the "A" (accumulator) register. (10) /* Function to put a character to the serial port */ void putchar(char c){ while(SCISI
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
