www.pudn.com > Demo_asm_80x86.rar > Nonary.asm
;****************************************************** ;* 文件名:Nonary.asm ;* 创建日期:2001.7.1 ;* 作者:陈文尧 ;* 功能:打印九九乘方表 ;****************************************************** include system.inc ;****************************************************** ;* 以下代码由汇编专家产生,不要随便修改 ;****************************************************** .CODE ifdef __COM__ org 100h endif @@Start: ;------------------------------------------------------ ; 初始化数据段 ;------------------------------------------------------ InitDS cs ;------------------------------------------------------ ; 调用主函数 ;------------------------------------------------------ call main ;------------------------------------------------------ ; 正常返回DOS ;------------------------------------------------------ ReturnDos ;++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;+ 主函数,加入实现程序功能的代码 ;++++++++++++++++++++++++++++++++++++++++++++++++++++++ main proc LibCall Puts,sub di,di LibCall Fill,'0' @Outer: inc di sub si,si LibCall Crlf LibCall Crlf @Inner: inc si LibCall PutInteger,si LibCall PutChar,'X' LibCall PutInteger,di LibCall PutChar,'=' mov ax,si mul di ;宽度为2,右边对齐,十进制 LibCall PutIntegerEx,ax,-02h,0ah LibCall PutChar,' ' cmp si,di jb @Inner cmp di,09h jb @Outer ; ret main endp msg db '九九乘方表:',00h ;****************************************************** ;* 标志程序结束并指定程序入口 ;****************************************************** end @@Start