这是我写的代码完美的代码,除了我无法弄清楚如何删除控制台的东西(d: \)。 代码在屏幕中间打印出你好。我试图在组件中以图形模式打印消息,但控制台d:仍然存在
IDEAL
MODEL small
STACK 100h
DATASEG
; --------------------------
msg db 'hello'
; --------------------------
CODESEG
start:
mov ax, @data
mov ds, ax
; --------------------------
;fullscreen
MOV AL, 13H
MOV AH,0
INT 10H
mov si,@data;moves to si the location in memory of the data segment
mov ah,13h;service to print string in graphic mode
mov al,0;sub-service 0 all the characters will be in the same color(bl) and cursor position is not updated after the string is written
mov bh,0;page number=always zero
mov bl,00001111b;color of the text (white foreground and black background)
; 0000 1111
;|_ Background _| |_ Foreground _|
;
mov cx,5;length of string
;resoultion of the screen is 244x126
mov dh,63;y coordinate
mov dl,122;x coordinate
mov es,si;moves to es the location in memory of the data segment
mov bp,offset msg;mov bp the offset of the string
int 10h
; --------------------------
exit:
mov ax, 4c00h
int 21h
END start
没有如预期黑色背景和白色文字在中间,但在左上角有d:\
感谢您的帮助!
我无法运行你的代码...但是你认为当你的代码执行完毕后,会发生什么? –