Hello. Faced two problems. Just started to go through work with machine code. I did everything step by step, as it was in the methodical instructions.

In general, a program has been created. Using the command line, launched its debug program.COM . Use the debugger to view the source program: -U . Then he traced it as in the assignment. And here are the questions go sequentially:

  1. using the command U find the address 6 of the command MOV AX, 0001?
  2. and then using command A to replace command MOV AX, 0001 with command? MOV AX, 0002.

This is the first work with similar codes, I could not find a suitable answer on the Internet, please tell me what to enter.

  • I say right away, I tried to do it myself, but nothing happened. the methodical instructions are rather useless, but on the Internet they do not find it in a way that I cannot even fully formulate the question - Muscled Boy
  • Do not get used to this debug, it is nowhere for a long time. Put some IDA on yourself. - vp_arth
  • @vp_arth, you are probably right, but this is the task. Can I ask you for help, since you have responded? - Muscled Boy
  • it looks like they threw me - Muscled Boy
  • one
    @MuscledBoy I am afraid that if anyone knew this waste of a dinosaur could have known, they had long forgotten the details as absolutely useless uselessness :) - PinkTux

1 answer 1

I went to Wikipedia .
And here it is .

-U [range] Command to convert code into assembler instructions. Short for Unassemble.

 Параметр диапазон используется в подкомандах debug для задания диапазона памяти. Параметр диапазон можно задать в одном из следующих форматов: - начальный адрес и конечный адрес - начальный адрес и длина (обозначаемая l) диапазона. Например, оба следующих выражения задают диапазон из 16 байтов, начинающийся с адреса CS:100: cs:100 10f cs:100 l 10 

-A [address] Conversion of assembly instruction to machine code. Short for the word Assemble.

 Параметр адрес Задает адрес, по которому записаны инструкции на языке ассемблер. Параметр адрес принимает шестнадцатеричные значения без знака h. 

Example:

 -U [Нажать Enter] 1814:0100 ADD [BX+SI],AL 1814:0102 XOR AL,00 -A 1814:0102[Нажать Enter] 1814:0102 MOV AX,0009 [Нажать Enter] 
  • I entered -U , this is a list of all commands, and I need to use this U to find out the address of the command MOV AX, 0001. And then use A to replace the command MOV AX, 0001 with the command MOV AX, 0002. Sorry if this is it just brains do not cook already. Half a day trying to figure out how. So, if so, write. - Muscled Boy
  • Enter -U, look for a line with the command you need, see the address to the left of it - vp_arth
  • If I remember correctly, after -A you can enter this address - vp_arth
  • that is, in your example -A 1814:0100 , press Enter, and enter MOV AX, 0002 ? again do not be offended if not. I am just learning. - Muscled Boy
  • He is interactive, everything is visible. No, 1814:0100 is the entry point in .com, look for the right address. - vp_arth