当前位置: 首页 > 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)


http://www.mrgr.cn/news/10127.html

相关文章:

  • Word文件密码忘记,该如何才能编辑Word文件呢?
  • 190款大模型背后:揭秘600天后的中国大模型产业落地「真相」
  • 前端学习Day31
  • 【C++指南】类和对象(一):类和对象的定义和使用 基础讲解
  • Echarts
  • chmod命令学习2
  • Verilog | 有限状态机Case
  • JAVA基础:文件字符流
  • 【Go语言基础】调度器模型GPM与垃圾回收器GC
  • 第1章-04-Chrome及Chrome Driver安装及测试
  • 【Linux:管道】
  • 【审批流】springboot+vue+activiti平台,直接接入业务表单,成熟工作流
  • 20240827 每日AI必读资讯
  • 华为手机换ip地址怎么换?手机换ip地址有什么影响
  • Windows电脑本地安装跨平台文生音乐AI应用MusicGPT详细教程
  • 数据库架构演变过程
  • 《黑神话悟空》幽魂怎么打?大头怪幽魂打法攻略
  • Redis(面试篇)
  • 高可用IP地址管理:使用Keepalived和Nginx实现VIP及IP池配置
  • Linux | 探究C语言文件接口与Linux系统文件接口的区别与联系 | fopen和open的区别与联系