linux - 装配 IA32 - open() 实现
问题描述
需要用程序集实现系统调用 open(char* string, int flag) 以 WRITE-APPEND 模式打开文件。所以 int 标志将是 O_WRONLY|O_APPEND 的按位或。
ebx - 将包含字符串的内存地址(要打开的文件的路径名)。
ecx - 将包含一个整数,它是 O_WRONLY|O_APPEND 的结果。
al - 将包含 open() 的系统调用号,即 5。
如何计算 O_WRONLY|O_APPEND 来填写 ecx?
解决方案
推荐阅读
- node.js - 新的 Hyperledger Fabric sdk 是否支持链码安装和实例化?
- memory - 我可以将页表的位置更改为另一个 NUMA 节点吗?
- r - rentrez entrez_summary 过早的 EOF
- javascript - React 功能组件中的 Chrome API 不起作用
- android - 我的应用程序在创建 setSupportActionBar( ) 方法时崩溃
- python - 将图像文件写入 tfrecords 时列表索引超出范围
- css - flex-wrap 是否以相等的数量破坏内容?
- reactjs - 直接访问 URL 时的 React-js undefined props 动态页面
- c - 是否可以对同一个变量使用 scanf 两次?
- javascript - 按唯一值对对对象数组进行分组