Category : Assembly Language Source Code
Archive   : RHSTDLIB.ZIP
Filename : CRSETS.ASM
assume cs:stdlib
;
extrn sl_malloc:far
;
; CreateSets- Creates an 8-element array of sets.
;
; outputs:
;
; es:di- Pointer to first element. Each successive element of the
; array starts one byte later.
;
; carry=0 if successful.
; carry=1 if could not allocate sufficient memory for the set.
;
;
public sl_CreateSets
;
sl_CreateSets proc far
push ax
push cx
pushf
;
mov cx, 256+16 ;# of bytes for a set array.
call sl_malloc ;Allocate storage for the set.
jc BadAlloc
xor ax, ax ; Turn into the empty set.
push di
mov cx, (256+16)/2
cld
rep stosw
pop di
mov word ptr es:[di], 201h ;Init the mask bytes
mov word ptr es:2[di], 804h
mov word ptr es:4[di], 2010h
mov word ptr es:6[di], 8040h
;
popf
pop cx
pop ax
clc
ret
;
BadAlloc: pop di
popf
pop cx
pop ax
stc
ret
sl_CreateSets endp
;
;
stdlib 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/