--------------------------------------------------------------FBLD
集把80位打包BCD值加载到FPU寄存器中以及从FPU寄存获取这些值FBSTP
同上
--------------------------------------------------------------fbld
source---------------------------------...
寄存器
通用 8个32位奇存器,用于处理数据
段 6个16位寄存器,用于处理内存访问
指令指针 单一的32位寄存器,指向要执行的下一条指令码
浮点数据 8个80位寄存器,指向要执行的下一条指令
控制 5个32位寄存器,用于确定处理器的操作模式
调试 8个32位寄存器,用于在调试处理时包含信息
通用寄存器
EAX 用于操...
.dataoutput: .asciz "This is section %d\n".text.global _start_start: pushl $1 pushl $output call printf add $8, %esp call overhere pushl $3 pushl $output call printf add $8, %esp pushl $0 call exitoverhere: pushl %ebp movl %esp, %ebp pushl $2 pushl...
.dataoutput: .asciz "The value is %d\n"values: .int 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60.text.global _start_start: movl $0, %ediloop: movl values(, %edi, 4), %eax pushl %eax pushl $output call printf addl $8, %esp inc %edi cmpl $11, %edi jne loop movl $1,...
An immediate data element ---> a general-purpose registerAn immediate data element ---> a memory locationA general-purpose register ---> another general-purpose registerA general-purpose register ---> a segment registerA segment register ---> a general-purpose registerA general-purpose register -...
#int_printf.s printf int.dataa: .long 4str: .ascii "the a is 'xxxx'\n".text.global _start_start: movl a, %eax or $0x30, %eax movl $str, %edi movl %eax, 10(%edi) movl $4, %eax movl $1, %ebx movl $str, %ecx movl $17, %edx int $0x80 movl $1, %eax movl $0, %e...
#hellos.s printf string "hello world" using C library calls.dataoutput: .asciz "hello world.\n".text.global _start_start: pushl $output call printf addl $4, %esp pushl $0 call exit
#cpuid.s Sample program to extract the processor Vendor ID.section .dataoutput: .ascii "The processor Vendor ID is 'xxxxxxxxxxxx'\n".section .text.globl _start_start: movl $0, %eax cpuid movl $output, %edi movl %ebx, 28(%edi) movl %edx, 32(%edi) movl %ecx, 36(%edi) movl $4, %eax ...
#hello.s printf "hello world".data#define string "hello world"hw: .ascii "Hello world.\n".text .global _start_start: #EAX contains the system call value #EBX contains the file descriptor to write to #ECX contains the start of the string #EDX contains the length of the string movl $...
EAX Accumulator for operands and results dataEBX Pointer to data in the data memory segmentECX Counter for string and loop operationsEDX I/O pointerEDI Data pointer for destination of string operationsESI Data pointer for source of string op...