Home > Back-end >  In 32-bit mode without paging, how to calculate the physical address?
In 32-bit mode without paging, how to calculate the physical address?

Time:12-02

I am brand new to assembly and was given the following task:

If the processor is in protected 32-bit mode without paging, and for the segment connected to the DS selector states in the descriptor table that it starts from 00036D95h, and the EBX register has the value 000034A7h, from which physical locations will the value be moved to AL after instruction MOV AL, [EBX 0016h]?

I tried looking on the web for any similar example, and couldn't find anything? Does anyone know some similar examples, or any formula to calculate the physical location?

EDIT: Could you just sum up these three numbers to get the physical address?

CodePudding user response:

Could you just sum up these three numbers to get the physical address?

Yeah, that's exactly how it works.

Does anyone know some similar examples, or any formula to calculate the physical location?

In general, as fig-3-1

Now since you don't have paging, if you remove the "Paging" part on the right, all you are left with is the "Segmentation" part, and you are in the following situation (notice the "or Physical Memory" on the right):

fig-3-4

Note that the above figure is just indicative, you don't necessarily need to have each segment register point to a different segment descriptor, but you can.

  • Related