Programs often need data to do their work. We can read data from a file, from the keyboard, and from the program itself. (Programs can have data embedded in the code. We call that data immediate operands. For example, in the instruction mov rax, 23, mov is the op code, and rax is operand, and 23 is the immediate operand.) Another very easy way for a program to get small amounts of data is to place it on the command line when we execute a program. We’ll use that method in cmdline.c and cmdline.asm.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Passing Information to a Program on the Command Line

  • John Schwartzman

摘要

Programs often need data to do their work. We can read data from a file, from the keyboard, and from the program itself. (Programs can have data embedded in the code. We call that data immediate operands. For example, in the instruction mov rax, 23, mov is the op code, and rax is operand, and 23 is the immediate operand.) Another very easy way for a program to get small amounts of data is to place it on the command line when we execute a program. We’ll use that method in cmdline.c and cmdline.asm.