home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
screen
/
use2crts.arc
/
FLIP.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-10-30
|
1KB
|
45 lines
;RECOVERED FROM THE BAD USE2CRTS.LBR
;FLIP.ASM From the Feb. 19, 1985 issue of PC Magizine, pp256
;This program switches the color monitor active page between 0 & 1.
;convert to flip.com with exe2bin
code_seg segment
assume cs:code_seg
org 100h
begin: mov ah,15 ;read vidio state (call to BIOS)
int 10h ;
and bh,1 ;make sure we deal only with 0 or 1
xor bh,1 ;switch to other page
mov bl,bh ;save new page
mov al,bh ;set new active page (call to BIOS)
mov ah,5 ;
int 10h ;
mov dh,22 ;set cursor to row 22
mov dl,0 ; and column 0
mov ah,2 ;set cursor position (call to BIOS)
int 10h ;
mov ch,6 ;assume page 0, begin cursor at 6
mov cl,7 ;end cursor at line 7
or bh,bh ;check new page number
jz is_zero ;if new page is 0, we guessed right
mov ch,0 ;cursor begins at line 0
is_zero: mov ah,1 ;set cursor type (call to BIOS)
int 10h ;
mov ch,23 ;set upper left of window to row 23
mov cl,0 ; and column 0
mov dh,24 ;set lower right of window to row 24
mov dl,79 ; and column 79
mov al,0 ; blank the window
mov bh,7 ;use white on black
mov ah,6 ; perform window scroll (call to BIOS)
int 10h ;
mov al,bl ;supply new page number as return code
mov ah,4ch ;exit to DOS
int 21h ;
code_seg ends
end begin
;courtesy of The Consultants' Exchange, (714) 842-6348 data