【文件属性】:
文件名称:部件
文件大小:3KB
文件格式:ZIP
更新时间:2021-02-12 23:55:41
Assembly
ERE项目0-“ RISC汇编编程”
梅森·福克纳
MIPS
使用QtSpim编译并运行
手臂
编译:
arm-linux-gnueabi-gcc ARM-prime.s -static -mcpu = cortex-a7
跑:
qemu-arm a.out
PIC
编译:
gpasm。\ PIC-prime.s
运行:使用gpsim
概述
每个程序集都有不同的语法和指令集,需要深入学习不同的功能。 从本质上讲,必须分解问题以查看是否可以平均分配数字。 通常,这是通过Modulo完成的。 内置了除法和余数功能的MIPS,最容易实现。
div $t1, $t0 # i mod 2
mfhi $t6 # temp for the mod
beq $t6, 0, notPrime # if mod == 0, p
【文件预览】:
assembly-main
----MIPS-prime.s(1KB)
----ARM-prime.s(618B)
----README.md(2KB)
----PIC-prime.s(1KB)