>>477
正確には short jmp だったか、far jump だったかは資料を見てみないと
思い出せないけど、少なくとも Wikibooksには、
6. Set the PE bit (and the PG bit if paging is going to be enabled) of the
MSW or CR0 register
7. Execute a far jump (in case of switching to long mode, even if the destination
code segment is a 64-bit code segment, the offset must not exceed 32-bit
since the far jump instruction is executed in compatibility mode)
また、https://stackoverflow.com/questions/26679682/how-does-setting-the-pe-flag-in-cr0-enable-protected-mode
にも、
1. Set up a global descriptor table (gdt) and load it using the lgdt instruction
2. Set the PE flag/bit in the control register CR0 to enabled (ie. to the value 1)
3. Execute a long jump with ljmp
Technically the CPU internally stores the selector information of all selectors used.
Whenever a selector register changes then the limit, base and so on are loaded.
This means that loading the CS register is required for updating the base, limit
and so of the CS register. This means: A far jump must be done (because this
will load the CS register). Maybe a RETF would also work...
I'm not sure if loading the other segment registers (for example DS) would
already work before the far jump so if you load the DS register before the
far jump the base address and limit will be taken from the GDT. Would be
nice to try this out...
と書かれている。
探検
アセンブラ初心者スレッド 2©2ch.net
■ このスレッドは過去ログ倉庫に格納されています
485デフォルトの名無しさん
2019/11/01(金) 12:10:32.63ID:iX6unUP8■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 【速報】「女芸人No.1決定戦 THE W」9代目女王にニッチェ! 7年ぶり3度目で悲願の優勝 [牛丼★]
- 731部隊の新資料、中国が公開 「日本が細菌戦の罪を自白」と主張 ロシアが引き渡し [少考さん★]
- 中国・ロシア両軍の爆撃機が東京方面へ向かう「異例のルート」を共同飛行…核も搭載可能、連携して威嚇か ★7 [ぐれ★]
- 【芸能】『女芸人No.1決定戦THE W』 粗品が最後にバッサリ「優勝賞金1000万円にしてはレベル低い大会」 [冬月記者★]
- 中国・ロシア両軍の爆撃機が東京方面へ向かう「異例のルート」を共同飛行…核も搭載可能、連携して威嚇か ★8 [ぐれ★]
- 【広島】ペルー女性の国保加入を誤って認め、福山市が医療費484万円を肩代わりするミス…入院して手術を受ける [ぐれ★]
- 【緊急高市朗報】WBC全試合、地上波完全生放送決定wmwmwmwmwmwmwmwmwmwmwmwmwmwmwmw [517459952]
- パン🍞つー✌まる👌見え👊😅👊
- テメェは俺を怒らせたオラァ👊💢😅💢👊🏡
- かなシコ!!許可願います!!
- 🏡パン🍞つー✌まる👌見え👊😅👊
- こち亀初期の麗子って乳放り出してたよな
