随笔分类 -  assembly

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

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

摘要: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 阅读(110) 评论(0) 推荐(0)

摘要:宏 (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 阅读(139) 评论(0) 推荐(0)

摘要:.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 阅读(105) 评论(0) 推荐(0)

摘要:[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 阅读(80) 评论(0) 推荐(0)

摘要: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 阅读(393) 评论(0) 推荐(0)

摘要: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 阅读(715) 评论(0) 推荐(0)

导航