|
@@ -58,16 +58,16 @@ which is 65519 bytes over first megabyte. Since only one megabyte is accessible
|
|
|
|
|
|
Ok, now we know about real mode and memory addressing, let's get back to register values after reset.
|
|
Ok, now we know about real mode and memory addressing, let's get back to register values after reset.
|
|
|
|
|
|
-`CS` register has two parts: the visible segment selector and hidden base address. We know predefined `CS` base and `IP` value, so our logical address will be:
|
|
|
|
|
|
+`CS` register consists of two parts: the visible segment selector and hidden base address. We know predefined `CS` base and `IP` value, logical address will be:
|
|
|
|
|
|
```
|
|
```
|
|
-0x0ffff000:0xfff0
|
|
|
|
|
|
+0xffff0000:0xfff0
|
|
```
|
|
```
|
|
|
|
|
|
-which we can translate to the physical address:
|
|
|
|
|
|
+In this way starting address formed by adding the base address to the value in the EIP register:
|
|
|
|
|
|
```python
|
|
```python
|
|
->>> hex((0x0ffff000 << 4) + 0xfff0)
|
|
|
|
|
|
+>>> 0xffff0000 + 0xfff0
|
|
'0xfffffff0'
|
|
'0xfffffff0'
|
|
```
|
|
```
|
|
|
|
|