Joke Collection Website - Talk about mood - Talk about which aspects or parts of linux embody the characteristics of protected mode, and explain that you need to choose a piece of linux source code (optional).
Talk about which aspects or parts of linux embody the characteristics of protected mode, and explain that you need to choose a piece of linux source code (optional).
Cli /* Turn off all interrupts */
mov ax,#0x0000
Cld /*DF is cleared, which increases the string operation by */
Do_move: mov es, ax /* Address of the target segment to be moved, that is, to the 0 th segment */
Add ax, #0x 1000.
Cmax, #0x9000 /* Move 9 segments * * *
Jz end_move /*** End of move * * * * * * *
Mobile ds, ax
sub di,di
sub si,si
Movcx, # 0x8000/* * The size of one move is 32K words, that is, 64K bytes * * */
Represents movsw
jmp do_move
/* * * * * * * * The above code is to move the core code from 000 1H:0000H to 0000h * */
End_move: move axis, cs
Mov ds, ax /** Because ds is used in front, it needs to be reset, otherwise it will be wrong */
Lidt idt_48 /*** * * Load interrupt descriptor table, 3 words long and 48 bits */
LGDTGDT _ 48/* * Load global descriptor table, 3 words and 48 bits */
Call empty _8042
mov al,#0xD 1
Output #0x64, al
Call empty _8042
Move al, #0xDF
Out # 0x60, Al/* * * * * * Open A20 address line * * * * * * *
Call empty _8042
Output #0x20, al
. Words 0x00eb, 0x00eb | jmp $+2, jmp $+2
2.out #0xA0, al | and to 8259A-2
. Words 0x00eb, 0x00eb
3.mov al, #0x20 | Write ICW2 to host 8259A.
Out #0x2 1, al | hardware interrupt entry address 0x20 and ICW 1
| Know interrupt vector length = 8 bytes.
. Words 0x00eb, 0x00eb
4.mov al, #0x28 | Start of hardware integer 2 (0x28)
Out #0xA 1, al | The interrupt entry of the second block 8259A is 0x28.
. Words 0x00eb, 0x00eb
5.mov al, #0x04 | 8259- 1 is the master device.
Out # 0x2 1, Al | interrupt request 2 has cascade processing.
. Words 0x00eb, 0x00eb
Mov al, #0x02 | 8259-2 is the slave.
Out #0xA 1 and al | correspond to the above. Tell everyone that I am a colleague of IR2.
| Cascading processors.
. Words 0x00eb, 0x00eb
6. mov al, #0x0 1 | 8086 mode of both.
out #0x2 1,al
. Words 0x00eb, 0x00eb
out #0xA 1,al
. Words 0x00eb, 0x00eb
Mov al, #0xFF | Temporarily mask all interrupts.
out #0x2 1,al
. Words 0x00eb, 0x00eb
out #0xA 1,al
Mov ax, #0x000 1 | protection mode (PE) bit
Lmsw ax | That's it!
JmpI 0,8 | JMP offset 0(cs) of segment 8
/* * * * * This function ensures that the keyboard command queue is empty * * * * * * *
empty_8042:
. Words 0x00eb, 0x00eb
In aluminum, #0x64
Test aluminum #2
jnz empty_8042
Soak in water to soften
- Previous article:Love pairing of the twelve constellations
- Next article:Dream of making a fire with firewood
- Related articles
- Say that a person is sick and feels helpless.
- Tell me about those precision marketing
- As a daughter-in-law, smoking and drinking, what do mother-in-law and father-in-law do?
- Have a good chat and bring it to yourself.
- Is Ping An Insurance Recruitment Fraud Unattended?
- My family arranged for me to go on a blind date, saying that I would meet other girls tomorrow, but I was clumsy and didn't know what to say then. I'm so nervous!
- It is said that Nissan Teana is very cost-effective. What are the advantages of this car?
- What is the nutritional value of eating broad beans in long summer?
- Send an early sleep message.
- Wife derailed friends circle to talk about.