双系统grub修复

放假了,比较空,就在折腾系统。(linux+xp双系统)。结果linux重启进不去系统。filesystem error。修复的过程grub rescue>set root=(hd0, 6) #linux安装的分区grub rescue>set prefix=(hd0, 6)/boot/grubgrub rescue>insmod normalgrub rescue>normal这样又重新进入到了熟悉的界面进入系统后,运行sudo grub-install /dev/sda 修复完成。
other | 2011-01-01 15:44 | 阅读 991 次 | 评论 1 条

汇编资料(二)(转)

--------------------------------------------------------------FBLD 集把80位打包BCD值加载到FPU寄存器中以及从FPU寄存获取这些值FBSTP 同上 --------------------------------------------------------------fbld source---------------------------------...
汇编 | 2010-12-30 20:11 | 阅读 1848 次 | 评论 1 条

汇编资料(一) (转)

寄存器 通用 8个32位奇存器,用于处理数据 段 6个16位寄存器,用于处理内存访问 指令指针 单一的32位寄存器,指向要执行的下一条指令码 浮点数据 8个80位寄存器,指向要执行的下一条指令 控制 5个32位寄存器,用于确定处理器的操作模式 调试 8个32位寄存器,用于在调试处理时包含信息 通用寄存器 EAX 用于操...
汇编 | 2010-12-30 20:10 | 阅读 1050 次 | 评论 1 条

call function

.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...
汇编 | 2010-12-30 19:35 | 阅读 1060 次 | 评论 1 条

mov and print

.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,...
汇编 | 2010-12-23 21:46 | 阅读 1050 次 | 评论 1 条

mov instruction

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 -...
汇编 | 2010-12-20 21:50 | 阅读 1122 次 | 评论 1 条

printf integer

#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...
汇编 | 2010-12-20 21:14 | 阅读 1067 次 | 评论 1 条

hello world

#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
汇编 | 2010-12-20 19:53 | 阅读 717 次 | 评论 0 条

get cpu id

#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 ...
汇编 | 2010-12-18 22:34 | 阅读 1061 次 | 评论 0 条

my first assembly program

#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 $...
汇编 | 2010-12-18 22:20 | 阅读 943 次 | 评论 0 条

AT&T汇编寄存器

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...
汇编 | 2010-12-18 22:07 | 阅读 1005 次 | 评论 0 条