home *** CD-ROM | disk | FTP | other *** search
- .MODEL TPASCAL
- LOCALS @@
-
- .DATA
-
- EXTRN CheckSnow:BYTE,textattr:BYTE
-
- .CODE
-
- PUBLIC fastputvertical,fastputhorizontal
-
- SetUp PROC NEAR
-
- dec bx
- mov ax,bx
- shl ax,1
- shl ax,1
- add ax,bx
- mov cl,5
- shl ax,cl ; multiply row by 160d
-
- dec dx
- shl dx,1
- add ax,dx ; add col to row
- mov di,ax
- mov ah,0Fh ; get the video mode
- int 10h
- mov bx,0B800h ; assume color segment
- cmp al,7 ; is it mono
- jne @@01 ; no, keep color segment
- mov bx,0B000h ; use mono segment
- @@01:
- mov es,bx
- mov al,[checksnow]
- mov bh,[textattr]
- cld
- ret
-
- SetUp ENDP
-
- FastPutVertical PROC NEAR character:BYTE:2,count:WORD,col:WORD,row:WORD
-
- mov bx,row
- mov dx,col
- call setup
- mov cx,count
- mov bl,character
- ; mov bh,[textattr]
- ; mov al,[checksnow]
- ; cld
- or al,al
- jz @@03
- mov dx,03DAh
- @@02:
- in al,dx
- and al,9
- cmp al,9
- jne @@02
- @@03:
- mov ax,bx
- @@04:
- stosw
- add di,158d ; adjust for next row
- loop @@04
- ret
-
- FastPutVertical ENDP
-
- FastPutHorizontal PROC NEAR character:BYTE:2,count:WORD,col:WORD,row:WORD
-
- mov bx,row
- mov dx,col
- call setup
- mov cx,count
- mov bl,character
- ; mov bh,[textattr]
- ; mov al,[checksnow]
- ; cld
- or al,al
- jz @@03
- mov dx,03DAh
- @@02:
- in al,dx
- and al,9
- cmp al,9
- jne @@02
- @@03:
- mov ax,bx
- rep stosw
- ret
-
- FastPutHorizontal ENDP
-
- END