Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language.

Similar presentations


Presentation on theme: "Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language."— Presentation transcript:

1 Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language

2 Operating System OS – is the program that control the overall operation of the computer, and it is the single most important piece of system software on a computer. It is the interface between the users and the all other hardware and software resources in a computer system.

3 Different OS in Different Systems There are many different OS which operating on different computer systems. For the beginners, the GUI (graphical user interface), such as Windows, is a typical OS. The other OS examples are UNIX, DOS, the OS for IBM mainframe computers,…

4 The main Function of an OS Language Services Memory Managers Information Managers Scheduler Utilities Operating Systems Interpreters Assemblers Compilers Loaders Garbage Collectors Linkers File Systems Database Systems Text Editors Graphics Routines …

5 What kind of language to write OS? It depends on different systems and application’s preference. Open system versus Non-open Systems

6 Assembly Language ? Assembly Language Program assembler Machine Language Program Loader.EXE ->Memory Hardware Results

7 The ASS in Our Simulator Let’s take a close look one by one: 1. 0000 --- Load X Contents in [X]  R Here X is a memory address and R is the register (implied) Example: 0000 0000 0000 0101

8 STORE X 0001 --- STORE X R  [X] The content inside R  memory location X Example: 0001 0000 0000 0111 However, in most situations, we use a symbol to represent X.

9 CLEAR X and ADD X 0010 – CLEAR X 0  [X] 0011 – ADD X ---------------- R+[X]  R

10 INCREMENT X and SUBTRACT X 0100 – INCREMENT X ---[X]+1  [X] 0101 – SUBTRACT X --- R-[X]  R

11 DECREMENT X and COMPARE X 0110 – DECREMENT X -----[X] – 1  [X] 0111 – COMPARE X 1. if [X] > R then GT=1, else GT=0 2. if [X] = R then EQ=1, else EQ=0 3. if [X]<R then LT=0, else LT = 0

12 JUMP X and JUMPGT X 1000 – JUMP X -  Get the instruction from address X unconditionally. 1001 JUMPGT X  Get the next Instruction from X only if GT=1 **** X could be a symbol to represent any legal address

13 JUMPEQ X and JUMPLT X 1010 – JUMPEQ X  Get the next instruction from X only if EQ=1 1011 – JUMPLT X  Get the next instruction from X only if LT=1

14 JUMPNEQ X and IN X 1100 – JUMPNEQ X  Get the next instruction from X only if EQ=0 1101 – IN X  Input a integer value from the standard input device and store it into X. The standard input device is the Keyboard.

15 OUT X and HALT 1110 – OUT X  Output the number stored in X to display in decimal form. HALT – Stop Program Execution.

16 .BEGIN and.END To indicate the beginning and the end of the program.

17 *** Separate Code and DATA Always put the DATA after the HALT Instruction to prevent the wrong action from the program.


Download ppt "Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language."

Similar presentations


Ads by Google