Category : Assembly Language Source Code
Archive   : EMAC15ES.ZIP
Filename : MINT.DEF

 
Output of file : MINT.DEF contained in archive : EMAC15ES.ZIP
mark_overhead equ 3 ;one mark byte + one pointer (3 bytes total)

define_buffer macro x
x&prev_buffer dw ?
x&next_buffer dw ?
x&toptop dw ?
x&topbot dw ?
x&bottop dw ?
x&botbot dw ?
x&new_size dw ?
endm

;see if di is still below actptr. If it isn't, we've run out of memory and
; must abort.
chk_room macro segreg
local ok
cmp di,data_bottop
jb ok
push ax
push cx
ifnb
mov ax,segreg
else
mov ax,ds
endif
mov data_topbot,di
mov cx,100 ;if we can't get 100 free bytes,
call buffer_free ; we may as well not try for only 1.
pop cx
pop ax
jnc ok
call nomem
ok:
endm

;see if di+cx is still below data_bottop. If it isn't, we've run out of memory
; and must abort.
chk_room_cnt macro segreg
local not_ok, ok
push di
add di,cx
jc not_ok
cmp di,data_bottop
pop di
jb ok
push di
not_ok:
pop di
push ax
ifnb
mov ax,segreg
else
mov ax,ds
endif
mov data_topbot,di
call buffer_free
pop ax
jnc ok
call nomem
ok:
endm

;make di point to fbgn and push a copy of it.
;this macro is used by functions that return a value and don't need their
; arguments. More efficient than di_points_fend.
di_points_fbgn macro
mov di,fbgn
dec di
push di
endm

;make di point to fend and push a copy of it.
;this macro is used by functions that need their arguments.
di_points_fend macro
mov di,fend
add di,2
push di
endm


xchgdses macro
push ds
push es
pop ds
pop es
endm


dsdata macro
push ss
pop ds
assume ds:data
endm


esdata macro
push ss
pop es
assume es:data
endm


  3 Responses to “Category : Assembly Language Source Code
Archive   : EMAC15ES.ZIP
Filename : MINT.DEF

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/