汇编程序没有显示任何输出?

时间:2012-11-23 19:52:38

标签: assembly x86-16

我想在屏幕上显示'F'。当我编译我的代码时,它没有任何问题,但它没有显示'F'。 编译器是:emu8086 代码是:

stseg segment
db 64 dup(?)
stseg ends

dtseg segment
dtseg ends

cdseg segment
main  proc far
assume cs:cdseg,ds:dtseg,ss:stseg
mov   ax,dtseg
mov   ds,ax
call  clear
call  color
call  moh
mov   ah,4ch
int   21h
main  endp

clear proc
mov  ax,0600h
mov  bh,07
mov  cx,0000
mov  dx,184fh
clear endp

color proc
mov   ah,0b
mov   bh,0
mov   bl,4
int   10h
color endp

moh  proc
mov cx,100
mov dx,30
back:mov ah,0ch
mov al,01
int 10h
inc cx
cmp cx,130
jnz back
mov cx,100
mov dx,50
loo: mov ah,0ch
mov al,01
int 10h
inc cx
cmp cx,130
jnz loo
mov cx,100
mov dx,30
joo: mov ah,0ch
mov al,01
int 10h
inc cx
cmp cx,50
jnz joo
cdseg  ends

1 个答案:

答案 0 :(得分:0)

在绘制F时,您需要先将视频模式设置为图形,例如int 10 with ah 0x00 and al 0x04(选择320x200 4色图形模式)