Category : Files from Magazines
Archive   : PJ91.ZIP
Filename : ASM.INC
page 63,128
.model small
ASSUME ds:nothing
; includelib lib
bptr equ byte ptr
wptr equ word ptr
dptr equ dword ptr
stdin equ 0
stdout equ 1
stderr equ 2
FILENAME_MAX equ 80
FOPEN_MAX equ 20
ZER0 equ 0
NULL_POINTER equ 0
NULL_HANDLE equ 0
NULL_CHAR equ 0
TAB_CHAR equ 9
EOL_CHAR equ 10 ; end of line
LF_CHAR equ 10 ; linefeed
CR_CHAR equ 13 ; carriage return
SPACE_CHAR equ ' '
NEWLINE_CHARS equ 0A0Dh
BLOCK_SIZE equ 16384 ; size of an EMS block
; MACROs
; smart CMP marco
;
cmpx macro dst,src
if src eq 0
or dst,dst
else
cmp dst,src
endif
endm
; smart MOV macro
;
movx macro dst,src
ifidn
push ss
pop dst
exitm
endif
if (type src) eq 0 ; if register or constant AND
if ((.type src) and 11100b) eq 0 ; if not any register AND
if src eq 0 ; if source is zero
sub dst,dst ; then efficiently 0 register
exitm
endif
endif
endif
mov dst,src
endm
; OPTASM macros
;
IFNDEF .date ; if not OPTASM
.sall ; don't show macro contents
extb macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
extrn xx:byte
else
exitm
endif
endm
endm
extd macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
extrn xx:dword
else
exitm
endif
endm
endm
extn macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
extrn xx:near
else
exitm
endif
endm
endm
extw macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
extrn xx:word
else
exitm
endif
endm
endm
pushm macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
push xx
else
exitm
endif
endm
endm
popm macro a,b,c,d,e,f,g,h,i,j,k
irp xx,
ifnb
pop xx
else
exitm
endif
endm
endm
ENDIF ; end MASM/TASM macros
.list ; end of asm.inc
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/