c-assign.s

来自「一个编译器的例子,基于c语言,在linux下开发 现在了简单的c语言例子」· S 代码 · 共 68 行

S
68
字号
				# start of the file.include "defines.h"		# system call numbers.include "c-assign.literals"	# include the string literal file	.global _start		.bss	.align	4_data:.text	.align	4_start:	pushl %ebp		# save the ebp address	movl %esp, %ebp	subl $8, %esp		# allocate space for local variables	movl $100, -4(%ebp)	pushl %eax	popl %eax	movl $4, -8(%ebp)	pushl %eax	popl %eax	leal -4(%ebp), %eax	pushl %eax	pushl -8(%ebp)	popl %ebx	popl %eax	addl %ebx, (%eax)	pushl (%eax)	popl %eax	leal -4(%ebp), %eax	pushl %eax	pushl -8(%ebp)	popl %ebx	popl %eax	subl %ebx, (%eax)	pushl (%eax)	popl %eax	leal -4(%ebp), %eax	pushl %eax	pushl -8(%ebp)	popl %ebx	popl %eax	movl (%eax), %ecx	imull %ebx, %ecx	movl %ecx, (%eax)	pushl (%eax)	popl %eax	leal -4(%ebp), %eax	pushl %eax	pushl -8(%ebp)	popl %ebx	popl %ecx	movl (%ecx), %eax	cltd	idivl %ebx	movl %eax, (%ecx)	pushl (%ecx)	popl %eax	movl -4(%ebp),%eax		# get the integer value of the ID	call ishow	call newline	pushl $0	popl %eax		# save the return value in eax	movl %ebp, %esp	popl %ebp		# restore the ebp address	movl $SYS_exit,%eax	# load the exit call number	movl $0,%ebx		# load the exit code	int $0x80		# and exit!				# end of the file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?