ªþ¿ý¤» SYMDEB.EXE ¨Ï¥Î¤èªk

SYMDEB.EXE ¬Oªþ¦b MASM 4.0 ªº¤@­Ó°£¿ùµ{¦¡¡AÁöµM¦W®ð¤£¦p DEBUG ¤j¡A¦ý¬O¥\¯à«o¤ñ DEBUG ±j±o¦h¡C©M DEBUG ¤ñ¸û¡ASYMDEB ªº·s¼W¥\¯à¤¤³Ì­«­n¬O¡A¯à¦b°£¿ù®ÉÅã¥Ü­ì©lµ{¦¡ªºÅܼƦW¡B¼Ð°O¦W¡K¡K¡A¤£¦A¬O«ÜÃø¬ÝÀ´ªº¦ì§}¡A©Ò¥H¦W¤§¬°¡y²Å¸¹°£¿ù¾¹¡z(symbolic debug)¡C°£¦¹¤§¥~¡A§Y¨Ï¤£¨Ï¥Î¤W­z¥\¯à¡A¥¦ÁÙ¥[±j¤F³\¦h DEBUG ©R¥O¡A¨Ò¦pÅã¥Ü IEEE ®æ¦¡¹ê¼Æ¡B¤¤Â_ÂIªº³]©wµ¥µ¥¡C

©³¤U¤p¤ì°¸´N¦p¦ó¦b°£¿ù®ÉÅã¥Ü­ì©l½Xªº²Å¸¹¦W¥H¤Î¥[±jªº«ü¥O¨Ó»¡©ú¡C


¦b°£¿ù®ÉÅã¥ÜÅܼƦW

SYMDEB ªº©Ò¿×¡y²Å¸¹¡z«üªº¬OÅܼƦW¡B¼Ð°O¦W©M°Æµ{¦¡¦W¤TºØ¡ASYMDEB ¥i¥H¦b°£¿ù¶¥¬q¥H­ì©l½X©Ò©w¸qªº¦WºÙÅã¥Ü³o¤TºØ¦WºÙ¡A¦Ó¤£¥²¦A¨Ï¥Î¦ì§}¡A¦]¦¹¤j¤jªº¼W¥[¤F¤è«K©Ê»P¥iŪ©Ê¡C¬°¤F¹F¨ì³o­Ó¥Øªº¡A¥²¶·§â³o¨Ç¦WºÙ³£¼g¶i¤@­ÓºÙ¬°¡y²Å¸¹ÀÉ¡zªºÀÉ®×ùØ¡A³o­Ó²Å¸¹Àɪº°ÆÀɦW©T©w¬O *.SYM¡A«Ø¥ßªº¤èªk¦³¨âºØ¡C

²Ä¤@ºØ¬O¤èªkªº¹Lµ{¦p¤U¡A¦@¦³¤T­Ó¨BÆJ¡G

  1. ¦b¼¶¼g­ì©lµ{¦¡®É¡A­nÅã¥Üªº²Å¸¹¥²¶·«Å§i¬°¡ypublic¡z¡C
  2. ³sµ²®É¥[¤W¡y/MAP¡z°Ñ¼Æ¡A»s³y¥X *.MAP ÀÉ¡C
  3. ¥Î MASM 4.0 ©Òªþªº¥t¤@­Ó¤½¥Îµ{¦¡¡AMAPSYM.EXE¡A±q *.MAP ÀÉ»s³y *.SYM ÀÉ¡C(µù¤@)

¤p¤ì°¸Á|­Ó¨Ò¤l§a¡A´N¥H²Ä 22 ³¹ªº FPU2.ASM ¬°¨Ò¤l¡C­º¥ý±oµyµy­×§ï§â­n¦b°£¿ù¶¥¬qªº²Å¸¹«Å§i¦¨¡ypublic¡z¡G

;***************************************
code    segment
        assume  cs:code,ds:code
        org     100h
        public  n1,n2,begin
;---------------------------------------
start:  jmp     short begin
n1      dd      10.25
n2      dd      2.33
sum     dd      ?
begin:  finit           ;  st   ; st(1)
        fld     n1      ; 10.25 ;
        fld     n2      ;  2.33 ; 10.25
        fadd            ; 12.58
        fstp    sum
        int     20h
;---------------------------------------
code    ends
;***************************************
        end     start

±µ¤U¨Ó·Ó¤U­±¤èªk»s³y¥X FPU2.SYM ¤Î¥i°õ¦æÀÉ FPU2.COM¡G

H:\HomePage\SOURCE>path e:\asm;%path% [Enter] ¡÷³]©w¸ô®|

H:\HomePage\SOURCE>masm fpu2; [Enter]
Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987.  All rights reserved.


  51590 + 365354 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors

H:\HomePage\SOURCE>link fpu2 [Enter]

Microsoft (R) Personal Computer Linker  Version 2.40
Copyright (C) Microsoft Corp 1983, 1984, 1985.  All rights reserved.

Run File [FPU2.EXE]: [Enter]
List File [NUL.MAP]: fpu2 /map [Enter]  ¡÷ »s³y MAP ÀÉ
Libraries [.LIB]: [Enter]
Warning: no stack segment

H:\HomePage\SOURCE>exe2bin fpu2 fpu2.com [Enter]

H:\HomePage\SOURCE>mapsym fpu2 [Enter]  ¡÷ »s³y SYM ÀÉ
Microsoft (R) Symbol File Generator  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

        Program entry point at 0000:0100  ¡÷¤£Åã¥Ü²Å¸¹¦W

H:\HomePage\SOURCE>

¨ì¦¹¡A¤w¸g§â©Ò¦³°£¿ù¥²³ÆªºÀɮסAFPU2.COM ¥H¤Î FPU2.SYM¡A³£»s³y¦n¤F¡A±µ¤U¨Ó´N­n¨Ï SYMDEB ¸ü¤J²Å¸¹ÀɤΥi°õ¦æÀÉ¡A¤èªk¦p¤U¡G(µù¤G)

H:\HomePage\SOURCE>symdeb fpu2.sym fpu2.com [Enter]   ¡÷¥ý¸ü¤J²Å¸¹ÀɦA¸ü¤J¥i°õ¦æÀÉ
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-u [Enter]
2205:0100 EB0C           JMP    BEGIN   ¡÷Åã¥Ü¼Ð°O¦W
CODE:N1:   ¡÷Åã¥ÜÅܼƦW
2205:0102 0000           ADD    [BX+SI],AL
2205:0104 2441           AND    AL,41                         ;'A'
CODE:N2:   ¡÷Åã¥ÜÅܼƦW
2205:0106 B81E15         MOV    AX,151E
2205:0109 40             INC    AX
2205:010A 0000           ADD    [BX+SI],AL
-t [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=2205  ES=2205  SS=2205  CS=2205  IP=010E   NV UP EI PL NZ NA PO NC
CODE:BEGIN:  ¡÷Åã¥Ü°Ï¬q¦W¤Î¼Ð°O¦W
2205:010E 9B             WAIT
-t [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=2205  ES=2205  SS=2205  CS=2205  IP=010F   NV UP EI PL NZ NA PO NC
2205:010F DBE3           FINIT
-t [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=2205  ES=2205  SS=2205  CS=2205  IP=0111   NV UP EI PL NZ NA PO NC
2205:0111 9B             WAIT
-t [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=2205  ES=2205  SS=2205  CS=2205  IP=0112   NV UP EI PL NZ NA PO NC
2205:0112 D9060201       FLD    DWord Ptr [N1]                 DS:0102=0000
-ds n1 [Enter] ¡÷¤]¥i¥HÅܼƦW¿é¤J
2205:0102  00 00 24 41  +0.1025E+2

²Ä¤GºØ¤èªk¬O²ÕĶ®É¡A¥[¤W¡y/ZD¡z©Î¡y/ZI¡z°Ñ¼Æ¡A±j­¢ MASM 5.0 §â©Ò¦³²Å¸¹¸ê®Æ¦s¤J¥ØªºÀɤ¤¡A³sµ²®É¤]±o¥H¡y/MAP¡z°Ñ¼Æ³y¥X *.MAP ÀÉ¡A°£¿ù®É¤@¦p«e­±¡C

©³¤U¤¶²Ð SYMDEB ªº«ü¥O¡C


SYMDEB ªº«ü¥O

¦b¤¶²Ð SYMDEB ªº«ü¥O«e¡A¥ý»¡©ú SYMDEB ªº¤@¯ë³W«h¡C­º¥ý¡ASYMDEB ¬O¤£¤À¤j¤p¼gªº¡A´«¥y¸Ü»¡¡ASYMDEB ¤¤¤j¼g©M¤p¼g¬O¤@¼Ëªº¡A¦Ó¥B¼Æ­È¥u¯à¥H¤Q¤»¶i¦ì¿é¤J©Î¿é¥X¡A³o¨âÂI©M DEBUG ¬Û¦P¡C

²Ä¤G¡A¦b SYMDEB ùØ¡A¦ì§}ªºªí¥Üªk¬O¥H XXXX:YYYY ªº¤è¦¡ªí¥Ü¡A¦Ó°Ï¬q¦³®É¥i¥H¬Ù²¤¡A¬Ù²¤®É³q±` SYMDEB ·|¥H DS ¬°¤º©w­È¡A¦ý¬O¦pªG¬O©Mµ{¦¡½X¦³Ãöªº«ü¥O¡A¨Ò¦p A «ü¥O¡BU «ü¥Oµ¥·|¥H CS ¬°¤º©w­È¡C°Ï¬q¦ì§}»P°¾²¾¦ì§}¡A³£¥i¥H¥Î²Å¸¹¦W¥N´À¡C

²Ä¤T¡A¦³®É­n«ü©w½d³ò®É¡A¨Ò¦p¥Î D «ü¥O¨Ï¬Y¤@­Ó°O¾ÐÅé½d³òªº¸ê®ÆÅã¥Ü¦b¿Ã¹õ¤W®É¡A¥i¥H¥Î¨âºØ¤èªkªí¥Ü¡A²Ä¤@ºØ¬O¥H¡y°_©l¦ì§} µ²§ô¦ì§}¡zªí¥Ü¡A²Ä¤GºØ¬O¥H¡y°_©l¦ì§} Lªø«×¡zªí¥Ü¡C¨Ò¦p¡G

DS:0100 1FF
0000:400 LA0

SYMDEB ªº«ü¥O¦@¦³ 33 ­Ó¡A¨ä¤¤¦³¨Ç»P DEBUG §¹¥þ¬Û¦P¡A§Ú¦b¤Uªíªº DEBUG Ä椺¼Ð¥Ü¡y¦P¡z¡Q¦³¨Ç¬O·s¼Wªº¡A§Ú¼Ð¥Ü¬°¡y·s¡z¡Q¦³¨Ç¬O DEBUG ùؤ]¦³¦ý¬O SYMDEB ùØ¥[±j¤F¦¹«ü¥Oªº¥\¯à¡A§Ú¼Ð¥Ü¬°¡y+¡z¡C¤Uªí´N¬O SYMDEB ªº§¹¾ã«ü¥O¦Cªí¡G

«ü¥O¦W¥\¯à »P DEBUG
¤ñ¸û
A(assemble) ¿é¤J²Õ¦X»y¨¥µ{¦¡ +
B(break) ¤¤Â_ÂI«ü¥O¸s ·s
C(compare) ¤ñ¸û¨â¬q°O¾ÐÅ餺®e ·s
D(dump) ¶É¦L°O¾ÐÅ餺®e +
E(enter) ¿é¤J¸ê®Æ+
F(fill) ¶ñ¤J¸ê®Æ¦P
G(go) °õ¦æµ{¦¡¦P
H(hex) ¨D¨â¤Q¤»¶i¦ì¼Æ¤§©M»P®t ¦P
I(input) ¥Ñ©PÃä¿é¤J¦P
K(stack trace) °lÂÜ°ïÅ| ·s
L(load) ¸ü¤JÀÉ®×©ÎºÏ°Ï ¦P
M(move) ²¾°Ê¸ê®Æ¦P
N(name) ¿é¤J FCB ÀɦW ¦P
O(output) ©PÃä¿é¥X¦P
P(proc trace) §â°Æµ{¦¡©Î¤¤Â_¬°³æ¦ìªº°lÂÜ ·s
Q(quit) µ²§ô SYMDEB.EXE ¦P
R(register) Åã¥Ü¼È¦s¾¹¼Æ­È ¦P
S(search) ·j´M¸ê®Æ +
T(trace) ³æ¨B°lÂÜ+
U(unassemble) ¤Ï²ÕĶ+
V(view) Åã¥Ü­ì©l«ü¥O ·s
W(write) ¼g¤JºÏ¤ù¦P
X(exam symbol map) À˵ø²Å¸¹ÀÉ ·s
XO(open symbol map) ¶}±Ò·sªº²Å¸¹ÀÉ ·s
Z(set symbol value) ³]©w²Å¸¹¦ì§} ·s
?(help) ½u¤W»¡©ú ·s
!(shell) °õ¦æ DOS «ü¥O ·s
.(current line) Åã¥Ü¥Ø«eªº­ì©l«ü¥O ·s
<{ ¿é¤JÂà¦V ·s
>} ¿é¥XÂà¦V ·s
=~ ¿é¥X¤JÂà¦V ·s
* ¥[µù¸Ñ ·s

Assemble¡G¼g x86/x87 «ü¥O

A «ü¥O©M DEBUG ´X¥G¬Û¦P¡A¦ý¬O¥i¥H¨Ï¥Î 8087¡B80286¡B80287 «ü¥O¡A¦ý¤£¯à¨Ï¥Î 80286 «OÅ@¼Ò¦¡«ü¥O¡A¤]¤£¤ä´© MMX «ü¥O¡C°Ñ¦Ò²Ä¤T³¹¡C

Break Point¡G¤¤Â_ÂI«ü¥O¸s

³o­Ó«ü¥O¥]§t¤­­Ó¤l«ü¥O¡ABP¡BBC¡BBD¡BBE¡BBL¡C

BP «ü¥O¥i¥H¦b¬Y­Ó¦ì§}¡B¼Ð°O³]©w¤¤Â_ÂI¡A·í SYMDEB °õ¦æ¨ì³o­Ó¤¤Â_ÂI®É·|°±¤U¨Ó¡AÅã¥Ü©Ò¦³¼È¦s¾¹¡BºX¼Ð¡A¤¤Â_ÂIªº³]©w¥²¶·¬O«ü¥Oªº°_©l¦ì§}¤~¦³®Ä¡A³]©w«á°£«D¬O²M°£¡A§_«h³£·|¤@ª½«O«ù¡C³o­Ó¥\¯à¹ï©ó°lÂܤÀªK«Ü¦³¥Î¡CBP «ü¥Oªº¨Ï¥Î¤èªk¦p¤U¡G

BP[n] ADDRESS [¦¸¼Æ] ["COMMAND"]

n ªí¥Ü¤¤Â_ÂI¸¹½X¡A¥i¥H±q 0 ¨ì 9 ¦@¤Q­Ó¸¹½X¡ASYMDEB ¥i¥H³]©w 10 ­Ó¤¤Â_ÂI¡A±z¥i¥H«ü©w¸¹½X¡A¤]¥i¥H¤£«ü©w¡A¦pªG¤£«ü©wªº¸Ü´N¥Ñ SYMDEB ¥Ñ 0 ¶}©l¨Ì¦¸¥[¤W¥h¡A¦pªG«ü©w¸¹½Xªº¸Ü¡A¸¹½X©M¡yBP¡z¤§¶¡¤£¥i¥H¦³ªÅ®æ¡CADDRESS ªí¥Ü©Ò³]©wªº¤¤Â_ÂI¦ì§}¡A¤]¥i¥Î¼Ð°Oªí¥Ü¡C¦¸¼Æ¬O«ü¸Ó¤¤Â_ÂI¤£¥ß§Y¥Í®Ä¡A¥²¶·°õ¦æ¹L©Ò«ü©wªº¦¸¼Æ¤§«á¤~¥Í®Ä¡A³o­Ó¤èªk¦b°»´ú°j°é®É¯S§O¦³¥Î¡CCOMMAND ¬O«ü·í°õ¦æ¨ì¤¤Â_ÂI®É¡A¤£¶È°±¤î°õ¦æÅã¥Ü¼È¦s¾¹¥~¡AÁÙ­n°õ¦æ¡y"¡z¤§¶¡ªº SYMDEB «ü¥O¡A¦pªG«áÄò­n°õ¦æªº«ü¥O¤£¥u¤@­Ó¡A¥i¥Î¡y;¡z¤À¶}¡C

BC ¬O¥Î¨Ó²M°£¤¤Â_ÂI¡A¨ä«ü¥O®æ¦¡¬O

BC n

·í«ü©w n ®Éªí¥Ü²M°£¨º¤@­Ó¤¤Â_ÂI¸¹½X¡A¦pªG n ¬°¡y*¡zªí¥Ü²M°£©Ò¦³ªº¤¤Â_ÂI¡C·í¤¤Â_ÂI³Q²M°£«á¡ASYMDEB °õ¦æ¨ì¦¹³B´N¤£·|°±¤U¨Ó¤F¡C

BD ¬O¥Î¨Ó¼È®É¨Ï¤¤Â_ÂI¥¢¥h¥\¯à¡A¦ý¤£¬O¯u¥¿²M°£¡A¥i¥H¥Î BE ¨Ó¨Ï¥¦«ì´_¥\¯à¡ABD¡BBE ªº¨Ï¥Î®æ¦¡©M BC ¬Û¦P¡C( D ©M E ¨ä¹ê¤À§O¬O disable ©M enable ¤§·N )

BL ¬O§â©Ò¦³ªº¤¤Â_ÂI¦C¥X¨Ó¡A²Ä¤@Äæ¬O¤¤Â_ÂI¸¹½X¡A²Ä¤GÄæ¬O¬O§_¥¢¥h¥\¯à©Î¥¿±`(¥Í¥h¥\¯à«hÅã¥Ü¡yd¡z¡Q¥¿±`«hÅã¥Ü¡ye¡z)¡A²Ä¤TÄæ¬O¤¤Â_ÂI¦ì§}¡A²Ä¥|Äæ¬O¸Ó¤¤Â_ÂI¦ì§}ªº¼Ð°O¦W¡A²Ä¤­Äæ¬OÁÙ­n³q¹L´X¦¸¤~¥Í®Ä¡A²Ä¤»Äæ¬O³Ìªì³]©w®Éªº¥i³q¦æ¦¸¼Æ¡A²Ä¤CÄæ¬O¤¤Â_ÂI¤¤Â_«áªº«áÄ~°Ê§@¡C©³¤U¬Ý¬Ý¤@¨Ç¨Ò¤l¡G

h:\homepage\source>e:symdeb fpu2.sym fpu2.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-u begin 123 [Enter] ¡÷¥ýÆ[¹îµ{¦¡½X
CODE:BEGIN:
211C:010E 9B             WAIT
211C:010F DBE3           FINIT
211C:0111 9B             WAIT
211C:0112 D9060201       FLD    DWord Ptr [N1]
211C:0116 9B             WAIT
211C:0117 D9060601       FLD    DWord Ptr [N2]
211C:011B 9B             WAIT
211C:011C DEC1           FADDP  ST(1),ST
211C:011E 9B             WAIT
211C:011F D91E0A01       FSTP   DWord Ptr [N2+04 (010A)]
211C:0123 CD20           INT    20
-bp 117 [Enter] ¡÷©ó CS:0117 ³B¡A³]©w 0 ¸¹¤¤Â_ÂI
-bp 11C 5 [Enter] ¡÷©ó CS:011C ³B¡A³]©w 1 ¸¹¤¤Â_ÂI¡A¦ý²Ä 6 ¦¸³q¹L®É¤~¥Í®Ä
-bp4 11e [Enter] ¡÷©ó CS:011E ³B¡A³]©w 4 ¸¹¤¤Â_ÂI
-bl [Enter] ¡÷¦C¥X©Ò¦³¤¤Â_ÂI
0 e 211C:0117 [CODE:BEGIN+09 (0117)]
1 e 211C:011C [CODE:BEGIN+0E (011C)] 0005 (0005)
4 e 211C:011E [CODE:BEGIN+10 (011E)]
-g [Enter] ¡÷°õ¦æ
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=211C  ES=211C  SS=211C  CS=211C  IP=0117   NV UP EI PL NZ NA PO NC
211C:0117 D9060601       FLD    DWord Ptr [N2]            ;BR0 DS:0106=1EB8
¡÷µ²ªG¨ì 0 ¸¹¤¤Â_ÂI´N°±¤U¨Ó¤F
-bc 4 [Enter] ¡÷²M°£ 4 ¸¹¤¤Â_ÂI
-g [Enter] ¡÷°õ¦æ

Program terminated normally (0) ¡÷¦] 4 ¸¹¤¤Â_ÂI¤w²M°£¡A¦Ó 1 ¸¹¤¤Â_ÂI¥²¶·³q¹L 5 ¦¸
                                      ¤~¥Í®Ä¡A©Ò¥H¹J¤£¨ì¦³®Äªº¤¤Â_ÂI¡A°õ¦æ¨ìµ{¦¡µ²§ô

Compare¡G¤ñ¸û°O¾ÐÅ餺®e

C «ü¥O¬O¥Î¨Ó¤ñ¸û¨â¬q°O¾ÐÅ骺¤º®e¡A¨ä»yªk¬O¡G

C ²Ä¤@­Ó°O¾ÐÅé°_©l¦ì§} Lªø«× ²Ä¤G­Ó°O¾ÐÅé°_©l¦ì§}

°O¾ÐÅé°_©l¦ì§}¥i¥H¥Î XXXX:YYYY ªº¤è¦¡ªí¥Ü¡A¤]¥i¥H¥Î¬q¼È¦s¾¹ªí¥Ü XXXX¡A¦pªG¬Ù²¤ XXXX «h¤º©w°Ï¬q¬O DS ©Ò«üªº°Ï¬q¡C¥²¸ûµ²ªG¬O¥H

²Ä¤@­Ó¦ì§}  ¼Æ­È1  ¼Æ­È2  ²Ä¤G­Ó¦ì§}

ªº¤è¦¡ªí¥Ü¡A¼Æ­È 1 ¬O²Ä¤@­Ó¦ì§}ªº¼Æ­È¡A¼Æ­È 2 ¬O²Ä¤G­Ó¦ì§}ªº¼Æ­È¡A¤ñ¸û«á SYMDEB ¥u§â¤£¦Pªº¼Æ­ÈÅã¥Ü¦b¿Ã¥ú¹õ¤W¡C°Ñ¦Ò¥H¤U¨Ò¤l¡G

-c 100 L10 200 [Enter]
211C:0100  EB  00  211C:0200
211C:0101  0C  00  211C:0201
211C:0104  24  00  211C:0204
211C:0105  41  00  211C:0205
211C:0106  B8  00  211C:0206
211C:0107  1E  00  211C:0207
211C:0108  15  00  211C:0208
211C:0109  40  00  211C:0209
211C:010E  9B  00  211C:020E
211C:010F  DB  00  211C:020F

³o­Ó¨Ò¤l¬O¤ñ¸û DS:0100 ¶}©lªº 10 ­Ó¦ì¤¸²Õ©M DS:0200 ¶}©lªº 10 ­Ó¦ì¤¸²Õ¡A·íµM¥²¶·¬Û¦Pªø«×¤~¤ñ¸û¡A©Ò¥H²Ä¤G­Ó¦ì§}ªº½d³ò¤£¶·«ü©w¡C¤ñ¸ûµ²ªG DS:0100 ¼Æ­È¬O EB¡A¦Ó DS:0200 ¬O 00¡A¤£¦P¤~¦C¥X¡A¦Ó DS:0102¡ADS:0103 ©M DS:0202¡ADS:0203 ¬Û¦P©Ò¥H¨S¦C¥X¨Ó¡C

Dump¡G¦L¥X°O¾ÐÅ餧¤º®e

D «ü¥O¥i¥H§â°O¾ÐÅ餺®e¥H ASCII ¦r¦ê¡B¦ì¤¸²Õ¡B¦r²Õ¡BÂù¦r²Õ¡Bµu¹ê¼Æ¡Bªø¹ê¼Æ¡B¼È®É¹ê¼Æªº¸ê®Æ§ÎºA³¼¦L©ó¿Ã¹õ¤W¡C¨ä»yªk¬O

Dx °_©l¦ì§} µ²§ô¦ì§}
Dx °_©l¦ì§} Lªø«×

¨ä¤¤ x ¬O©Ò¿ï¾Üªº¸ê®Æ§ÎºA¡Ax ¥i¥H¬O A¡BB¡BW¡BD¡BS¡BL¡BT¡A¤À§Oªí¥Ü ASCII ¦r¦ê¡B¦ì¤¸²Õ¡B¦r²Õ¡BÂù¦r²Õ¡Bµu¹ê¼Æ¡Bªø¹ê¼Æ¡B¼È®É¹ê¼Æµ¥¤CºØ¸ê®Æ§ÎºA¡C¤]¥i¥H¤£«ü©w¸ê®Æ§ÎºA¡A´N¬O¨Ï x ªÅ¥Õ¡A³o®É SYMDEB ´N¥H¤W¦¸ªº¸ê®Æ§ÎºA¤è¦¡Åã¥Ü©ó¿Ã¹õ¡A¦pªG¬O²Ä¤@¦¸¡A´N¥H¦ì¤¸²Õªº¤è¦¡¦L¥X¨Ó¡C

¤]¥i¥H¬Ù²¤µ²§ô¦ì§}©Î¡yLªø«×¡z¡A³o®É SYMDEB ·|¦Û°Ê¦L¥X 128 ­Ó¦ì¤¸²Õ¸êªø«×´N°±¤î¡A¦pªG¬O¥H¹ê¼Æ§ÎºA¦C¦L¡A«h¥u¦L¥X¤@­Ó¹ê¼Æªø«×¡C¥H¤U¬O¹ê¨Ò¡G

h:\homepage\source>e:symdeb fpu2.sym fpu2.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-da 100 L10 [Enter]
211C:0100  k...$A8..@.....[
-db n1 l4 [Enter]
211C:0100        00 00 24 41                                  ..$A
-dw begin L10 [Enter]
211C:010E  DB9B 9BE3 06D9 0102 D99B 0606 9B01 C1DE
211C:011E  D99B 0A1E CD01 2620 1501 F8E2 EB58 07E7
-dd n1 L2 [Enter]
211C:0102  4124:0000 4015:1EB8
-ds n1 L2 [Enter]
211C:0102  00 00 24 41  +0.1025E+2
211C:0106  B8 1E 15 40  +0.2329999923706055E+1
-dl n1 [Enter]
211C:0102  00 00 24 41 B8 1E 15 40  +0.5279999749967828E+1
-dt 102 [Enter]
211C:0102  00 00 24 41 B8 1E 15 40 00 00  +0.0E+0

Enter¡G¿é¤J¸ê®Æ¨ì°O¾ÐÅ餺

¥i¥H¿é¤J ASCII ¦r¦ê¡B¦ì¤¸²Õ¡B¦r²Õ¡BÂù¦r²Õ¡Bµu¹ê¼Æ¡Bªø¹ê¼Æ¡B¼È®É¹ê¼Æµ¥¤CºØ¸ê®Æ§ÎºA¡A«ü©w¤è¦¡¦p¦P D «ü¥O¡A¤À§O¬O EA¡BEB¡BEW¡BED¡BES¡BEL¡BET¡A¨ä»yªk®æ¦¡¬°

Ex ¦ì§} [¸ê®Æ]

x ªí¥Ü¿é¤Jªº¸ê®Æ§ÎºA¡A¬Ù²¤®Éªu¥Î¤W¤@¦¸ªº¸ê®Æ§ÎºA¡C¦ì§}¥i¥Î¼Ð°O¦W¡A¤]¥i«ü©w°Ï¬q¡A©Î¨Ï¥Î°Ï¬q¼È¦s¾¹¡C¦pªG«ü©w¸ê®Æ¡A«h´N¥u¯à¿é¤J¸Óµ§¸ê®Æ¡Q¦pªG¤£«ü©w¸ê®Æ¡A¥i¥H³sÄò¿é¤J¼Æµ§¸ê®Æ¡A¨C¦¸¿é¤J¸ê®Æ®É¡ASYMDEB ·|±N°O¾ÐÅé­ì¦³ªº¤º®eÅã¥Ü¥X¨Ó¡A¦Aµ¥«Ý±z¿é¤J¡C­nª`·Nªº¬O¦b EB ¿é¤J§¹¸ê®Æ«á¡AÁÙ­n¿é¤J¤U¤@µ§­n«öªÅ¥ÕÁä¤~¯à¦A¿é¤J¨ä¥L¸ê®Æ¡A¨ä¥L«ü¥O«h«ö Enter Áä¡C°²¦p­n°±¤î¿é¤J¡A¦b SYMDEB Åã¥Ü­ì¦³¤º®e®É¡A¤£¿é¤J¥ô¦ó¸ê®Æª½±µ«ö Enter Áä¡A´N¯à°±¤î¿é¤J¡C½Ð¬Ý¨Ò¤l¡G

-eb 100 [Enter]
2104:0100  00.ff   00.fe   00.[Enter]
-eb 108 3 [Enter]
-ea 110 "Happy" [Enter]
-ew 120 [Enter]
2104:0120  0000.aa00 [Enter]
2104:0122  0000.3344 [Enter]
2104:0124  0000.[Enter]
-ew 128 ffee [Enter]
2104:012A  0000.abcd [Enter]
2104:012C  0000.[Enter]
-es 130 [Enter]
2104:0130  +0.9181027278563336E-40       100E3 [Enter]
2104:0134  +0.0E+0                       1.234 [Enter]
2104:0138  +0.0E+0[Enter]
-el 140 9876.54321 [Enter]
-et 150 9876.54321 [Enter]
-db 100 15f [Enter]
2104:0100  FF FE 00 00 00 00 00 00-03 00 00 00 00 00 00 00  .~..............
2104:0110  48 61 70 70 79 00 00 00-00 00 00 00 00 00 00 00  Happy...........
2104:0120  00 AA 44 33 00 00 00 00-EE FF CD AB 00 00 00 00  .*D3....n.M+....
2104:0130  00 50 C3 47 B6 F3 9D 3F-00 00 00 00 00 00 00 00  .PCG6s.?........
2104:0140  6E C0 E7 87 45 4A C3 40-00 00 00 00 00 00 00 00  n@g.EJC@........
2104:0150  CE 70 03 3E 3F 2C 52 9A-0C 40 00 00 00 00 00 00  Np.>?,R..@......

Fill¡G¶ñ¤J¸ê®Æ

³o­Ó«ü¥O¬O¥Î¨Ó§â¸ê®Æ¶ñ¤J¤@¶ô°O¾ÐÅ餺¡C¥¦¥u¯à¥Î¦ì¤¸²Õªº¸ê®Æ§ÎºA¶ñ¤J¡A¨Ï¥Î¤èªk¬O

F °_©l¦ì§} Lªø«× ¸ê®Æ
F °_©l¦ì§} µ²§ô¦ì§} ¸ê®Æ

½Ð¬Ý¨Ò¤l

-f 100 L6 dd [Enter]
-f 110 118 cc [Enter]
-db 100 L20 [Enter]
2104:0100  DD DD DD DD DD DD 00 00-00 00 00 00 00 00 00 00  ]]]]]]..........
2104:0110  CC CC CC CC CC CC CC CC-CC 00 00 00 00 00 00 00  LLLLLLLLL.......

Go¡G°õ¦æ

G «ü¥O¬O¥Î¨Ó°õ¦æ©Ò°£¿ùªºµ{¦¡¡A¨ä»yªk¬O¡G

G[=°_©l¦ì§}] [¤¤Â_ÂI¦ì§}1] [¤¤Â_ÂI¦ì§}2]¡K¡K

°_©l¦ì§}¬O G «ü¥O¶}©l°õ¦æªº¦ì§}¡A¥²¶·³]¦b¬Y¤@±ø«ü¥Oªº¶}©l³B¡A§_«h«Ü®e©ö·í¾÷¡A¤]¥i¥H¥Î¼Ð°O¦W¥N´À°_©l¦ì§}¡A¦pªG¨S¦³³]©w¡A¨º SYMDEB ·|±q CS:IP ©Ò«üªº¦ì§}¶}©l°õ¦æ¡C¨Æ¹ê¤W¡A·í SYMDEB ¸ü¤J­n°»¿ùªºµ{¦¡®É¡A·|¦Û°Êªº§â CS:IP «ü¦V¸Óµ{¦¡ªº¶i¤JÂI¡A©Ò¥H±`±`¬Ù²¤°_©l¦ì§}¡C

¤¤Â_ÂI¦ì§}¬O«ü G «ü¥O°õ¦æ¨ì³o¨Ç¦ì§}¡A´N·|°±¤U¨Ó¡AÅã¥Ü¼È¦s¾¹¤ÎºX¼Ð­È¡A³Ì¦h¥i¥H³]©w¤Q­Ó¤¤Â_ÂI¡A¦ý¬O G «ü¥O§¹¦¨«á¡A³o¨Ç¤¤Â_ÂI´N³Q²M°£¤F¡A³oÂI©M BP «ü¥O©Ò³]©wªº¤¤Â_ÂI¤£¦P¡C¤¤Â_ÂIªº³]©w¹ï°»´úµ{¦¡ªº¤À¤ä«Ü¦³¥Î¡C¦pªG¤£³]©w¤¤Â_ÂI¡A¨ºµ{¦¡´N·|¤@ª½°õ¦æ¨ìµ{¦¡µ²§ô¡C

SYMDEB ¤§©Ò¥H¯à¤¤Â_°õ¦æªº­ì¦]¬O¡A¥¦·|°½°½¦a§â¤¤Â_ÂI©Ò¦bªº¦ì§}´«¦¨¤¤Â_ CCH¡AµM«á¦b³]©w INT CCH °Æµ{¦¡¡A©Ò¥H·í¦¨¬O°õ¦æ¨ì¤¤Â_ÂI®É¡A¹ê»Ú¤W¬O³QÂà¦V¨ì¤¤Â_ CCH¡C¦Ó¤¤Â_ CCH ÅãµM¬O¦L¥X¦U¼È¦s¾¹¤ÎºX¼Ð¤§­È¡C¨Ò¦p¡G

H:\HomePage\SOURCE>symdeb fpu2.sym fpu2.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-g=begin 117 [Enter] ¡÷¥Ñ BEGIN ¶}©l°õ¦æ¨ì¦ì§} CS:0117
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=1422  ES=1422  SS=1422  CS=1422  IP=0117   NV UP EI PL NZ NA PO NC
1422:0117 D9060601       FLD    DWord Ptr [N2]                 DS:0106=1EB8
 ¡÷ °õ¦æ¨ì CS:0117 ¤¤Â_¤F

Hex¡G­pºâ¨â¼Æ¤§©M»P®t

¦¹«ü¥O¥u¯à¥H¤Q¤»¶i¦ìªí¥Ü¡A»yªk¬O

H ¼Æ­È1 ¼Æ­È2

¨ä´îªk¬O¼Æ­È 1 ´î¼Æ­È 2¡A¨Ò¦p¡G

-h 100 300 [Enter]
0400  FE00

Input¡GÅã¥Ü¿é¤J°ð

Stack Trace¡GÅã¥Ü°ïÅ|¤º®e

Load¡G¸ü¤JÀɮשκϰϨì°O¾ÐÅéùØ

¦pªG­n¸ü¤JºÏ°Ï¡A¨ä»yªk¬O¡G

L ¸ü¤J¦ì§} ºÏºÐ¾÷¦W °_©lºÏ°Ï ºÏ°Ï¼Æ

¦pªG­n¸ü¤JÀɮסA¥²¶·¥ý¥Î N «ü¥O©R¦W¡AµM«áª½±µ¿é¤J

L

§Y¥i¡C

Move¡G·h²¾°O¾ÐÅé¸ê®Æ

»yªk¬O¡G

M °_©l¦ì§} Lªø«× ¥Øªº¦ì§}
M °_©l¦ì§} µ²§ô¦ì§} ¥Øªº¦ì§}

­n·h²¾ªº°O¾ÐÅé½d³ò¡A¥i¥H¥Î¨âºØ¤è¦¡ªí¥Ü¡C²Ä¤@ºØ¥Ñ°_©l¦ì§}·h²¾¥H¡yL¡z«ü©wªºªø«×¨ì¥Øªº¦ì§}¡A¦¹ªø«×¬O¥H¦ì¤¸²Õ¬°³æ¦ì¡C²Ä¤GºØ¬O¥Ñ°_©l¦ì§}¨ìµ²§ô¦ì§}·h²¾¨ì¥Øªº¦ì§}¡C¤£ºÞ¨º¤@ºØ¤è¦¡¡A·h²¾«á´©¨Óªº°O¾ÐÅ餺®e¤£ÅÜ¡C¨Ò¦p¡G

-d 100 l10 [Enter]
1422:0100  EB 0C 00 00 24 41 B8 1E-15 40 00 00 00 00 9B DB  k...$A8..@.....[
¡÷Æ[¹î­n·h²¾¦ì§}¤§¤º®e
-d 200 l10 [Enter]
1422:0200  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
¡÷Æ[¹î¥Øªº¦ì§}¤§¤º®e
-m 100 l5 200 [Enter]  ¡÷¥Hªø«×¤è¦¡·h²¾
-m 10a 10f 20a [Enter]  ¡÷¥H°_©l¨ìµ²§ô¤è¦¡·h²¾
-d 200 l10 [Enter]
1422:0200  EB 0C 00 00 24 00 00 00-00 00 00 00 00 00 9B DB  k...$..........[
¡÷Æ[¹î·h²¾«á¤§¤º®e

Name¡G³]©wÀɦW

¨ä»yªk¬O

N ¸ô®|¦W\ÀɦW

Output¡G±N¸ê®Æ¿é¥X¦Ü¬Y¤@ IO °ð

Proc Trace¡G§â°Æµ{¦¡·í¦¨¤@­Ó«ü¥O

P «ü¥O©M T «ü¥O¬Û¦P¡A¥Î¨Ó°lÂܵ{¦¡¤§°õ¦æ¡A¨ä¤¤ªº®t§O¦b P «ü¥O¦pªG¹J¨ì CALL ©Î¬O INT «ü¥O¡A«hª½±µ°õ¦æ¥þ³¡ªº°Æµ{¦¡©Î¤¤Â_¸Ì­±ªº«ü¥O¦Ó¨ì¤U¤@­Ó«ü¥O¡F¦ý¬O T «ü¥O«h¬O¤@¨B¤@¨Bªº°lÂÜ¡C³o¼Ëªº¦n³B¬O¡A°Æµ{¦¡©Î¤¤Â_ªA°Èµ{¦¡À³¸Ó¤£·|¥X¿ù¡A©Ò¥H¥i¥H¤£¥Î°lÂÜ¡A²¤Æ°lÂܹLµ{¡CP «ü¥Oªº§¹¾ã¥Îªk¬O¡G

P[=°_©l¦ì§}] [«ü¥O­Ó¼Æ]

¦pªG¬Ù²¤°_©l¦ì§}¡A«h¥Ñ²{¦b CS:IP ³B¶}©l°õ¦æ¡A¦pªG¬Ù²¤«ü¥O­Ó¼Æ¡A«ü°õ¦æ¤@­Ó«ü¥O¡C

Quit¡Gµ²§ô SYMDEB

¥Îªk¬O¡G

Q

¨S¦³¨ä¥L°Ñ¼Æ¡C

Register¡GÅã¥Ü©Î§ó§ï¼È¦s¾¹¤§­È

¥Îªk¬O¡G

R [¼È¦s¾¹ [¼Æ­È]]

¦pªG¬Ù²¤¼È¦s¾¹¡A¨º SYMDEB ·|§â©Ò¦³¼È¦s¾¹¥H¤ÎºX¼Ð¤§­ÈÅã¥Ü¥X¨Ó¡A¦pªG¤£¬Ù²¤¼È¦s¾¹¡A¨º SYMDEB ·|Åã¥Ü¸Ó¼È¦s¾¹ªº¼Æ­È¡A¨Ã¥H«_¸¹´£¥Ü±z¿é¤J·sªº¼Æ­È§ó´«­ì¼È¦s¾¹¼Æ­È¡A¦pªG¼Æ­È¤]¤£¬Ù²¤¡ASYMDEB ¤£·|¥X²{´£¥Ü¡Aª½±µ­×§ï¦¨¸Ó¼Æ­È¡C

-r [Enter]
AX=0000  BX=0000  CX=0000  DX=0000  SP=EAE5  BP=0000  SI=0000  DI=0000
DS=140A  ES=140A  SS=140A  CS=140A  IP=0100   NV UP EI PL NZ NA PO NC
140A:0100 01D8           ADD    AX,BX
-r ax 400 [Enter]
-r bx [Enter]
BX 0000
:800 [Enter]
-r [Enter]
AX=0400  BX=0800  CX=0000  DX=0000  SP=EAE5  BP=0000  SI=0000  DI=0000
DS=140A  ES=140A  SS=140A  CS=140A  IP=0100   NV UP EI PL NZ NA PO NC
140A:0100 01D8           ADD    AX,BX

Search¡G·j´M

¦b«ü©wªº°O¾ÐÅé½d³ò·j´M¦r¦ê©Î¼Æ¦r¦C¡A¥Îªk¬O¡G

S °_©l¦ì§} µ²§ô¦ì§} ¦r¦ê©Î¼Æ¦C
S °_©l¦ì§} Lªø«× ¦r¦ê©Î¼Æ¦C

°_©l¦ì§}¥i¥H¥Î¼Ð°O©Î XXXX:YYYY ªí¥Ü¡A¥ç¥i¥Î°¾²¾¦ì§}ªí¥Ü¡A·í«ü¥Î°¾²¾¦ì§}®É¡ASYMDEB ·|¦Û°Ê·j´M DS ©Ò«üªº°Ï¬q¦ì§}¡A¦Ü©ó·j´M¨ì¨º¤@­Ó½d³ò¥i¥H¥Îµ²§ô¦ì§}¡A©Î·j´Mªø«×ªí¥Ü¡A¦pªG¥Îµ²§ô¦ì§}«h¤£¯à¸ó¶V¨ä¥L°Ï¬q¡A©Ò¥H¤£¶·ªí¥Ü°Ï¬q¦ì§}¡A¦pªG¥Î·j´Mªø«×«h»Ý¥Î¡yL¡zªí¥Ü¥X¨Ó¡C

­n·j´Mªº¼Æ­È¦pªG¤£¥u¤@­Ó¡A«h¥HªÅ¥Õ¤À¹j¡A¦Ó¥B¥²¶·¬O 00H ¨ì 0FFH ¤§¶¡ªº¼Æ¡C¦pªG­n·j´M¦r¦ê¡A¥²¶·¥Î¡y"¡z¬A°_¨Ó¡CS «ü¥O©Ò§ä¨ìªº¸ê®Æ·|¥H XXXX:YYYY ªº¤è¦¡Åã¥Ü¦b¿Ã¹õ¡A¦pªG¨S§ä¨ì¡A´N¤£Åã¥Üª½±µÅã¥Ü SYMDEB ªº´£¥Ü²Å¸¹¡Aµ¥«Ý¨Ï¥ÎªÌ¿é¤J¤U¤@­Ó«ü¥O¡C¨Ò¦p¡G

-s f000:e000 f000 "IBM" [Enter]
F000:E00E
-s f000:e000 f000 41 54 [Enter]
F000:E012
-r ds f000 [Enter]
-s f000 L1000 "PATCH" [Enter]
F000:FF62
F000:FF8A
F000:FFB2

Trace¡G³æ¨B°lÂÜ

³o­Ó«ü¥O¨C¦¸«ü°õ¦æ¤@¹D CPU «ü¥O¡A¦Ó«á§â°õ¦æ«áªº¼È¦s¾¹¥H¤ÎºX¼Ð¤º®eÅã¥Ü©ó¿Ã¥ú¹õ¤W¡AÅý±zÆ[¹îµ{¦¡¬O§_¨Ì±zªº³]­p¥¿½T°õ¦æ¡A¦P®É¨Ï CS:IP «ü¦V¤U¤@­Ó CPU «ü¥O¡C¥¦ªº¥Îªk¬O¡G

T [=°_©l¦ì§}] [«ü¥O­Ó¼Æ]

T «ü¥O¤]¥i¥H³]©w¥Ñ¨º¤@­Ó¦ì§}¶}©l°õ¦æ¡A©Î­n°õ¦æ´X­Ó«ü¥O¡C¦pªG¨S¦³«ü©w°_©l¦ì§}(¦b°»¿ù®É¡A¥Î±o³Ì¦h)¡A·|±q CS:IP ²{¦bªº¦ì§}¶}©l°õ¦æ¡C¨Ò¦p¡G

H:\HomePage\SOURCE>symdeb fpu2.sym fpu2.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-t [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=1422  ES=1422  SS=1422  CS=1422  IP=010E   NV UP EI PL NZ NA PO NC
CODE:BEGIN:
1422:010E 9B             WAIT
-t 3 [Enter]
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=1422  ES=1422  SS=1422  CS=1422  IP=010F   NV UP EI PL NZ NA PO NC
1422:010F DBE3           FINIT
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=1422  ES=1422  SS=1422  CS=1422  IP=0111   NV UP EI PL NZ NA PO NC
1422:0111 9B             WAIT
AX=0000  BX=0000  CX=0025  DX=0000  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=1422  ES=1422  SS=1422  CS=1422  IP=0112   NV UP EI PL NZ NA PO NC
1422:0112 D9060201       FLD    DWord Ptr [N1]                 DS:0102=0000

¦A¬Ý²Ä¤G­Ó¨Ò¤l¡G


¦¹¥~ SYMDEB ªº T «ü¥O©M DEBUG ¦³¨Ç¤£¦Pªº¦a¤è¡C²Ä¤@¡ASYMDEB ªº T «ü¥O¤£¹ï INT 21H °µ°lÂÜ¡A¤j·§¬O·L³n»{¬° INT 21H ¤£·|¦³¿ù»~§a¡A¦pªG±z·QÆ[¹î INT 21H ªº°õ¦æ±¡§Î¡A¥u¦n¦^¥h¥Î DEBUG¡C²Ä¤G¡A¥i¥H°lÂÜ BIOS ¤º®e¡C²Ä¤T¡A¥i¥H°t¦X·L³n©Ò¥X«~ªº°ª¶¥»y¨¥½sĶ¾¹°£¿ù¡C

Unassemble¡G¤Ï²ÕĶ

³o­Ó«ü¥O¬O¥Î¨Ó§â¾÷±ñ½X¤Ï²ÕĶÅܦ¨§U°O¾Ð½X¡A¥Îªk¬O¡G

U [°_©l¦ì§} [µ²§ô¦ì§}©ÎLªø«×]]
h:\homepage\source>symdeb fpu2.sym fpu2.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-u [Enter]
211F:0100 EB0C           JMP    BEGIN
CODE:N1:
211F:0102 0000           ADD    [BX+SI],AL
211F:0104 2441           AND    AL,41                         ;'A'
CODE:N2:
211F:0106 B81E15         MOV    AX,151E
211F:0109 40             INC    AX
211F:010A 0000           ADD    [BX+SI],AL
-u begin L4 [Enter]
CODE:BEGIN:
211F:010E 9B             WAIT
211F:010F DBE3           FINIT
211F:0111 9B             WAIT

View¡GÅã¥Ü°ª¶¥»y¨¥¤§­ì©lµ{¦¡»P¬Û¹ïÀ³¤§¾÷±ñ½X¡C

¨ä»yªk¬O¡G

V °_©l¦ì§}

Write¡G¼g¤JºÏ¤ù©ÎÀÉ®×

Exam¡G¦C¥X²Å¸¹Àɤº®e

»yªk¬O

X [*]
X? [²Å¸¹ÀɦW!]

³o­Ó«ü¥O¥i¥H¥Î¡yX *¡zÆ[¬Ý¤w¸g¥Ñ SYMDEB ¸ü¤Jªº²Å¸¹ÀÉ¡A©Î¬O¥Î¡yX?¡z¨ÓÆ[¬Ý¦bºÏºÐ¤Wªº²Å¸¹Àɤº®e¡C

Open map¡G¶}±Ò²Å¸¹ÀÉ

¥Îªk¬O

XO [²Å¸¹ÀɦW!]

Symbol Set¡G³]©w²Å¸¹(ÅܼÆ)­È

¥Îªk¬O

Z ²Å¸¹ ¼Æ­È

³o­Ó«ü¥O¥i¥H³]©wÅܼƭȡC

?¡G½u¤W¨D§U

-? [Enter]
A [<address>] - assemble              M <range> <address> - move
BC[<bp>] - clear breakpoint(s)        N <filename> [<filename>...] - name
BD[<bp>] - disable breakpoint(s)      O <value> <byte> - output to port
BE[<bp>] - enable breakpoint(s)       P [=<address>] [<value>] - program step
BL[<bp>] - list breakpoint(s)         Q - quit
BP [bp] <address> - set breakpoint    R [<reg>] [[=] <value>] - register
C <range> <address> - compare         S <range> <list> - search
D[type][<range>] - dump memory        S {-|&|+} - source level debugging
E[type] <address> [<list>] - enter    T [=<address>] [<value>] - trace
F <range> <list> - fill               U [<range>] - unassemble
G [=<address> [<address>...]] - go    V [<range>] - view source lines
H <value> <value> - hexadd            W [<address> [<drive><rec><rec>]] - write
I <value> - input from port           X [?] <symbol> - examine symbols(s)
K [<value>] - stack trace             XO<symbol> - open map/segment
L [<addr> [<drive><rec><rec>]] - load Z <symbol> <value>

? <expr> - display expression         > } <device/file> - Redirect output
! [dos command] - shell escape        < { <device/file> - Redirect input
. - display current source line       = ~ <device/file> - Redirect both
\ - screen flip                       * <string> - comment

<expr> ops: + - * / : not seg off by wo dw poi port wport mod and xor or
<type> : Byte, Word, Doubleword, Asciz, Shortreal, Longreal, Tenbytereal
-

Shell¡G°õ¦æ DOS «ü¥O

! DOS«ü¥O

¥i¥H°õ¦æ DOS «ü¥O¡A¨Ò¦p

-! dir m*.exe [Enter]

 Volume in drive E is UTILITY
 Volume Serial Number is 114B-0D05
 Directory of E:\ASM

MAPSYM   EXE        18,026  10-16-85   4:00 MAPSYM.EXE
MASM     EXE       103,175  07-31-87   0:00 MASM.EXE
         2 file(s)        121,201 bytes
         0 dir(s)      50,827,264 bytes free

-

.¡GÅã¥Ü¥Ø«e¦æ¸¹

³o­Ó«ü¥Oªº»yªk¬O¡G

.

¦ý¬OµLªk¦b²Õ¦X»y¨¥¤¤¨Ï¥Î¡A¥u¯à¦b·L³nªº°ª¶¥»y¨¥¤¤¨Ï¥Î¡C

Âà¦V

>¡B< ¬O«ü SYMDEB ªºÂà¦V²Å¸¹¡A«eªÌ¬O¿é¥XÂà¦V¡A«áªÌ¬O¿é¤JÂà¦V¡A¥¦­Ì«á­±¥i¥H±µÀɦW©Î³]³Æ¦W¡A³]³Æ¦W¥i¥H¬O±±¨î¥x ( ¥Î con ªí¥Ü ) ©Î¦Lªí¾÷ ( ¥H prn ªí¥Ü )¡C¤@¯ë¦Ó¨¥¡ASYMDEB ·|§â¸ê®Æ¿é¥X¦Ü¿Ã¹õ¡AÅýµ{¦¡³]­p®vÆ[¹îµ{¦¡¨º¨à¥X¤F¿ù»~¡A¦ý¬O¦³®É·|·Q­n§â¸ê®Æ¿é¥X¦ÜÀɮסA³o®É­Ô´N¥i¥H¥Î >¡A­¢¨Ï SYMDEB §â ¸ê®Æ¶ñ¤J¬Y­ÓÀɮסCÅý¤p¤ì°¸¥H TRACE.ASM ( ¨ä¤º®e¨£ªþ¿ý¤K ) °µ¥Ü½d¡G

H:\HomePage\SOURCE>symdeb trace.com [Enter] ¡÷¥Î SYMDEB ¸ü¤J TRACE.COM
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-dt 100 [Enter] ¡÷¥ý¨Ï DT «ü¥OÅã¥Ü©ó¿Ã¥ú¹õ¤W ( ¨Æ¹ê¤W SYMDEB ¤º©w¿é¥X´N¬O¿Ã¥ú¹õ )
0EB4:0100  1C C8 C4 F7 0F 33 45 CA F8 3F  +0.123456E-1
->e:\trace.txt [Enter] ¡÷¨Ï SYMDEB ªº°T®§¿é¥X¦Ü E:\TRACE.TXT
 -   ¡÷¡°¦¹®É¡AÁÙ¹ï SYMDEB ¤U¤F³\¦h«ü¥O¡A½Ð¬Ý¤U­±ªº»¡©ú
-q [Enter]

H:\HomePage\SOURCE>type e:\trace.txt [Enter] ¡÷ªð¦^ DOS «á¡AÀ˵ø E:\TRACE.TXT Àɮתº¤º®e
 -dt 100
0EB4:0100  1C C8 C4 F7 0F 33 45 CA F8 3F  +0.123456E-1
->con

H:\HomePage\SOURCE>

¦b¤W­±¼Ð¦³¡y¡°¡zªº¦a¤è¡A¨Æ¹ê¤W¤p¤ì°¸ÁÙ¹ï SYMDEB ¤U¤F¨â¹D«ü¥O¡A¡ydt 100¡z©M¡y>con¡z¡A¦ý¬O¦]¬°¤§«e¤w¸g¨Ï SYMDEB ªº°T®§Âà¦V¿é¥X¨ì E:\TRACE.TXT ÀÉ®×ùØ¡A©Ò¥H¤£·|Åã¥Ü¦b±±¨î¥xªº¿Ã¥ú¹õ¤W¡A¤Ï¦Ó¬O³Q«O¦s¦b E:\TRACE.TXT ùØ¡C²Ä¤G­Ó«ü¥O¡A¡y>con¡z¬OÅý SYMDEB ªº¿é¥X¦A«×Âà¦^¨ì±±¨î¥x ( console ) ªº¿Ã¥ú¹õ¤W¡AµM«á¦A¿é¤J¡yq¡z«ü¥O¡ASYMDEB ´N·|§â°T®§¦A«×Åã¥Ü¦b¿Ã¥ú¹õ¤W¤F¡C

¡y}¡z¡B¡y{¡z³o¨â­Ó¿é¥X¡B¿é¤JÂà¦V«ü¥O¬O«ü¹ï SYMDEB ©Ò°£¿ùªºµ{¦¡¡A°µ¿é¥X¿é¤JªºÂà¦V¡A¦Ó SYMDEB ¥»¨­ªº¿é¥X¡B¿é¤J¤´¤£¨ü¼vÅT¡C¨Ò¦p¥Î SYMDEB ¹ï¤U­±ªºµ{¦¡¡APNT_STR.ASM¡A°£¿ù¡G

				        page    ,132 
                            ;*************************************** 
 0000                       code    segment 
                            assume  cs:code,ds:code 
 0100                               org     100h 
                            ;--------------------------------------- 
 0100  EB 1E                start:  jmp     short begin 
 0102  48 65 6C 6C 6F 77 2C	string  db      'Hellow, I learn assembly now.$' 
       20 49 20 6C 65 61 72
       6E 20 61 73 73 65 6D	
       62 6C 79 20 6E 6F 77	
       2E 24
 0120  B4 09                begin:  mov     ah,9 
 0122  BA 0102 R                    mov     dx,offset string 
 0125  CD 21                        int     21h 
 0127  CD 20                        int     20h 
                            ;--------------------------------------- 
 0129                       code    ends 
                            ;*************************************** 
                            end     start

¨Ï PNT_STR.ASM ²ÕĶ¡B³sµ²¨ÃÂà´«¦¨ PNT_STR.COM «á¡A¥Î SYMDEB ¸ü¤J¡G

H:\HomePage\SOURCE>symdeb pnt_str.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-g [Enter] ¡÷³o¦¸¨S¦³¿é¥XÂà¦V
Hellow, I learn assembly now.
Program terminated normally (0)
-q [Enter]

H:\HomePage\SOURCE>symdeb pnt_str.com [Enter]
Microsoft (R) Symbolic Debug Utility  Version 4.00
Copyright (C) Microsoft Corp 1984, 1985.  All rights reserved.

Processor is [80286]
-}e:\pnt_str.txt [Enter] ¡÷¨Ï³Q°£¿ùªºµ{¦¡¡APNT_STR.COM¡Aªº¸ê®ÆÂà¦V¿é¥X¨ì E:\PNT_STR.TXT ÀÉ®×
-g125 [Enter] ¡÷¦ý¬O SYMDEB ¥»¨­©Ò²£¥Íªº°T®§¡A¦p¡yt¡z¡B¡yg¡z«ü¥O¡A¤´¿é¥X¨ì±±¨î¥x
AX=0900  BX=0000  CX=0029  DX=0102  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=0EB8  ES=0EB8  SS=0EB8  CS=0EB8  IP=0125   NV UP EI PL NZ NA PO NC
0EB8:0125 CD21           INT    21  ;Display String
-t [Enter]
AX=0924  BX=0000  CX=0029  DX=0102  SP=FFFE  BP=0000  SI=0000  DI=0000
DS=0EB8  ES=0EB8  SS=0EB8  CS=0EB8  IP=0127   NV UP EI PL NZ NA PO NC
0EB8:0127 CD20           INT    20
-g [Enter]

Program terminated normally (0)
-q [Enter]

E:\HomePage\SOURCE>type e:\pnt_str.txt [Enter] ¡÷Àˬd¡y}¡z«ü¥O¡A¨ÏPNT_STR Âà¦V¦Ü PNT_STR.TXT
 Hellow, I learn assembly now.
E:\HomePage\SOURCE>

*¡Gµù¸Ñ

³o­Ó«ü¥O¬O¦b * «á¥[¤Wµù¸Ñ¡A¨Ò¦p¡G

-* FPU debug [Enter]
 FPU debug
-

µù¤@¡GMAPSYM.EXE ªº»yªk¬O

MAPSYM [/L] MAPÀɦW

MAPSYM ¥u¦³¤@­Ó°Ñ¼Æ¡A/L¡A¥[¤W /L ªí¥Ü§âÅܼƦWÅã¥Ü¦b¿Ã¹õ¤W¡A¤£¥[ /L ªí¥Ü¤£Åã¥Ü¡CMAP ÀɦW¥i¥H¬Ù²¤°ÆÀɦW¤]¥i¥H¼g¥X¨Ó¡C

µù¤G¡GSYMDEB ªº§¹¾ã»yªk¬O

SYMDEB [°Ñ¼Æ] [SYMÀÉ] [±ý°£¿ù¤§¥i°õ¦æÀÉ] [¸Ó¥i°õ¦æÀɤ§°Ñ¼Æ]

SYMDEB ªº°Ñ¼Æ¦³ 5 ­Ó¡C

  1. /IBM¡G¤]¥i²¼g¦¨¡y/I¡z¡A³o­Ó°Ñ¼Æ·|±j­¢ SYMDEB §â IBM PC ªº¬Û®e¾÷ºØ·í¦¨ IBM PC ¨Ï¥Î¡C
  2. /K¡G³o­Ó°Ñ¼Æ¥i¥H¨ÏÁä½Lªº¡yScroll Lock¡z©Î¡yBreak¡zÁä·í§@¤¤Â_Áä¨Ï¥Î¡C
  3. /N¡G³o­Ó°Ñ¼Æ¨Ï«D IBM PC ¦ý¬O°õ¦æ MS DOS ªº¾÷ºØµo´§µwÅ餤Â_¥\¯à¡C
  4. /S¡G¥i¥H¨Ï SYMDEB ¦b°£¿ùµe­±»P°õ¦æµe­±¤§¶¡¤Á´«¡A¹ï©ó¹Ï§Îµe­±«Ü¦³¥Î¡C
  5. /"«ü¥O"¡G¡y"¡z¤§¶¡¬° SYMDEB «ü¥O¡A¥¦¥i¥H«ü©w SYMDEB ¤@±Ò°Ê´N­n°õ¦æªº«ü¥O¡C