⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readtest3.s

📁 汇编经典教程profession_assembly_language(Richard Blum著) 的code
💻 S
字号:
# readtest3.s - An example of modifying data read from a file and outputting it.section .bss   .lcomm buffer, 10   .lcomm infilehandle, 4   .lcomm outfilehandle, 4   .lcomm size, 4.section .text.globl _start_start:   # open input file, specified by the first command line param   movl %esp, %ebp   movl $5, %eax   movl 8(%ebp), %ebx   movl $00, %ecx   movl $0444, %edx   int $0x80   test %eax, %eax   js badfile   movl %eax, infilehandle   # open an output file, specified by the second command line param   movl $5, %eax   movl 12(%ebp), %ebx   movl $01101, %ecx   movl $0644, %edx   int $0x80   test %eax, %eax   js badfile   movl %eax, outfilehandle   # read one buffer's worth of data from input fileread_loop:   movl $3, %eax   movl infilehandle, %ebx   movl $buffer, %ecx   movl $10, %edx   int $0x80   test %eax, %eax   jz done   js badfile   movl %eax, size   # send the buffer data to the conversion function   pushl $buffer   pushl size   call convert   addl $8, %esp   # write the converted data buffer to the output file   movl $4, %eax   movl outfilehandle, %ebx

⌨️ 快捷键说明

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