Presentation is loading. Please wait.

Presentation is loading. Please wait.

April 14, 2007CCSC-Central Plains Region1 Use of a Simulator and an Assembler in Teaching Input-Output Processing and Interrupt Handling Soe Than Department.

Similar presentations


Presentation on theme: "April 14, 2007CCSC-Central Plains Region1 Use of a Simulator and an Assembler in Teaching Input-Output Processing and Interrupt Handling Soe Than Department."— Presentation transcript:

1 April 14, 2007CCSC-Central Plains Region1 Use of a Simulator and an Assembler in Teaching Input-Output Processing and Interrupt Handling Soe Than Department of Math & Computer Science Virginia Military Institute

2 April 14, 2007CCSC-Central Plains Region2 The Simulator and Assembler

3 April 14, 2007CCSC-Central Plains Region3 Teaching Assembly Language  Teach assembly language as part of computer systems course  Not a semester-long course on assembly language programming  To convey various concepts in CS through the assembly language  To explore inner workings of a basic computer

4 April 14, 2007CCSC-Central Plains Region4 Organization of The Computer  Computer System Arch., 3/e by Mano  Single Accumulator (16 bits)  4096 words x 16 bits  4 bits for Opcode, 12 bits for Operand  1 st bit of Opcode indicates indirect addr  8 bit I/O registers connected to AC in parallel, and to I/O devices in serial  I/O Flags to indicate availability of I/O registers

5 April 14, 2007CCSC-Central Plains Region5 The Simulator and Assembler

6 April 14, 2007CCSC-Central Plains Region6 Assembly Language  Memory-reference instructions AND, ADD, LDA, STA, BUN, BSA, ISZ  Register-reference instructions CLA, CLE, CMA, CIR, CIL, INC, SPA, HLT  Input-output instructions INP, OUT, SKI, SKO, ION, IOF  Pseudo-instructions ORG, DEC, HEX, END

7 April 14, 2007CCSC-Central Plains Region7 Purpose of Developing The Assembler  To provide a safe and enjoyable environment for assembly language programming (I.e., to avoid manual tracing / execution of assembly language programs)  To illustrate the first pass and the second pass of compilation process  To demonstrate the inner workings of the computer system

8 April 14, 2007CCSC-Central Plains Region8 Development of The Assembler  Java Application as well as Applet  Simulator, Assembler, and GUI  Interactive Development Environment  1600 lines in 14 source program files  18 Classes

9 April 14, 2007CCSC-Central Plains Region9 Development Environment  Integrated Development Environment for editing, compilation, and execution  A window for error messages  Facility to Save / Open the source program files  Ability to run the program completely, or to execute one instruction at a time  Possible to abort a (run away) program

10 April 14, 2007CCSC-Central Plains Region10 Development Environment

11 April 14, 2007CCSC-Central Plains Region11 Learning Environment  On screen display of assembling process showing source program symbol table object code, and errors, if any

12 April 14, 2007CCSC-Central Plains Region12 Source Program & Object Program

13 April 14, 2007CCSC-Central Plains Region13 Window for Error Messages

14 April 14, 2007CCSC-Central Plains Region14 Learning Environment  Demonstrate execution of the program by showing step-by-step changes and historical records of the program counter the instruction register the accumulator other key registers, and input/output flags

15 April 14, 2007CCSC-Central Plains Region15 View of the Computer System

16 April 14, 2007CCSC-Central Plains Region16 Learning Environment  Current contents of non-zero memory units are displayed  Current contents Input Register (INPR) and Output Register (OUTR) are shown  Remaining contents of input stream and current contents of output stream are shown  Step-by-step (Walk) or Run

17 April 14, 2007CCSC-Central Plains Region17 Current Contents of Memory

18 April 14, 2007CCSC-Central Plains Region18 Features of The Assembler  Input/Output facilities with I/O flags  Interrupt facility implemented  Use delays to represent slow speeds of transferring data between I/O devices and I/O registers  Enter input data before execution or during execution

19 April 14, 2007CCSC-Central Plains Region19 I/O Streams and I/O Registers

20 April 14, 2007CCSC-Central Plains Region20 Features of The Assembler  Menu item to load a complete demo source program  Help menu items to display how to compile / run a program, and a review of the assembly language instructions

21 April 14, 2007CCSC-Central Plains Region21 Use of The Assembler  Ability to Check and Trace programs  Assembling Process and Symbol Table  Parameter Passing Scheme  Character coding and digit values  Speed of CPU vs. speeds of I/O devices  Input / Output processing  Interrupt Handling

22 April 14, 2007CCSC-Central Plains Region22 Input-Output without Interrupt

23 April 14, 2007CCSC-Central Plains Region23 Input a Decimal Integer

24 April 14, 2007CCSC-Central Plains Region24 Convert Lowercase to Uppercase

25 April 14, 2007CCSC-Central Plains Region25 Interrupting Handling

26 April 14, 2007CCSC-Central Plains Region26 Interrupting Handling – Cont.


Download ppt "April 14, 2007CCSC-Central Plains Region1 Use of a Simulator and an Assembler in Teaching Input-Output Processing and Interrupt Handling Soe Than Department."

Similar presentations


Ads by Google