- [younggay] 20? 那个20? 01/21 15:05
- [martian] 博主辛苦了! 11/24 13:43
- [acool] 先存下 看看O(∩_∩)O哈哈~ 11/22 12:30
- [acool] 不错,踩踩;) 11/22 12:27
- [tomato] 收藏一下,好好看看,扫扫盲。 11/21 20:01
- [younggay] 程序正确固然重要,必要的地方写注释也是很必要的。要不看的人脑袋可就大了。呵呵 fighting ! 11/21 14:47
- [younggay] 就提一点要求: 哥儿们,加点注释把,(*^__^*)...嘻嘻 11/21 14:37
- [lwbfq] 有点糊涂。 11/21 14:26
- [lwbfq] 有点糊涂。 11/21 14:26
- [younggay] 嗯。不错,不过要是关键代码部分加上注释就更好了。而且加注释也是一个成熟的编程人员的良好习惯。 11/21 14:23
- [h.goood] 汇编作业在哪里做?我怎么没找到? 11/24 12:32
[2008-11-17 16:50] 实验十四
assume cs:code,ds:data
data segment
db 9,8,7,4,2,0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
mov di,0
s:
mov al,[si]
mov cl,al
mov ch,0
push cx
out 70h,al
in al,71H
mov ah,al
mov cl,4
shr ah,cl
and al,00001111b
add ah,30h
add al,30h
mov bx,0b800h
mov es,bx
mov byte ptr es:[12*160+40*2+di],ah
mov byte ptr es:[12*160+41*2+di],al
pop cx
jcxz s1
inc si
add di,6
jmp short s
s1:
mov byte ptr es:[12*160+40*2+4],2fH
mov byte ptr es:[12*160+40*2+10],2fH
mov byte ptr es:[12*160+40*2+16],20H
mov byte ptr es:[12*160+40*2+22],3aH
mov byte ptr es:[12*160+40*2+28],3aH
mov ax,4c00h
int 21h
code ends
end start
data segment
db 9,8,7,4,2,0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
mov di,0
s:
mov al,[si]
mov cl,al
mov ch,0
push cx
out 70h,al
in al,71H
mov ah,al
mov cl,4
shr ah,cl
and al,00001111b
add ah,30h
add al,30h
mov bx,0b800h
mov es,bx
mov byte ptr es:[12*160+40*2+di],ah
mov byte ptr es:[12*160+41*2+di],al
pop cx
jcxz s1
inc si
add di,6
jmp short s
s1:
mov byte ptr es:[12*160+40*2+4],2fH
mov byte ptr es:[12*160+40*2+10],2fH
mov byte ptr es:[12*160+40*2+16],20H
mov byte ptr es:[12*160+40*2+22],3aH
mov byte ptr es:[12*160+40*2+28],3aH
mov ax,4c00h
int 21h
code ends
end start
评论次数(1) |
浏览次数(1064) |
类型(汇编作业) |
收藏此文 |