mirror of
https://github.com/0xAX/linux-insides.git
synced 2025-01-24 14:41:36 +00:00
Merge pull request #25 from fuzhli/segmented_address_fix
Segmented address presentation fix
This commit is contained in:
commit
e8e180dbe8
@ -8,3 +8,4 @@ Thank you to all contributors:
|
|||||||
* [Chris Costes](https://github.com/ccostes)
|
* [Chris Costes](https://github.com/ccostes)
|
||||||
* [nathansoz](https://github.com/nathansoz)
|
* [nathansoz](https://github.com/nathansoz)
|
||||||
* [RubanDeventhiran](https://github.com/RubanDeventhiran)
|
* [RubanDeventhiran](https://github.com/RubanDeventhiran)
|
||||||
|
* [fuzhli](https://github.com/fuzhli)
|
||||||
|
@ -61,13 +61,13 @@ Ok, now we know about real mode and memory addressing, let's get back to registe
|
|||||||
`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 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:
|
||||||
|
|
||||||
```
|
```
|
||||||
0xffff0000:0xfff0
|
0x0ffff000:0xfff0
|
||||||
```
|
```
|
||||||
|
|
||||||
which we can translate to the physical address:
|
which we can translate to the physical address:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
>>> hex((0xffff000 << 4) + 0xfff0)
|
>>> hex((0x0ffff000 << 4) + 0xfff0)
|
||||||
'0xfffffff0'
|
'0xfffffff0'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user