摘要: 知识点 关于通过位运算置位的总结如下: |0 取得原来值 |1 全置为1 &0 全置为0 &1 取得原来值 注意 提取hour时,采用的方法是先将hour右移11位,hour有5位,所以再与000000000000011111,即0X1F相与。 *(volatile int *)的必要 算法: 阅读全文
posted @ 2021-12-13 10:53 20191301 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 第4个不成立,其他三个成立 代码链接:https://gitee.com/luhanqi_20191301/linux-coding/tree/master/test3 阅读全文
posted @ 2021-12-13 10:20 20191301 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1 简述你完成的工作 完成系统的前端设计。 2 你们小组总共的代码行数,你贡献的代码行数?相关代码链接? 总计5236行代码,我贡献1048行,https://gitee.com/luhanqi_20191301/electronic-document 3 你们小组总共的文档数?你贡献的文档数?相关 阅读全文
posted @ 2021-12-11 16:13 20191301 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1. 在X86_64架构下实践2.4中的内容 2. 通过GDB查看寄存器的内容,把教材中的图填入具体的值 3. 把2.4的C代码在OpenEuler中重新实践一遍,绘制出ARM64的逻辑框图 1.32位GCC中的运行时堆栈使用情况 main main.c: main(){ int a,b,c; a= 阅读全文
posted @ 2021-12-05 21:28 20191301 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1. 在X86_64架构下实践2.5中的内容,提交代码和实践截图 1.在X86_64架构下实现 查看linux虚拟机版本 下载gcc32位库 sudo apt-get install gcc-multilib g++-multilib module-assistant 1、用汇编代码编程 将c代码编 阅读全文
posted @ 2021-12-05 20:59 20191301 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1.time服务器的客户端服务器,提交程序运行截图 编译 结果 2. echo服务器的客户端服务器,提交程序运行截图,服务器把客户端传进来的内容加入“服务器进程pid 你的学号 姓名 echo :”返回给客户端 编译 结果 3. 服务器部署到华为云服务器,客户端用Ubuntu虚拟机。 运行结果 前5 阅读全文
posted @ 2021-11-25 14:30 20191301 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 代码 main #include<stdio.h> #include<stdlib.h> //定义此头文件,里面包含一些宏和通用工具函数,包含atoi()函数 int sum(int N,int arr[]); //声明sum函数 int main(int argc,char *argv[]) // 阅读全文
posted @ 2021-11-15 11:52 20191301 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1 编译运行附件中的代码,提交运行结果截图,并说明程序功能 #include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <semaphore.h> #define NUM 5 int queue[NUM]; sem_t b 阅读全文
posted @ 2021-11-15 11:28 20191301 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 通过输入gcc -S -o main.s main.c 将下面c程序”week0303学号.c“编译成汇编代码 #include <stdio.h> int g(int x){ return x+3; } int f(int x){ int i = 01; return g(x)+i; } int 阅读全文
posted @ 2021-11-06 16:27 20191301 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 码云链接 https://gitee.com/luhanqi_20191301/hello1/commit/cd212e82de26d936b1ff1db0bc722aa53ab01d7d ##改进思路 ###伪代码 打开目录文件 针对目录文件 根据输入进入判断并执行 读取目录条目 显示文件名 关闭 阅读全文
posted @ 2021-11-04 19:17 20191301 阅读(15) 评论(0) 推荐(0) 编辑