home *** CD-ROM | disk | FTP | other *** search
- .text
- .=0x100
-
- | this routine swaps between the b&w display and the color display
- | on the IBM personal computer. 80 character width is always selected
-
- start: push ax
- push ds
- xor ax,ax |zero AX
- mov ds,ax |use data at very beginning of memory
- xorb 0x410,#0x20 | ?
- movb al,0x449 | this is the "current video mode"
- cmpb al,#7 | if it is 7, the monochrome display
- jz color | is in use, and we swith to color.
- mono: mov ax,#3 | AH=0 -> set mode, AL=3 -> 80 column color
- int 0x10
- j exit
- color: mov ax,#7
- int 0x10
- mov ax,#0x0501
- int 0x10
- wait: inc ax
- jnz wait
- mov ax,#0x0500
- int 0x10
- mov ax,#3 |dont ask me why I have to do it twice...
- int 0x10
-
- exit: pop ds
- pop ax
- int 0x20
- ret
-