First, I'm sorry I haven't reply till now. I was busy at school (you know, China's education system sucks) and now the summer holiday is coming so I have more time on the Internet. (In fact, I nearly forgot my post here...)
I know a lot of advantages of VBE, but it's really not so easy to use in non-real mode (whatever pmode or lmode).
I looked at the post
Combuster provided, but it still uses VBE to switch modes.
And
blackoil, I like to cooperate with you, and my OS's code base is here:
https://github.com/cjxgm/lanos
I'm not so good at documenting, and I used to believe a good line-break replaces comments, so there are few docs and comments. I'm sorry for that. And for the summer holiday doesn't start yet, I can now be online only at weekends.
Maybe an x86 emulator serves my need, but unless I understand the mechanism, I won't use it. (And I don't fully understand it yet.)