COMP2012H: OOP and DS (honors track)

Slides:



Advertisements
Similar presentations
DOS and BIOS Interrupts DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from.
Advertisements

Writing and reading files. Creating a file on a disk Get a file handle from system Use INT 21H function 3C to create a directory entry for the file Use.
ICS312 Set 6 Operands. Basic Operand Types (1) Register Operands. An operand that refers to a register. MOV AX, BX ; moves contents of register BX to.
More about procedures and Video Processing. Lesson plan Review existing concepts More about procedures and boolean expression Video processing.
Video systems (continue). Practice Modify the program to get a string from a keyboard to display the input string on the middle of the screen with reverse.
Lecture 6 Machine Code: How the CPU is programmed.
Assembly Language for Intel-Based Computers Chapter 15: BIOS-Level Programming (c) Pearson Education, All rights reserved. You may modify and.
Problem Solving and Program Design. COMP104 Problem Solving / Slide 2 Our First Program // a simple program #include using namespace std; int main() {
CS2422 Assembly Language & System Programming November 2, 2006.
Chapter 7 Programming with DOS and BIOS Function Calls Objectives: The use of DOS and BIOS function call How to read the PC’s keyboard How to send text.
Flow Control Instructions
Kip Irvine: Assembly Language for Intel-Based Computers
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#8) By Dr. Syed Noman.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#6)
Assembly Programming Timothy C. Rice Jr., MIT. OUTLINE Basic Structure Exit to Dos Print Character Clear Screen Change BG & FG Color Set Curser Location.
ICS312 Set 4 Program Structure. Outline for a SMALL Model Program Note the quiz at the next lecture will be to reproduce this slide.MODEL SMALL.586 ;
Lab 5 Part C Write to the screen a character string that uses a ‘$’ to indicate the end of the string. Do not write the ‘$’ to the screen. Use DOS Interrupt.
Programming the Microprocessor A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
PC-technology MASM and Inline Code in C. PC-Teknik © CAAK2 MASM and Inline Code in C Some things to think about –Which size has the register you use AX,
1 Screen and Keyboard Operations Suthida Chaichomchuen
1 Chapter 5: Procedures and Interrupts Assembly Language for Intel-Based Computers, Kip R. Irvine 3rd edition 3/17/2000.
Text-Mode Programming Question #1 What are the three levels of access to the video display when writing characters on the screen in text mode?
Lecture 10: BIOS and DOS Programming
Binary Number Output To display a number in binary format, a program looks at each bit in the number and sends the ASCII equivalent of a ‘1’ (31h) or a.
Video systems. Lesson plan Review the code for the previous exercise Video systems Review for midterm exam.
CS Class 03 Topics  Sequence statements Input Output Assignment  Expressions Read pages Read pages 40 – 49 for next time.
10H Interrupt. Option 0H – Sets video mode. Registers used: – AH = 0H – AL = Video Mode. 3H - CGA Color text of 80X25 7H - Monochrome text of 80X25 Ex:
String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures.
4. Kernel and VGA ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  None.
LEA instruction The LEA instruction can be used to get the offset address of a variable Example ORG 100h MOV AL, VAR1 ; check value of VAR1 by moving it.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
Lecture 11 Text mode video
Lecture 6 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
1 Structure of Simple C++ Program Chapter 1 09/09/13.
File Operations. FILE PROCESSING For the purposes of the following discussion, reading means copying all or part of an existing file into memory Writing.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Computer Graphics Lecture 04 Point Taqdees A. Siddiqi
C++ Programming: Presentation 1
COMP 1321 Digital Infrastructure
Topic Pre-processor cout To output a message.
Presentation on Real Mode Memory Addressing
BYTE AND STRING MANIPULATON
Additional Assembly Programming Concepts
Lecture 4 Control Flow Structures (LOOPS)
EEM336 Microprocessors Laboratory Orientation
Assembly Language Programming Part 2
Microprocessor Lab CSL1543 0:0:2
(The Stack and Procedures)
9/17/2018 Kiến Trúc Máy Tính.
Microprocessor and Assembly Language
Defining Types of data expression Dn [name] expression Dn [name]
Symbolic Instruction and Addressing
Introduction to Assembly Language
CS 1430: Programming in C++ Turn in your Quiz1-2 No time to cover HiC.
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Microprocessor Lab CSL1543 0:0:2
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
(The Stack and Procedures)
LCD and Keyboard Sepehr Naimi
Microprocessor Lab CSL1543 0:0:2
Symbolic Instruction and Addressing
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Unit:08 Software Interrupts
Chapter 6 –Symbolic Instruction and Addressing
Process.
(The Stack and Procedures)
Introduction to Algorithms and Programming COMP151
Presentation transcript:

COMP2012H: OOP and DS (honors track) http://course.cs.ust.hk/comp2012h Fast-paced High workload Learn many details on your own Therefore, you must be both good and hard-working to succeed COMP2012H challenges the best and the most independently minded!

Announcement No lab in week 1 Want to skip all the labs: score them all before Mar 4! See courseweb for details.

Hello World! #include <iostream.h> using namespace std; int main() { cout << "hello, world!" << endl; return 0; } contains classes/objects useful for screen output e.g. cout

Who wants to write this … except COMP180 students ?! org 100h ; set video mode mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3) int 10h ; do it! ; cancel blinking and enable all 16 colors: mov ax, 1003h mov bx, 0 int 10h ; set segment register: mov ax, 0b800h mov ds, ax ; print "hello world" ; first byte is ascii code, second byte is color code. mov [02h], 'h' mov [04h], 'e' mov [06h], 'l' mov [08h], 'l' mov [0ah], 'o' mov [0ch], ',' mov [0eh], 'w' mov [10h], 'o' mov [12h], 'r' mov [14h], 'l' mov [16h], 'd' mov [18h], '!' ; color all characters: mov cx, 12 ; number of characters. mov di, 03h ; start from byte after 'h' c: mov [di], 11101100b ; light red(1100) on yellow(1110) add di, 2 ; skip over next ascii code in vga memory. loop c ; wait for any key press: mov ah, 0 int 16h ret Who wants to write this … except COMP180 students ?!

What’s good about OOP? Objects separate interface from implementation In C++, interface is given by .h files, and implementation by .cpp files

Suggested Work Schedule for Project #1 Due on Mar 8! (14 days) work up to lab5. Learn QT / some inheritance on your own (14 days) work on project #1. OOP allows you to implement the requirements readily by using QT classes (4 days) backup in case you fall short of the above schedule

Due dates and late penalty Projects are due at 23:59:00 on the due date. You are permitted a total of five late days without penalty for the semester that may be used on any of the five programming projects. See courseweb for details (or ask questions now!)