SLR 08 - Introduction to Programming Flashcards
What are the branch Mnemonics?
BRA - Branch Always
BRZ - Branch if Zero
BRP - Branch if Positive
What are the categories of Program Flow?
Sequence
Iterarion
Selection
What is sequence?
When a program is executing a program line by line
What is iteration?
A program executing a set of lines in a loop repeatedly
What is selection?
Branch statements that complete sections of code based on if conditions are met
What is nesting?
The process of placing one type of statement inside another
What is variables?
A pointer to a memory address given a user friendly name
What are constants?
A variable that holds a fixed value
What is the process of assignment?
A value being assigned to a variable or constant
What is an output?
Turning computer data into a user-friendly manner
What is a subroutine?
A block of code given a unique indentifiable name
Why are subroutines used?
To break down a larger problem into a series of smaller manageable ones
What are the types of subroutines and what is different about them?
Procedures - Carries out a set task
Functions - Carries out a set task and returns a value
What are the advantages of subroutines?
Programs become easier to write
Easier to debug
Gives reusable components
Functions can be grouped in a library for reuse across programs
What performs operations in a computer?
The ALU
What is the function of Modulus?
The remainder of a division
What is the function of DIV?
Division with a natural answer
What is the command for Modulus?
%
What is command for DIV?
//
What types of commands fall undet file handling?
Opening, Closing, Reading and writing to and from files