|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- assume cs:code,ds:code
- code segment
- color db 8
- rest: mov color,8
- jmp a
- start: mov ax, code
- mov ds, ax
- mov ax, 0b800h
- mov es, ax
- mov bx, 0
- mov cx, 100
- start0: cmp color, 10h
- jnb rest
- a: mov bl,color ;show函数的变量bl赋值,bl存放颜色信息
- call show
- inc color
- loop start0
- mov ah, 4ch ;退出程序
- int 21h
-
- show: push bx ;定义show函数
- push cx
-
- delay: mov dx,100h ;小甲鱼外中断视频里讲到的delay函数
- mov ax,0
- s1: sub ax,1
- sbb dx,0
- cmp ax,0
- jne s1
- cmp dx,0
- jne s1
-
- mov bh,bl
- mov di, 0
- mov cx,4000
- mov al,'\'
- b: mov ah,bl
- mov es:[di],ax
- dec cx
- jcxz exit
- add di, 2
- cmp bl, 10h
- jnb init ;将bl变量重新初始化
- inc bl
- jmp go
- init: mov bl,bh
- go: jmp b
- ok: pop cx
- pop bx
- exit: ret
-
- code ends
- end start
复制代码 |
评分
-
查看全部评分
|