汇编语言实验16
assume cs:code
code segment
start:mov ax,0
mov es,ax
mov ax,200h
mov bx,7*4
mov es:[bx],ax
add bx,2
mov word ptr es:[bx],0
mov di,200h
mov ax,cs
mov ds,ax
mov ax,offset x
mov si,ax
mov di,200h
mov cx,offset xx- offset x
cld
rep movsb
mov ah,0
int 7ch
mov ax,4c00h
int 21h
org 200h
x:jmp short startt
table dw gongneng1,gongneng2,gongneng4
startt:push bx
mov bl,ah
mov bh,0
add bx,bx
call word ptr table[bx]
eend:pop bx
iret
gongneng1:push ax
push bx
push ds
push cx
mov ax,0b800h
mov ds,ax
mov bx,0
mov cx,2000
s:mov byte ptr ds:[bx],' '
add bx,2
loop s
pop ax
pop bx
pop ds
pop cx
ret
gongneng2:push ax
push bx
push cx
push ds
mov ax,0b800h
mov ds,ax
mov bx,1
mov cx,2000
s0:and byte ptr ds:[bx],11111000b
or es:[bx],al
add bx,2
loop s0
pop ax
pop bx
pop cx
pop ds
ret
gongneng4:push ax
push bx
push cx
push ds
push si
push es
push di
mov ax,0b800h
mov ds,ax
mov es,ax
mov si,160h
mov di,0
cld
mov cx,24
s2:push cx
mov cx,160
rep movsb
pop cx
loop s2
ret
xx:nop
code ends
end

浙公网安备 33010602011771号