Process Management Lecture Notes

Process Management Lecture Notes - Chapter 8 Process...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter Process Management 8
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Three types of operating systems Single-user Hand-held devices, e.g. cell phones Multi-user Personal computers and workstations Real-time Equipment control, e.g. car engine
Image of page 2
The Pep/8 OS An operating system is a program One function of an operating system is to manage the jobs (application programs) that users submit Because the operating system is itself a program, it is stored in memory The location of the OS program relative to the application programs is the memory map
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
FC9B FC4F FC57 FBCF FBCF FFF8 FC4F FFFA FC57 FFFC FC9B FFFE System stack User stack Heap I/O buffer Loader Trap handler 0000 Applications program Mem Figure 8.1
Image of page 4
The Pep/8 loader The purpose is to load the application program into memory starting at address 0000 When you invoke the Pep/8 loader: SP Mem[FFFA] PC Mem[FFFC]
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The .BURN command If .BURN is in a program, the assembler assumes the program will be burned into ROM It generates code for instructions that follow the .BURN It does not generate code for instructions that precede the .BURN It computes symbol values assuming the operand of .BURN is the last address
Image of page 6
;******* Pep/8 Operating System ; TRUE: .EQUATE 1 FALSE: .EQUATE 0 ; ;******* Operating system RAM FBCF osRAM: .BLOCK 128 ;System stack area FC4F wordBuff:.BLOCK 1 ;Input/output buffer FC50 byteBuff:.BLOCK 1 ;Least significant byte of wordBuff FC51 wordTemp:.BLOCK 1 ;Temporary word storage FC52 byteTemp:.BLOCK 1 ;Least significant byte of tempWord FC53 addrMask:.BLOCK 2 ;Addressing mode mask FC55 opAddr: .BLOCK 2 ;Trap instruction operand address ; ;******* Operating system ROM FC57 .BURN 0xFFFF Figure 8.2
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
;******* System Loader ;Data must be in the following format: ;Each hex number representing a byte must contain exactly two ;characters. Each character must be in 0..9, A..F, or a..f and ;must be followed by exactly one space. There must be no ;leading spaces at the beginning of a line and no trailing ;spaces at the end of a line. The last two characters in the ;file must be lowercase zz, which is used as the terminating ;sentinel by the loader. ; FC57 C80000 loader: LDX 0,i ;X := 0 FC5A E9FC4F STX wordBuff,d ;Clear input buffer word ; Figure 8.3
Image of page 8
FC5D 49FC50 getChar: CHARI byteBuff,d ;Get first hex character FC60 C1FC4F LDA wordBuff,d ;Put ASCII into low byte of A FC63 B0007A CPA 'z',i ;If end of file sentinel 'z' FC66 0AFC9A BREQ stopLoad ;then exit loader routine FC69 B00039 CPA '9',i ;If characer <= '9', assume decimal FC6C 06FC72 BRLE shift ;and right nybble is correct digit FC6F 700009 ADDA 9,i ;else convert nybble to correct digit FC72 1C shift: ASLA ;Shift left by four bits to send FC73 1C ASLA ;the digit to the most significant FC74 1C ASLA ;position in the byte FC75 1C ASLA FC76 F1FC52 STBYTEA byteTemp,d ;Save the most significant nybble FC79 49FC50 CHARI byteBuff,d ;Get second hex character FC7C C1FC4F LDA wordBuff,d ;Put ASCII into low byte of A FC7F B00039 CPA '9',i ;If characer <= '9', assume decimal FC82 06FC88 BRLE combine ;and right nybble is correct digit FC85 700009 ADDA 9,i ;else convert nybble to correct digit FC88 90000F combine: ANDA 0x000F,i
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern