functest2.s

来自「汇编经典教程profession_assembly_language(Richa」· S 代码 · 共 37 行

S
37
字号
# functest2.s - An example of using global variables in functions.section .dataprecision:   .byte 0x7f, 0x00.section .bss   .lcomm radius, 4   .lcomm result, 4   .lcomm trash, 4.section .text.globl _start_start:   nop   finit   fldcw precision   movl $10, radius   call area   movl $2, radius   call area   movl $120, radius   call area   movl $1, %eax   movl $0, %ebx   int $0x80.type area, @functionarea:   fldpi   filds radius   fmul %st(0), %st(0)   fmulp %st(0), %st(1)   fstps result   ret

⌨️ 快捷键说明

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