当前位置: 首页 > news >正文

《Programming from the Ground Up》阅读笔记:p95-p102

《Programming from the Ground Up》学习第6天,p95-p102总结,总计8页。

一、技术总结

1.directive(伪指令)

很多资料喜欢把directive和instruction都翻译成“指令”,这样在看到指令这个词时就不知道到底指的是什么?这里参考其它人的做法,将directive称为“伪指令”。

2.rept & .endr

语法:

.rept count....endr

(1).rept: rept是"repeat"的缩写,表示.rept和.endr之间的内容重复count次。

(2).endr: endr是“end repeat”的缩写。

record2:.ascii "Marilyn\0".rept 32 #Padding to 40 bytes.byte 0.endr

如上所示,"Marilyn\0"长度是8,占8个bytes, 重复0 byte 32次,所以是“Padding to 40 bytes”。

3.bit、byte、word

(1)bit

bit就是0或者1,即0是一个bit,1也是一个bit。01是两个bit,00000000是八个bit。

(2)byte

1 byte = 8 bit。

(3)word

word由多少个byte构成取决于电脑是多少位的:

16-bit architecture: A word is 2 bytes (16 bits).

32-bit architecture: A word is 4 bytes (32 bits).

64-bit architecture: A word is 8 bytes (64 bits).

(4)示例

《programming from the ground up》:p96, In this, everything is character data except for the age, which is simply a numeric field, using a standard 4-byte word(we could just use a single byte for this, but keeping it at word makes it easier to process)。

二、英语总结

1.open back up

p95, You can shut down the program and open it back up, and you are back where you started.

在上面这句话中“open it back up”的意思是“re-open, open again”。

2.be off with

p95, Structured data can contain variable-length fields, but at that point you are usually better off with a database.

在这句话话中“be better off with database”翻译过是“最好使用数据库”。

3.have sth down vs have sth down pat

have sth down的意思是“know it”,have sth down pat的意思是“know it perfectly”。示例:

p100,Now that we have our basic definitions down, we are ready to write oure programs.

三、其它

《Progromming From The Ground Up》p104写着:as write-record.s -o write-record.o,但前面都没有提到哪里定义了write-record.s这个文件,整本书翻遍了都没有找到。此时转到Github上去找,发现了别人写的write-record.s文件。

书上没有写哪段代码是写在这个文档,为什么别人知道呢?个人猜测是看到了as write-record.s -o write-record.o 这句命令,知道放到这里。这种灵活转换是我目前需要学习的。根据已有的条件去实现目标,不纠结于问题或错误。

四、参考资料

1. 编程

(1)Jonathan Bartlett,《Programming From The Ground Up》:https://book.douban.com/subject/1787855/

2. 英语

(1)Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org
在这里插入图片描述

欢迎搜索及关注:编程人(a_codists)

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • Redis使用详解
  • LLM之基于llama-index部署本地embedding与GLM-4模型并初步搭建RAG(其他大模型也可,附上ollma方式运行)
  • 【设计模式】模板方法模式和迭代器模式
  • 【Docker】Linux系统以及威联通QNAP部署思源笔记的通用教程
  • css实现闪烁渐变背景,@property自定义属性
  • 一次了解所有功能!超详细【Stable Diffusion界面】大揭秘!
  • 简过网:报个线上公务员培训班大概要多少钱?
  • 警惕!低血糖来袭,这些“隐形信号”你中招了吗?
  • 解决LabVIEW配置文件中文乱码问题
  • 【项目】微服务及时通讯系统:编写核心类
  • 拼车系统开发方案
  • Android about event log
  • 《通义千问AI落地—中》:前端实现
  • C语言程序设计(初识C语言后部分)
  • Compose(7)交互和动画
  • 《微软的软件测试之道》成书始末、出版宣告、补充致谢名单及相关信息
  • co.js - 让异步代码同步化
  • Codepen 每日精选(2018-3-25)
  • java小心机(3)| 浅析finalize()
  • Logstash 参考指南(目录)
  • mysql 数据库四种事务隔离级别
  • MySQL的数据类型
  • Spring技术内幕笔记(2):Spring MVC 与 Web
  • 从0搭建SpringBoot的HelloWorld -- Java版本
  • 对JS继承的一点思考
  • 给Prometheus造假数据的方法
  • 类orAPI - 收藏集 - 掘金
  • 理解IaaS, PaaS, SaaS等云模型 (Cloud Models)
  • 理清楚Vue的结构
  • 事件委托的小应用
  • 听说你叫Java(二)–Servlet请求
  • 《码出高效》学习笔记与书中错误记录
  • Hibernate主键生成策略及选择
  • 支付宝花15年解决的这个问题,顶得上做出十个支付宝 ...
  • # AI产品经理的自我修养:既懂用户,更懂技术!
  • #### go map 底层结构 ####
  • #pragma预处理命令
  • #我与Java虚拟机的故事#连载07:我放弃了对JVM的进一步学习
  • (02)Unity使用在线AI大模型(调用Python)
  • (1)无线电失控保护(二)
  • (附源码)spring boot车辆管理系统 毕业设计 031034
  • (附源码)基于SpringBoot和Vue的厨到家服务平台的设计与实现 毕业设计 063133
  • (附源码)计算机毕业设计ssm基于B_S的汽车售后服务管理系统
  • (九)信息融合方式简介
  • (十八)devops持续集成开发——使用docker安装部署jenkins流水线服务
  • (四)汇编语言——简单程序
  • (原創) 如何將struct塞進vector? (C/C++) (STL)
  • (转)四层和七层负载均衡的区别
  • .bat批处理(九):替换带有等号=的字符串的子串
  • .NET 4.0中使用内存映射文件实现进程通讯
  • .NET CLR Hosting 简介
  • .NET CORE 第一节 创建基本的 asp.net core
  • .net core 6 使用注解自动注入实例,无需构造注入 autowrite4net
  • .net core 连接数据库,通过数据库生成Modell
  • .NET core 自定义过滤器 Filter 实现webapi RestFul 统一接口数据返回格式