boring programming Flashcards
Imperative programming?
Where we tell the computer what to do
Add subtract store and load LMC instructions (3 letters(
ADD
SUB
STA
LDA
LMC branch instructions
BRA - ALWAYS
BRZ - IF ZERO
BRP - IF POSITIVE
LMC PRINT, READ INSTRUCTIONS
INP
OUT
LMC end program instruction
HLT (halt)
LMC DAT instruction what is it
It’s normal asm like data in the bss/data section
notify assembler it’s a static piece of data like a string in the exe
LMC where are labels put
Before any instruction
Direct vs immediate addressing
Direct is normal like pointer deference
Immediate is not really addressing just means load the actual data not the address (deferencing the pointer is just getting the pointer int value
Indirect vs indexed addressing
Indirect is double pointer deferenencing (ie LDA 6 would mean load the value from the pointer which the pointer is at memory location address 6)
Indexed is when you have an index register and then can increment it etc
What tags are needed for a HTML page with a title, a heading and some paragraph
Head,body,title,h1,p
What are how use the IMG tag HTML
<img></img>
How to embed link in html
<a>CLICK ME</a>
What does html ordered list look like and how
Numbered list of the data
<ol> is used and <li> for each item both are terminated</li></ol>
HTML unordered list
with <li> uses bullet points</li>
What tag includes CSS into html
Style
Where can the style tag be used
As an attribute and as a normal embedded CSS
CSS font family semantics
Define multiple in order of which to use if one is not available
How to link to use a separate CSS file
HTML link tag
DIV tag and how to style it in CSS
use div with a “class” attribute and in the CSS use a dot prefix
How to use IDs in CSS with html
In a tag such as paragraph or header or list, add an Id attrib and in the css use a hashtag
what is needed to make HTML form which has a submit button and an input box and execute a server file to handle the data
Form tag using ID and action linking to a php
Inside the tag space add a label tag with text
Add an input tag with a type attribute of text and id and a name for the input tag
Add another input tag with a type attribute of submit and name submit and VALUE tag of submit as well which is displayed on the button
What attribute links a tag with a JS function
onclick=“somefunction()”
What is the html script tag used for
Embedding JS
How to get a tag value in JS
document.getElementById(“some tag id”)
How to set raw HTML string in JS
getElementById(“…”).innerHTML
How to put a “page says” message in browser in js
alert(“hi”);
What is a heuristic approach to problem solving (2)
Educated guess approach (1)
Which leads to a “good enough” result
Example of heuristics when making a decision about if to cross a busy road (3)
Any 3 of
We dont get data (1) about all vehicle speeds (1)
We scan the data for which is most likely to be useful (1)
And make a judgement based on experience (1)
MDR vs MAR
MDR is the actual instruction fetched
MAR is the current address instruction
What bus and what gets sent down when loading/storing in LMC
CONTROL BUS
Read or write signal
What is the memory management where it’s split into chunks
PAGING
What happens when a search engine indexes a page (3)
web crawler (1) transverses web (1) takes each word in the document and adds an entry (1)
Why does RISC have less power consumption
less transistors