Shared Flashcard Set

Details

Module 5 assembly programing
ece331
19
Electrical Engineering
Undergraduate 1
04/23/2016

Additional Electrical Engineering Flashcards

 


 

Cards

Term
Problems with assembly programming
Definition
Every process architecture is different
Time consuming and error-prone
Term
Advantages of assembly
Definition
Use of processor specific features
highest possible performance with lowest memory footprint
C has a nice balance of expressive power and direct correspondance with common machine instructions
Term
type
Definition
Lets us specify how a piece of data should be interpreted, every type has a size in bytes
char= 1 byte, int is 4
Term
Type cast
Definition
(different type) expression
(int) '!' treat character ! as int
Term
function, subroutine
Definition
Allows us to reuse, organize and parametrize code, may hae many inputs, but at most one output (return value)
Term
void
Definition
No argument or no return value
Term
pointer type
Definition
A variable which holds an address
int t(referent type)* ptr(identifier)= &x; (address of variable x)
Term
program flow
Definition
Sequential- linear from entry to exit
Conditional- tests a true/false condition (seperate true and false paths)
loop- repeats a process multiple times
Term
for loops
Definition
most basic and common counting loop
for x=1 to n
repeats process n times then continues to next processor
Term
do while
Definition
linear for loop
does process for n times while test condition is true tests x>= n-1
Term
branch vs call sub
Definition
Branch move forward or back to non sequential position in code, unconditional-always, conditional if T/F
Sub- jump to subroutine, when subroutine is finished return to point of call.
Term
Stack
Definition
Section of RAM used for temp storage
FILO structure, 32 bit word alligned
4 bytes for each read/write of stack,
bottom of stack = highest stack address
Term
Sp- stack pointer
Definition
cpu register that tracks the top of the stack, always contains an address value that points to the last data placed on stack, initially defined as bottom of stack
Term
PUSH
Definition
Store registers to stack, registers stored in sequence lowest numbered register to lowest memory address
Term
POP
Definition
Load registers for stack
Term
a good subroutine is(3):
Definition
Independent: does not rely on other programs or subbroutines that can change
Transparent: restores CPU registers to values before subroutines (store CPU reg temporarily to stack)
Relocatable: data and code is location independent
Term
Branch always to an address held within a register
Definition
BX
Term
Branch always to a subroutine at an addressed held within a register
Definition
BLX
Term
For the KL25Z, what is
the possible memory address range for the stack?
Definition
RAM exist between 0x2000.0000 and 0x2000.2FFF, and the stack can be placed
anywhere in RAM.
Supporting users have an ad free experience!