CS260 program assignment #3 (30 points, check the schedule for the due date)

Size: px
Start display at page:

Download "CS260 program assignment #3 (30 points, check the schedule for the due date)"

Transcription

1 CS260 program assignment #3 (30 points, check the schedule for the due date) This assembly language program simulates virtual memory management. Since you have no access to associative memory, you will need to write a function to simulate a TLB and the rest of the virtual memory techniques discussed in the Virtual Memory chapter in the Course Notes! You earn points by completing the code, as you ll soon see This project requires the files 3VirtMem.asm, and Test3.zip, which contains a library file, an include file (VirtMem.inc) required by 3VirtMem.asm, and test and data files. After you unzip the download, to create 3VirtMem.exe, use ml /Zi 3VirtMem.asm VirtMem.lib to run the program, at the command prompt use 3VirtMem.exe test3.txt to see the sample in Course Notes chap 22, use 3VirtMem.exe /s Chap22.txt to run limited unit testing, use 3VirtMem.exe /u to do a full test, use test3.bat To experiment or debug, you can create a shorter datafile (e.g., shorter.txt). To use it, run 3VirtMem.exe shorter.txt 3VirtMem.exe reads a data file (test3.txt) that contains a series of virtual memory requests. The program honors each virtual memory request using simulated vpframes in working memory. If you care, the format of the data file is explained in the GetData routine in 3VirtMem.asm (or run 3Virtmem.exe /c to display it). 3VirtMem.asm contains the line include VirtMem.inc. At compile time, the contents of VirtMem.inc is used along with the contents of 3VirtMem.asm to produce 3VirtMem.obj. However, 3VirtMem.obj does not contain all the code required for the problem. The rest of the code lives in VirtMem.lib. The linker satisfies the extern statements that appear in 3VirtMem.asm, with the corresponding public statements that I put into the file VirtMem.asm that I used to create VirtMem.lib. Note: I created the file VirtMem.lib by ml /c VirtMem.asm lib Virtmem.lib /ignorecase +VirtMem.obj,lib.lst So, if you start with a completely working program that implements the ideas in the Course Notes, what are you supposed to do to earn 30 points??? The Grades section of 3VirtMem.asm contains the answer. Read it now from the file ; ; ; Grades ; ; This file with the Virtmem.lib is a fully functioning correct program! ; Run the test procedure to verify that this is true! ; ; Each function in this file is defined in a uproc/uendp block. The ; library has a corresponding gsmproc/gsmendp block. The points you earn ; for this problem will depend on which uproc/uendp routines you write ; A: >=27 points; B: >=24 points; C: >=21 points; D: >=18 points; F: < 18 pts. ; You can't earn more than 30 points total...even if you do more... unless... ; if you code ALL the routines worth points, you can earn 31 points. This is known ; as the Ryosuke Niwa Challenge. Ryosuke is the first person to earn 31 even though ; he didn t need the points to earn an A! Why do it??? Because there was an opportunity ; to learn more? Because it was there? If you have to ask why, well, never mind.

2 Currently, 3VirtMem.asm has the main routine and little else. All the calls through out the system go to the library. If the library detects that you wrote code for a function, it calls your code instead of using the library code. To be cool, here s what to do! 1) Setup the editor ;;NOTE: set the editor to use tabs == 8 spaces, and to insert spaces instead of TABS! ;; Otherwise, the results will be impossible for me to read and you'll loose style points!!! ;; If you are using WinMerge, set tabs==8 and insert spaces, also!!! ;; Ragged text is "unacceptable" style subject to a 10% penalty!!! 2) Entirely read 3VirtMem.asm to get the lay of the land. 3) One by one, for each function a.) Between uproc XXXX,pts and uendp XXXX write the code. The documentation for each function includes a description!!!! Read it! Basically it documents (a) where the incoming data is located, (b) where results are returned, and (c) what registers you may trashed. input output ; ENTRY registers (and/or stack) which contain input arguments ; EXIT - registers, and/or stack, and/or flags which contain the results ; REGS - registers which are modified by the function at exit. ; (You may need to use other registers in the function, but you ; must restore their original values when the function exits! ; PUSH on entry, and POP original values on exit. The outside ; world only cares what is changed by your function. Do NOT ; list what registers you use, only those that may have CHANGED!) b.) For example, for function DspCRLF ;************** DspCRLF - Display CR,LF ; ENTRY - none ; EXIT - none ; REGS - FLAGS ; USES - whatever (hints: DspChr, DspStr, PrintStr, MSDOS, etc.) BEFORE AFTER uproc DspCRLF,1 Uses uproc DspCRLF,1 library int 3 ;for debugging ret code push ax int 3 ;for debugging... uendp DspCRLF pop ax ret uendp DspCRLF ` Now, when you re-compile and run 3VirtMem.exe, your DspCRLF is used instead of the library code. c.) Add some throw-away-unit-testing code to exercise your function (this is not always feasible) d.) Re-compile and debug your function when the int 3 breakpoint is hit. e.) When you think it is working, remove the unit test code, and run it with test3.bat to verify that all is well. If it compares exactly, you earn the points for this function! If it doesn t compare exactly, fix the code, or give-up and try later. If you decide to try later, just put ret as the first instruction in the function. Then, go on to the next function, and so on. To re-active your function code, just remove the first instruction ret and the rest of your code becomes active.

3 Shortcuts: You can use short-cut instructions like shl reg,# and imul reg16,reg16,# to simplify your programming tasks because.186 appears at the top of the Virtmem.inc. Do NOT change VirtMem.inc (the library was compiled with this file). mov ax,1011b shl ax,2 (AX = b) instead of mov cl,2 shl ax,cl mov bx,7 imul ax,bx,3 (AX=0015h) push 12 (000Ch pushed) instead of mov ax,12 push ax How Big are the tables? Assume that both vpframes and virtual pages are 4KB. This means that a program s virtual memory is at most 256 vpages (256 * 4K = 2 8 * 2 2 *2 10 = 2 20 = 1MB, max. addressable space of an Intel 8086) The following values come from the data file and may change each time your program is run. See DosEntry: mov vpagetbl_max,dx ;Save nr. of vpages in virtual memory mov wm_vpframes_cnt,bx ;Save nr. of vpframes in working memory mov tlb_row_cnt,cx ;Save nr. of entries in the expensive TLB Programming notes 1. Make sure you have read and understand Chapter 22 before you change 3VirtMem.asm! 2. Look at the list of functions and see what part they play in the algorithm. 3. We ll use a special debugging trick to test the Not-Recently-Used logic in a controlled fashion. 4. The code dynamically allocates tables based on the input sizes for the virtual page table, TLB, and vpframe maps. 5. Use the next full TLB # strategy to replace the entries in the TLB. 6. Use the next full vpframe # strategy to replace vpframes when all have been used recently. TLB I Vpage # Physical Vpframe # 0?? 0?? 0?? Next full TLB # is in the variable tlb_fullindex See 3VirtMem.asm Working memory Vpframe maps Physical Vpframe index I R 0 0?? 1 0??... D The number of s in the In-Use, Referenced, Dirty maps are defined by wm_vpframes_cnt. Next full vpframe # is in the variable wm_fullindex Virtual Page table (VPtbl) Vpage index P 0 0? 1 0? 2 0? 3 0? 4 0? 5 0? * 0? Physical vpframe # 1 byte per entry 1 P- flag 7 s for vpframe number * Number of entries == program size defined in datafile. Vpage index = 0 program size in vpages minus one! Max program size = 1 MB = 256 * 4K = 8- by 4K

4 7. Basically, through out the system, a virtual page number is a 2-byte value (a word). The vpframe number is a 1-byte value (a byte). 8. The TLB I- is a single byte, a waste of 7 extra s, but, there you have it. 9. The I, R, and D s associated with working memory vpframes, are true single flags, saved in a map (one or more bytes). 10. The Virtual Page Table is an array of bytes most-significant- (msb), the left most, is the P- flag, the remaining 7 s hold the vpframe index. 11. Remember: RTFM. Read the F ine manual. Have fun! Think of Ryosuke Niwa! Helpful hints 1) Think globally. Act locally. Think about the function you are working on and how it fits into the big picture. 2) Regular expressions are great for finding function definitions. Searching for Dsp will show lots of matches. Searching for proc.*dsp (check the regular expression check box) will only show function definitions that contain Dsp in the name! Check the match case checkbox if you care about upper and lower case matching. Think of a question in English stating what you wish to search for. Then use special regular expression symbols to translate your question a. any character. b. the period character \. c. specific character char e.g., a or b etc. d. range of characters [ ] e.g., [_A-Za-z][_A-Za-z0-9]* searches for C++ like variable names (begins with underscore, or letter, followed by zero or letters, digits or underscores e. zero or more occurrences * f. logical OR g. check on-line for examples. However, Crimson Editor doesn t support a lot of fancy searches. 3) When you use F3 to continue a search, sometimes the editor gets stuck and refuses to continue the search even when there are more matches to find (this usually happens near blank lines). Click somewhere and press F3 again. 4) Shift+F3 continues the search backwards. 5) Use int 3 to set breakpoints in all new code. Remove them when you are done testing that code. 6) Search for the regular expression int.*3 to locate int 3 s in your code (matches: int anything 3). 7) Use proc endp to find the next proc OR endp. Good for backing up to the top a function or down to the bottom or to go to the next/previous function. 8) See the Course Notes Index to find Crimson Editor and CodeView topics. They can save a lot of time. An index is your friend. You don t have to know everything, just where to find it! (check the index on the first page, first items on the left under! special! special $......x-xxx etc. using CodeView......x-xxx 9) The DWIM instruction mentioned in class is always handy when you get a mental block. Let me know what special uses you put it to. 10) Remember to use SHL/SHR and IMUL with constants to make life easier!

5 11) Use Crimson Editor s Search Find in Files to find where a name is used/defined. For example, you see GO_MSDOS MEMORY_ALLOCATE in the notes. What the heck is MEMORY_ALLOCATE? Aim the Folder: textbox at your subdirectory containing 3VirtMem.asm, Virtmem.inc, and Errors.inc, click Find. Double click on the highlighted line to see that MEMORY_ALLOCATE is defined in virtmem.inc in the second MSDOS functions. Use the Course Notes Index under MSDOS you ll see 48h allocate memory.. A-189. Turn to page A-189 to get all the details. 12) Don t use CodeView s RUN RESTART option! The only safe thing to do is EXIT entirely to the command line, and then run a fresh copy of CodeView with your program. Why is this? Hint: int x = 4; this is saved in.data void main() { cout << x; x = 7; now RUN RESTART. What do you think x is??? 13) To really give your program a work out, run data file bigtest.txt which produces bigtest.out. 3VirtMem.exe bigtest.txt > pgm.out wm.bat bigtest.out pgm.out

6 Associated Reading The skills for this problem appear in various chapters as shown below. The Virtual Memory algorithm and data structures (ch 22) Arrays (ch 10) maps (ch 9) bytes variable length (ch 12.1, Appendix A) structures (ch 11) IMUL (appendix A.5.1) Macros (ch 8) pushs/pops, PrintStr Interrupts (ch 15) Misc. XCHG (ch 7.1.1) XLAT (ch ) Chapter List Summary 7 (XCHG) 8 (macro) 9 (logical operations) 11 (structure) 12 (seg override) 15 (interrupts) 22 (virtual memory) Appendix A (new/free, IMUL)

Organizing your Outlook Inbox

Organizing your Outlook Inbox Organizing your Outlook Inbox Tip 1: Filing system Tip 2: Create and name folders Tip 3: Folder structures Tip 4: Automatically organizing incoming emails into folders Tip 5: Using Colors Tip 6: Using

More information

Experiment N o 1. Introduction to Assembly Language Programming

Experiment N o 1. Introduction to Assembly Language Programming Experiment N o 1 Introduction to Assembly Language Programming Introduction: The aim of this experiment is to introduce the student to assembly language programming, and the use of the tools that he will

More information

QUIZ. What are 3 differences between C and C++ const variables?

QUIZ. What are 3 differences between C and C++ const variables? QUIZ What are 3 differences between C and C++ const variables? Solution QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Solution The C/C++ preprocessor substitutes mechanically,

More information

Premium POS Pizza Order Entry Module. Introduction and Tutorial

Premium POS Pizza Order Entry Module. Introduction and Tutorial Premium POS Pizza Order Entry Module Introduction and Tutorial Overview The premium POS Pizza module is a replacement for the standard order-entry module. The standard module will still continue to be

More information

INTRODUCTION. NOTE Some symbols used in this manual CL = Click Left CR = Click Right DCL = Double Click Left = Enter. Page 1

INTRODUCTION. NOTE Some symbols used in this manual CL = Click Left CR = Click Right DCL = Double Click Left = Enter. Page 1 INTRODUCTION OBJECTIVE The purpose of this manual is to provide the student with practical experience in the writing of assembly language programs, and give them background and instructions on how to use

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

Mating Assembly with C

Mating Assembly with C 16 Do to others what you want them to do to you. Mating Assembly with C Nothing can beat the efficiency of Assembly language. A good optimizing C compiler will convert C file to a better assembly code.

More information

Assembler Programming. Lecture 10

Assembler Programming. Lecture 10 Assembler Programming Lecture 10 Lecture 10 Mixed language programming. C and Basic to MASM Interface. Mixed language programming Combine Basic, C, Pascal with assembler. Call MASM routines from HLL program.

More information

NCMail: Microsoft Outlook User s Guide

NCMail: Microsoft Outlook User s Guide NCMail: Microsoft Outlook 2003 Email User s Guide Revision 1.0 11/10/2007 This document covers how to use Microsoft Outlook 2003 for accessing your email with the NCMail Exchange email system. The syntax

More information

1.00 Lecture 2. What s an IDE?

1.00 Lecture 2. What s an IDE? 1.00 Lecture 2 Interactive Development Environment: Eclipse Reading for next time: Big Java: sections 3.1-3.9 (Pretend the method is main() in each example) What s an IDE? An integrated development environment

More information

Writing Code and Programming Microcontrollers

Writing Code and Programming Microcontrollers Writing Code and Programming Microcontrollers This document shows how to develop and program software into microcontrollers. It uses the example of an Atmel ATmega32U2 device and free software. The ATmega32U2

More information

Programming assignment A

Programming assignment A Programming assignment A ASCII Minesweeper Official release on Feb 14 th at 1pm (Document may change before then without notice) Due 5pm Feb 25 th Minesweeper is computer game that was first written in

More information

QUIZ. Source:

QUIZ. Source: QUIZ Source: http://stackoverflow.com/questions/17349387/scope-of-macros-in-c Ch. 4: Data Abstraction The only way to get massive increases in productivity is to leverage off other people s code. That

More information

Overview. Constructors and destructors Virtual functions Single inheritance Multiple inheritance RTTI Templates Exceptions Operator Overloading

Overview. Constructors and destructors Virtual functions Single inheritance Multiple inheritance RTTI Templates Exceptions Operator Overloading How C++ Works 1 Overview Constructors and destructors Virtual functions Single inheritance Multiple inheritance RTTI Templates Exceptions Operator Overloading Motivation There are lot of myths about C++

More information

Excel Basics: Working with Spreadsheets

Excel Basics: Working with Spreadsheets Excel Basics: Working with Spreadsheets E 890 / 1 Unravel the Mysteries of Cells, Rows, Ranges, Formulas and More Spreadsheets are all about numbers: they help us keep track of figures and make calculations.

More information

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB!

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB! CS 1033 Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB! Lab 06: Introduction to KompoZer (Website Design - Part 3 of 3) Lab 6 Tutorial 1 In this lab we are going to learn

More information

Lab: Supplying Inputs to Programs

Lab: Supplying Inputs to Programs Steven Zeil May 25, 2013 Contents 1 Running the Program 2 2 Supplying Standard Input 4 3 Command Line Parameters 4 1 In this lab, we will look at some of the different ways that basic I/O information can

More information

Templating functions. Comp Sci 1570 Introduction to C++ Administrative notes. Review. Templates. Compiler processing. Functions Overloading

Templating functions. Comp Sci 1570 Introduction to C++ Administrative notes. Review. Templates. Compiler processing. Functions Overloading s s in Templating functions Comp Sci 1570 Introduction to Outline s s in 1 2 3 s s in 4 Test 1 grade distribution grade on y, each student on x, sorted by y s s in 50 or below should talk to me. Outline

More information

CNIT 127: Exploit Development. Ch 2: Stack Overflows in Linux

CNIT 127: Exploit Development. Ch 2: Stack Overflows in Linux CNIT 127: Exploit Development Ch 2: Stack Overflows in Linux Stack-based Buffer Overflows Most popular and best understood exploitation method Aleph One's "Smashing the Stack for Fun and Profit" (1996)

More information

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

x86 architecture et similia

x86 architecture et similia x86 architecture et similia 1 FREELY INSPIRED FROM CLASS 6.828, MIT A full PC has: PC architecture 2 an x86 CPU with registers, execution unit, and memory management CPU chip pins include address and data

More information

Segmentation in Assembly Language Programming

Segmentation in Assembly Language Programming 1 2 Segmentation in General Segmentation in Assembly Language Programming UNIX programs have 3 segments Text segment Executable machine instructions Data segment Initialized data BSS segment (Block Started

More information

Easy Windows Working with Disks, Folders, - and Files

Easy Windows Working with Disks, Folders, - and Files Easy Windows 98-3 - Working with Disks, Folders, - and Files Page 1 of 11 Easy Windows 98-3 - Working with Disks, Folders, - and Files Task 1: Opening Folders Folders contain files, programs, or other

More information

SVN_Eclipse_at_home. 1. Download Eclipse. a. Go to: and select Eclipse IDE for Java Developers

SVN_Eclipse_at_home. 1. Download Eclipse. a. Go to:  and select Eclipse IDE for Java Developers 1. Download Eclipse SVN_Eclipse_at_home a. Go to: http://www.eclipse.org/downloads/ and select Eclipse IDE for Java Developers b. Select a mirror (which just means select which identical copy you should

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

Name (10) # Student. Student. 2017, Microprocessors 1 / 11

Name (10) # Student. Student. 2017, Microprocessors 1 / 11 Microprocessorss Laboratory 01 Debug/EMU86 # Student ID Student Name Grade (10) 1 / 11 DEBUG COMMAND SUMMARY Debug commands may be divided into four categories: program creation/debugging, memory manipulation,

More information

EE 314 Spring 2003 Microprocessor Systems

EE 314 Spring 2003 Microprocessor Systems EE 314 Spring 2003 Microprocessor Systems Laboratory Project #3 Arithmetic and Subroutines Overview and Introduction Review the information in your textbook (pp. 115-118) on ASCII and BCD arithmetic. This

More information

EXPERIMENT 1. FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS

EXPERIMENT 1. FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS EXPERIMENT 1 FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS Pre-lab: This lab introduces you to a software tool known as DEBUG. Before the lab session, read the first two sections of chapter

More information

Interrupt Programming

Interrupt Programming 19 Think before you speak. Interrupt Programming Interrupt is the one which temporarily suspends the execution of the current program and executes a specific subroutine called interrupt routine and then

More information

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software. Introduction to Netbeans This document is a brief introduction to writing and compiling a program using the NetBeans Integrated Development Environment (IDE). An IDE is a program that automates and makes

More information

Computer Architecture and System Software Lecture 07: Assembly Language Programming

Computer Architecture and System Software Lecture 07: Assembly Language Programming Computer Architecture and System Software Lecture 07: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements New assembly examples uploaded to

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,

More information

NCMail: Microsoft Outlook User s Guide

NCMail: Microsoft Outlook User s Guide NCMail: Microsoft Outlook 2007 Email User s Guide Revision 1.1 3/9/2009 This document covers how to use Microsoft Outlook 2007 for accessing your email with the NCMail Exchange email system. The syntax

More information

Familiarity with data types, data structures, as well as standard program design, development, and debugging techniques.

Familiarity with data types, data structures, as well as standard program design, development, and debugging techniques. EE 472 Lab 1 (Individual) Introduction to C and the Lab Environment University of Washington - Department of Electrical Engineering Introduction: This lab has two main purposes. The first is to introduce

More information

Intel 8086: Instruction Set

Intel 8086: Instruction Set IUST-EE (Chapter 6) Intel 8086: Instruction Set 1 Outline Instruction Set Data Transfer Instructions Arithmetic Instructions Bit Manipulation Instructions String Instructions Unconditional Transfer Instruction

More information

PHY4635/5635 Spring Lecture 8: Program Control Instructions

PHY4635/5635 Spring Lecture 8: Program Control Instructions PHY4635/5635 Spring 2009 Lecture 8: Program Control Instructions Short, Near and Far Jumps Short jump: jump is within +127 to -128 bytes from the address following the jump. Relative jumps : moves with

More information

Computer Architecture and System Software Lecture 06: Assembly Language Programming

Computer Architecture and System Software Lecture 06: Assembly Language Programming Computer Architecture and System Software Lecture 06: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Assignment 3 due thursday Midterm

More information

CSE351 Spring 2018, Midterm Exam April 27, 2018

CSE351 Spring 2018, Midterm Exam April 27, 2018 CSE351 Spring 2018, Midterm Exam April 27, 2018 Please do not turn the page until 11:30. Last Name: First Name: Student ID Number: Name of person to your left: Name of person to your right: Signature indicating:

More information

QUIZ Friends class Y;

QUIZ Friends class Y; QUIZ Friends class Y; Is a forward declaration neeed here? QUIZ Friends QUIZ Friends - CONCLUSION Forward (a.k.a. incomplete) declarations are needed only when we declare member functions as friends. They

More information

UNIT 4. Modular Programming

UNIT 4. Modular Programming 1 UNIT 4. Modular Programming Program is composed from several smaller modules. Modules could be developed by separate teams concurrently. The modules are only assembled producing.obj modules (Object modules).

More information

Summer 2003 Lecture 14 07/02/03

Summer 2003 Lecture 14 07/02/03 Summer 2003 Lecture 14 07/02/03 LAB 6 Lab 6 involves interfacing to the IBM PC parallel port Use the material on wwwbeyondlogicorg for reference This lab requires the use of a Digilab board Everyone should

More information

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007 Table of Contents A Document Created By Lisa Diner Western Quebec School Board October, 2007 Table of Contents Some Basics... 3 Login Instructions... 4 To change your password... 6 Options As You Login...

More information

Operating Systems. Objective. Background

Operating Systems. Objective. Background Operating Systems Project #5: Processes and Multiprogramming Project #5: Processes and Multiprogramming Objective Background Memory Management Time-Sharing Process Management Getting Started Drew University:

More information

Intel Architecture Segment:Offset Memory Addressing

Intel Architecture Segment:Offset Memory Addressing Name: Date: Lab Section: Lab partner s name: Lab PC Number: Objectives: Understanding video memory and character mapping of CGA characters in ROM BIOS, using the DOS debug command. Writing simple assembly-language

More information

ELEC VIDEO BIOS ROUTINES

ELEC VIDEO BIOS ROUTINES It is less confusing to the user if we remove unnecessary messages from the display before giving information or instructions. At the command prompt, we do this with the DOS command CLS. However, this

More information

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn FILE ORGANIZATION GETTING STARTED PAGE 02 Prerequisites What You Will Learn PRINCIPLES OF FILE ORGANIZATION PAGE 03 Organization Trees Creating Categories FILES AND FOLDERS PAGE 05 Creating Folders Saving

More information

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files 1-59863-307-4_APP A_541_10/31/06 Appendix A Backing Up Your Project Files At the end of every recording session, I back up my project files. It doesn t matter whether I m running late or whether I m so

More information

A practicalintroduction to embedded programming. Brian Plancher 10/17/2018

A practicalintroduction to embedded programming. Brian Plancher 10/17/2018 A practicalintroduction to embedded programming Brian Plancher Brian_Plancher@g.harvard.edu 10/17/2018 This week s task is simple: 1. Since the boards you made 2 weeks ago are perfect and are still in

More information

Lab 10 CST8214 Ian! D. Allen Fall 2007

Lab 10 CST8214 Ian! D. Allen Fall 2007 Name: Date: Lab Section: Lab partner s name: Lab PC Number: Objectives: Understanding video memory and character mapping of CGA characters in ROM BIOS, using the DOS debug command. Writing simple assembly

More information

Parameter Passing. Procedure line. Calling procedure line. Most subroutines require parameters Can sometimes pass parameters via registers

Parameter Passing. Procedure line. Calling procedure line. Most subroutines require parameters Can sometimes pass parameters via registers Parameter Passing Most subroutines require parameters Can sometimes pass parameters via registers Assume subroutine line will compute the value: y = m*x + b where m,x,b are signed byte values, and y is

More information

Constants and Expressions. Lecture 7: Assembly Language Programs. Constants and Expressions (cont.) Statements. Names. Assembly Directives

Constants and Expressions. Lecture 7: Assembly Language Programs. Constants and Expressions (cont.) Statements. Names. Assembly Directives Lecture 7: Assembly Language Programs Basic elements of assembly language Assembler directives Data allocation directives Data movement instructions Assembling, linking, and debugging Using TASM Constants

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University Virtual addresses Virtual memory addresses (what the process uses) Page

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

Subprograms: Arguments

Subprograms: Arguments Subprograms: Arguments ICS312 Machine-Level and Systems Programming Henri Casanova (henric@hawaii.edu) Activation Records The stack is useful to store and rieve urn addresses, transparently managed via

More information

Consider the above code. This code compiles and runs, but has an error. Can you tell what the error is?

Consider the above code. This code compiles and runs, but has an error. Can you tell what the error is? Discussion 1H Notes (Week 8, May 20) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 Dynamic Allocation of Memory Recall that when you create an array, you must know

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

ECE 206, Fall 2001: Lab 3

ECE 206, Fall 2001: Lab 3 ECE 206, : Lab 3 Data Movement Instructions Learning Objectives This lab will give you practice with a number of LC-2 programming constructs. In particular you will cover the following topics: - Load/store

More information

15 Sharing Main Memory Segmentation and Paging

15 Sharing Main Memory Segmentation and Paging Operating Systems 58 15 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per

More information

This is a combination of a programming assignment and ungraded exercises

This is a combination of a programming assignment and ungraded exercises CSE 11 Winter 2017 Programming Assignment #1 Covers Chapters: ZY 1-3 START EARLY! 100 Pts Due: 25 JAN 2017 at 11:59pm (2359) This is a combination of a programming assignment and ungraded exercises Exercises

More information

Lab 7: OCaml 12:00 PM, Oct 22, 2017

Lab 7: OCaml 12:00 PM, Oct 22, 2017 CS17 Integrated Introduction to Computer Science Hughes Lab 7: OCaml 12:00 PM, Oct 22, 2017 Contents 1 Getting Started in OCaml 1 2 Pervasives Library 2 3 OCaml Basics 3 3.1 OCaml Types........................................

More information

Experiment N o 1. 1 Introduction to Assembly Language Programming

Experiment N o 1. 1 Introduction to Assembly Language Programming Experiment N o 1 1 Introduction to Assembly Language Programming Introduction: This experiment introduces the student to assembly language programming. In order to illustrate the basic concepts of assembly

More information

Introduction to Computation and Problem Solving

Introduction to Computation and Problem Solving Class 3: The Eclipse IDE Introduction to Computation and Problem Solving Prof. Steven R. Lerman and Dr. V. Judson Harward What is an IDE? An integrated development environment (IDE) is an environment in

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

16.317: Microprocessor Systems Design I Fall 2014

16.317: Microprocessor Systems Design I Fall 2014 16.317: Microprocessor Systems Design I Fall 2014 Exam 2 Solution 1. (16 points, 4 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by circling

More information

Copyright 1998 CH-UH Schools Revised 10/31/98 Authored by: Bob Torrelli Jim Harmon Hannah Reid. Technology Specialists, CH-UH Schools

Copyright 1998 CH-UH Schools Revised 10/31/98 Authored by: Bob Torrelli Jim Harmon Hannah Reid. Technology Specialists, CH-UH Schools Copyright 1998 CH-UH Schools Revised 10/31/98 Authored by: Bob Torrelli Jim Harmon Hannah Reid Technology Specialists, CH-UH Schools Resizing and moving the taskbar 1 Taskbar properties 2 Clear documents,

More information

HOUR 4 Understanding Events

HOUR 4 Understanding Events HOUR 4 Understanding Events It s fairly easy to produce an attractive interface for an application using Visual Basic.NET s integrated design tools. You can create beautiful forms that have buttons to

More information

LeakDAS Version 4 The Complete Guide

LeakDAS Version 4 The Complete Guide LeakDAS Version 4 The Complete Guide SECTION 4 LEAKDAS MOBILE Second Edition - 2014 Copyright InspectionLogic 2 Table of Contents CONNECTING LEAKDAS MOBILE TO AN ANALYZER VIA BLUETOOTH... 3 Bluetooth Devices...

More information

CS 1110, LAB 1: PYTHON EXPRESSIONS.

CS 1110, LAB 1: PYTHON EXPRESSIONS. CS 1110, LAB 1: PYTHON EXPRESSIONS Name: Net-ID: There is an online version of these instructions at http://www.cs.cornell.edu/courses/cs1110/2012fa/labs/lab1 You may wish to use that version of the instructions.

More information

Subprograms: Local Variables

Subprograms: Local Variables Subprograms: Local Variables ICS312 Machine-Level and Systems Programming Henri Casanova (henric@hawaii.edu) Local Variables in Subprograms In all the examples we have seen so far, the subprograms were

More information

Q. State and Explain steps involved in program development. [w-08, w-10, s-12, w-11]

Q. State and Explain steps involved in program development. [w-08, w-10, s-12, w-11] Q. State and Explain steps involved in program development. [w-08, w-10, s-12, w-11] Answer: 1. Defining Problem 2. Algorithm 3. Flowchart 4. Initialization of checklist 5. Choosing instructions 6. Converting

More information

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial A Walkthrough with Examples CMSC 212 - Spring 2009 Last modified March 22, 2009 What is gdb? GNU Debugger A debugger for several languages, including C and C++ It allows you to inspect what the program

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file? QUIZ on Ch.5 Why is it sometimes not a good idea to place the private part of the interface in a header file? Example projects where we don t want the implementation visible to the client programmer: The

More information

By: Dalbir Singh, Computer Science Dep't

By: Dalbir Singh, Computer Science Dep't Assembly language is essentially the native language of your computer. Technically the processor of your machine understands machine code (consisting of ones and zeroes). But in order to write such a machine

More information

Introduction to the Emacs Editor

Introduction to the Emacs Editor Introduction to the Emacs Editor Scott D. Anderson Wellesley College Scott.Anderson@acm.org c Fall 2004 1 What is Emacs? Emacs is an editor: a program that allows you to modify files. Many of you have

More information

Midterm Exam #2 Answer Key

Midterm Exam #2 Answer Key Midterm Exam #2 Answer Key Name: Student ID #: I have read and understand Washington State University s policy on academic dishonesty and cheating YOU Signed: Problem 1) Consider the following fragment

More information

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

Outlook Web Access. In the next step, enter your  address and password to gain access to your Outlook Web Access account. Outlook Web Access To access your mail, open Internet Explorer and type in the address http://www.scs.sk.ca/exchange as seen below. (Other browsers will work but there is some loss of functionality) In

More information

Startup Notes for Standard CMD 2015.x Setup

Startup Notes for Standard CMD 2015.x Setup Startup Notes for Standard CMD 2015.x Setup The standard CMD program setup refers to the 2015 version of The Church Membership Directory software, which includes the two phone apps (one for staff use and

More information

COPYRIGHTED MATERIAL. Starting Strong with Visual C# 2005 Express Edition

COPYRIGHTED MATERIAL. Starting Strong with Visual C# 2005 Express Edition 1 Starting Strong with Visual C# 2005 Express Edition Okay, so the title of this chapter may be a little over the top. But to be honest, the Visual C# 2005 Express Edition, from now on referred to as C#

More information

CSC369 Lecture 2. Larry Zhang

CSC369 Lecture 2. Larry Zhang CSC369 Lecture 2 Larry Zhang 1 Announcements Lecture slides Midterm timing issue Assignment 1 will be out soon! Start early, and ask questions. We will have bonus for groups that finish early. 2 Assignment

More information

Excel Intermediate

Excel Intermediate Excel 2013 - Intermediate (103-124) Multiple Worksheets Quick Links Manipulating Sheets Pages EX16 EX17 Copying Worksheets Page EX337 Grouping Worksheets Pages EX330 EX332 Multi-Sheet Cell References Page

More information

Ch. 11: References & the Copy-Constructor. - continued -

Ch. 11: References & the Copy-Constructor. - continued - Ch. 11: References & the Copy-Constructor - continued - const references When a reference is made const, it means that the object it refers cannot be changed through that reference - it may be changed

More information

Heap Arrays. Steven R. Bagley

Heap Arrays. Steven R. Bagley Heap Arrays Steven R. Bagley Recap Data is stored in variables Can be accessed by the variable name Or in an array, accessed by name and index a[42] = 35; Variables and arrays have a type int, char, double,

More information

ORG ; TWO. Assembly Language Programming

ORG ; TWO. Assembly Language Programming Dec 2 Hex 2 Bin 00000010 ORG ; TWO Assembly Language Programming OBJECTIVES this chapter enables the student to: Explain the difference between Assembly language instructions and pseudo-instructions. Identify

More information

You just told Matlab to create two strings of letters 'I have no idea what I m doing' and to name those strings str1 and str2.

You just told Matlab to create two strings of letters 'I have no idea what I m doing' and to name those strings str1 and str2. Chapter 2: Strings and Vectors str1 = 'this is all new to me' str2='i have no clue what I am doing' str1 = this is all new to me str2 = I have no clue what I am doing You just told Matlab to create two

More information

CSE/EEE 230 Computer Organization and Assembly Language

CSE/EEE 230 Computer Organization and Assembly Language 1 Instructions You may work in pairs with one partner on this assignment if you wish or you may work alone. If you work with a partner, only submit one file to Blackboard with both of your names in the

More information

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW STAROFFICE 8 DRAW Graphics They say a picture is worth a thousand words. Pictures are often used along with our words for good reason. They help communicate our thoughts. They give extra information that

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be

More information

CPU. IBM PC and compatible Memory Structure

CPU. IBM PC and compatible Memory Structure CPU The CPU is usually organised in three parts: The Arithmetic and Logic Unit or ALU (which performs computations and comparisons) and the Control Unit which fetches information from and stores information

More information

EE 352 Lab 3 The Search Is On

EE 352 Lab 3 The Search Is On EE 352 Lab 3 The Search Is On Introduction In this lab you will write a program to find a pathway through a maze using a simple (brute-force) recursive (depth-first) search algorithm. 2 What you will learn

More information

Recitation: Bomb Lab. September 17 th 2018

Recitation: Bomb Lab. September 17 th 2018 15-213 Recitation: Bomb Lab September 17 th 2018 Agenda Logistics - Bomb Lab Overview - Introduction to GDB - GDB and Assembly Tips What is Bomb Lab? An exercise in reading x86-64 assembly code. A chance

More information

reply db y prompt db Enter your favourite colour:, 0 colour db 80 dup(?) i db 20 k db? num dw 4000 large dd 50000

reply db y prompt db Enter your favourite colour:, 0 colour db 80 dup(?) i db 20 k db? num dw 4000 large dd 50000 Declaring Variables in Assembly Language As in Java, variables must be declared before they can be used Unlike Java, we do not specify a variable type in the declaration in assembly language Instead we

More information

UMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP.

UMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP. Procedures: CALL: Pushes the address of the instruction following the CALL instruction onto the stack. RET: Pops the address. SUM PROC NEAR USES BX CX DX ADD AX, BX ADD AX, CX MOV AX, DX RET SUM ENDP NEAR

More information

Getting Started (1.8.7) 9/2/2009

Getting Started (1.8.7) 9/2/2009 2 Getting Started For the examples in this section, Microsoft Windows and Java will be used. However, much of the information applies to other operating systems and supported languages for which you have

More information

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

2 Getting Started. Getting Started (v1.8.6) 3/5/2007 2 Getting Started Java will be used in the examples in this section; however, the information applies to all supported languages for which you have installed a compiler (e.g., Ada, C, C++, Java) unless

More information

Documentation Requirements Computer Science 2334 Spring 2016

Documentation Requirements Computer Science 2334 Spring 2016 Overview: Documentation Requirements Computer Science 2334 Spring 2016 These requirements are based on official Java coding conventions but have been adapted to be more appropriate to an academic environment.

More information

Adding content to your Blackboard 9.1 class

Adding content to your Blackboard 9.1 class Adding content to your Blackboard 9.1 class There are quite a few options listed when you click the Build Content button in your class, but you ll probably only use a couple of them most of the time. Note

More information

Chapter 7 Subroutines. Richard P. Paul, SPARC Architecture, Assembly Language Programming, and C

Chapter 7 Subroutines. Richard P. Paul, SPARC Architecture, Assembly Language Programming, and C Chapter 7 Subroutines Richard P. Paul, SPARC Architecture, Assembly Language Programming, and C 2 Subroutines Subroutines allow us to either to repeat a computation or to repeat the computation with different

More information

The Stack. Lecture 15: The Stack. The Stack. Adding Elements. What is it? What is it used for?

The Stack. Lecture 15: The Stack. The Stack. Adding Elements. What is it? What is it used for? Lecture 15: The Stack The Stack What is it? What is it used for? A special memory buffer (outside the CPU) used as a temporary holding area for addresses and data The stack is in the stack segment. The

More information