随笔分类 -  assembly

\()" 符号连接 和引用宏参数
摘要:汇编宏kernel_ventry 该汇编宏主要是用于异常响应向量表中,每个向量的宽度为0x80字节,即0x20条指令(每条指令4字节);而且每个向量入口点地址必须按照0x80对齐,即地址低7位为零。由于0x20条指令不可能完成异常处理过程,因此在这0x20条指令之内一定要跳转到到其他函数执行。 一般 阅读全文

posted @ 2022-03-11 20:16 tycoon3 阅读(1923) 评论(0) 推荐(0) 编辑

ld Map system.map
摘要:root@ubuntu:~/arm/raspberry-pi3-mini-os/1.hello_world# grep Map -rn * Makefile:22: $(ARMGNU)-ld -T linker.ld -o objects/kernel8.elf $(OBJ_FILES) -Map 阅读全文

posted @ 2022-03-10 20:24 tycoon3 阅读(100) 评论(0) 推荐(0) 编辑

宏macro
摘要:宏 (1).macro和.endm组成一个宏;(2).macro后面跟着的依次是宏名称,宏参数;(3)在宏中使用参数,需要添加前缀""; .macro add a,b //宏名称add,参数a,b (4)红参数定义时,可以设置初始值 .macro test p1=0 p2//可以用test a,b或 阅读全文

posted @ 2022-03-10 19:52 tycoon3 阅读(116) 评论(0) 推荐(0) 编辑

ARM 汇编 - Numeric local labels
摘要:.global _start _start: MOV r4,#1 // r4=1 1: // Local label ADD r4,r4,#1 // Increment r4 CMP r4,#0x5 // if r4 < 5... BLT 1b // ...branch backwards to l 阅读全文

posted @ 2021-12-13 10:52 tycoon3 阅读(91) 评论(0) 推荐(0) 编辑

asm-examples
摘要:[root@centos7 aarch64-bare-metal-qemu]# cat libc.s /* Output "Hello world!" to standard output. For Aarch64 (ARM64) architecture with GNU assembler, u 阅读全文

posted @ 2021-12-02 11:50 tycoon3 阅读(65) 评论(0) 推荐(0) 编辑

How to implement system call in ARM64?
摘要:System calls Sometimes it is necessary for software to request a function from a more privileged entity. This might happen when, for example, an appli 阅读全文

posted @ 2021-12-02 11:26 tycoon3 阅读(356) 评论(0) 推荐(0) 编辑

'Hello World' in ARM64 Assembly
摘要:cat hello.s .data /* Data segment: define our message string and calculate its length. */ msg: .ascii "Hello, ARM64!\n" len = . - msg .text /* Our app 阅读全文

posted @ 2021-11-08 11:25 tycoon3 阅读(642) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示