标签:int 如何 inf 总结 方式 start 实验 div 锻炼
1
assume cs:code, ds:data
data segment
db 12
db 0,0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov ah,0
mov al,ds:[0]
mov bl,10
div bl
mov ds:[0],al
mov ds:[1],ah
mov ah,2
mov dl,ds:[0]
add dl,30h
int 21h
mov ah,2
mov dl,ds:[1]
add dl,30h
int 21h
mov ax,4c00h
int 21h
code ends
end start
实验截图:
2
assume ds:data, cs:code
data segment
db ‘welcome to masm!‘
db 2H,24H,71H
data ends
code segment
start: mov ax,data
mov ds,ax
mov ax,0b800H
mov es,ax
mov bx,0
mov bp,16
mov di,071ch
mov cx,3
s: mov bx,cx
mov si,0
mov cx,16
s0: mov ax,0
mov al,[si]
mov ah,[bp]
mov es:[di],ax
inc si
add di,2h
loop s0
add di,80h
mov cx,bx
inc bp
loop s
mov ax,4c00h
int 21h
code ends
end start
实验截图:
3
assume ds:data, cs:code
data segment
db ‘welcome to masm!‘
db 2H,24H,71H
data ends
code segment
start: mov ax,data
mov ds,ax
mov ax,0b800H
mov es,ax
mov bx,0
mov bp,16
mov di,071ch
mov cx,3
s: mov bx,cx
mov si,0
mov cx,16
s0: mov ax,0
mov al,[si]
mov ah,[bp]
mov es:[di],ax
inc si
add di,2h
loop s0
add di,80h
mov cx,bx
inc bp
loop s
mov ax,4c00h
int 21h
code ends
end start
实验截图:
实验总结:简单掌握了十进制两位数输出的方法 ,通过实验及看书理解了80×25彩色字符模式显示原理 ,锻炼了如何综合应用寻址方式和汇编指令完成应用编程。
实验九
标签:int 如何 inf 总结 方式 start 实验 div 锻炼
原文地址:https://www.cnblogs.com/101whw/p/10093315.html