thestarman__DEBUG__A
debug吧
全部回复
仅看楼主
level 7
Assemble: A [address]Creates machine executable code in memory beginning at CS:0100 (or the specified address) from the 8086/8088 (and 8087) Assembly Language instructions which are entered. Although no Macro instructions nor labels are recognized, you can use the pseudo-instructions 'DB' and 'DW' (so you can use the DB opcode to enter ASCII data like this: DB 'This is a string',0D,0A ).The 'A' command remembers the last location where any data was assembled, so successive 'A' commands (when no address is specified) will always begin at the next address in the chain of assembled instructions. This aspect of the command is similar to the Dump command which remembers the location of its last dump (if no new address is specified).The assembly process will stop after you ENTER an empty line. Example; you ENTER the characters in bold type; you do not need to enter the comments after the semi-colon ( ; ) symbols : -a 100 xxxx:0100 jmp 126 ; Jump over data that follows: xxxx:0102 db 0d,0a,"This is my first DEBUG program!" xxxx:0123 db 0d,0a,"$" xxxx:0126 mov ah,9 ; Function 09 of Int 21h: xxxx:0128 mov dx,102 ; DS:DX -> $-terminated string. xxxx:012B int 21 ; Write String to STD Output. xxxx:012D mov ah,0 ; Function 00 of Int 21h: xxxx:012F int 21 ; Terminate Program. xxxx:0131 -g =100 This is my first DEBUG program! Program terminated normally -NOTE: You can pipe simple 8086/8088 Assembly Language "scripts" into DEBUG (You can even include a semi-colon ';' followed by comments on most of its lines. For some odd reason though, these comments are not allowed on DB/DW lines!). For example, you can copy and paste the following into the DEBUG program (after entering the "a" command) and obtain the same results as above:jmp 126 ; Jump over data that follows:db 0d,0a,"This is my first DEBUG program!"db 0d,0a,"$"; End of string marker above: "$"=24hmov ah,9 ; Function 09 of Int 21h:mov dx,102 ; DS:DX -> $-terminated string.int 21 ; Write String to STD Output.mov ah,0 ; Function 00 of Int 21h:int 21 ; Terminate Program.DEBUG uses the convention of enclosing operands which refer to Memory locations in square brackets '[ ]' (as opposed to an immediate value as an operand). DEBUG may require you to explicitly tell it whether or not an operand refers to a word or byte in Memory! In such cases, the data type must be stated using the prefixes 'WORD PTR' or 'BYTE PTR' For all 8087 opcodes, the WAIT or FWAIT prefix must be explicitly specified.
2008年05月03日 01点05分 1
level 7
"注释"性的分号
2008年05月03日 01点05分 2
level 6
从哪里抢那么多代码来了?(-_-)
2008年05月03日 09点05分 3
level 7
来源:http://www.cn-dos.net/forum/viewthread.php?tid=24201&fpage=1&highlight=256%E5%AD%97%E8%8A%82http://www.256b.com/home.php
2008年05月03日 10点05分 5
1