8051 Virtual Workshop User Guide

Introduction
Overview
    Overview
    Virtual Workshop Integration
    Extension Integration
Getting Started
    Loading an 8051 Program into the Virtual Workshop
    Running a Simulation
Watching C Variables
    Watching C Variables
    Local Symbols Window
    Watch Windows
    Editing C Variable Values
    The Context Menu
    Variable Tooltips
Viewing Disassembly Memory Contents and Registers
    Disassembly Window
    Registers Window
    Memory Windows
Activity Views
    Introduction
    Port Activity View
    Serial Port Activity View
    Timer/Counter Activity View
    Program Status Word Activity View
Interrupts
    Simulation
    Tree View
Breakpoints
    Using Breakpoints
    Source and Machine Level Breakpoints
    Source Level Breakpoints
        Setting
        The Breakpoint View
        Breakpoint Properties
        Context Menu
        Deleting
        Hierarchical Breakpoints
    Machine Level Breakpoints
        Set Breakpoint at Cursor
        Breakpoints Dialog Box
        Editing Breakpoints
            Editing Breakpoints
            Add Breakpoint
            Delete Breakpoint
            Change Breakpoint
            Disable Breakpoint
Using the Toolbar
Interpreting the Status bar
Program Status File
Simulator Commands
    Go
    Halt
    Trace
    Restart
    Step Into
    Step Over
    Step Out
    Step to Cursor
    Undo Instruction
    Undo Command
    Trigger Interrupt 0
    Trigger Interrupt 1
    Trigger Timer 2 Reset
Specifying the 8051 Memory Setup
    Memory Address Ranges
    Memory Mapping
    Memory Mapped I/O
Using the Console I/O Utility
Using the Serial Port I/O Utility
    Serial Port Output
    Serial Port Input
Using the Port I/O Utility
    Using the Port I/O Utility
    8051 Ports Dialog Box
Code and Data Coverage
    Code Coverage
    Data/Xdata Coverage
Source Code Profiling
State capture
Using the Call Stack
Improving Simulation Speed
    Improving Simulation Speed
    Enable/Disable Interrupts
    Enable/Disable Serial Port
    Enable/Disable Timers
Miscellaneous Features
    Check Returns
    Trap Delayed Interrupts
    Clear Ram on Reset
    No Break on Stepout
    No Break on Stepover
    Confirm Binary
The Extension Interface
    Introduction
    Compulsory Interface Calls
        Introduction
        Initialise()
    General Purpose Interface Calls
        Introduction
        GetXDataMemory()
        SetXDataMemory()
        ClearXDataMemory()
        GetProgramMemory()
        SetProgramMemory()
        SetMachineCycles()
        IncMachineCycles()
        GetSerialInput()
        GetSerialInputWord()
        SetSerialOutput()
        SetSerialOutputWord()
        GetPortPins()
        SetPortPins()
        SetAnalogOutputs
        SetWaveForm
        ResetState()
        PreCloseExtensions()
    Capture State Specific Interface Calls
        Introduction
        DuplicateState()
        DeleteState()
        SetActiveState()
    MFC Specific Interface Calls
        Introduction
        AddViewMenuItems()
        OnCmdMsg()
    Variant Specific Interface Calls
        Introduction
        GetSFRMemory()
        SetSFRMemory()
        GetDptr()
        SetDptr()
        GetWaveForm
        GetMachineCycles()
        CheckWatchdog()
        GetAdditionalInterrupts()
        GetAdditionalPorts()
        GetRegisters()
        GetSerialPorts()
        HandleReservedInstruction()
        GetReservedInstructionMnemonic()
        GetExternalBusAccessCode()
        GetExternalBusAccessData()
    Advanced Interface Calls
        Introduction
        GetDataMemory()
        SetDataMemory()
Extension Examples
    Introduction
    Counters 0 and 1
        Introduction
        Extension Source Code
        8051 Test Code
    Memory Bank Switching
        Introduction
        Extension Source Code
        8051 Test Code
Using the Visual C++ Custom AppWizard
    Introduction
    Microsoft Visual C++ 5.0 or 6.0
    Custom Appwizard
    Installing the Custom AppWizard
        Installing under Visual C++ version 5
        Installing under Visual C++ version 6
    Tutorial - Creating an Extension with the AppWizard
        Introduction
        Create an 8051 Project
        Edit and Compile your 8051 Program
        Running your Program in the Virtual Workshop
        Watch the Serial Port Running
        Shut Down the Virtual Workshop
        Create an Outline Virtual Workshop Extension
        Configuring and Building the Extension
        Loading and Running the Extension
        Unloading the Extension
        Toggling a Port Pin from your Extension
        Adding a Dialog Box to your Extension
            Modeless Dialog Box
            Creating the Dialog Box Resource
            Creating the Class Source Files for your Dialog Box
            Making the Dialog Box Modeless
            Opening the Dialog Box
            Build and Run your Extension
            Sending Messages to your Program
            Build and Run your Extension
        Finalising Support for your Dialog Box
            The Finishing Touches
            Supporting the Capture State Command
            Build and Run your Extension
            Closing and Reopening your Dialog Box
                Handling the Close Event
                Creating a Menu Item
                Handling the Menu Message
                Build and Run your Extension
            Restoring the Dialog Position
            Build and Run your Extension
        Single Stepping through your Extension
        Speeding up your Extension
Code Creation Wizards
    Introduction
    Common Features
    xstdsys.c and xstdsys.h
    _init_chip() and _init_chip1()
    Wizard blocks
    Modifying the Configuration Code
    Inserting Code into your Normal Source Files
    Interrupt and I/O Handlers
    Changing Variants
    Linked Wizards
    Reset All Wizards
    Headers Wizard
    Accessing Wizards using the Source Code Context Menu
        Displaying the Context Menu
        A Wizards Dialog Box
        Operations and Registers
        Register Bits
        Register Only Selection