Download presentation
Presentation is loading. Please wait.
Published byLynne Hoover Modified over 9 years ago
1
Chapter 7 Low-Level Programming Languages
2
2 Features in Pep/7 Figure 7.1 Pep/7’s architecture
3
3 Instruction Format Figure 7.2 The Pep/7 instruction format
4
4 Instruction Format Figure 7.3 Difference between immediate-mode and direct-mode addressing
5
5 Some Sample Instructions Figure 7.3 Subset of Pep/7 instructions
6
6 Sample Instructions
7
7
8
8
9
9
10
10 Algorithms Write "H" Write 48 (hex) Write "e" Write 65 (hex). Write "o" Write 6F (hex)
11
11 A Program Example
12
12 Hand Simulation
13
13 Hand Simulation
14
14 Hand Simulation
15
15 Pep/7 Simulator
16
16 Pep/7 Simulator
17
17 Pep/7 Assembly Language
18
18 Pep/7 Assembly Language
19
19 Assembly Process
20
20 A New Program Reading and adding three numbers Set sum to 0 Read num1 Add num1 to sum Read num2 Add num2 to sum Read num3 Add num3 to sum Write sum
21
21 Our Completed Program
22
22 Decision Making
23
23 Decision Making … Add num3 to sum If sum is negative Write "Error" Else Write sum Write "Error" if sum is negative.
24
24 Decision Making Add num3 to sum If status bit N is 1 Go to NegMsg Write sum Quit: STOP NegMsg: Write the message and go to Quit
25
25 Decision Making Read limit Set sum to 0 While (limit is not zero) Read number Set sum to sum + number Set limit to limit - 1
26
26 Decision Making Set the accumulator to limit Subtract one from the accumulator Compare accumulator to zero If status bit Z is 1 go to Quit Else go to Read
27
27 Decision Making
28
What do you think? Suppose the government no longer required physical crash tests for new cars. What factors might you consider before buying a car that was crash tested only by computer simulation? 28
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.