Our first 64-bit ventures How to remotely access our new Core-2 Duo platforms for some exploration and programming.

Slides:



Advertisements
Similar presentations
Assembly Language for x86 Processors 6th Edition Chapter 5: Procedures (c) Pearson Education, All rights reserved. You may modify and copy this slide.
Advertisements

Using VMX within Linux We explore the feasibility of executing ROM-BIOS code within the Linux x86_64 kernel.
Lab6 – Debug Assembly Language Lab
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Creating a device-file node An introduction to some privileged Linux system-calls (needed for an upcoming programming exercise)
The ‘system-call’ interface We see how an application program can invoke privileged kernel services.
Viewing 8086 memory-areas A peek into the video display memory, the real-mode Interrupt Vector Table, and the ROM-BIOS DATA AREA.
The x86 Feature Flags On using the CPUID instruction for processor identification and feature determination.
Timeout for some demos An instructive look at how the Linux Operating System sets up system data-structures.
PC hardware and x86 3/3/08 Frans Kaashoek MIT
1 Lecture 5: Procedures Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine.
Exploring the Internet Creating and setting up your website Instructor: Michael Krolak Instructor: Patrick Krolak See also
1 Homework Reading Assignment –Professional Assembly Language, pp 39-59, MP1 –Get assignment file from my web page and study it –Make and populate.
Exploring the Internet Creating and setting up your website Instructor: Michael Krolak Instructor: Patrick Krolak See also
1 Lab Session-IV CSIT-120 Fall 2000 Precedence Rules Machine Language Programming The “Micro” Machine The “Micro” Simulator The “Micro” Translator (Thanks.
Common network diagnostic and configuration utilities A ‘toolkit’ for network users and managers when ‘troubleshooting’ is needed on your network.
Dayu Zhang 9/3/2014 Lab01. Lab Instructor: Dayu Zhang Office Hour Mon/Wed 10:40am – 11:10am Room A201 Lab Website
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Guide To UNIX Using Linux Third Edition
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Stack Operations Runtime Stack PUSH Operation POP.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Cisco Confidential 1 © 2011 Cisco and/or its affiliates. All rights reserved.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
A crash course in njit’s Afs
SoftwareTools CGS 3460, Lecture 7 Jan 25, 2006 Zhen Yang.
Agenda What is Computer Programming? The Programming Process
CprE 288 – Quick intro for compiling C in Linux
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
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 ;
COMP1070/2002/lec3/H.Melikian COMP1070 Lecture #3 v Operating Systems v Describe briefly operating systems service v To describe character and graphical.
The Network Management Lab pc pc pc pc pc Virtual Servers Your Laptop.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Lab How to Use WANem Last Update Copyright 2011 Kenneth M. Chipps Ph.D. 1.
6.828: PC hardware and x86 Frans Kaashoek
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Practical Session 4. Labels Definition - advanced label: (pseudo) instruction operands ; comment valid characters in labels are: letters, numbers, _,
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
Goals: To gain an understanding of assembly To get your hands dirty in GDB.
AI – CS289 Fuzzy Logic - Labs Fuzzy Logic – Lab 1 Starting up… 05 th October 2006 Dr Bogdan L. Vrusias
Microcode Source: Digital Computer Electronics (Malvino and Brown)
Basic Router Configuration 1.1 Global configuration Cisco allows us to configure the router to support various protocols and interfaces. The router stores.
UNIX Introduction CSCE 221H Texas A&M University.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
Exploitation Of Windows Buffer Overflows. What is a Buffer Overflow A buffer overflow is when memory is copied to a location that is outside of its allocated.
Compiling a C Program. Before we can begin we must open a telnet session to phobos. There are a number of ways to do this, but the easiest is to click.
Derived from "x86 Assembly Registers and the Stack" by Rodney BeedeRodney Beede x86 Assembly Registers and the Stack Nov 2009.
Assembly Language for x86 Processors 7th Edition Chapter 13: High-Level Language Interface (c) Pearson Education, All rights reserved. You may modify.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
Agenda Steps to Obtain your Phobos and Matrix Accounts. How to use a Telnet Application to Access your Phobos and Matrix Accounts How to Create an Effective.
1 Logic, Shift, and Rotate Instructions Read Sections 6.2, 7.2 and 7.3 of textbook.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Functions/Methods in Assembly
Assembly 07. Outline Boxes within Boxes Procedure Definition call, ret Saving / Restoring Registers Argument(s) Return Value(s) Global vs. Local Data.
1 The Stack and Procedures Chapter 5. 2 A Process in Virtual Memory  This is how a process is placed into its virtual addressable space  The code is.
Agenda Overview of Seneca Computer System File Servers / Student Computer Accounts Telnet application How to Logon to Learn / Phobos accounts How to Change.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
ITIS  Today’s Notes  NFS in the lab  Lecture: ▪ Linux II ▪ vi  Lab 2.
Reset Windows 10 Forgotten Local Admin Password. Just take it easy, if you’ve forgotten Windows 10 local admin password and can’t log onto your PC. Here.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Precept I : Lab Environment, Unix, Bash, Emacs
CS1010: Intro Workshop.
Assembly language.
CS-401 Computer Architecture & Assembly Language Programming
Guide To UNIX Using Linux Third Edition
Assembly Language Programming I: Introduction
SAPC Hardware Pentium CPU (or 486) 4M usable memory
Lecture9: Embedded Network Operating System: cisco IOS
Computer Architecture and System Programming Laboratory
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

Our first 64-bit ventures How to remotely access our new Core-2 Duo platforms for some exploration and programming

Recall our system setup rackmount PC system gateway-server student workstation KVM cable ethernet cables ‘anchor00’ ‘anchor01’ ‘anchor02’ ‘anchor03’ ‘anchor04’ ‘anchor05’ ‘anchor06’ ‘anchor07’ Core 2 Duo systems ‘colby’ CS file-server null-modem serial cables

You can login via the LAN From a classroom or CS Lab machine, you can use Linux ‘ssh’ command; e.g.: $ ssh anchor07 All of your files will be there, remotely mounted via the Network File System You can use the customary editors and compilers or assemblers, and you can execute your programs or shell-scripts

remotely ‘rebooting’ If you ever need to ‘reboot’ one of these new Core-2 Duo machines, you can do that from our classroom or the CS Lab But you will need to connect via the alternate ‘gateway’ machine to watch screen-output during the reboot stage Then you can select GRUB menu-items that let you ‘boot’ alternative systems

If you need ‘boot-time’ access From a classroom or CS Lab machine, you can use Linux ‘ssh’ command: $ ssh colby Then use the Linux ‘telnet’ command, e.g.: $ telnet localhost 2007 Now you are connected to ‘anchor07’ via the serial-port null-modem link and can login normally (with username, password)

Name-to-number associations The new Core-2 Duo machine-names, and their corresponding ‘telnet’ port-numbers: ‘anchor00’  2000 ‘anchor01’  2001 ‘anchor02’  2002 ‘anchor03’  2003 ‘anchor04’  2004 ‘anchor05’  2005 ‘anchor06’  2006 ‘anchor07’  2007

Ordinary ‘rebooting’ As long as your ‘anchor’ machine’s OS is working, you can reboot it using this Linux command:$ sudo reboot But if your ‘anchor’ machine gets ‘hung’ as a result of some unintended program ‘bug’ and you need to reboot it while the Linux operating system is non-responsive, then you can do it from ‘colby’ using ‘telnet’

Emergency ‘rebooting’ Be sure you are logged into the ‘colby’ gateway-server, and type this command: $ telnet localhost 2222 When the telnet-program prompts you for a command, type this: $ telnet> Reboot 8 This reboots ‘anchor07’ (You can adjust the number for other ‘anchor’ machines)

Name-to-number for ‘reboot’ The new Core-2 Duo machine-names, and their corresponding reboot-numbers: ‘anchor00’  Reboot 1 ‘anchor01’  Reboot 2 ‘anchor02’  Reboot 3 ‘anchor03’  Reboot 4 ‘anchor04’  Reboot 5 ‘anchor05’  Reboot 6 ‘anchor06’  Reboot 7 ‘anchor07’  Reboot 8

‘Quirks’ When you type the ‘telnet’ command to reboot a machine, you may find that you have to type it more than once Whenever you want to disconnect from a serial-port link between ‘colby’ and one of the ‘anchor’ machines, you can do it by typing the key-combination: -’]’ You can exit from ‘telnet’ by typing ‘quit’

Code-fragments Here is an often-needed code-fragment in assembly language ‘systems’ programs: # converts the 32-bit value in EAX to a string of 8 hex numerals at DS:EDI eax2hex:.code32 pushal# preserve register-values mov$8, %ecx# setup numeral-count in ECX nxnyb:rol$4, %eax# rotate next nybble into AL mov%al, %bl# copy nybble-pair into BL and$0xF, %ebx# mask out all but lowest nybble movhex(%ebx), %dl# lookup the nybble’s numeral mov%dl, (%edi)# put numeral into output buffer inc%edi# and advance the buffer-pointer loopnxnyb# go back for another nybble popal# restore the saved registers ret# return control to the caller hex:.ascii“ ABCDEF”# array of hex numerals

How do we use ‘eax2hex’? Here’s how we modify ‘eflags.s’ to show the register-value in hexadecimal format.section.data msg:.ascii“\n EFLAGS=“ buf:.ascii“xxxxxxxx \n” len:.int. - msg.section.text _start:pushfl pop%edx mov%edx, %eax leabuf, %edi calleax2hex # the remainer of ‘eflags.s’ may be kept unchanged

In-class exercise #1 Try logging onto an ‘anchor’ via the Local Area Network, using the ‘ssh’ command (Your instructor will assign you to one of our new ‘anchor’ machines for your use) Compile and execute the ‘typesize.cpp’ demo-program (from our website), and compare its screen output with what you see when you run it on a classroom PC

In-class exercise #2 Make a copy of the demo-program from our course website named ‘eflags.s’, but use ‘rflags.s’ as your name for the copy Insert the directive.code64 at the top Now edit ‘rflags.s’ so that it uses 64-bit register-names, memory-addresses and opcode-suffixes, instead of 32-bit ones (e.g., change ‘pushfl’ to ‘pushfq’, and change ‘%edx’ to ‘%rdx’, etc.).

In-class exercise #3 Modify your ‘rflags.s’ program so that it would display the value in the RFLAGS register as a 16-digit hexadecimal value when executed on 64-bit Linux machines