Thank you for the help A PIC18F4620 has the following specif

Thank you for the help!

A PIC18F4620 has the following specifications RAM: 3942 times 8 ROM: 32k times 16 Stack: 32 times 16 How many lines of assembler can a program have until you run out of room? How many lines of C can a program have until you run out of room? What is the largest n times n array of integers this processor can store? How many times can a subroutine call a subroutine which calls a subroutine until you run out space?

Solution

1a.

32k (Determined by the RAM)

1b.

1 to 32k.
Each line of C compiles into one or more lines for assembler.

1c.

Variables are stored in RAM (3942 x 8)
Each integer takes 2 bytes, allowing 1971 integers (3942/2)

1971 = 44.39
We can store a single 44x44 array of integers. At that point, we are out of memory.

1d.

The return address for a subroutine call is stored on the stack.
wE can have 32-levels of subroutine calls

Thank you for the help! A PIC18F4620 has the following specifications RAM: 3942 times 8 ROM: 32k times 16 Stack: 32 times 16 How many lines of assembler can a p

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site