editor

The editor is used to create the source code file. > The assembly language source code file name extension has to be .asm The source code is not case sensitive. The editor used is edit.com for starting to edit - note down the following source code in your observation book

	 
	                .model tiny
                .stack  32
                .data
num1            db   8
num2            db   5
result          dw   00
                .code
                .startup
                mov     ax,@data
                mov    ds,ax
                mov     ax,0
                mov     al,num1
                mov     bl,num2
                add   al,bl
                mov    result,ax
                .exit
                end
- goto dos prompt
- type edit.com or edit - enter the source code from the observation book - save the file as mfp.asm and exit the editor - type dir mfp.* , find that mfp has 1 file .asm - invoke the assembler and give the file to assemble - type TASM mfp.asm - type dir mfp.* , find that mfp has 2 files .asm,.obj - type TLINK mfp.obj - type dir mfp.* , find that mfp has 5 files .asm,.obj,.lst.map.exe -execute td.exe -press ALT+F+O select MFP.EXE - notice the code assembly cum machine code - left most is the CS:IP values - next the machine code instruction -next are the labels and memory references -rightmost are the mnemonic instructions used in the source code -the window on the right is the 16 bit register contents - the execution of each instruction may be controlled using F7 & F8

F7----single step execution

executes one instruction at a time

F8----single step over execution

exectues one instruction at a time and for a CALL instruction it executes the complete subroutine called and returns to the next instruction in the calling module execution)

The initial objective is to understand the result of each instructions execution Trace through each instruction while checking the change in contents of the registers (in the Derbuuger registers window) and verify wether the execution of the code is as expected if not find out the reason

Back to Main page