assembly - 为什么我的 .s 文件不能使用我的 Raspberry Pi VM 组装?
问题描述
我使用这个版本的 raspberry pi创建了一个虚拟机。我正在尝试组装简单的汇编程序“program.s”
.global _start
_start:
mov r0,#0 @ exit status code 0 for normal completion
mov r7,#1 @ service command 1 terminates this program
svc 0 @ issue linux command to terminate program
组装
as -o program.o program.s
给
GNU assembler version 2.28 (i686-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.28
e.s: Assembler messages:
e.s:6: Error: expecting operand after ','; got nothing
e.s:7: Error: expecting operand after ','; got nothing
e.s:8: Error: no such instruction: `svc 0'
我不认为问题出在代码上,而是与汇编器试图汇编的汇编类型有关。我是 Raspberry Pi 和一般组装的初学者,所以我完全不知所措。
解决方案
推荐阅读
- android - 启用 androidX 会导致“解决后无法更改配置策略 ':app:compile'”错误
- c++ - 返回 STRING 的 MySQL UDF 与数据重叠
- google-cloud-platform - 通过 api 调用访问 google Cloud IAM 策略所需的范围列表
- git - PowerShell git push 作为计划任务
- python - 按顺序将浮点值映射到元组
- linux - find 命令重命名每个文件和目录。最大深度 1
- javascript - 打开一个新窗口并关闭另一个
- python - 在特定时间内完成画圆
- python - Python:更新字典的语法
- html - 调整窗口大小时Div消失