Microprocessor execution Flashcards
Where are instructions stored?
ROM - read only memory
How is this piece of code written as microprocessor instructions?
int a = 5;
int b = 3;
int c;
c = a + b;
MOV A, #5. (Move 5 to ‘A’ register)
ADD A, #3. (Add 3 to ‘A’ contents)
MOV 0x0.09, A.
Define a subroutine
A written program that is used any number of times by the main program
-it can be called from anywhere in the program
What are the two words in the assembler are used to call on a subroutine?
ACALL
LCALL
What is the difference between ACALL and LCALL?
-ACALL only takes 2 bytes of program memory and LCALL takes 3
-LCALL can be used to call subroutines located anywhere within the 64K-byte address space of the 8051
Define stack
-a special area in the memory used by the CPU to store information
Define stack pointer
a small register that “points” at an address in the stack
-it points at the top of the stack, where the next item will be stored
Define the PUSH instruction of the stack
-pushes a register or memory location onto the stack
Define the POP instruction of a stack
remove the upmost item from the stack
Define MOVC
Loads the accumulator with a value from memory
Define MOV
Moves bytes betwen registers and ports
Define INC
Increment the value in the accumulator or register
Define SJMP/LJMP
Short/long jump within code
Define XCH
Exchange contents of register with accumulator
Define DJNZ
Decrement register and jump if register is non-zero