编程与计算机基础

CSAPP学习笔记

深入理解计算机系统(C语言、数据结构、微嵌、编译原理、数电、模电) 第一章:计算机系统漫游 编译系统 hello.c->hello.i gcc -E hello.c -o hello.i hello.i->hello.s gcc -S hello.i -o hello.s hello.s->hello.o gcc -c hello.s -o hello.o hello.o->hello gcc hello.o -o hello 第二章:信息的表示和处理 //数据在不同架构处理器下的表示 #include <stdio.h> typedef unsigned char * byte_pointer; void show_bytes(byte_pointer start, size_t led) { size_t i; for (i = 0 ;i < led; i++) { printf("%.2x",start[i]); } printf("\n"); } void show_int(int x) { show_bytes((byte_pointer)&x,sizeof(int)); } void show_float(float x) { show_bytes((byte_pointer)&x,sizeof(float)); } void show_pointer(void *x) { show_bytes((byte_pointer)&x,sizeof(void *)); } int main() { int i =12345; show_int(i); return 0; } 整数、浮点数在计算机内部的表示与运算 第三章:程序的机器级表示 while、do-while、for性能分析 三种都是通过条件测试和跳转指令实现的。 switch、if-else性能分析 switch通过一个跳转表实现,所以只需要执行一次跳转,而if-else需要多次跳转指令,代码效率相对低。 ...

嵌入式与硬件

华迪实习

6月24日 PC与嵌入式计算机 参考微处理器与嵌入式系统设计课程内容。介绍计算机的体系结构、组成等。 开发环境及配置 介绍了在VMware中安装Ubuntu20.04LTS的方法 介绍通过运维三大神器之一sed来实现CLI换源操作,对sudo apt update命令作用做了分析介绍 安装openssh服务端,通过xshell、secureCRT、CMD、powershell等工具来实现对linux的访问,此处也介绍了systemctl命令的常用用法status、enabled、start等 介绍cd ls mkdir rm 等文件操作命令及参数 介绍文件权限管理命令chmod以及文件类型判断、文件权限修改等 介绍环境变量的概念,以及影响环境变量的多个配置文件,有系统级和用户级配置文件 介绍tar的归档打包与解包 ...

编程与计算机基础

hello world!

#include <stdio.h> void main() { printf("hello world\n"); return; }