Ask you about a piece of code in the Linux Kernel assembly!

Source: Internet
Author: User
Ask you about a piece of code in the Linux Kernel assembly! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. # Include in C language in entry. S And # What does the define statement mean?
Why can I use this syntax in assembly? I don't seem to have found this syntax in assembly? Please advise
# Include
# Include
# Include
# Include
# Include

EBX = 0x00
ECX = 0x04
EDX = 0x08
ESI = 0x0C
EDI = 0x10
EBP = 0x14
EAX = 0x18
DS = 0x1C
ES = 0x20
ORIG_EAX = 0x24
EIP = 0x28
CS = 0x2C
EFLAGS = 0x30
OLDESP = 0x34
OLDSS = 0x38

CF_MASK = 0x00000001
IF_MASK = 0x00000200
NT_MASK = 0x00004000
VM_MASK = 0x00020000

/*
* These are offsets into the task-struct.
*/
State = 0
Flags = 4
Sigpending = 8
Addr_limit = 12
Exec_domain = 16
Need_resched = 20
Tsk_ptrace = 24
Processor = 52

ENOSYS = 38


# Define SAVE_ALL \
Cld ;\
Pushl % es ;\
Pushl % ds ;\
Pushl % eax ;\
Pushl % ebp ;\
Pushl % edi ;\
Pushl % esi ;\
Pushl % edx ;\
Pushl % ecx ;\
Pushl % ebx ;\
Movl $ (_ KERNEL_DS), % edx ;\
Movl % edx, % ds ;\
Movl % edx, % es;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.