下载此文档

比赛计算器.doc


文档分类:通信/电子 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
;--------------------------------------------------------------------
; Filename:
; Version: V
; Writer: Liu Cong,Cui Yang
; Organization: Tianjin University
; Object: This is a demo for the header of assembly language source file.
; Compilation Options: None
; History: 09/20/2011 Init version
;--------------------------------------------------------------------
imr0 equ 0f7h
imr1 equ 00h
cnt0 equ 280h
cnt1 equ 281h
cntcmd equ 283h
p85a equ 290h
p85b equ 291h
p85c equ 292h
p85cmd equ 293h
stacked segment stack
sta dw 100 dup(?)
top equ length sta
stacked ends
data segment
mes1 db 'please input the question.',0ah,0dh,'$'
mes2 db 'can not hold the number!',0ah,0dh,'$'
mes3 db 'incorrect input!',0ah,0dh,'$'
mes4 db 'two-operand support only!',0ah,0dh,'$'
mes5 db 'overflow!',0ah,0dh,'$'
tab db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h
db 7fh,67h,77h,7ch,39h,2eh,79h,71h,73h
tab1 db 88h,48h,28h,18h,84h,44h,24h,14h
db 82h,42h,22h,12h,81h,41h,21h,11h
int_seg dw ?
int_off dw ?
fmimr db 0
fmimr1 db 0
mdisp db 4 dup(?)
operand1 dw 0000h
operand2 dw 0000h
operator db 00h
result dw 0000h
numsys dw 10h
tfor db 60d
temp dw ?
tmp dw ?
time0 dw ?
time1 dw ?
flag0 db 00h
flag1 db 00h
flag2 db 01h
flag3 db 00h
flag4 db 00h
time dw 0000h
data ends
code segment
assume cs:code,ds:data,ss:stacked
start: mov ax, data
mov ds, ax
mov ax, stacked
mov ss, ax
mov sp, top

mov dx, cntcmd ;initialize8253,set interrupt frequency to 1s once
mov al, 37h
out dx, al
mov dx, cnt0
mov al, 00h
out dx, al
mov al, 10h
out dx, al
mov dx, cntcmd
mov al, 77h
out dx, al
mov dx, cnt1
mov al, 00h
out dx, al
mov al, 10h
out dx, al

mov dx, p85cmd
mov al, 88h
out dx, al

mov ax, 350bh
int 21h
mov ax, es
mov int_seg, ax
mov int_off, bx
push ds
mov ax, seg int_pr
mov ds, ax
mov dx, offset int_pr
mov ax, 250bh
int 21h
pop ds
in al, 21h
mov fmimr, al
and al, 0f7h
out

比赛计算器 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数15
  • 收藏数0 收藏
  • 顶次数0
  • 上传人yuzonghong1
  • 文件大小334 KB
  • 时间2018-08-05