• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >汇编语言 > 汇编源代码之汇编语言制作的光带菜单及源程序(1.0)

汇编源代码之汇编语言制作的光带菜单及源程序(1.0)

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2017-06-28

匿名通过本文主要向大家介绍了led光带注胶,led内嵌灯光带,光带线槽灯,光带是什么,暖色光带外用等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
</div>

这个是我上大二的时候的汇编语言课程设计。自己做得很满意。现在拿出来,给大家看看。我对部分代码又从新做了调整。编译后大小比原来大了一点,不过速度上去了。其实就是一个图形接口。你只要在中间加上自己的实用功能,就可以直接用了。代码我都有注释,读起来应该不会有什么问题。当然,汇编的代码本身就很难读。所以有什么不是很好懂的地方,可以直接同我联系。

我还给同学做过一个C语言版的光带菜单,不过很可惜的是自己做得不是很满意,就把程序给删掉了。大家也就看不到了

本程序用 tasm 进行编译,tlink 进行连接。

menu.asm 主程序

mnmacro.asm 功能调用宏文件

menu.exe 编译后的可执行文件

menu.asm 主程序
include mnmacro.asm
data segment
scrmm db 100 dup(?)
;主菜单名
mainmenu1 db 'File'
mainmenu2 db 'Edit'
mainmenu3 db 'Run'
mainmenu4 db 'Debug'
mainmenu5 db 'Help'
;主菜单File下的子菜单名
submenu11 db 'Save'
submenu12 db 'Open'
submenu13 db 'Exit'
;主菜单Edit下的子菜单名
submenu21 db 'Cut'
submenu22 db 'Past'
submenu23 db 'Copy'
;主菜单Run下的子菜单名
submenu31 db 'Run'
submenu32 db 'Go to'
submenu33 db 'Step'
;主菜单Debug下的子菜单名
submenu41 db 'Call'
submenu42 db 'Find'
submenu43 db 'Source'
;主菜单Help下的子菜单名
submenu51 db 'About'
submenu52 db 'Our'
submenu53 db 'Web'
;欢迎窗口信息
msgtitle db 'Assemble Design'
msg1 db 'Please press Alt+F,Alt+E,Alt+R,Alt+D,Alt+H or ',19h,' to open the submenu.'
msg2 db 'Please press Enter (',11h,0c4h,0d9h,') to close the submenu.'
msg3 db 'Please press ',1bh,' or ',1ah,' to select the mainmenu.'
msg4 db 'Please press ',18h,' or ',19h,' to select the submenu.'
msg5 db 'Copyright 2002 mikespook'
msg6 db 'Press any key to continue...'
msg7 db ' '
;退出窗口信息 '
over db 'Thank you for uesing...Good buy~~ '
;其他信息
escape db 'Press ESC to exit.'
text1 db 'This is a example showing you how to make a menu with assemble.'
text2 db 'And you could get it for free from http://lucky7.yeah.net.'
text3 db 'You could use it in your software freely.'
text4 db 'But please send me a copy of your software.'
text5 db 'Thank you. Have a good time.'
text6 db '--Yours truly mikespook'
sub11 db 'Select Save'
sub12 db 'Select Open'
sub13 db 'Select Exit'
sub21 db 'Select Cut'
sub22 db 'Select Past'
sub23 db 'Select Copy'
sub31 db 'Select Run'
sub32 db 'Select Go to'
sub33 db 'Select Step'
sub41 db 'Select Call'
sub42 db 'Select Find'
sub43 db 'Select Source'
sub51 db 'Select About'
sub52 db 'Select Our'
sub53 db 'Select Web'
;-------------------------
mainnum db 1;主菜单序列号
subnum db ?;子菜单序列号
subshow db 0;为0时子菜单未显示
mainindex db ?;主菜单字符长度
data ends
;--------------------------------
code segment
assume cs:code,ds:data,es:data
start:
mov ax,data
mov ds,ax
mov es,ax
;******************* 初始化屏幕开始
mov ah,0
mov al,03h
int 10h
;******************* 初始化屏幕结束
showcur 1 ;隐藏光标
;************************************* 开始主窗口的绘制
drawwindow 1eh,0,0,24,79
outputstr msgtitle,15,10,30,13h
outputstr msg1,68,15,5,17h
changemenu 15,18,5,1eh
changemenu 15,24,5,1eh
changemenu 15,30,5,1eh
changemenu 15,36,5,1eh
changemenu 15,42,5,1eh
changemenu 15,51,1,1eh
outputstr msg2,46,16,5,17h
changemenu 16,18,11,1eh
outputstr msg3,43,17,5,17h
changemenu 17,18,1,1eh
changemenu 17,23,1,1eh
outputstr msg4,42,18,5,17h
changemenu 18,18,1,1eh
changemenu 18,23,1,1eh
outputstr msg5,24,13,5,1fh
outputstr msg6,28,20,40,9eh
outputstr msg7,19,9,28,93h
outputstr msg7,19,11,28,93h
setpos 10,28
outputchar ' ',93h,1
setpos 10,46
outputchar ' ',93h,1
mov ah,07h
int 21h
drawwindow 1eh,0,0,24,79
drawwindow 70h,0,0,0,79
drawwindow 70h,24,0,24,79
setpos 1,0
windowtandb 0d5h,0cdh,0b8h,1,0,80,1eh
mov al,2
draw:
windowlandr 0b3h,al,0,80,1eh
inc al
cmp al,17h
jne draw
windowtandb 0c0h,0c4h,0d9h,23,0,80,1eh
outputstr escape,18,24,3,70h
;***************************************开始主菜单的绘制
setpos 0,3
outputstr mainmenu1,4,0,3,0fh
outputstr mainmenu2,4,0,13,70h
changemenu 0,13,1,74h
outputstr mainmenu3,3,0,23,70h
changemenu 0,23,1,74h
outputstr mainmenu4,5,0,33,70h
changemenu 0,33,1,74h
outputstr mainmenu5,4,0,43,70h
changemenu 0,43,1,74h
setpos 0,3
;*********************************** 结束主窗口和主菜单的绘制
outputstr msg1,68,15,5,17h
changemenu 15,18,5,1eh
changemenu 15,24,5,1eh
changemenu 15,30,5,1eh
changemenu 15,36,5,1eh
changemenu 15,42,5,1eh
changemenu 15,51,1,1eh
outputstr msg2,46,16,5,17h
changemenu 16,18,11,1eh
outputstr msg3,43,17,5,17h
changemenu 17,18,1,1eh
changemenu 17,23,1,1eh
outputstr msg4,42,18,5,17h
changemenu 18,18,1,1eh
changemenu 18,23,1,1eh
outputstr text1,63,3,5,1ah
outputstr text2,58,4,5,1ah
outputstr text3,41,5,5,1ah
outputstr text4,43,6,5,1ah
outputstr text5,28,7,5,1ah
outputstr text6,23,9,25,1ah
input:;消息接收循环
mov ah,0
int 16h
cmp ah,01h
jne continue1
call exit
jmp input
continue1:
cmp ah,4bh
jne continue2
call prsleft
jmp input
continue2:
cmp ah,4dh
jne continue3
call prsright
jmp input
continue3:
cmp ah,50h
jne continue4
call prsdown
jmp input
continue4:
cmp ah,21h
jne continue5
mov ah,02h
int 16h
and al,0fh
cmp al,08h
jne continue5
call FAlt
jmp input
continue5:
cmp ah,12h
jne continue6
mov ah,02h
int 16h
and al,0fh
cmp al,08h
jne continue6
call EAlt
jmp input
continue6:
cmp ah,13h
jne continue7
mov ah,02h
int 16h
and al,0fh
cmp al,08h
jne continue7
call RAlt
jmp input
continue7:
cmp ah,20h
jne continue8
mov ah,02h
int 16h
and al,0fh
cmp al,08h
jne continue8
call DAlt
jmp input
continue8:
cmp ah,23h
jne continue9
mov ah,02h
int 16h
and al,0fh
cmp al,08h
jne continue9
call HAlt
jmp input
continue9:
cmp ah,48h
jne continue10
call prsup
jmp input
continue10:
cmp ah,1ch
jne continue11
call prsenter
jmp input
continue11:
jmp input
;-----------------
prsenter proc near;按下ENTER键
cmp subshow,0
jne enter1
call prsdown
ret
enter1:
mov al,mainnum
push ax
mov cl,0ah
mul cl
sub ax,07h
mov mainnum,al
dec mainnum
writescr mainnum,scrmm
inc mainnum
setpos 0,mainnum
pop ax
mov mainnum,al
drawwindow 13h,22,4,22,50
cmp mainnum,1
jne prsenter1
cmp subnum,2
jne entersub12
outputstr sub11,11,22,5,13h
entersub12:
cmp subnum,3
jne entersub13
outputstr sub12,11,22,5,13h
entersub13:
cmp subnum,4
jne prsenter1
outputstr sub13,11,22,5,13h
call exit
prsenter1:
cmp mainnum,2
jne prsenter2
cmp subnum,2
jne entersub22
outputstr sub21,10,22,5,13h
entersub22:
cmp subnum,3
jne entersub23
outputstr sub22,11,22,5,13h
entersub23:
cmp subnum,4
jne prsenter2
outputstr sub23,11,22,5,13h
prsenter2:
cmp mainnum,3
jne prsenter3
cmp subnum,2
jne entersub32
outputstr sub31,10,22,5,13h
entersub32:
cmp subnum,3
jne entersub33
outputstr sub32,12,22,5,13h
entersub33:
cmp subnum,4
jne prsenter3
outputstr sub33,11,22,5,13h
prsenter3:
cmp mainnum,4
jne prsenter4
cmp subnum,2
jne entersub42
outputstr sub41,11,22,5,13h
entersub42:
cmp subnum,3
j

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 汇编源代码之汇编语言制作的光带菜单及源程序(1.0)

相关文章

  • 2017-06-28汇编教程:使用语句
  • 2017-06-28用汇编语言编写消息框程序
  • 2017-06-28WINDOWS钩子函数详解
  • 2017-06-28汇编源码系列之cldoc12
  • 2017-06-28汇编源码系列之charop
  • 2017-06-28debug命令详解
  • 2017-06-17变量和标号的属性
  • 2017-06-17汇编程序设计
  • 2017-06-28汇编语言中“[]”的用法
  • 2017-06-28汇编数据转换操作小技巧

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 重复汇编
    • 汇编源码之跑动的男孩
    • “HELLO,WORLD”进阶汇编程序系列
    • 一个汇编hello world程序
    • 计算机中数和字符的表示
    • 汇编源码系列之drivesex
    • 汇编教程:使用语句
    • Casl汇编语言辅导
    • 汇编源码系列之free
    • 汇编语言中“[]”的用法

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有