Микропроцессорные системы Программирование INTEL 8086 Системная программа Debug © Е.А.Сторожок, доц. каф. ИСКТ ВГУЭС.

Презентация:



Advertisements
Похожие презентации
Section 2.1: Use Inductive Reasoning Conjecture: A conjecture is an unproven statement that is based on observations; an educated guess. Inductive Reasoning:
Advertisements

Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
11 BASIC DRESS-UP FEATURES. LESSON II : DRESS UP FEATURES 12.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Applying Route-Maps as BGP Filters.
Lecture # Computer Architecture Computer Architecture = ISA + MO ISA stands for instruction set architecture is a logical view of computer system.
What to expect? How to prepare? What to do? How to win and find a good job? BUSINESS ENGLISH COURSE NOVA KAKHOVKA GUMNASUIM 2012.
Family Relationships (Семейные Отношения). Family How could you describe the word family? First of all family means a close unit of parents and their.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Module Summary The Cisco Discovery Protocol is an information-gathering tool used by network.
Multiples Michael Marchenko. Definition In mathematics, a multiple is the product of any quantity and an integer. in other words, for the quantities a.
DRAFTING TECHNIQUES I 136. Here is a basic shape. From here, we will do some advanced drafting once we put this shape on a sheet as a drawing. Select.
Linux Daemons. Agenda What is a daemon What is a daemon What Is It Going To Do? What Is It Going To Do? How much interaction How much interaction Basic.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Attributes Setting BGP Local Preferences.
It's great to be a teenager. It's fearful to be a teenager. Being a teenager is romantic. It's fun to be a teenager. It's not easy to be young.
CONSTRAINTS 52. You do your CONSTRAINING in Sketcher mode to create your part to exacting dimensions. This is the opposite of free-form creating we have.
USB Download Manual (v1.3) (GP2 Year 2010) LG Electronics/ LCD TV Division Feb. 17 th, Applied Models & Notice - File Copy - User Download Mode.
Binary numbers Learning objectives & evaluation criteria -Represent positive decimal numbers in binary -Perform addition and multiplication on binary.
REFERENCE ELEMENTS 64. If your REFERENCE ELEMENTS toolbar is not in view and not hidden, you can retrieve it from the toolbars menu seen here. 65.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Overview Monitoring and Troubleshooting BGP.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Employing AS-Path Filters.
The Web The Internet. Level A2 Waystage Level A2 Waystage Listening (p.17) I can understand simple messages delivered at a relatively high speed (on every.
Транксрипт:

Микропроцессорные системы Программирование INTEL 8086 Системная программа Debug © Е.А.Сторожок, доц. каф. ИСКТ ВГУЭС

Запуск программы Debug Для запуска программы Debug В DOS - набрать debug в командной строке В Windows – Нажать Пуск -> Выполнить -> набрать debug в командной строке Для перехода из оконного режима в полноэкранный и обратно нажимайте Alt+Enter Окно программы Debug в среде Windows

Команды Debug: a Перевод мнемонических машинных кодов в числовой код(ввод программы в память) (a) ssembler а [нач.адрес] нач.адрес указывает адрес, с которого программа располагается в памяти

Команды Debug: d Вывод на экран содержимого участка памяти(d)unp d[нач.адрес] L [число] нач.адрес указывает на первый байт сегмента памяти, который надо вывести на экран; число задает размер участка памяти, который надо просмотреть

Команды Debug: e Ввод данных в оперативную память компьютера(e)nter е[нач.адрес] [список значений] нач.адрес указывает на первый байт сегмента памяти; список значений задает вводимые значения в шестнадцатеричном виде через пробел

Команды Debug: t Выполнение одной (нескольких) команд в пошаговом режиме(t)race t=[Haч.адрес] [число] нач.адрес указывает адрес команды. число задает количество команд которые требуется выполнить

Hex: H value1 value2 Простой калькулятор для сложений и вычитаний шестнадцатеричных чисел. Можно ввести два числа, каждое не более чем по 4 цифры. Сначала debug выведет сумму этих чисел, а затем разность. Search: S range list Searches within a range of addresses for a pattern of one or more byte values given in a list. The list can be comprised of numbers or character strings enclosed by matching single or double quote marks. [ NOTE: In the examples below, if you do find the same data on your computer, the locations could easily vary from ours! ] Compare: C range address Compares two blocks of memory. If there are no differences, then DEBUG simply displays another prompt (-). Fill: F range list This command can also be used to clear a whole segment of Memory as well as filling smaller areas with a continuously repeating phrase or single byte.

Go: G [=address] [addresses] Go is used to run a program and set breakpoints in the program's code. Unassemble: U [range] Disassembles machine instructions into 8086 Assembly code. Without the optional [range], it uses Offset 100 as its starting point, disassembles about 32 bytes and then remembers the next byte it should start with if the command is used again. Input: I port Output: O port byte The use of I/O commands while running Windows9x/Me is just plain unreliable! This is especially true when trying to directly access hard disks! Under Win NT/2000/XP, the I/O commands are only an emulation; so don't trust them. Though the example below still works under Win2000/XP, it's most likely using some WinAPI code to show what's in the Windows clock area; not directly from an RTC chip.

Load: L [address] [drive] [firstsector] [number] or program! (See the N command for more on this) This command will LOAD the selected number of sectors from any disk's Logical Drive under the control of MS-DOS or Windows into Memory. The address is the location in Memory the data will be copied to (use only 4 hex digits to keep it within the memory allocated to DEBUG), the drive number is mapped as: 0=A:, 1=B:, 2=C:, etc., firstsector counts from ZERO to the largest sector in the volume and finally number specifies in hexadecimal the total number of sectors that will be copied into Memory (so a floppy disk with 0 through 2,879 sectors would be: 0 through B3F in Hex).N command Move: M range address This command should really be called: COPY (not Move) as it actually copies all the bytes from within the specified range to a new address. Name: N [pathname] [arglist] This command can be used to load files into DEBUG's Memory after you have started the program, but it's main function is to create a new file under control of the Operating System which DEBUG can WRITE data to.WRITE

Register: R [register] Entering ' r ' all by itself will display all of the 8086 register's contents and the next instruction which the IP register points to in both machine code and an unassembled (Assembly Language) form. Proceed: P [=address] [number] Proceed acts exactly the same as Debug's T (Trace) command for most types of instructions... EXCEPT: Proceed will immediately execute ALL the instructions (rather than stepping through each one) inside any Subroutine CALL, a LOOP, a REPeated string instruction or any software INTerrupts. This means that you do not have to single-step through any of the code contained in a Subroutine or INT call if you use the Proceed (P) command. This means Proceed will be the command you use most often to debug programs, and Trace will only be used to step into a Subroutine or possibly check the logic of the first few iterations of a LOOP or REP instruction.T (Trace) command Write: W [address] [drive] [firstsector] [number] The WRITE (W) command is often used to save a program to your hard disk from within DEBUG. But the only safe way to do so, especially under Windows, is by allowing the OS to decide where to physically create that file on the disk. This is done by first using the Name (N) command to set up an optional path and filename for the new file (or to overwrite one that already exists).Name (N) command