Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0 Assembly Language Programming.

Similar presentations


Presentation on theme: "Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0 Assembly Language Programming."— Presentation transcript:

1 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Assembly Language Programming Appendix C

2 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved A Small Assembly Language Program (a) An assembly language program. (b) The corresponding tracer display.

3 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The General Registers The 8088 registers.

4 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Addressing (1) Operand addressing modes. The symbol # indicates a numerical value or label.

5 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Addressing (2) Operand addressing modes. The symbol # indicates a numerical value or label.

6 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The 8088 Instruction Set (1) Some of the most important 8088 instructions.

7 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The 8088 Instruction Set (2) Some of the most important 8088 instructions.

8 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The 8088 Instruction Set (3) Some of the most important 8088 instructions.

9 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Conditional Jumps Conditional jumps.

10 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Subroutine Calls An example stack.

11 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved System Calls and System Subroutines Some UNIX system calls and subroutines available in the interpreter.

12 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The ACK-Based Assembler, as88 (1) The as88 pseudoinstructions.

13 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The ACK-Based Assembler, as88 (2) Some of the escapes allowed by as88.

14 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Tracer The tracer’s windows.

15 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Tracer Commands (1) The tracer commands. Each command must be followed by a carriage return (the Enter key). An empty box indicates that just a carriage return is needed. Commands with no Address field listed above have no address. The # symbol represents an integer offset.

16 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Tracer Commands (2) The tracer commands. Each command must be followed by a carriage return (the Enter key). An empty box indicates that just a carriage return is needed. Commands with no Address field listed above have no address. The # symbol represents an integer offset.

17 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Hello World Example (a) HlloWrld.s. (b) The corresponding tracer window.

18 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved General Registers Example (a) Part of a program. (b) The tracer register window after line 7 has been executed. (c) The registers.

19 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program (1) The program vecprod.s.

20 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program (2) The program vecprod.s.

21 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program (3) The program vecprod.s.

22 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program (4) Execution of vecprod.s when it reaches line 28 for the first time.

23 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program arrayprt The program arrayprt before debugging.

24 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program strngcpy.s Copy a string.

25 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Example Program reverspr.s Print a string backwards.

26 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Dispatch Tables (1) A program demonstrating a multiway branch using a dispatch table.

27 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Dispatch Tables (2) A program demonstrating a multiway branch using a dispatch table.

28 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Dispatch Tables (3) A program demonstrating a multiway branch using a dispatch table.

29 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Buffered and Random File Access (1) A program with buffered read and random file access.

30 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Buffered and Random File Access (2) A program with buffered read and random file access.

31 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Buffered and Random File Access (3) A program with buffered read and random file access.


Download ppt "Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0 Assembly Language Programming."

Similar presentations


Ads by Google