BuiltWithNOF
Debug Session

The first step is to run the “calc2.exe” program under debug.  The first two steps are shown below:

  • The command “u” followed by “CR” produces a listing of the program as it is loaded in the microprocessor memory.
  • The location in memory has two parts “1272:0000”, the first part gives 1272h x 10h = 12720h the location in memory where the data segment begins. The second part marks the location in memory, where the first data or program statement is stored.
  • The whole calc2.asm is stored from offset “0000” to “001F”. 
  • The command “r” follwed by “CR” produces the listing of all the relevant registers of the microprocessor. At this point, the rgistr contents are not valid, until the data segment “DS” register is defined. This will not happen until we execute 5 steps in the program.  This can be done by executing the command “t” followed by “CR” at the prompt as shown below:
  • At this point, younotice that segment register “DS=1271”, which mean the data segment is defined. We can now look at the cotents of memory defined as data segment.
  • The first two bytes at the starting address of the data segment are “FF 00”. The data is saved in the order “low byte followed by the high byte”, so the actual data word “00FF h”, which you can go to the program and see is first data word stored in the data segment. 
  • The third and fourth bytes are “FF 0F”, so that the second data word stored is “0F FF h”, which you should verify is indeed the second data word stored in the data segment by the progam.
  • On the right hand side, an attempt is made to convert the bytes to their ASCII code equivalent, if there is a valid match.

[PHY353/553] [PHY353/553] [Goals] [Prof. Saj Alam] [Syllabus] [Grading Policy] [Books] [Schedule] [Lectures] [Manual] [Downloads] [DOS Mode] [Quick DOS] [Start] [Exams] [Grades]