输出字符:
假设字节是大写'A',ASCII=41H
1. (dos函式2H)
mov dl,41h
mov ah,2
int 21H
2. (dos函式40H,输出到标准设备02)
mov ax,40H
mov bx,2 ;标准输出设备=2,即屏幕
mov cx,1
mov dx,字符段地址
mov ds,dx
mov dx,字符偏移地址
int 21h
(输出ds:dx地址中的cx个字符到'标准输出设备')
3. (dos非正式渠道)
mov al,41H
int 29h
4. (bios函0EH,文字模式)
mov al,41h
mov ah,0eh
int 21h
5. (bios,函式9H,绘图模式)
mov ah,9H
mov al,41h
mov bh,显示页 ;通常=0
mov bl,字符颜色 ;可设定字符色和底色
mov cx,1
int 10h
6. (bios,函式0AH,绘图模式)
mov ah,0AH
mov al,41h
mov bh,显示页 ;通常=0
mov bl,字符颜色 ;底色为当前底色
mov cx,1
int 10h
输出字串:
1.(dos函式09H)
mov dx,字串偏移
mov ah,9
int 21h (输出地址ds:dx中的以'$'作结串符的字串)
2. (dos函式40H,输出到标准设备02)
mov ax,40H
mov bx,2 ;标准输出设备=2,即屏幕
mov cx,字串长度
mov dx,字符段地址
mov ds,dx
mov dx,字符偏移地址
int 21h
(输出ds:dx地址中的cx个字符(即字串长)到'标准输出设备')
3. (bios,函式13H,绘图模式)
mov ax,字串段地址
mov es,ax
mov bp,字串偏移地址
mov ah,13H
mov al,输出模式 ;0~3, 通常=0
mov bh,显示页 ;通常=0
mov bl,字符颜色(若al=0或1)
mov cx,字串长度
mov dh,输出到座标y
mov dl,输出到座标x
int 10h
(输出地址es:bp的字串,长度=cx,座标=DX,显示页=BH,颜色=BL)
假设字节是大写'A',ASCII=41H
1. (dos函式2H)
mov dl,41h
mov ah,2
int 21H
2. (dos函式40H,输出到标准设备02)
mov ax,40H
mov bx,2 ;标准输出设备=2,即屏幕
mov cx,1
mov dx,字符段地址
mov ds,dx
mov dx,字符偏移地址
int 21h
(输出ds:dx地址中的cx个字符到'标准输出设备')
3. (dos非正式渠道)
mov al,41H
int 29h
4. (bios函0EH,文字模式)
mov al,41h
mov ah,0eh
int 21h
5. (bios,函式9H,绘图模式)
mov ah,9H
mov al,41h
mov bh,显示页 ;通常=0
mov bl,字符颜色 ;可设定字符色和底色
mov cx,1
int 10h
6. (bios,函式0AH,绘图模式)
mov ah,0AH
mov al,41h
mov bh,显示页 ;通常=0
mov bl,字符颜色 ;底色为当前底色
mov cx,1
int 10h
输出字串:
1.(dos函式09H)
mov dx,字串偏移
mov ah,9
int 21h (输出地址ds:dx中的以'$'作结串符的字串)
2. (dos函式40H,输出到标准设备02)
mov ax,40H
mov bx,2 ;标准输出设备=2,即屏幕
mov cx,字串长度
mov dx,字符段地址
mov ds,dx
mov dx,字符偏移地址
int 21h
(输出ds:dx地址中的cx个字符(即字串长)到'标准输出设备')
3. (bios,函式13H,绘图模式)
mov ax,字串段地址
mov es,ax
mov bp,字串偏移地址
mov ah,13H
mov al,输出模式 ;0~3, 通常=0
mov bh,显示页 ;通常=0
mov bl,字符颜色(若al=0或1)
mov cx,字串长度
mov dh,输出到座标y
mov dl,输出到座标x
int 10h
(输出地址es:bp的字串,长度=cx,座标=DX,显示页=BH,颜色=BL)