What is an Operating System ? ReadString() WriteString() ReadChar() WriteChar() Read one Char Write one Char.

Slides:



Advertisements
Similar presentations
Calling sequence ESP.
Advertisements

Lecture 9: MIPS Instruction Set
Chapter 9 TRAP Routines and Subroutines. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9-2 Subroutines.
I/O: SPARC Assembly Department of Computer Science Georgia State University Georgia State University Updated Spring 2014.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /17/2013 Lecture 12: Procedures Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Ch. 8 Functions.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 4 Assembly Language Programming 2.
The University of Adelaide, School of Computer Science
Apr. 12, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 6: Branching and Procedures in MIPS* Jeremy R. Johnson Wed. Apr. 12, 2000.
CS 300 – Lecture 10 Intro to Computer Architecture / Assembly Language Strings and Characters and More.
Procedure call frame: Hold values passed to a procedure as arguments
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
ECE 232 L7.Simul.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 7 MIPS Assembly.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
Runtime Stack Managed by the CPU, using two registers
Overview I/O – memory mapped programmed / interrupt driven Traps mechanism & RET Subroutines & JSR & JSRR & RET Interrupt mechanism & RTI.
Kip Irvine: Assembly Language for Intel-Based Computers Overview Stack Operations (PUSH and POP) Procedures Procedure Parameters Software Interrupts MS-DOS.
S. Barua – CPSC 240 CHAPTER 9 TRAP ROUTINES AND SUBROUTINES The TRAP mechanism allows the user program.
28/06/2015CMPUT Functions (2)  Function calling convention  Various conventions available  One is specified by CMPUT229  Recursive functions.
Chapter 9 Trap Routines & RET Subroutines (or Functions) & JSR & JSRR & RET.
Chapter 9 Trap Routines TRAP number (go to service routine) & RET (return from service routine) Subroutines (or Functions) JSR offset or JSRR rn (go to.
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Stack Operations Runtime Stack PUSH Operation POP.
BR 6/001 Ways to Handle I/O (Input/Ouput) For Output –Use Irvine16 Functions Writechar, WriteBin, WriteInt, Writehex, Writestring –Use DOS (Int 21h) Functions.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Indexing. The Idea of Indexing Indexing means having several data items organized under a single name where the individual items can be referred to by.
Spring EE 437 Lillevik 437s06-l8 University of Portland School of Engineering Advanced Computer Architecture Lecture 8 Project 3: memory agent Programmed.
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
Functions and Procedures. Function or Procedure u A separate piece of code u Possibly separately compiled u Located at some address in the memory used.
Computer Science 210 Computer Organization Introduction to Subroutines.
Functions available for Writing to the Video Display Three different ways to write to the display –Irvine library functions –DOS Video Functions (Interrupt.
Character Data and 32-bit Constants (Lecture #20) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying.
Procedure Basics Computer Organization I 1 October 2009 © McQuain, Feng & Ribbens Procedure Support From previous study of high-level languages,
Today’s topics Procedures Procedures Passing values to/from procedures Passing values to/from procedures Saving registers Saving registers Documenting.
A Level Computing#BristolMet Session ObjectivesU2#S12 MUST describe the terms modal and pretty printing in term of input and output facilities. SHOULD.
All code must be commented! Each problem part (1,2,3a,3b,…) will be in a separate file: problem_1.s …. You may be asked to demonstrate your program. You.
Functions. Motivation What is a function? A function is a self-contained unit of program code designed to accomplish a particular task. We already used.
Computer Architecture CSE 3322 Lecture 4 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/10/09
The SPIM Trap Handler Syscall Trap handler services String operations File operations Memory allocation Central Connecticut State University, MIPS Tutorial.
MIPS Subroutines Subroutine Call – jal subname Saves RA in $31 and jumps to subroutine entry label subname Subroutine Return – jr $31 Loads PC with return.
Pushing the Return Address To return to the caller a subroutine must have the correct return address in $ra when the jr instruction is performed. But this.
Function Calling. Mips Assembly Call and Return Steps for procedure calling –Save the return address –Jump to the procedure (function) –Execute the procedure.
Robotics scanf and strings March 18 th, Today’s learning objective Use character strings Use the “scanf” function to input data into C programs.
Computer Architecture & Operations I
Computer Science 210 Computer Organization
Help! How do procedure calls work?
MIPS Assembly Language Programming
1st prog! Q: Read a char – from a keyboard & display it at the beginning of the next line! ====== A.
Operating Systems CMPSC 473
Computer Science 210 Computer Organization
Computer Architecture and Assembly Language
Computer Science 210 Computer Organization
CS 3305 System Calls Lecture 7.
What is an Operating System ?
Stack Frames Stack frame = block of memory located in the system stack that contains: return address input parameters (from calling program to subroutine)
Functions and Procedures
An Overview to Compiler Design
Ken D. Nguyen Department of Computer Science Georgia State University
Computer System Overview
Computer Science 210 Computer Organization
Use proper case (ie Caps for the beginnings of words)
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
The University of Adelaide, School of Computer Science
Computer Science 210 Computer Organization
Chapter 5: I/O Systems.
Interrupts and Exception Handling
Buffer Overflows.
Computer Science 210 Computer Organization
Ken D. Nguyen Department of Computer Science Georgia State University
CS 1111 Introduction to Programming Spring 2019
Presentation transcript:

What is an Operating System ? ReadString() WriteString() ReadChar() WriteChar() Read one Char Write one Char

Live Menu Initialization (addresses, registers, variables) Show menu and Input Character from console 1 ? 2 ? 4 ? Yes Task 1 Task 4 Yes No Cycle1 Jump Cycle1 Cmp2Strings Save $RA Read 2 Strings and print the comparison result Save All Registers Save all registers Restore all registers Return Push all registers to stack Pop all registers from stack Return Cmp2s trings Restore All Registers Return Restore $RA No RA saving la$a0, mystring li$a1, 6 jalread_string nop la$a0, mystring jalwrite_string nop String Driver usage in user program Call the OS

Save $RA Save All Registers Restore All Registers Return Restore $RA Read String (This is the OS) Characters Count Read_character from Driver Return Read Character (This is the driver) Wait Character Take character

Save $RA Save All Registers Restore All Registers Return Restore $RA Write String (This is OS) Characters Count Write_character to Driver Return Write Character (This is the driver) Wait device to be ready Write character