汇编基础总结(一)

跟我学汇编(一)基础知识 零、前言身为程序员,序号一定从零开始数,哈哈。这篇文章是在学习汇编语言是所做的笔记,其中的内容必定会受到书中内容的影响,我所看的课本是王爽所著的《汇编语言》(第三版),写博客的目的是为了巩固自己所学的知识,同时将自己的想法表达出来,和大家一起分享,共同进步,不会将内容用于任何商业目的,如果博文中内容涉及侵权,请及时与我联系删除,谢谢!一、汇编语言的产生我们知道机器只能看懂机器语言,也就是0和1。实际 阅读详情

汇编学了也有一个多月了,今天把学过的基础知识点先总结一下先。留待日后忘了查阅。

 

--------------------------------------------------------------------------------------------

 

-----------------1,2,3-----------------------------
段寄存器存放 基地址

AX  通用寄存器

CS 存放要被cpu执行的代码的基地址 code segment
IP 别名为指令指针寄存器,存放段地址的偏移地址
CS*16+IP  就是cpu要执行的指令


debug是dos、windows都提供的实模式程序调试工具,可以查看cpu各种寄存器中的内容和机器码级跟踪程序的运行

r命令用来查看和改变各个寄存器内容,
d命令查看内存中的内容,
u命令将内存机器码转为汇编指令,
a命令以汇编指令格式在内存写入指令
t命令但不跟踪


数据段:全局变量
代码段:代码
堆栈段:局部变量

CPU根据DS(Data Segment)这个寄存器和任意一个通用寄存器的值或其他数值组成数据段的物理地址如:
DS:[0] DS:[BX]  (内存寻址)  (内存访问)

mov ds:[13ABH],1234H         内存地址的内容进行赋值  内存地址=1234
mov [13ABH],1234H         CPU默认指向ds


---------------------4-----------------------------

CPU如何知道一段内存空间被当作栈使用?执行入栈出栈时,如何知道哪个单元式栈顶单元?
cpu通过ss这个寄存器和sp通用寄存器来感知堆栈段的存在。
ss存放基地址,sp存放栈顶的偏移地址,任何时候ss:sp都指向栈顶元素

---------------------5,6-----------------------------

汇编语言中变量如何定义
如何屏幕显示
如何进行调试

assume关键字
如何让汇编语言“知道”,我们编写的应用程序有多少个段组成。
assume表示用来假设某一段寄存器和程序中的某一个用segment...ends定义的段相关联

db指令
define byte
label db initializer,initializer,initializer
label 表示任选标号,相当于c语言变量名
msg db "hello world"

vga B800F
 字体属性格式
7  6 5 4 3 2 1 0
BL R G B I R G B

闪烁 背景色 高亮 前景色
红底绿字: 01000010B

vga显存地址空间
在80*25列彩色模式下显示器可以显示25行80列
每个字符可以有256种属性(背景色前景色闪烁等)
一个字符在显存中占两个字节,分别存放ascii码值和属性
显示缓冲总共分为8页,每页4kb,显卡可以显示任意页内容一般情况下显示第0页内容即B8000H~B8F9FH

es,扩展段寄存器

不能直接给段寄存器赋值,应该先给通用寄存器赋值,然后再传给段寄存器

loop关键字
语法:
标号:  指令
  &nbs

零基础汇编视频课程19讲(超级经典) 资源名称:零基础汇编视频课程19讲(超级经典)资源目录:【】0c6aaf217261e95a8694b3c45e78f906【】0eed1838183a7f494bdc41d1c3b9e3c4【】13e7cc12e03f145e5248f9125dcda8ba【】365cc4b757cd74ddd079fb5b8627ff12【】3dc41072d 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。 立即下载

相关推荐

英语语法-句法

摘要:本文系统梳理了英语句法知识,重点解析了五种基本句型及其扩展结构。内容包括句子类型(陈述句、疑问句、祈使句、感叹句)、复合句构成(从句分类与连词使用)、特殊句型(倒装、强调、引语转换)等。特别强调句子成分分析技巧,指出每种句子成分可由不同词法单元充当,需掌握成分识别与划分方法。文章还提供了往期语法系列链接,形成完整的英语语法学习体系,帮助读者建立从词法到句法的系统认知框架。

STCNXPARM的博客 8828

别再手动查日志了!用Dify+Zabbix打造你的专属运维“嘴替”(保姆级配置流程)

本文详细介绍了如何利用Dify平台与Zabbix监控系统集成,构建智能运维对话系统,实现自然语言交互的运维管理。通过保姆级配置流程,帮助运维工程师提升查询效率、降低学习成本,打造企业级智能运维解决方案。

weixin_27298377的博客 457

【ROS】ROS局域网下多机通讯方法

最近工作中需要用到多机通讯,这里稍微总结一下使用方法。一、网络配置ifconfig这里举个例子,主机的IP地址为192.168.1.127,从机的IP地址为192.168.1.126;之后可测试一下能否互相ping通,成功后进行下一步。

weixin_43326110的博客 3362

vCenter Server出现no healthy upstream的解决方法

可以通过"VMware vCenter Server Management(服务)"来排查问题,在网页里面找到“服务”模块,会发现有很多服务没有启动起来,而且手动启动也无法启动。7.0 地址后,页面出现“no healthy upstream”,无法正常登录vCenter,重启后依旧如此,该故障的前提是没有对vCenter做过任何配置,如下图所示。于是用命令查询是否有证书过期,发现真有多个服务依赖的证书在当天早上过期。使用如下命令尝试打开服务发现不分服务可以打开,不分服务无法打开。

1万+

深入理解Android音视频同步机制(三)NuPlayer的avsync逻辑

本文深入介绍了NuPlayer的avsync逻辑和原理

张晖的专栏 1万+

ArcGIS实验教程——实验十七:缓冲区分析(Buffer Analysis)

【实验描述】缓冲区(Buffer)是为了识别某一地理实体对周围地物的影响而在其周围建立的一定宽度多边形区域,缓冲区分析(Buffer Analysis)是用来确定不同地理要素的空间临近性或接近程度的一种分析方法。作为GIS的空间分析方法之一,缓冲区分析的应用范围特别广泛,常用于分析矢量实体对周围的影响。例如,工厂排放的废水废气所影响的空间范围等等。 一、缓冲区的基本概念 1、缓冲区 是地理空间目标的一种影响范围或服务范围。 2、缓冲区分析 指根据分析对象的点、线、面实体,自动建立它们周围一定距离的带

智慧空间实验室 1万+

【GlobalMapper精品教程】027:路径剖面和和视线工具的使用

路径剖面视线工具允许您使用加载的高程数据集沿用户指定的路径获取垂直剖面。要定义生成3D路径剖面所遵循的路径,只需单击鼠标左键选择路径的点,然后石键单击以结束路径。出现一个带有剖面的对话框,允许您设置视线分析或优化端点。

智慧空间实验室 2051

【运动规划算法项目实战】全覆盖分区算法

全覆盖规划在机器人学领域具有重要意义,其应用场景涵盖了自动农场、扫地机器人、扫描监视无人机等多个领域。该问题的核心目标是使机器人能够从指定起点出发,规划一条避开障碍物、同时路径尽可能短的轨迹,从而实现对特定区域的全面覆盖。在实际应用中,全覆盖规划的成功实现对于提高机器人在各类环境中的工作效率至关重要。这一问题的解决涉及到高效的路径规划和规划区域分解技术。其中,梯形单元分解算法是一种常用分区的技术,过将地图上需要规划的区域进行分区,采用梯形分解的方式,可以更好地应对复杂环境。全覆盖算法规划流程。

xiewf的博客 1万+

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 开始了
debugboy_zy
博客等级 码龄16年 0粉丝 2原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值