Notes
Assembly Language - Little mans computer
Content of the notes (1)
Page 1
Assembly Langauge
Machine code uses binary sequences to represent instructions and data on which they act.
Rather than having to remember which binary sequence represents which instruction, assembly code allows us to use mnemonics to represent these sequences.
As each assembly code instruction represents a machine code instruction, assembly code programs can often be much longer than their high-level equivalents.
Each processor has its own assembly language in this Case its little mans computer
Little mans computer uses 11 Instructions:
ADD - Add
SUB - Subtract
STA - Stores value from accumulator to memory
LDA - Loads Value from the memory to accumulator.
BRA - Branch Always
BRZ - Branch if zero
BRP - Branch if positive
INP - Input
OUT - Output
HLT - End Program
DAT - Data Location
Example:
INP
STA Num
ADD Num
OUT
HLT
Num DAT
What does it do?
Input a number and store it in accumulator
The contents of the accumulator are stored in the memory location labelled Num
The contents of Num are added to the accumulator
The contents of accumulator are outputted
The Program Ends
A location in memory is labelled Num
Information
- Description
- AS - Level Computer Science Note on Assembly Language - Little mans computer , created by Nathan King on 31/05/2016.
- Created by
- Nathan King
- Views
- 10
- Tags
- Rating