Category : C Source Code
Archive   : CEXPRESS.ZIP
Filename : AVLPAGES.ASM
EXTRN _memory_model:byte
EXTRN _error_code:byte
_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:_TEXT
PUBLIC _available_pages
_available_pages proc near
mov ah,42h ;function number
int 67H ;EMS interrupt
mov _error_code,0 ;0 = successful
or ah,ah ;test if OK
jz L1 ;jump if no error
inc _error_code ;1 = software malfunction
cmp ah,80h ;test error type
je L1 ;jump if error 1
inc _error_code ;2 = hardware malfunction
L1: mov ax,bx ;set return value
cmp _memory_model,0 ;quit
jle Quit ;
db 0CBh ;RET far
Quit: ret ;RET near
_available_pages 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/