1 / 14

Computer Platforms

Computer Platforms. Week 4: Assembly Language & Operating Systems. Assembly Language. Is at a level below programming languages Eg.- C++, Java, Pascal Assembly language is converted into machine code Machine code is raw data that would take ages for a human to decipher

hye
Télécharger la présentation

Computer Platforms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Platforms Week 4: Assembly Language & Operating Systems

  2. Assembly Language • Is at a level below programming languages • Eg.- C++, Java, Pascal • Assembly language is converted into machine code • Machine code is raw data that would take ages for a human to decipher • This is the data and instructions which is used by the Fetch Execute Cycle

  3. Assembly Language • Programs or sequences can be written in assembly language • Which is what is effectively done when we compile a C++ program • Why write in assembly language? • Faster (direct) access to CPU • Some programs need to be written to operate at a lower level • E.g.- Device Drivers

  4. A simple Assembly program (Honest!) org 100h mov dx,msg mov ah,9 int 21h mov ah,4Ch int 21h msg db 'Hello, World!',0Dh,0Ah,'$'

  5. A simple Assembly program (Honest!) org 100h mov dx,msg mov ah,9 int 21h Tells the compiler (NASM) the program will be loaded at memory address 100h Moves the address of our message (msg) into a register which is known as the DX Register (Data Register) Moves the value 9 into a register called the AH Register ‘int’ calls an ISR (interrupt service routine) “DOS Services” this is correlated with contents of AH (9) to determine that we want to output a message– contents of DX (msg)

  6. A simple Assembly program (Honest!) mov ah,4Ch int 21h msg db 'Hello, World!',0Dh,0Ah,'$' Effectively tells the processor to stop. Otherwise it will try to fetch and execute the next instructions it comes to msg is a variable name (the name of out message string) db is an instruction to the compiler to use the information the follows as data Then out message ‘Hello, World!’ (note: ‘ ‘ marks) 0Dh, 0Ah – performs carriage return and line feed $ terminate string output – (int 21h & 9 in ah requirement)

  7. A simple Assembly program (Honest!) • OK, so what does it actually do? • Output “Hello, World!” to the screen • How? • Type the program into a text document and call it ‘hello.asm’ • Use the NASM program • This is used to compile assembly language programs • Rename the produced file as type COM • ren hello hello.com • Run the program • hello

  8. A simple Assembly program (Honest!) • Step by Step:

  9. Operating Systems • The main piece of software you interact with • Application run ‘on top’ of the OS • Is started up with the computer • Boot process • Also deals with organising files and directories on storage media • How physical data on the disk is organised logically in the OS

  10. Windows Boot Process • What happens when a Windows PC is kicked into life? • System goes through low-level boot procedure • POST • Device / system initialisation • Warm boot stage initialises • Search for boot record • IBMBIO.COM then IBMDOS.COM (booting DOS) • COMMAND.COM then AUTOEXEC.BAT loaded • This starts the Windows programs running

  11. Windows Boot Process • Getting things to load at start-up • Start-up Folder • Easy to configure • Useful for application loading • System Files • AUTOEXEC.BAT • CONFIG.SYS • WIN.INI • SYSTEM.INI • Historically used for DOS tweaks • Harder to configure

  12. Windows Boot Process • Getting things to load at start-up • Windows Registry • Contains system & essential information for software and hardware on the PC • Stores many settings • Hard to configure (?) • Easy for an amateur to screw up! • Can point to application (EXE) files to run on start-up or on certain actions • Common place for viruses to hide!!!

  13. File Systems • FAT 16 • Or just ‘FAT’ • Used by DOS and Windows 95 backwards • FAT 32 • Used in Windows 95 (B) – current • NTFS • New Technology File System (MS) • 32-bit • Secure • Used in Windows NT/2000/XP

  14. File Systems • HPFS • High Performance File System • 32-bit • Used in OS/2 (remember that?) • ISO 9660 • CD-ROM • ISO 13346 • DVD

More Related