我有这个功能,它绘制彩色框。在绘制框之前需要设置视频模式。问题是,我无法将视频模式重置为原始模式。我怎么能这样做?
以下是绘制彩色框的代码:
mov ah, 00h ; set video mode
mov al, 13h ; mode 13h = 320x200 pixels, 256 colors.
int 10h ; set mode
mov ah, 0Ch ; change color for a single pixel
mov al, 1 ; color
mov bh, 0 ; page number
mov cx, 0 ; x
mov dx, 0 ; y
blue: int 10h ; execute change
inc cx ; increment x
cmp cx, 320 ; compare if x is 320
jne blue ; if not, go to blue
mov cx, 0 ; reset x to 0
inc dx ; increment y
cmp dx, 200 ; compare if y is 200
jne blue ; if not, go to blue
...
...
;MOV AH, 08H
;INT 21H
;JMP start
;reset video mode