一字一句体验语言的魅力-2:80386-datasheet翻译学习-第一章完

1.1.4 Part IV ── Instruction Set
指令集

    Parts I, II, and III present overviews of the instructions as they relate

to specific aspects of the architecture, but this part presents the
instructions in alphabetical order, providing the detail needed by
assembly-language programmers and programmers of debuggers, compilers,
operating systems, etc. Instruction descriptions include algorithmic
description of operation, effect of flag settings, effect on flag settings,
effect of operand- or address-size attributes, effect of processor modes,
and possible exceptions.
第I,II,III部分呈现了指令的总体概述,因为他们涉及到构架的特定部分。这部分
使用字母序列呈现指令,提供了汇编语言程序员、调试程序员,编译程序员,操作系统
程序员需要的的细节。指令的介绍包括算法的操作描述,对标志位的影响,设置标志位
的影响,操作数或是地址长度属性的影响,处理器模式的影响,与可能的异常。

 1.1.5 Appendices
        附件
The appendices present tables of encodings and other details in a format

designed for quick reference by assembly-language and systems programmers.
这个附件呈现了编码表与其他的细节,使用一种格式为汇编语言与系统程序员快速
索引而设计。

1.2 Related Literature
    相关文献

The following books contain additional material concerning the 80386
microprocessor:
下面的书包含了80386微处理相关的其他材料:
● Introduction to the 80386, order number 231252
● 80386 Hardware Reference Manual, order number 231732
● 80386 System Software Writer’s Guide, order number 231499
● 80386 High Performance 32-bit Microprocessor with Integrated Memory
Management (Data Sheet), order number 231630

1.3 Notational Conventions
转换符号
This manual uses special notations for data-structure formats, for symbolic
representation of instructions, for hexadecimal numbers, and for super- and
sub-scripts. Subscript characters are surrounded by {curly brackets}, for
example 10{2} = 10 base 2. Superscript characters are preceeded by a caret
and enclosed within (parentheses), for example 10^(3) = 10 to the third
power. A review of these notations will make it easier to read the
manual.
这手册为数据结构格式,助记符,十六进制数,上标与下标使用特殊的符号。下标
字符被花括号围着。例如10{2}=10以2为基。上标字符使用^与(),例如10^(3) =
10的三次方。回顾这些符号将更简单的读这个手册。

1.3.1 Data-Structure Formats
    数据结构格式

In illustrations of data structures in memory, smaller addresses appear at
the lower-right part of the figure; addresses increase toward the left and
upwards. Bit positions are numbered from right to left. Figure 1-1
illustrates this convention.
数据结构在内存中的插图,小地址出现在图的右低部分;地址朝左与上增加。位
的位置从右到左的编号。图1-1说明这种约定。

1.3.2 Undefined Bits and Software Compatibility
未定义位于软件兼容
In many register and memory layout descriptions, certain bits are marked as
undefined. When bits are marked as undefined (as illustrated in Figure
1-1), it is essential for compatibility with future processors that
software treat these bits as undefined. Software should follow these
guidelines in dealing with undefined bits:
● Do not depend on the states of any undefined bits when testing the
values of registers that contain such bits. Mask out the undefined bits
before testing.
● Do not depend on the states of any undefined bits when storing them in
memory or in another register.
● Do not depend on the ability to retain information written into any
undefined bits.
● When loading a register, always load the undefined bits as zeros or
reload them with values previously stored from the same register.

在很多的寄存器与内存布局描述中,有些位被标记为未定义。当位被标记为未定义,

它的本质是为未来处理器兼容,软件将这些位作为未定义的。软件应该遵循下面的指导
方针处理未定义的位:
》当测试包含未定义位的寄存器的值得时候,不要依赖于任何未定义位的状态。测试
之前应该屏蔽掉这些位。
》当在内存中或其他寄存器中存储他们时,不要依赖任何未定义位的状态。
》不要依赖于将信息写入未定义位中保留信息的能力。
》当载入到一个寄存器,总是使用0装载未定义位或是装载此寄存器中原来的值。

NOTE

Depending upon the values of undefined register bits will make software
dependent upon the unspecified manner in which the 80386 handles these
bits. Depending upon undefined values risks making software incompatible
with future processors that define usages for these bits. AVOID ANY
SOFTWARE DEPENDENCE UPON THE STATE OF UNDEFINED 80386 REGISTER BITS.
依赖于未定义寄存器中的位的值,将使软件依赖于80386处理这些位使用未指定
的方式。依赖于这些有使软件不兼容的风险,在定义使用这些位的未来的处理器中。
避免任何软件依赖于808386寄存器未定义位的值。

1.3.3 Instruction Operands
When instructions are represented symbolically, a subset of the 80386
Assembly Language is used. In this subset, an instruction has the following
format:
label: prefix mnemonic argument1, argument2, argument3
where:
● A label is an identifier that is followed by a colon.
● A prefix is an optional reserved name for one of the instruction
prefixes.
● A mnemonic is a reserved name for a class of instruction opcodes that
have the same function.

在一个80386的汇编语言指令集中使用符号代替指令。在这个字集,一个指令有下面的

格式:
标号: 前缀 助记 参数1 参数2 参数3
标签是一个标示符,后面跟一个冒号。
前缀是一个指令前缀可选的保留名字。
助记符是为有相同功能操作码一类指令的保留名字。

● The operands argument1, argument2, and argument3 are optional. There
may be from zero to three operands, depending on the opcode. When
present, they take the form of either literals or identifiers for data
items. Operand identifiers are either reserved names of registers or
are assumed to be assigned to data items declared in another part of
the program (which may not be shown in the example). When two operands
are present in an instruction that modifies data, the right operand is
the source and the left operand is the destination.
这个操作参数1,参数2,参数3是可选的。可能有0到3个操作数,这依赖于操作码。
当表达这些参数时,他们采用字符或是表示符的形式表示数据条目。操作数表示符
是寄存器的保留名字,或者假定分配给声明在一个程序另一部分的数据条目。(可能
无法再这个例子中显示出来)。当两个操作数出现在同一个修改数据的指令中,右操
作数作为源操作数,左操作数是目的操作数。

For example:
LOADREG: MOV EAX, SUBTOTAL
In this example LOADREG is a label, MOV is the mnemonic identifier of an
opcode, EAX is the destination operand, and SUBTOTAL is the source operand
例如:
LOADREG: MOV EAX, SUBTOTAL
在这个例子中LOADREG是一个标签,MOV是一个操作码的助记标识符,EAX是一个目的操作数
,SUBTOTAL是一这个源操作数。

1.3.4 Hexadecimal Numbers
Base 16 numbers are represented by a string of hexadecimal digits followed
by the character H. A hexadecimal digit is a character from the set (0, 1,
2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F). In some cases, especially in
examples of program syntax, a leading zero is added if the number would
otherwise begin with one of the digits A-F. For example, 0FH is equivalent
to the decimal number 15.
1.3.4 十六进制数
基与16个数字组成的一个字符串后面跟一个字符H,可以表示一个十六进制数。
一个16进制数字的字符集(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).在一些情况,
尤其是在程序语法例子中,如果一个数字开始的不是A-F,一个前导0被添加。例如,
0FH是等效于10进制的数字15.

1.3.5 Sub- and Super-Scripts
This manual uses special notation to represent sub- and super-script
characters. Sub-script characters are surrounded by {curly brackets}, for
example 10{2} = 10 base 2. Super-script characters are preceeded by a
caret and enclosed within (parentheses), for example 10^(3) = 10 to the
third power.
Editors Note: This revised document provides actual super-script and sub-script characters where appropriate
1.3.5 sub- 与 super-脚本
这个手册使用一个指定的符号去呈现sub- 与 super-脚本 字符。
sub-脚本 字符 被一个{}符号包围。例如10{2} = 10以2为基。
sub-脚本 字符 演进成^符号。例如10^(3) = 10的三次方。

第一章 完

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
clc; clear all; close all; doTraining = 1; % 是否训练 %% 数据集标注 % trainingImageLabeler %% 导入数据集 load('data400.mat'); len = (size(data400, 1))/2; percent = 0.6; % 划分训练集 potData = data400(len+1:end, [1 3]); trainLen = round(len*percent); trainImg = potData([1:trainLen], 1:2); testImg = potData([(trainLen+1):len], 1:2); %% 网络参数 % 输入图片尺寸 imageSize = [128 128 3]; % 定义要检测的对象类的数量 numClasses = width(trainImg) - 1; % 根据训练数据估计检测框大小 trainingData = boxLabelDatastore(trainImg(:,2:end)); numAnchors = 1; % 一种检测框 [anchorBoxes, meanIoU] = estimateAnchorBoxes(trainingData, numAnchors); %% 搭建网络 % 导入基础训练网络resnet18 baseNetwork = resnet18(); % analyzeNetwork(baseNetwork) % 查看基础网络结构 % 指定特征提取层 featureLayer = 'res3a_relu'; % 创建 YOLO v2 对象检测网络 lgraph = yolov2Layers(imageSize,numClasses,anchorBoxes,baseNetwork,featureLayer); % analyzeNetwork(lgraph); % 查看搭建的YOLO网络结构 %% 训练YOLO检测网络 if doTraining % 训练参数 adam rmsprop options = trainingOptions('rmsprop', ... 'MiniBatchSize', 50, .... 'InitialLearnRate', 0.001, ... 'MaxEpochs', 100,... 'ExecutionEnvironment','cpu',... 'Shuffle', 'every-epoch'); % 训练检测器 [detector, info] = trainYOLOv2ObjectDetector(trainImg, lgraph, options); save(['模型New/model' num2str(round(rand*1000)) '.mat'], 'detector', 'info') else % 导入已训练模型 modelName = ''; load(modelName); end %% 查看训练结果 disp(detector) figure plot(info.TrainingLoss) grid on xlabel('Number of Iterations') ylabel('Training Loss for Each Iteration')给我非常详细的,一一句的解释,一句一句的解释这段代码
06-02

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值