WEBVTT

1
00:01.870 --> 00:02.470
Welcome back.

2
00:02.650 --> 00:05.110
Now we are going to try this in our debugger.

3
00:05.200 --> 00:09.850
So the first type is move from the immediate to register.

4
00:09.850 --> 00:11.800
So open your template tool.

5
00:11.830 --> 00:13.060
I have it done here already.

6
00:13.900 --> 00:15.670
So the first one.

7
00:15.670 --> 00:20.800
So we type spacebar move, write register.

8
00:20.800 --> 00:23.980
We choose - and immediate.

9
00:24.130 --> 00:29.500
Maybe we give a value of 12 in hex.

10
00:32.350 --> 00:36.580
So we put a breakpoint and run step over.

11
00:39.480 --> 00:42.300
So this - here.

12
00:46.320 --> 00:48.270
So we step over this.

13
00:48.270 --> 00:51.870
We notice now there's a value 12 in -.

14
00:53.130 --> 00:55.890
The second type is to move immediate to memory.

15
00:55.890 --> 01:00.930
So let's choose a memory. Select dump one, memory map, VSS.

16
01:01.560 --> 01:03.720
Go to this address.

17
01:03.720 --> 01:08.850
We are going to move an immediate value to this location in the memory.

18
01:09.210 --> 01:12.960
So you right-click on this address and copy it.

19
01:14.880 --> 01:18.240
And now we type move.

20
01:19.910 --> 01:23.810
I then put the keyword prefix and the pointer prefix,

21
01:24.650 --> 01:27.260
square bracket, the hex prefix,

22
01:27.620 --> 01:33.530
paste the address, close it, and specify an immediate value.

23
01:33.950 --> 01:35.720
Hex 34, for example.

24
01:37.750 --> 01:41.110
So let's run over that now and watch this address.

25
01:42.040 --> 01:43.060
Step over.

26
01:43.930 --> 01:48.760
And now you see three four has been moved to this address here.

27
01:50.460 --> 01:54.030
Next is to move memory to register.

28
01:54.600 --> 01:59.670
So we are going to move the value stored at this memory, which is three four,

29
01:59.670 --> 02:01.620
move it into register -.

30
02:01.890 --> 02:02.880
So let's try that.

31
02:04.310 --> 02:05.600
So move.

32
02:07.860 --> 02:09.300
Register -.

33
02:10.110 --> 02:13.650
And here is your memory address again.

34
02:13.650 --> 02:21.300
Keyword PTR, hex prefix, paste memory, and hit okay.

35
02:22.800 --> 02:28.230
So now watch what happens to - when we step over that instruction.

36
02:29.040 --> 02:33.960
So now three four has been copied from this memory address into -.

37
02:35.640 --> 02:36.750
Then the last one.

38
02:36.750 --> 02:39.870
The fourth one is to move from register to memory.

39
02:40.770 --> 02:48.480
So for this, we are going to take whatever value is in - and move it to another location in memory.

40
02:48.510 --> 02:49.590
Maybe this one.

41
02:50.280 --> 02:53.430
So we right-click and copy this memory address.

42
02:56.010 --> 03:03.840
And then we come back here and we type the move instruction, keyword PTR,

43
03:05.980 --> 03:10.990
hex prefix, paste the memory we copied, and type here -.

44
03:11.680 --> 03:14.770
Hit okay. Okay.

45
03:14.770 --> 03:20.860
Take a look now at this location in memory as we step over this instruction.

46
03:22.830 --> 03:28.050
So instead of all this, it copies the value one two into this memory location here.

47
03:28.590 --> 03:34.470
So this is how we can use the four different types of move instructions inside our debugger.

48
03:34.830 --> 03:36.120
That's all for this video.

49
03:36.150 --> 03:37.440
Thank you for watching.