汇编实验 屏幕窗口程序
实验一 汇编程序学习与程序调试方法实验
七、实验报告要求
实验内容1任选2个为必做内容;内容2为必做。内容1 1. 实验内容1任选2个为必做内容;内容2为必做。内容1有单步调试与全 速执行记录,内容2有单步调试、断点调试以及全速执行记录。 速执行记录,内容2有单步调试、断点调试以及全速执行记录。
单步调试记录表: 单步调试记录表:
序号 执行到指令
实验一
一、 实验目的
汇编程序学习与程序调试方法实验
1.了解仿真软件使用、简单程序编写和汇编程序调试的方法。 了解仿真软件使用、简单程序编写和汇编程序调试的方法。 掌握程序的单步,断点,连续运行方法和寄存器及片内外RAM RAM存储器的检查 2. 掌握程序的单步,断点,连续运行方法和寄存器及片内外RAM存储器的检查 方法 3.掌握存储器块操作、内存块五、实验步骤
启动计算机,打开伟福仿真软件, 进入仿真环境, 1. 启动计算机 , 打开伟福仿真软件 , 进入仿真环境 , 了解片内 RAM、特殊功能寄存器、片外RAM内容的检查、修改方法。 RAM内容的检查 RAM、特殊功能寄存器、片外RAM内容的检查、修改方法。 进行仿真器的设置,点击主菜单的仿真器选项, 2. 进行仿真器的设置 , 点击主 菜 单的仿真器选项 , 选择仿真器 设置,或者直接点击仿真器设置快捷按钮打开仿真器设置窗口, 设置,或者直接点击仿真器设置快捷按钮打开仿真器设置窗口, 在仿真器标签里选择使用伟福软件模拟器。 在仿真器标签里选择使用伟福软件模拟器。 在编辑窗口输入源程序,保存,文件名为T11- ASM。 3. 在编辑窗口输入源程序,保存,文件名为T11-A.ASM。
T12.ASM源程序 T12.ASM源程序 ORG OOOOH A,#00 00H MOV A,#00H ,#16 MOV R2,#16 ,#40 40H MOV R0,#40H LOOP: @R0 LOOP:MOV @R0,A INC R0 INC A DJNZ R2,LOOP ;建立数据 DPTR,#1000 MOV DPTR,#1000 ,#16 MOV R3,#16 ,#40 40H MOV R0,#40H LOOP1 A,@R0 LOOP1:MOV A,@R0 MOVX @DPTR,A INC DPTR INC R0 ,LOOP1 DJNZ R3,LOOP1 SJMP $ ;移动数据 END
汇编实验指导书
实验一汇编语言程序的上机过程一、实验目的掌握汇编语言源程序的编辑、汇编、连接及运行过程,为以后的实验打下基础。
二、实验内容1、输入下列完整的程序STACK SEGMENT STACKDB 200 DUP(?)STACK ENDSDATA SEGMENTBUF DB‘HOW ARE YOU!$’DATA ENDSCODE SEGMENTASSUME CS:CODE,DS:DATA,SS:STACKSTART:MOV AX,DATAMOV DS,AXLEA DX,BUFMOV AH,9INT 21HMOV AH,4CHINT 21HCODE ENDSEND START(本程序的正确运行结果是在屏幕显示“HOW ARE YOU!”)2、完成课本P193习题5.1。
三、实验步骤(1)利用EDIT编辑源程序;(2)汇编源程序;(3)连接目标程序文件;(4)运行可执行文件。
四、实验报告要求写出以上两个实验内容的题目、源码、具体实验步骤和实验结果。
1.在屏幕上打印字符串”How are you?”。
(1)源代码:;打印字符串"How are you?"STACK SEGMENT STACKDB 200 DUP(?)STACK ENDSDATA SEGMENTBUF DB 'How are you?$'DATA ENDSCODE SEGMENTASSUME CS:CODE, DS:DATA, SS:STACKSTART: MOV AX, DATAMOV DS, AXMOV AX, STACKMOV SS, AX;在屏幕上打印字符串LEA DX, BUFMOV AH, 9HINT 21HMOV AH, 4CHINT 21HCODE ENDSEND START(2)具体实验步骤:编辑→保存→masm→link→运行(3)结果截图:2.编写一个汇编语言程序,要求对键盘输入的小写字母用大写字母显示出来。
汇编实验-屏幕窗口程序
实验五屏幕窗口程序
一、实验的目的与要求
(一)实验目的:掌握显示器I。程序设计的方法,掌握宏的相关概念,以及运用方法。
(二)实验要求:在屏幕上开出三个窗口,它们的行列坐标如下页图所示,光标首先定位在右窗口最下面一行 的行首(15,50),如果从键盘输入字符,则显示在右窗口,同时也显示在下窗口的最下面一行。若需要将字符显示 于左窗口,则先按下左键,接着再从键盘输入字符,字符就会从左窗口的最下行开始显示,同时下窗口也显示左窗 口的内容。当一行字符显示满后,窗口自动向上卷动一行,输入字符继续显示于最低一行,窗口最高一行向上卷动 后消失。编写屏幕窗口程序时,要求将一些功能程序段定义成宏指令,如向上卷动、清屏、
(18,15)
(22,65)
接受字符并判断、在屏幕上显示字符、光标定位。
二、实验正文
实验分析:实验思路比较简单,主要是运用BloS调用,这些查表可得,实验要求要用宏来定义一些基本功能, 宏调用比较简单,把一些基本功能编写成宏,能高效率的执行程序,但是宏也存在着一些缺点,在宏调用时,要宏展 开,这样会占用一定的空间,所以宏是一种以空间换时间的策略,像一些复杂的操作不宜编写成宏。BIoSI。号调用 提供了大量的屏幕、光标显示格式,要注意参数的意义,以便正确的显示结果。
三、流程图如下:
初始化卷行属性 scroll 页号 行、列 附录:程序源代码如下: ・**************************************************************** datassegmentcurydb15curxdb50 在当前பைடு நூலகம்口和下窗口显示 displaymacro ;在当前的窗口打印字符 ;在下窗口输出
Win32汇编 开始了解窗口程序word精品文档9页
Win32汇编开始了解窗口程序Be water,my friends!世界上只有一种失败,那就是半途而废。
窗口是什么?大家每天在使用Windows,屏幕上的一个个方块就是一个个窗口!那么,窗口为什么是这个样子呢?窗口就是程序吗?回想DOS时代的计算屏幕,在1990年Windows 3.0推出之前,计算机的屏幕一直使用文本模式,黑洞洞的底色上漂浮着白色的小字。
对DOS程序来说,屏幕是唯一的,上面有光标表示输入字符的位置,程序运行后往屏幕输出一些信息,退出时输出的信息就留在了屏幕上,然后是第二个程序重复这个过程,当屏幕被写满的时候,整个屏幕上卷一行,最上面一行被去掉,然后程序在最底下新空出来的一行上继续输出。
对于一个单任务的操作系统,这种方式是很合理的,因为平时使用传真机或打字机就是用上卷的方式来容纳新的内容的。
但是如果是多任务呢?两个程序同时往屏幕上写东西或者两个人同时往打字机上打字,那么谁都看不懂混在一起的是什么。
DOS下的TSR(内存驻留)程序是多个程序同时使用一个屏幕的例子,但实质上这并不是多任务,而是TSR将别的程序暂时挂起,挂起的程序不可能在TSR执行期间再向屏幕输出内容,TSR在输出自己的内容之前必须保存屏幕上显示的内容,并在退出的时候把屏幕恢复原来的样子,否则挂起的程序并不知道屏幕已经被改变,在这个过程中,DOS不会去干预中间发生的一切。
Windows是多任务的操作系统,可以同时运行多个程序,同样,各个程序在屏幕上的显示不能互相干扰,而且,多个程序可以看成是"同时"运行的,在后台的程序也可能随时向屏幕输出内容,这中间的高度是由Windows完成的。
Windows采用的方法是给程序一块矩形的屏幕空间,这就是窗口。
应用程序通过Windows向属于自己的窗口显示信息,Windows判断该窗口是不是被别的窗口挡住,并把没有挡住的部分输出到屏幕上,这样屏幕上显示的东西就不会互相覆盖而乱套。
窗口技术实验报告(3篇)
第1篇一、实验目的1. 理解窗口技术的概念和原理。
2. 掌握窗口的基本操作,如创建、显示、隐藏、移动和关闭。
3. 学习使用窗口技术实现简单的图形用户界面(GUI)。
二、实验环境1. 操作系统:Windows 102. 开发工具:Visual Studio 20193. 编程语言:C三、实验原理窗口技术是图形用户界面(GUI)设计的基础,它允许用户通过图形界面与计算机系统进行交互。
在C中,窗口通常是通过Windows窗体(Windows Forms)实现的。
每个窗体都是一个窗口,可以包含各种控件,如按钮、文本框、列表框等,以实现与用户的交互。
四、实验步骤1. 创建窗体打开Visual Studio 2019,创建一个新的Windows Forms App (.NET Framework) 项目。
在解决方案资源管理器中,双击Form1,打开窗体设计器。
2. 添加控件在工具箱中找到所需的控件,如按钮(Button)、标签(Label)、文本框(TextBox)等,并将它们拖放到窗体上。
3. 设置控件属性双击控件,在属性窗口中设置控件的属性,如名称、文本、位置、大小等。
4. 编写事件处理程序双击控件,在事件处理器中编写代码,以响应用户的操作,如按钮点击事件。
5. 测试窗体运行程序,测试窗体的功能,确保所有控件和功能按预期工作。
五、实验内容1. 创建一个简单的计算器创建一个包含数字按钮、运算符按钮和结果显示框的简单计算器。
用户可以通过点击按钮输入数字和运算符,然后点击等号按钮得到计算结果。
2. 实现一个简单的信息提示框创建一个窗体,包含一个按钮和一个标签。
点击按钮后,标签显示一条信息提示。
3. 实现窗口的基本操作编写代码实现窗口的创建、显示、隐藏、移动和关闭。
六、实验代码示例以下是一个简单的计算器窗体的代码示例:```csharpusing System;using System.Windows.Forms;namespace WindowsFormsApp{public partial class CalculatorForm : Form{public CalculatorForm(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){// 处理数字按钮点击事件}private void buttonAdd_Click(object sender, EventArgs e){// 处理加号按钮点击事件}private void buttonEqual_Click(object sender, EventArgs e){// 处理等号按钮点击事件}private void buttonClear_Click(object sender, EventArgs e){// 处理清除按钮点击事件}}}```七、实验结果与分析通过本次实验,我们成功创建了一个简单的计算器,实现了窗口的基本操作。
Windows窗体程序的开发实验报告
精通C#与.NET4.0数据库开发实验报告实验题目:Windows窗体程序的开发专业计算机科学与技术学生XX班级学号教师指导单位日期一、实验目的1.学会在Visual Studio 2021中创立和运行窗体程序。
2.掌握Windows窗体的根本操作。
3.学会使用常用的Windows控件。
4.学会使用菜单和工具栏以及通用对话框。
二、实验环境.NET框架开发环境Visual Studio 2021三、实验内容例5-1、2:源代码:publicpartialclass Form1 : Form{public Form1( ){Initializeponent( );}privatevoid AddInputToLog(string input){this.tbLog.AppendText("\r\n" + input);this.tbLog.ScrollToCaret( );}privatevoid btnSubmit_Click(object sender, EventArgs e) {string input = this.tbInput.Text;this.AddInputToLog(input);this.tbInput.Clear( );}}例5-3、4:源代码:publicpartialclass FrmMain : Form{public FrmMain( ){Initializeponent( );}privatevoid btnSetProp_Click(object sender, EventArgs e){this.Text = "测试对话框";this.FormBorderStyle = FormBorderStyle.FixedDialog;this.BackColor = Color.Gray;this.WindowState = FormWindowState.Normal; this.MinimizeBox = false;this.Height = 200;this.Width = 400;this.TopMost = true;}private FrmMain _CurrFrm = null;privatevoid btnCreate_Click(object sender, EventArgs e){if(this._CurrFrm == null){this._CurrFrm = new FrmMain( );this._CurrFrm.Show( );}else{this._CurrFrm.Activate( );}}privatevoid btnClose_Click(object sender, EventArgs e){if (this._CurrFrm !=null){this._CurrFrm.Close( );this._CurrFrm = null;}}privatevoid FrmMain_Load(object sender, EventArgs e){}}例5-5:源代码:// label1参数设置bel1.AutoSize = true;bel1.BackColor = System.Drawing.Color.Red;bel1.Font = new System.Drawing.Font("楷体_GB2312",12F, System.Drawing.FontStyle.Regular,System.Drawing.GraphicsUnit.Point,((byte)(134)));bel1.ForeColor = System.Drawing.Color.White;bel1.Location = new System.Drawing.Point(68, 43); = "label1";bel1.Size = new System.Drawing.Size(232, 16);bel1.TabIndex = 0;bel1.Text = "红底白字,楷体小四号, 无边框";bel1.Click += new System.EventHandler(bel1_Click);// label2参数设置bel2.AutoSize = true;bel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;bel2.Font = new System.Drawing.Font("幼圆",15F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((byte)(134)));bel2.Location = new System.Drawing.Point(49, 79); = "label2";bel2.Size = new System.Drawing.Size(289, 22);bel2.TabIndex = 1;bel2.Text = "幼圆小三粗体, Single边框";bel2.Click += new System.EventHandler(bel2_Click); 例5-6:源代码:publicpartialclass Form1 : Form{privateint _Value = 0;//btnShowMsg的Click事件处理函数privatevoid btnShowMsg_Click(object sender, EventArgs e) {MessageBox.Show(string.Format("现在需要: {0} ", this._Value));}//“多一点〞按钮Click事件处理函数privatevoid btnAdd_Click(object sender, EventArgs e){this._Value++;this.lbRes.Text = string.Format("现在需要: {0} ", this._Value);}//“少一点〞按钮Click事件处理函数privatevoid btnSub_Click(object sender, EventArgs e){this._Value--;this.lbRes.Text = string.Format("现在需要: {0} ", this._Value);}}例5-7:源代码:publicpartialclass Form1 : Form{public Form1( ){Initializeponent( );}privatevoid buttons_CheckedChanged(object sender, EventArgs e) {string weeks = "";weeks += ckbWeek1.Checked ? "星期一" :"";weeks += ckbWeek2.Checked ? "星期二" : "";weeks += ckbWeek3.Checked ? "星期三" : "";weeks += ckbWeek4.Checked ? "星期四" : "";weeks += ckbWeek5.Checked ? "星期五" : "";weeks += ckbWeek6.Checked ? "星期六" : "";weeks += ckbWeek7.Checked ? "星期日" : "";string sport = "";sport += rbSword.Checked ? "击剑" : "";sport += rbJump.Checked ? "跳水" : "";sport += rbTiCao.Checked ? "体操" : "";string jiangpai = "";jiangpai += rbGold.Checked ? "金牌" : "";jiangpai += rbSliver.Checked ? "银牌" : "";jiangpai += rbTong.Checked ? "铜牌" : "";this.lbHint.Text = weeks + sport + jiangpai;}}例5-8:源代码:publicpartialclass Form1 : Form{privatevoid Form1_Load(object sender, EventArgs e){this.mtbMobile.Mask = ""; //手机:13后面9个必填数字this.mtbPhone.Mask = "00"; //:4位必填区号,7或8位?this.tbName.Text = "";this.tbUsers.Text = "";}privatevoid btnAdd_Click(object sender, EventArgs e){string usr = string.Format("<{0}>:<{1}>:<{2}>", //产生用户信息this.tbName.Text,this.mtbPhone.Text,this.mtbMobile.Text);//添加到用户记录文本框¨°this.tbUsers.AppendText(usr + System.Environment.NewLine);this.mtbMobile.Text = ""; //清空用户信息this.mtbPhone.Text = "";this.tbName.Text = "";}}例5-9:源代码:publicpartialclass Form1 : Form{public Form1( ){Initializeponent( );}privatevoid Form1_Load(object sender, EventArgs e){//设置cmbHouXuan只能从boBox中的已有候选值选择this bHouXuan.DropDownStyle = boBoxStyle.DropDownList; //lstResult只能执行单项选择,并且对所有值进展排序this.lstResults.SelectionMode = SelectionMode.One;this.lstResults.Sorted = true;this.GeneratebItems( ); //产生boBox中D的可选项}privatevoid GeneratebItems( ){this bHouXuan.Items.Clear( ); //移除原有的数据Random rd = new Random();for (int i = 0; i < 10; i++) //随机生成10个新的数据{string item = string.Format("Item-{0:X8}", rd.Next( ));this bHouXuan.Items.Add(item); //添加到boBox中}this bHouXuan.SelectedIndex = 0; //默认选中第一条}//重新生成boBox中的侯选项privatevoid btnFresh_Click(object sender, EventArgs e){this.GeneratebItems( ); //重新生成bBox中的候选项}//将bBox中选中值¦添加到ListBox中Dprivatevoid btnAddOne_Click(object sender, EventArgs e){//通过boBox.SelectedItem获取当前选中的候选项,然后添加到ListBox中Dstring item = (string)this bHouXuan.SelectedItem;this.lstResults.Items.Add(item);}//从ListBox中移除当前选中项privatevoid btnRemoveOne_Click(object sender, EventArgs e){if (this.lstResults.SelectedIndex >= 0) //如果当前ListBox中有选中条目,移除它{this.lstResults.Items.RemoveAt(this.lstResults.SelectedIndex);}}//从ListBox中移除所有项privatevoid btnRemovAll_Click(object sender, EventArgs e){this.lstResults.Items.Clear( );}}例5-10:源代码:privatevoid btnMsgBox_Click(object sender, EventArgs e){MessageBox.Show("这是第一个消息框,只有确认按钮");//显示最简单的MessageBoxMessageBox.Show("这是二个消息框¨,有标题,只有确认按钮", "第二个消息框");//显示有文本和标题的MessageBox//显示具有文本、标题、确定和取消按钮的MessageBoxMessageBox.Show("这是第三个消息框¨,有标题,只有确认和¨取消按钮","第三个消息框", MessageBoxButtons.OKCancel);//显示具有文本、标题、确定和¨取消按钮、告警图标的MessageBox MessageBox.Show("这是第四个消息框¨,有标题,只有确认和取消按钮,告警图标", "第四个消息框", MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);}例5-11:源代码:private void btnOpenFile_Click(object sender, EventArgs e){OpenFileDialog ofdlg = new OpenFileDialog( );//创立OpenFileDialog对象ofdlg.Filter = "文本文件(*.txt)|*.TXT|Word文件(*.doc)|*.DOC"; //只选择TXT和DOC 扩展名文件ofdlg.Title = "选择文本文件或Word文件"; //设置对话框的标题if(ofdlg.ShowDialog() == DialogResult.OK) //显示对话框,并等待返回{this.tbOpenFileName.Text = ofdlg.FileName; //如果用户选择了文件那么显示到界面}else{this.tbOpenFileName.Text = "还没有选择要翻开的文件"; //没有选择文件,那么显示默认提示}}例5-12:源代码:private void btnSetColor_Click(object sender, EventArgs e){ColorDialog cdlg = new ColorDialog( ); //创立ColorDialog对象cdlg.Color = btnSetColor.ForeColor; //设置默认颜色为btnSetColor当前前风光if (cdlg.ShowDialog( ) == DialogResult.OK) //显示对话框,并等待返回{this.btnSetColor.ForeColor = cdlg.Color; //选择了新的颜色,那么更新btnSetColor前风光}}例5-13:源代码:private void btnSetFont_Click(object sender, EventArgs e){FontDialog fdlg = new FontDialog( ); //创立FontDialog对象fdlg.Font = btnSetFont.Font; //设置默认字体为btnSetFont当前字体if (fdlg.ShowDialog( ) == DialogResult.OK) //显示对话框,并等待返回{this.btnSetFont.Font = fdlg.Font; //选择了新的字体,那么更新btnSetFont的字体}}四、实验总结通过此次实验,我学会了在Visual Studio 2021中创立和运行窗体程序;也掌握了Windows窗体的根本操作;学习使用了常用的Windows控件;同时学会了使用菜单和工具栏以及通用对话框。
窗口基本操作实验报告
窗口基本操作实验报告一、实验目的本实验旨在学习和掌握窗口的基本操作,包括打开新窗口、最小化、最大化和关闭窗口等,以便能够熟练地操作和管理窗口。
二、实验内容1. 打开新窗口在操作系统的桌面上,鼠标右键点击空白处,选择“新建”-> “窗口”来打开一个新的窗口。
也可以通过使用快捷键“Ctrl + N”来新建一个窗口。
2. 最小化和还原窗口点击窗口的右上角的“-”符号,即可将窗口最小化到任务栏中。
在任务栏中,点击对应的窗口图标,将窗口重新还原到屏幕上。
也可以通过使用快捷键“Windows键+ D”将窗口最小化或还原。
3. 最大化和还原窗口点击窗口的右上角的“口”符号,即可将窗口最大化,占据整个屏幕。
再次点击该符号,窗口将还原到原来的大小。
也可以通过使用快捷键“Windows键+ 上箭头”将窗口最大化,使用快捷键“Windows键+ 下箭头”将窗口还原。
4. 关闭窗口点击窗口的右上角的“X”符号,即可关闭当前窗口。
也可以通过使用快捷键“Alt + F4”来关闭窗口。
三、实验步骤1. 在桌面右键点击空白处,选择“新建”-> “窗口”打开一个新的窗口。
2. 点击窗口右上角的“-”符号,将窗口最小化到任务栏中。
3. 在任务栏中,点击对应的窗口图标,将窗口重新还原到屏幕上。
4. 点击窗口右上角的“口”符号,将窗口最大化。
再次点击该符号,窗口将还原到原来的大小。
5. 点击窗口右上角的“X”符号,关闭当前窗口。
四、实验结果与分析通过以上实验操作,我们成功地完成了窗口的基本操作。
我们可以发现,在操作系统中,窗口的打开、关闭、最小化和最大化等操作都非常简便和直观。
这些窗口的基本操作功能方便了我们在同时处理多个任务时的操作和切换。
此外,通过实验我们也了解到了使用快捷键能够提高操作效率,特别是在关闭窗口时,使用快捷键“Alt + F4”比鼠标点击操作更加快捷和便捷。
五、实验总结通过本次实验,我们不仅学习和掌握了窗口的基本操作,还深刻意识到了操作系统的智能化和人性化设计的重要性。
汇编实验四汇编语言上机过程及屏幕字符显示程序
实验报告──学年第学期实验课程汇编语言学生姓名123实验项目汇编语言上机过程及屏幕字符显示程序学院计算机科学技术实验性质专业选修课班级学号实验地点同组人数 1 第组实验日期第周星期第节成绩3环境参数Windows xp一、实验目的及要求二、实验原理、实验内容三、实验仪器设备及材料四、操作方法与实验步骤五、实验数据记录及处理六、实验结果分析及讨论一:1、熟练掌握汇编语言的程序格式,程序设计方法;学会使用masm6.11对源程序进行编译、链接、调试和运行2、利用DOS功能调用INT21H的2号和9号功能进行屏幕显示的方法。
3、利用^Break退出程序的方法及局限性。
4、汇编程序的编写二:实验任务编写一个简化的段定义结构程序:先提示输入数字“Input number:0-9”,然后在下一行显示输入的数字,结束;如果不是键入了0-9 数字,就提示错误“ERROR!”,继续等待输入数字。
源代码:编译连接:实验结果:此程序没按要求将数字在下一行输出。
且程序中用到了多余的指令int 3.修改“done:”段done: mov dl,almov ah,02hint 21h.exit 02.编写一个完整的段定义结构程序:从键盘输入一个字符串(不超过255个),将其中的小写字母转换成大写字母,然后按原来的顺序在屏幕上显示。
要求对以上两个程序,进行编译,链接,调试,运行,给出具体步骤源代码:请问程序中的第39行错误用了一个标号。
编译连接:运行结果:三、小结1、学会使用edit进行程序的编写。
2、学会写简易段程序和完整段程序。
3、学会了在dos下进行汇编程序的编译、连接、调试和运行。
4、学会了使用21号中断的2号9号功能进行字符的显示。
5、汇编基础知识不扎实,指令经常写错,要多练习。
仪器设备损坏、非正常损耗材料(试剂)及处理情况:无教师对报告的最终评价及处理意见:2段程序均有错。
教师签字:年月日。
2.8吋彩色液晶屏汇编语言实验程序
上一次发表的是用C语言编写的2.8 吋彩色液晶屏实验程序,这一次是汇编语言编写的2.8 吋彩色液晶屏实验程序,两个程序的运行结果是完全一样的,只是编程用的编程语言不同而已。
对于初学C51单片机的朋友们学习不同语言编程能有所帮助,本程序是经过本人上机测试完全通过Keil 4 验证的,可以放心的使用。
本程序驱动ILI9341 或RM68090 芯片驱动的2.8 吋彩色液晶屏。
显示点阵数:240RGB(W)×320(H)。
芯片为宏晶科技公司的STC12C5A60S2或STC12LE5A60S2 芯片。
注:RGB 为565 格式的16bit。
$INCLUDE(STC12C5A.INC);===============================================;编程日期:2014年09月25日;===============================================;初始化定义和数据单元;;===============================================RSB BIT P3.3 ;寄存器选择,0:寄存器,1:参数CSB BIT P3.4 ;片选,低电平有效RESET BIT P3.5 ;复位WRB BIT P3.6 ;写数据信号RDB BIT P3.7 ;读数据信号;===============================================;主程序开始;===============================================ORG 0000HLJMP MAIN ;开始ORG 0100HMAIN:MOV R0,#7FHCLR ACLEARED:MOV @R0,ADJNZ R0, CLEAREDMOV SP,#0E0HSETB RESETLCALL DELAY1MSCLR RESETLCALL DELAY10MSSETB RESETLCALL DELAY120MSLCALL REGISTER_SETTINGS ;配置9341;===============================================;循环程序;===============================================CYCLE:MOV R7,#0FFHMOV R6,#0FFHLCALL DISPLAY ;显示白色MOV R7,#00HMOV R6,#00HLCALL DISPLAY ;显示黑色LCALL DELAY1SLCALL PICTURES ;显示图片LCALL DELAY1SMOV R7,#0F8HMOV R6,#00HLCALL DISPLAY ;显示红色ACALL DELAY1SMOV R7,#07HMOV R6,#0E0HLCALL DISPLAY ;显示绿色ACALL DELAY1SMOV R7,#00HMOV R6,#1FHLCALL DISPLAY ;显示蓝色LCALL DELAY1SMOV R7,#0FFHMOV R6,#0E0HLCALL DISPLAY ;显示黄色LCALL DELAY1SMOV R7,#0F8HMOV R5,#1FHLCALL DISPLAY ;显示紫色LCALL DELAY1SMOV R7,#07HMOV R6,#0FFHLCALL DISPLAY ;显示青色LCALL DELAY1SCPL P4.3LJMP CYCLE ;返回循环程序;=============================================== ;显示设置,区域和数据240x320;=============================================== DISPLAY:MOV 22H,R7MOV 23H,R6LCALL SETTINGS_AREA ;设置区域CLR AMOV R3,AMOV R2,ADISPLAY01:MOV R4,#0F0HDISPLAY02:MOV R7,22HLCALL TWO_DATA ;写双字节显示数据DJNZ R4, DISPLAY02 ;240列INC R3CJNE R3,#00H,DISPLAY03INC R2DISPLAY03:CJNE R2,#01H,DISPLAY01CJNE R3,#40H,DISPLAY01 ;320行RET;=============================================== ;显示图片;=============================================== PICTURES:LCALL SETTINGS_AREA ;设置区域MOV R1,#04H ;显示4幅图片PICTURES01:MOV DPTR,#IMAGE_PIXELSMOV R2,#50HPICTURES02:MOV R3,#0F0HPICTURES03:CLR AMOVC A,@A+DPTRMOV R7,AINC DPTRCLR AMOVC A,@A+DPTRMOV R6,AINC DPTRLCALL TWO_DATA ;写DAT文件,双字节DJNZ R3,PICTURES03DJNZ R2,PICTURES02DJNZ R1,PICTURES01RET;=============================================== ;设置区域;=============================================== SETTINGS_AREA:MOV R7,#2AH ;列地址时钟LCALL COMMAND ;写8位命令MOV R7,#00HLCALL WRITE_DATA ;写8位数据参数MOV R7,#00HLCALL WRITE_DATA ;写8位数据参数LCALL WRITE_DATA ;写8位数据参数MOV R7,#0EFHLCALL WRITE_DATA ;写8位数据参数MOV R7,#2BH ;页地址设置LCALL COMMAND ;写8位命令MOV R7,#00HLCALL WRITE_DATA ;写8位数据参数MOV R7,#00HLCALL WRITE_DATA ;写8位数据参数MOV R7,#01HLCALL WRITE_DATA ;写8位数据参数MOV R7,#3FHLCALL WRITE_DATA ;写8位数据参数MOV R7,#2CH ;存储器写LJMP COMMAND ;写8位命令RET;=============================================== ;写寄存器命令;=============================================== COMMAND:CLR RSBSETB RDBCLR CSBMOV P0,R7CLR WRBSETB WRBSETB CSBRET;=============================================== ;写数据参数;=============================================== WRITE_DATA:SETB RSBSETB RDBCLR CSBMOV P0,R7CLR WRBSETB WRBSETB CSBRET;=============================================== ;写双字节显示数据;===============================================SETB RSBSETB RDBCLR CSBMOV P2,R7MOV P0,R6CLR WRBSETB WRBSETB CSBRET;=============================================== ;延时1mS;=============================================== DELAY1MS:MOV R6,#8DHDL0:MOV R5,#39HDJNZ R5,$DJNZ R6,DL0NOPRET;=============================================== ;延时10mS;=============================================== DELAY10MS:MOV R7,#0BDHDL1:MOV R6,#0AEHDL2:MOV R5,#01HDJNZ R5,$DJNZ R6,DL2DJNZ R7,DL1RET;=============================================== ;延时120mS;=============================================== DELAY120MS:MOV R7,#75HDL3:MOV R6,#78HDL4:MOV R5,#45HDJNZ R5,$DJNZ R6,DL4DJNZ R7,DL3DJNZ R5,$RET;=============================================== ;延时1S;=============================================== DELAY1S:MOV R7,#0DFHDL5:MOV R6,#0D4HDL6:MOV R5,#0ADHDJNZ R5,$DJNZ R6,DL6DJNZ R7,DL5MOV R5,#03HDJNZ R5,$NOPRET;=============================================== ;ILI9341寄存器配置;=============================================== REGISTER_SETTINGS:MOV R7,#0CFH ;LCALL COMMAND ;写寄存器命令MOV R7,#00H ;LCALL WRITE_DATA ;写8位数据MOV R7,#0D9HLCALL WRITE_DATAMOV R7,#30HLCALL WRITE_DATAMOV R7,#0EDHLCALL COMMANDMOV R7,#64HLCALL WRITE_DATAMOV R7,#03HLCALL WRITE_DATAMOV R7,#12HLCALL WRITE_DATAMOV R7,#81HLCALL WRITE_DATAMOV R7,#0E8HLCALL COMMANDMOV R7,#85HLCALL WRITE_DATAMOV R7,#10HMOV R7,#78H LCALL WRITE_DATA MOV R7,#0CBH LCALL COMMAND MOV R7,#39H LCALL WRITE_DATA MOV R7,#2CH LCALL WRITE_DATA MOV R7,#00H LCALL WRITE_DATA MOV R7,#34H LCALL WRITE_DATA MOV R7,#02H LCALL WRITE_DATA MOV R7,#0F7H LCALL COMMAND MOV R7,#20H LCALL WRITE_DATA MOV R7,#0EAH LCALL COMMAND MOV R7,#00H LCALL WRITE_DATA MOV R7,#00H LCALL WRITE_DATA MOV R7,#0C0H LCALL COMMAND MOV R7,#21H LCALL WRITE_DATA MOV R7,#0C1H LCALL COMMAND MOV R7,#12H LCALL WRITE_DATA MOV R7,#0C5H LCALL COMMAND MOV R7,#32H LCALL WRITE_DATA MOV R7,#3CH LCALL WRITE_DATA MOV R7,#0C7H LCALL COMMAND MOV R7,#0C1H LCALL WRITE_DATA MOV R7,#36H LCALL COMMAND MOV R7,#08HLCALL COMMAND MOV R7,#55H LCALL WRITE_DATA MOV R7,#0B1H LCALL COMMAND MOV R7,#00H LCALL WRITE_DATA MOV R7,#18H LCALL WRITE_DATA MOV R7,#0B6H LCALL COMMAND MOV R7,#0AH LCALL WRITE_DATA MOV R7,#0A2H LCALL WRITE_DATA MOV R7,#0F2H LCALL COMMAND MOV R7,#00H LCALL WRITE_DATA MOV R7,#26H LCALL COMMAND MOV R7,#01H LCALL WRITE_DATA MOV R7,#0E0H LCALL COMMAND MOV R7,#0FH LCALL WRITE_DATA MOV R7,#20H LCALL WRITE_DATA MOV R7,#1EH LCALL WRITE_DATA MOV R7,#09H LCALL WRITE_DATA MOV R7,#12H LCALL WRITE_DATA MOV R7,#0BH LCALL WRITE_DATA MOV R7,#50H LCALL WRITE_DATA MOV R7,#0BAH LCALL WRITE_DATA MOV R7,#44H LCALL WRITE_DATA MOV R7,#09HLCALL WRITE_DATA MOV R7,#05H LCALL WRITE_DATA MOV R7,#23H LCALL WRITE_DATA MOV R7,#21H LCALL WRITE_DATA MOV R7,#00H LCALL WRITE_DATA MOV R7,#0E1H LCALL COMMAND MOV R7,#00H LCALL WRITE_DATA MOV R7,#19H LCALL WRITE_DATA MOV R7,#19H LCALL WRITE_DATA MOV R7,#00H LCALL WRITE_DATA MOV R7,#12H LCALL WRITE_DATA MOV R7,#07H LCALL WRITE_DATA MOV R7,#2DH LCALL WRITE_DATA MOV R7,#28H LCALL WRITE_DATA MOV R7,#3FH LCALL WRITE_DATA MOV R7,#02H LCALL WRITE_DATA MOV R7,#0AH LCALL WRITE_DATA MOV R7,#08H LCALL WRITE_DATA MOV R7,#25H LCALL WRITE_DATA MOV R7,#2DH LCALL WRITE_DATA MOV R7,#0FH LCALL WRITE_DATA MOV R7,#11H LCALL COMMAND LCALL DELAY120MSLJMP COMMANDRET;===============================================;显示图像38400字节;===============================================IMAGE_PIXELS:DB 0xC4,0x8,0xBC,0x2A,0x8B,0x6A,0x49,0xA8,0x18,0x88,0x31,0x4D,0x41,0xCE,0x31,0x4B DB 0x18,0xA8,0x18,0x87,0x10,0x85,0x10,0x85,0x10,0x85,0x10,0xA5,0x10,0xA5,0x18,0xA6 DB 0x10,0xA5,0x10,0x85,0x10,0xA6,0x8,0xA6,0x8,0x64,0x38,0x64,0x88,0xE7,0xD1,0x69 DB 0xD1,0x6,0xD1,0x7,0xD1,0x8,0xD9,0x8,0xD8,0xE8,0xD0,0xE7,0xC9,0x7,0xC1,0x47DB 0xD0,0xE8,0xD0,0xE8,0xD0,0xE7,0xD0,0xE7,0xD1,0x7,0xD1,0x7,0xD1,0x7,0xD1,0x7 DB 0xD0,0xE7,0xC8,0xE6,0xC9,0x7,0xD0,0xE7,0xD0,0xA6,0xC0,0xE7,0xC2,0x4B,0xCB,0xF0 DB 0xFE,0xBB,0xFF,0xBE,0xF7,0xFF,0xEF,0xBE,0xFF,0x9F,0xFF,0xBF,0xEF,0x7F,0xC7,0x3D DB 0xCE,0xFC,0xDF,0x5E,0xEF,0x9E,0xEF,0xDF,0xEF,0xFF,0xEF,0xDE,0xFF,0xBF,0xFF,0xBF DB 0xEF,0xFF,0xF7,0xFF,0xF7,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFFDB 0xFF,0xFF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDFDB 0xF7,0xDF,0xF7,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xDF DB 0xF7,0xDD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x9E,0xEF,0x7E,0xFF,0xBF,0xFF,0xFFDB 0xF7,0x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 DB 0xAD,0x98,0xA5,0x98,0xA5,0x79,0xA5,0x79,0x9D,0x79,0xA5,0x99,0xAD,0xFA,0xB6,0x3B DB 0xB6,0x5B,0xBE,0x5B,0xB6,0x3C,0xAD,0xFA,0x9D,0xB9,0x9D,0x98,0xB5,0xB9,0xD5,0xFA DB 0xDE,0x1B,0xDE,0x1B,0xD5,0xDA,0xB5,0x99,0x9D,0x77,0xA5,0xD8,0xC6,0x9B,0xE7,0x3E DB 0xEF,0x7E,0xF7,0xDF,0xFF,0xDF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xF7,0xBF,0xEF,0x9EDB 0xF7,0x9D,0xEE,0x5A,0xBC,0x52,0xA4,0x51,0xC5,0xD7,0xEE,0xFC,0xF7,0x3E,0xD6,0xDC DB 0xD2,0x2B,0xB9,0x89,0xA0,0xC5,0xA0,0xC5,0xB1,0x6,0xB9,0x6,0xC1,0x7,0xD1,0x88DB 0xD9,0xCA,0xE2,0x4D,0xBA,0x6E,0x59,0x8C,0x41,0xCF,0x41,0xB1,0x51,0xF1,0x5A,0x71 DB 0x5A,0x73,0x5A,0x73,0x62,0x93,0x62,0x94,0x62,0x94,0x62,0x94,0x62,0x94,0x62,0x94 DB 0x62,0x93,0x62,0x93,0x62,0x93,0x62,0x94,0x62,0x94,0x62,0x93,0x62,0x73,0x5A,0x73。
汇编创建简单的窗口
理论:Windows 程序中,在写图形用户界面时需要调用大量的标准Windows Gui 函数。
其实这对用户和程序员来说都有好处,对于用户,面对的是同一套标准的窗口,对这些窗口的操作都是一样的,所以使用不同的应用程序时无须重新学习操作。
对程序员来说,这些 Gui 源代码都是经过了微软的严格测试,随时拿来就可以用的。
当然至于具体地写程序对于程序员来说还是有难度的。
为了创建基于窗口的应用程序,必须严格遵守规范。
作到这一点并不难,只要用模块化或面向对象的编程方法即可。
下面我就列出在桌面显示一个窗口的几个步骤:得到您应用程序的句柄(必需);得到命令行参数(如果您想从命令行得到参数,可选);注册窗口类(必需,除非您使用 Windows 预定义的窗口类,如 MessageBox 或 dialog box;产生窗口(必需);在桌面显示窗口(必需,除非您不想立即显示它);刷新窗口客户区;进入无限的获取窗口消息的循环;如果有消息到达,由负责该窗口的窗口回调函数处理;如果用户关闭窗口,进行退出处理。
相对于单用户的 DOS 下的编程来说,Windows 下的程序框架结构是相当复杂的。
但是 Win dows 和 DOS 在系统架构上是截然不同的。
Windows 是一个多任务的操作系统,故系统中同时有多个应用程序彼此协同运行。
这就要求 Windows 程序员必须严格遵守编程规范,并养成良好的编程风格。
内容:下面是我们简单的窗口程序的源代码。
在进入复杂的细节前,我将提纲挈领地指出几点要点:您应当把程序中要用到的所有常量和结构体的声明放到一个头文件中,并且在源程序的开始处包含这个头文件。
这么做将会节省您大量的时间,也免得一次又一次的敲键盘。
目前,最完善的头文件是 hutch 写的,您可以到 hutch 或我的网站下载。
您也可以定义您自己的常量和结构体,但最好把它们放到独立的头文件中用 includelib 指令,包含您的程序要引用的库文件,譬如:若您的程序要调用 "Message Box",您就应当在源文件中加入如下一行: includelib user32.lib 这条语句告诉 MASM 您的程序将要用到一些引入库。
汇编语言屏幕窗口程序——实验七
集美大学计算机工程学院实验报告课程名称:汇编语言程序设计班级:软件0812实验成绩:指导教师:徐焕姓名:谭驹翔实验项目名称:屏幕窗口程序学号:2008813050上机实践日期:实验项目编号:七组号:上机实践时间:学时一、实验目的与要求题目:屏幕窗口程序实验要求:在屏幕上开出三个窗口,它们的行列坐标(5,10)到(15,30);(5,50)到(15,70)以及(18,15)到(22,65)。
二、实验内容光标首先定位在右窗口最下一行的行首(15,50),如从键盘入字符,则显示在右窗口,同时也显示在下窗口的最下面一行。
若需要将字符显示于左窗口,则先按下←键,接着再从键盘输入字符,字符就会从左窗口的最下行开始显示,同时下窗口也显示出左窗口的内容。
同样再按→也是一样结果。
三、设计和编码scroll macro ulrow,ulcol,lrrow,lrcol,att,function ;设置或上卷窗口(由function决定) MOV bh,0MOV ah,6MOV al,functionMOV ch,ulrowMOV cl,ulcolMOV dh,lrrowMOV dl,lrcolMOV bh,attint 10hendmpos_curse macro x,y ;设置光标在(x,y)位置MOV bh,0MOV ah,2MOV dh,xMOV dl,yint 10hendmdisplay macro ;输出字符=alMOV ah,0eHint 10Hendm;a,b,c,d,e,f 分别保存了下一个字符在左右下三个窗口应显示的位置,也就是下一个字符的光标位置,该宏定义完成获取,判断,输出字符get_char macro a,b,c,d,e,flocal zuo,you,gol,completeagain: ;again是循环获取字符的标号,不是这个宏内部的标号,在下个宏定义末尾跳转到这里MOV ah,0int 16h ;获取字符放在al中cmp ah,01H ;若为esc 则跳转到exit(该标号在主程序的末尾)结束该程序je exitcmp ah,4BHje zuo ;若为左键跳转到zou(设置光标到左窗口相应位置(a,b)),该段程序结束cmp ah,4DHje you ;若为右键跳转到you(设置光标到左窗口相应位置(c,d)),该段程序结束MOV ah,3int 10H ;若以上三个键都不是则读取当前光标所在位置判断该字符应该在哪个窗口输出cmp dl,40 ;判断位于左窗口还是右窗口jl gol ;若为左窗口跳转到golpos_curse c,d ;若为右窗口则设置光标到右窗口相应位置(c,d)显示字符,纵坐标d+1,为下一次在右窗口设置光标准备displayINC dpos_curse e,f ;设置光标到下窗口相应位置(e,f)显示字符,纵坐标f+1,为下一次在下窗口设置光标准备displayINC fpos_curse c,d ;将光标设置回右窗口相应位置(c,d),该段程序结束jmp completegol: ;若判断光标在走窗口则执行以下命令pos_curse a,b ;则设置光标到左窗口相应位置(a,b)显示字符,纵坐标b+1,为下一次在左窗口设置光标准备displayINC bpos_curse e,f ;设置光标到下窗口相应位置(e,f)显示字符,纵坐标f+1,为下一次在下窗口设置光标准备displayINC fpos_curse a,b ;将光标设置回左窗口相应位置(a,b),该段程序结束jmp completezuo:pos_curse a,bjmp completeyou:pos_curse c,dcomplete:endm;a,b,c,d,e,f 分别保存了下一个字符在左右下三个窗口应显示的位置,也就是下一个字符的光标位置,该段代码完成判断三个窗口是否上卷judge macro a,b,c,d,e,flocal cl,cldMOV ah,3int 10H ;读取当前光标位置放入dx 为判断光标位置在左窗口还是右窗口,判断下窗口以及该窗口是否需要上卷push dxcmp f,66 ;若f=66说明下窗口字符已到边界jne clMOV f,15scroll 18,15,22,65,1fh,1 ;上卷下窗口并令f=15(下个字符显示的光标位置:下窗口最左边)pop dxMOV ah,2int 10Hcl: ;同样判断左窗口是否需要上卷cmp b,31jne cldMOV b,10scroll 5,10,15,30,1fh,1 ;上卷左窗口并令b=10(下个字符显示的光标位置:)pos_curse a,bjmp again ;因为左右窗口不可能同时上卷,所以直接跳转到上一个宏定义的开头再一次获取字符cld:cmp d,71 ;上卷右窗口并令d=50(下个字符显示的光标位置:右窗口最左边)jne againMOV d,50scroll 5,50,15,70,1fh,1pos_curse c,d ;将光标设置到右窗口最左边jmp again ;因为左右窗口不可能同时上卷,所以直接跳转到上一个宏定义的开头再一次获取字符endmDATAS SEGMENTlx db 15ly db 10rx db 15ry db 50dwx db 22dwy db 15DATAS ENDSSTACKS SEGMENT;此处输入堆栈段代码STACKS ENDSCODES SEGMENTASSUME CS:CODES,DS:DATAS,SS:STACKSSTART:MOV AX,DATASMOV DS,AXscroll 0,0,24,79,70h,0 ;function为0 设置三个窗口scroll 5,10,15,30,1fh,0scroll 5,50,15,70,1fh,0scroll 18,15,22,65,1fh,0pos_curse rx,ry ;将光标初始设置在右窗口get_char lx,ly,rx,ry,dwx,dwy ;获取键盘输入判断是否为esc、左右键改变光标位置或在相应的位置输出字符judge lx,ly,rx,ry,dwx,dwy ;判断窗口是否需要上卷循环再两个宏定义之间完成exit:MOV AX,4C00HINT 21HCODES ENDSEND START四、运行结果及分析五、实验小结在上卷的时候光标自动设置到最左侧,因此影响了下一次的输入。
LCD12864显示程序(汇编语言)
;实验目的:熟悉12864LCD的使用;12864LCD带中文字库;编程让12864LCD显示公司名称“深圳乾龙盛电子”,公司电话“5”,公司传真“6”;硬件设置:;关断所有拨码开关。
#include<p16f877a.inc>;__CONFIG_DEBUG_OFF&_CP_ALL&_WRT_HALF&_CPD_ON&_LVP_OFF&_BODEN_OFF&_PWRTE_ON&_WDT_OFF&_H S_OSC;芯片配置字,看门狗关,上电延时开,掉电检测关,低压编程关,加密,4M晶体HS振荡 #define RS PORTA,5 ;命令/数据选择#DEFINE RW PORTA,4 ;读/写选择#DEFINE E PORTA,3 ;使能信号#DEFINE PSB PORTA,2 ;并口/串口选择(H/L)#DEFINE RST PORTA,0 ;复位信号;-----------------------------------------------LCD_X EQU 30H ;页地址LCD_Y EQU 31H ;Y地址COUNT EQU 32H ;循环计数用COUNT1 EQU 33H ;循环计数用COUNT2 EQU 34H ;循环计数用POINT EQU 35H ;查表偏移地址POINT1 EQU 36H ;查表偏移地址POINT2 EQU 37H ;查表偏移地址TEMP EQU 38H ;临时寄存器TEMP1 EQU 39H ;临时寄存器;-----------------------------------------------ORG 0000H ;复位地址NOP ;ICD需要的空指令GOTO MAIN ;跳转到主程序;**********************主程序************************MAINBANKSEL TRISACLRF TRISA ;A口输出CLRF TRISD ;D口输出BANKSEL ADCON1MOVLW 06HMOVWF ADCON1 ;A口全为数字口CLRF STATUSBCF RST ;复位LCDCALL DELAY ;延时一段时间BSF RST ;清除复位信号NOPBSF PSB ;并口通讯;**************************初始化**********************MOVLW 30H ;基本指令操作CALL SEND_IMOVLW 01H ;清除显示CALL SEND_IMOVLW 06H ;指定在写入或读取时,光标的移动方向 CALL SEND_IMOVLW 0CH ;开显示,关光标,不闪烁CALL SEND_I;***********************显示汉字************************HAN_WR2CALL CLEAR_P ;清屏HAN_WR2A ;“深圳乾龙盛电子”MOVLW LOW(TAB1A)MOVWF POINTMOVLW HIGH(TAB1A)MOVWF POINT1 ;获取表格的首地址MOVLW 0eH ;数数据字节个数(7个汉字共14字节) MOVWF COUNTMOVLW 81H ;页地址CALL SEND_ICALL QUSHUHAN_WR2B ;“。
实验三 汇编语言程序上机操作方法
一 T AX=0233 BX=0000 CX=0011 DX=0038 SP=0000 BP=0000 SI=0000 DI=0000 DS=0B65 ES=0B65 SS=0B75 CS=0B75 IP=000B NV UP EI PL NZ NA PO NC_ 0B75:000B CD21_ INT_____21_ ・ 在_DEBUG_状态下执行程序 一 G 8 Program terminated normally ・ 退出 DEBUG 一 Q_ 2. 比较字符串_bjchx_ 编写一程序,比较两个字符串_string1_和 _string2_所含的字符是否相同,若相同则显示‘Match’ ,否则,显 示‘No_Match’ 。 参考程序如下:(程序名:SY3-2.ASM) D_SEG SEGMENT STRING1 DB '12345' STRING2 DB '1a345' MATCHSTR DB 'MATCH$' NOMATCHSTR DB 'NO MATCH$'
实验注意事项 1.如果使用的是 MASM5.1 的汇编工具,应包括以下文件:MASM 宏汇 编程序文件 LINK 连接程序文件CREF 索引程序文件(也可不用) EDIT 全屏幕文本编辑程序(或其他文字处理系统) 2.能用宏汇编通过的汇编语言源程序与在 DEBUG状态下运行的汇编 语言程序不同,必须是一个完整的程序,有各逻辑段的定义,而在 DEBUG 状态下运行的汇编语言源程序只是其程序段。 3.连接程序 LINK 是把一个或多个独立的目标程序模块装配成一个 可重定位的可执行文件,扩展名为.EXE。 实验与思考 1. 机器语言(Machine Language)、汇编语言(Assembler Language) 和高级语言(High_Level_ Language)的区别? 2.DOS 2 号功能调用和 DOS 9号功能调用的区别? 3.利用 DEBUG 调试程序过程中,应注意什么?
(整理)LCD1602汇编程序.
(整理)LCD1602汇编程序.LCD1602汇编程序;* 描述: LCD1602 滚动显示*;* 显示方式:*;* 1、从左到右逐字显示,闪动二次,清屏。
*;* 2、再从右到左逐字显示,闪动二次,清屏。
*;* 3、周期性地重复上述显示方式。
*;************************************************************** ***** LCD_RS EQU P2.0LCD_RW EQU P2.1LCD_EN EQU P2.2;************************************************************** ***** ORG 0000HAJMP MAINORG 0030H;************************************************************** ***** MAIN:MOV SP,#60HMOV R4,#02H ;设置闪烁次数ACALL LCD_INITMAIN1:ACALL LCDSET1MOV DPTR,#CHAR1ACALL WRITE1 ;MOV A,#0C0H ;显示第二行左边第一位位置ACALL LCD_CMDMOV DPTR,#CHAR2 ;显示ACALL WRITE1ACALL DELAY4 ;延时ACALL DELAY4ACALL SHAN ;闪烁两次ACALL LCDSET2MOV DPTR,#CHAR3 ;ACALL WRITE1MOV A,#0C0H ;显示第二行右边第一位位置ACALL LCD_CMDMOV DPTR,#CHAR4 ;显示ACALL WRITE1ACALL DELAY4 ;延时ACALL DELAY4ACALL SHAN ;闪烁两次ACALL MAIN1;************************************************************** *;LCD初始化设定子程序;************************************************************** * LCD_INIT:ACALL DELAY5MS ;延时15MSACALL DELAY5MS ;等待LCD 电源稳定ACALL DELAY5MSMOV A,#38H ;16*2 显示,5*7 点阵,8 位数据ACALL LCD_CMD_NC ;不进行LCD 忙检测ACALL DELAY5MSMOV A,#38H ;16*2 显示,5*7 点阵,8 位数据ACALL LCD_CMD_NC ;不进行LCD 忙检测ACALL DELAY5MSMOV A,#38H ;16*2 显示,5*7 点阵,8 位数据ACALL LCD_CMD_NC ;不进行LCD 忙检测ACALL DELAY5MSMOV A,#08H ;显示关ACALL LCD_CMD ;进行LCD 忙检测MOV A,#01H ;清除屏幕ACALL LCD_CMD ;进行LCD忙检测MOV A,#06H ;移动光标ACALL LCD_CMD ;进行LCD 忙检测MOV A,#0CH ;显示开,关光标ACALL LCD_CMD ;进行LCD 忙检测RET;************************************************************** * ;显示位置与移动光标设定;************************************************************** * LCDSET1:MOV A,#01H ;清除屏幕ACALL LCD_CMDACALL DELAY5MSMOV A,#06H ;移动光标(光标加1)ACALL LCD_CMDACALL DELAY5MSMOV A,#80H ;显示第一行左边第一位位置ACALL LCD_CMDACALL DELAY5MSRETLCDSET2:MOV A,#01H ;清除屏幕ACALL LCD_CMDACALL DELAY5MSMOV A,#06H ;移动光标(光标减1)ACALL LCD_CMDACALL DELAY5MSMOV A,#80H ;显示第一行右边第一位位置ACALL LCD_CMDACALL DELAY5MSRET;************************************************************** * ;写指令数据到LCD;RS=L,RW=L,D0-D7=指令码,E=高脉冲;************************************************************** * LCD_CMD:ACALL CHECKBUSYLCD_CMD_NC:CLR LCD_RSCLR LCD_RWMOV P0,ASETB LCD_ENNOPNOPNOPNOPCLR LCD_ENRET;************************************************************** * ; 发送字符串子程序;************************************************************** * WRITE1:MOV R0,#16WRITE0:CLR AMOVC A,@A+DPTRINC DPTRACALL LCD_WDATACALL DELAY ;加延时形成滚动效果DJNZ R0,WRITE0RET;************************************************************** * ;写显示数据到LCD;RS=H,RW=L,D0-D7=数据,E=高脉冲;************************************************************** * LCD_WDATA:ACALL CHECKBUSYSETB LCD_RSCLR LCD_RWMOV P0,ASETB LCD_ENNOPNOPNOPNOPCLR LCD_ENRET;************************************************************** * ;检测LCD 控制器忙状态;读数据;RS=L,RW=H,E=H,输出:D0-D7=数据;************************************************************** * CHECKBUSY:PUSH ACCMOV P0,#0FFHCLR LCD_RSSETB LCD_RWSETB LCD_ENBUSYLOOP:NOPJB P0.7,BUSYLOOPCLR LCD_ENPOP ACCRET;************************************************************** * ;闪烁子程序;************************************************************** * SHAN:MOV A,#08H ;关闭显示ACALL LCD_CMDACALL DELAY4MOV A,#0CH ;开显示,关闭光标ACALL LCD_CMDACALL DELAY4DJNZ R4,SHANMOV R4,#02H ;设置闪烁次数RET;************************************************************** * ;延时120MS 子程序;发送字符串时使用;************************************************************** * DELAY:MOV R7,#240DL1: MOV R6,#250DL2: DJNZ R6,DL2DJNZ R7,DL1RET;************************************************************** * ;延时800MS 子程序;闪烁时使用;************************************************************** * DELAY4:MOV R0,#40DL3: MOV R1,#100DL4: MOV R2,#100DL5: DJNZ R2,DL5DJNZ R1,DL4DJNZ R0,DL3RET;************************************************************** * ;延时5MS子程序;LCD初始化使用;************************************************************** * DELAY5MS:MOV R1,#10DL6: MOV R2,#249DL7: DJNZ R2,DL7DJNZ R1,DL6RET;************************************************************** * ;延时1MS子程序;************************************************************** * DELAY1MS:MOV R6,#14H ;20DL8: MOV R7,#19H ;25DL9: DJNZ R7,DL9DJNZ R6,DL8RET;************************************************************** * CHAR1:DB "Welcome to Cras-"CHAR2:DB " yBoye WorkGroup"CHAR3:DB " QQ: 15910380 "CHAR4:DB "TEL: 139********";************************************************************** *END12864汇编程序X EQU 26H ;LCD 地址变量RS EQU P2.0RW EQU P2.1EN EQU P2.2PSB EQU P2.3RST EQU P2.5ORG 0000HJMP MAINORG 0003H ;外部中断INT0入口地址MAIN:MOV SP,#40HMOV A,#00HMOV R0,#20HLOOP0: MOV @R0,A ;20H-26H清零INC R0CJNE R0,#27H,LOOP0MOV IE,#81H ;允许总中断中断,使能INT0 外部中断MOV TCON,#01H ;触发方式为脉冲负边沿触发SETB RSTNOPSETB PSB ;8位数据,并口CALL SET_LCD ;初始化TS12864mCALL MENU1CALL MENU2CALL MENU3CALL MENU4LOOP1:MOV A,22HCJNE A,#40H,LOOP2LOOP2: CJNE A,#04H,LOOP3LOOP3: JMP LOOP1;====================================== =======; LCD 初始化设置;====================================== =======-SET_LCD:CLR ENMOV A,#34H ;34H--扩充指令操作CALL WCOMMOV A,#30H ;30H--基本指令操作CALL WCOMMOV A,#0CH ;开显示,关光标,CALL WCOMMOV A,#01H ;清除LCM 显示屏CALL WCOMRET;====================================== ============= ;在LCM 各行显示信息字符;====================================== ============= LCD_SHOW:CJNE A,#1,LINE2 ;判断是否为第一行LINE1: MOV A,#80H ;设置LCD 的第一行地址CALL WCOM ;写入命令CALL CLR_LINE ;清除该行字符数据MOV A,#80H ;设置LCD 的第一行地址CALL WCOM ;写入命令JMP FILLLINE2: CJNE A,#2,LINE3 ;判断是否为第三行MOV A,#090H ;设置LCD 的第三行地址CALL WCOM ;写入命令CALL CLR_LINE ;清除该行字符数据MOV A,#090H ;设置LCD 的第三行地址CALL WCOMJMP FILLLINE3: CJNE A,#3,LINE4 ;判断是否为第三行MOV A,#088H ;设置LCD 的第三行地址CALL WCOM ;写入命令CALL CLR_LINE ;清除该行字符数据MOV A,#088H ;设置LCD 的第三行地址CALL WCOMJMP FILLLINE4: CJNE A,#4,LINE5 ;判断是否为第三行MOV A,#098H ;设置LCD 的第三行地址CALL WCOM ;写入命令CALL CLR_LINE ;清除该行字符数据MOV A,#098H ;设置LCD 的第三行地址CALL WCOMFILL: CLR A ;填入字符MOVC A,@A+DPTR ;由消息区取出字符CJNE A,#0,LC1 ;判断是否为结束码LINE5: RETLC1: CALL WDA TA ;写入数据INC DPTR ;指针加1JMP FILL ;继续填入字符RET;====================================== =========== ;清除该行LCM 的字符;====================================== =========== CLR_LINE:MOV R0,#16CL1: MOV A,#' 'CALL WDATADJNZ R0,CL1RET;====================================== ============ ;LCM 显示工作菜单信息;====================================== ============ MENU1:MOV DPTR,#MENU1AMOV A,#1 ;在第一行显示信息CALL LCD_SHOWRETMENU1A: DB "MUC 控制GPRS模块",0MENU2:MOV DPTR,#MENU2AMOV A,#2 ;在第二行显示信息CALL LCD_SHOWRETMENU2A: DB "TEL:139********",0MENU3:MOV DPTR,#MENU3AMOV A,#3 ;在第三行显示信息CALL LCD_SHOWRETMENU3A: DB "方案设计: 龚伟",0MENU4:MOV DPTR,#MENU4AMOV A,#4 ;在第四行显示信息CALL LCD_SHOWRETMENU4A: DB "程序编写: 靳鹏",0;====================================== ======== ; 写指令使能子程序;RS=L,RW=L,D0-D7=指令码,E=高脉冲;====================================== ======== WCOM:MOV P0,ACLR RSCLR RWSETB ENCALL DELAY0CLR ENRET;====================================== ======= ;写数据使能子程序;RS=H,RW=L,D0-D7=数据,E=高脉冲;=============================================WDATA:MOV P0,ASETB RSCLR RWSETB ENCALL DELAY0CLR ENRETDELAY0: MOV R7,#250 ;延时500微秒DJNZ R7,$RET END。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验五 屏幕窗口程序
一、 实验的目的与要求
(一)实验目的:掌握显示器IO 程序设计的方法,掌握宏的相关概念,以及运用方法。
(二)实验要求:在屏幕上开出三个窗口,它们的行列坐标如下页图所示,光标首先定位在右窗口最下面一行的行首(15, 50),如果从键盘输入字符,则显示在右窗口,同时也显示在下窗口的最下面一行。
若需要将字符显示于左窗口,则先按下左键,接着再从键盘输入字符,字符就会从左窗口的最下行开始显示,同时下窗口也显示左窗口的内容。
当一行字符显示满后,窗口自动向上卷动一行,输入字符继续显示于最低一行,窗口最高一行向上卷动后消失。
编写屏幕窗口程序时,要求将一些功能程序段定义成宏指令,如向上卷动、清屏、接受字符并判断、在屏幕上显示字符、光标定位。
二、实验正文
实验分析:实验思路比较简单,主要是运用BIOS 调用,这些查表可得,实验要求要用宏来定义一些基本功能,宏调用比较简单,把一些基本功能编写成宏,能高效率的执行程序,但是宏也存在着一些缺点,在宏调用时,要宏展开,这样会占用一定的空间,所以宏是一种以空间换时间的策略,像一些复杂的操作不宜编写成宏。
BIOS 10号调用提供了大量的屏幕、光标显示格式,要注意参数的意义,以便正确的显示结果。
三、流程图如下:
(5,10) (15,30)
(5,50)
(15,70)
(18,15) (22,65)
四、实验结果
附录:程序源代码如下:
;**************************************************************** datas segment
cury db 15 ;光标初始位置
curx db 50
lx db 10 ;记录左窗口当前光标位置,初始化为左窗口初始位置ly db 15
rx db 50 ;记录右窗口当前光标位置,初始化为右窗口初始位置ry db 15
dwx db 15 ;记录下窗口当前光标位置,初始化为下窗口初始位置dwy db 22
ulrow db 0
ulcol db 0
lrrow db 0
lrcol db 0
windownum db 1
datas ends
;-----------------------------------------------------------------宏指令clear 清屏
clear macro a,b,c,d
mov al,0 ;初始化窗口
mov bh,7 ;卷入行属性
mov ch,a ;左上角行号
mov cl,b ;左上角列号
mov dh,c ;右下角行号
mov dl,d ;右下角列号
mov ah,6
int 10h ;BIOS调用,屏幕初始化
endm
;-------------------------------------------------------------宏指令scroll向上卷动一行scroll macro cont,ulrow,ulcol,lrrow,lrcol
mov al,cont ;上卷行数
mov bh,70h ;卷入行属性
mov ch,ulrow ;左上角行号
mov cl,ulcol ;左上角列号
mov dh,lrrow ;右下角行号
mov dl,lrcol ;右下角列号
mov ah,6
int 10h ;BIOS调用,上卷
endm
;--------------------------------------------------------------宏指令postc 光标定位
postc macro y,x
mov bh,0 ;页号
mov dh,y ;行
mov dl,x ;列
mov ah,2
int 10h ;BIOS调用,置光标位置
endm
;---------------------------------------------------------------在当前窗口和下窗口显示display macro
mov bh,0
mov cx,1
mov ah,0ah ;在当前的窗口打印字符
int 10h
postc dwy,dwx
mov bh,0
mov cx,1
mov ah,0ah ;在下窗口输出
int 10h
endm
;----------------------------------------------------------------接收字符并判断getchar macro
input: ;输入键盘上的字符
mov ah,0
int 16h ;BIOS调用,从键盘读字符
cmp ah,4bh ;判断输入字符是否为左向键
jnz no_left
postc ly,lx
mov windownum,2
jmp input
no_left:
cmp ah,4dh
jnz no_right ;判断输入字符是否为右向键
postc ry,rx
mov windownum,1
jmp input
no_right:
cmp ah,01 ;判断输入字符是否为ESC
jz exit
display ;嵌套调用
inc dwx
cmp dwx,65 ;判断下窗口是否上卷
jle isright
scroll 1,19,15,22,65
mov dwx,15
isright:
cmp windownum,1 ;判断是否在右窗口
jnz displeft
dispright: ;判断右窗口是否上卷inc rx
cmp rx,70
jle rightexit
scroll 1,6,50,15,70
mov rx,50
rightexit: ;右窗口输出
postc ry,rx
jmp input
displeft: ;判断左窗口是否上卷
inc lx
cmp lx,30
jle leftexit
scroll 1,6,10,15,30
mov lx,10
leftexit: ;左窗口输出
postc ly,lx
jmp input
exit:
endm
;---------------------------------------------------------------
codes segment
assume cs:codes,ds:datas
start:
main proc far
push ds
sub ax,ax
push ax
mov ax,datas
mov ds,ax
clear 0,0,24,79
scroll 10,5,10,15,30
scroll 10,5,50,15,70
scroll 4,18,15,22,65
postc cury,curx
getchar
ret
main endp
;-----------------------------------------------------------------
codes ends
;****************************************************************
end start
五、实验总结
通过这次实验,掌握了屏幕窗口程序的基本设计方法,领略了宏的设计和使用方法,实验的整体思路比较简单,但如若想编出复杂的屏幕程序,需要对BIOS调用有一个大致的了解,只有这样才能灵活的去运用,这也就启迪我多去阅读和积累相关的知识,只有知识积累到一定程度才能编出好的程序。