| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5038 人关注过本帖
标题:一个简单的99乘法表
取消只看楼主 加入收藏
神vLinux飘飘
Rank: 13Rank: 13Rank: 13Rank: 13
来 自:浙江杭州
等 级:贵宾
威 望:91
帖 子:6140
专家分:217
注 册:2004-7-17
收藏
 问题点数:0 回复次数:0 
一个简单的99乘法表

;九九乘法口诀表
;作者:神vLinux飘飘
stack segment stack
stack ends

data segment
author db "Write by vlinux$"
data ends

code segment
assume cs:code,ds:data,ss:stack
_main:
mov ch,1d
_main_next_1:
call _print_crlf
mov cl,1d
_main_next_2:
mov ah,0d
mov al,cl
call _print_int
mov dl,42
mov ah,2
int 21h
mov ah,0d
mov al,ch
call _print_int
mov dl,61
mov ah,2
int 21h
mov ah,0d
mov al,cl
mul ch
call _print_int
call _print_tab
mov dl,ch
inc dl
inc cl
cmp cl,dl
jne _main_next_2
inc ch
cmp ch,10d
jne _main_next_1
call _print_crlf
call _print_crlf
mov ax,data
mov ds,ax
mov dx,offset author
mov ah,9
int 21h
mov ah,4ch
int 21h

_print_int:
push ax
push bx
push cx
push dx
pushf
mov cx,10000d
mov bl,0d
_print_int_next_1:
cwd
div cx
push ax
push dx
cmp al,0d
jne _print_int_flag_1
cmp bl,0d
je _print_int_flag_2
_print_int_flag_1:
mov ah,2
mov dl,al
add dl,48
int 21h
mov bl,1d
_print_int_flag_2:
mov ax,cx
mov cx,10d
cwd
div cx
mov cx,ax
pop ax
pop dx
cmp cx,1d
jne _print_int_next_1
mov dl,al
add dl,48
mov ah,2
int 21h
popf
pop dx
pop cx
pop bx
pop ax
ret

_print_tab:
push ax
push dx
mov dl,9
mov ah,2
int 21h
pop dx
pop ax
ret

_print_crlf:
push ax
push dx
mov dl,10
mov ah,2
int 21h
pop dx
pop ax
ret
code ends
end _main

搜索更多相关主题的帖子: 乘法表 mov stack segment int 
2006-03-18 07:54
快速回复:一个简单的99乘法表
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011655 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved