Programming the Basic Computer - Computer Architecture - Lecture Slides, Slides for Computer Architecture. Himgiri Zee University

Computer Architecture

Description: Programming the basic computer, Machine Language, Assembly Language, Assembler, Program Loops, Input Output Programming, Subroutines are the topics professor discussed in class.
Showing pages  1  -  4  of  22
PROGRAMMING THE BASIC COMPUTER
Introduction
Machine Language
Assembly Language
Assembler
Program Loops
Programming Arithmetic and Logic Operations
Subroutines
Input-Output Programming
Docsity.com
INTRODUCTION
Symbol Hexa code Description
Those concerned with computer architecture should
have a knowledge of both hardware and software
because the two branches influence each other.
m: effective address
M: memory word (operand)
found at m
Introduction
AND 0 or 8 AND M to AC
ADD 1 or 9 Add M to AC, carry to E
LDA 2 or A Load AC from M
STA 3 or B Store AC in M
BUN 4 or C Branch unconditionally to m
BSA 5 or D Save return address in m and branch to m+1
ISZ 6 or E Increment M and skip if zero
CLA 7800 Clear AC
CLE 7400 Clear E
CMA 7200 Complement AC
CME 7100 Complement E
CIR 7080 Circulate right E and AC
CIL 7040 Circulate left E and AC
INC 7020 Increment AC, carry to E
SPA 7010 Skip if AC is positive
SNA 7008 Skip if AC is negative
SZA 7004 Skip if AC is zero
SZE 7002 Skip if E is zero
HLT 7001 Halt computer
INP F800 Input information and clear flag
OUT F400 Output information and clear flag
SKI F200 Skip if input flag is on
SKO F100 Skip if output flag is on
ION F080 Turn interrupt on
IOF F040 Turn interrupt off
Instruction Set of the Basic Computer
Docsity.com
MACHINE LANGUAGE
Program
A list of instructions or statements for directing
the computer to perform a required data
processing task
Various types of programming languages
- Hierarchy of programming languages
Machine-language
- Binary code
- Octal or hexadecimal code
Assembly-language (Assembler)
- Symbolic code
High-level language (Compiler)
Machine Language
Docsity.com
COMPARISON OF PROGRAMMING LANGUAGES
0 0010 0000 0000 0100
1 0001 0000 0000 0101
10 0011 0000 0000 0110
11 0111 0000 0000 0001
100 0000 0000 0101 0011
101 1111 1111 1110 1001
110 0000 0000 0000 0000
Binary Program to Add Two Numbers
Location Instruction Code 000 2004
001 1005
002 3006
003 7001
004 0053
005 FFE9
006 0000
Hexa program
Location Instruction
Program with Symbolic OP-Code
000 LDA 004 Load 1st operand into AC
001 ADD 005 Add 2nd operand to AC
002 STA 006 Store sum in location 006
003 HLT Halt computer
004 0053 1st operand
005 FFE9 2nd operand (negative)
006 0000 Store sum here
Location Instruction Comments
Assembly-Language Program
Fortran Program
INTEGER A, B, C
DATA A,83 / B,-23
C = A + B
END
Machine Language
ORG 0 /Origin of program is location 0
LDA A /Load operand from location A
ADD B /Add operand from location B
STA C /Store sum in location C
HLT /Halt computer
A, DEC 83 /Decimal operand
B, DEC -23 /Decimal operand
C, DEC 0 /Sum stored in location C
END /End of symbolic program
Docsity.com
The preview of this document ends here! Please or to read the full document or to download it.
Document information
Embed this document:
Docsity is not optimized for the browser you're using. In order to have a better experience please switch to Google Chrome, Firefox, Internet Explorer 9+ or Safari! Download Google Chrome