Category : C Source Code
Archive   : JAZLIB.ZIP
Filename : MOVEATTR.ASM
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Title : moveattr ³
³purpose : moves a set of attibutes to a screen buffer. ³
³ ³
³This routine does a block move avoiding snow on the Ibm color card. ³
³It does this by monitering the video status bit at port location 0x3da ³
³by Jack A. Zucker (jaz) 75766,1336 on jan 25,1986 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*
title buffer moveattr
name moveattr
assume cs:_text
_text segment public byte 'code'
public _moveattr
public _moveattr, next, status_low, status_high
_moveattr proc near
push bp
mov bp,sp
push si
push di
push es
push ds
mov ax,[bp + 4] ; get screen segment
mov ds,ax ; in ds
mov si,[bp + 6] ; get screen offset
inc si ; point to attribute
mov bx,si ; save screen offset in bx
mov ax,[bp + 8] ; get number of rows
mov cl,[bp + 0Ah] ; get number of columns
mov ch,[bp + 0Ch] ; get attribute in ch
cmp [bp+4],0B000h ; mono ?
jz mono
next:
mov dx,3dah ; address of 6845 Status register
push ax
status_low:
in al,dx ; get vertical retrace status
ror al,1 ; faster than test
jc status_low ; wait for partially done retrace
cli ; don't allow any more interrupts
status_high:
in al,dx ; wait for beginning of new retrace
ror al,1
jnc status_high ; retrace not started
mov byte ptr [si],ch ; paint attribute on screen
sti ; interrupts allowed now
inc si
inc si
pop ax
dec cl
or cl,cl
jnz next
add bx,160
mov si,bx
mov cl,[bp + 0Ah]
dec ax
or ax,ax
jnz next
jmp exit
mono:
mov byte ptr [si],ch ; paint attribute on screen
sti ; interrupts allowed now
inc si
inc si
dec cl
or cl,cl
jnz mono
add bx,160
mov si,bx
mov cl,[bp + 0Ah]
dec ax
or ax,ax
jnz mono
exit:
pop ds
pop es
pop di
pop si
mov sp,bp
pop bp
ret
_moveattr endp
_text ends
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/