Category : Utilities for DOS and Windows Machines
Archive   : MAXDOS.ZIP
Filename : MAXDOS.ASM

 
Output of file : MAXDOS.ASM contained in archive : MAXDOS.ZIP
print macro string
lea dx,string
mov ah,9
int 21h
endm
cseg segment para public 'CODE'
assume cs:cseg,ds:cseg,ss:cseg,es:cseg
org 100h ;end of program segment prefix
enter: jmp main ;skip over data
mess1 db 'MAXDOS Copyright 1987 by Keith P. Graham',13,10
db ' DOS Memory Map fixer, 958K version',13,10
db ' Written for PC Rockland and 386 to the MAX software',13,10
db ' November 16, 1987',13,10
db ' Version 1.00',13,10,10,'$'
mess2 db 'Current DOS memory allocated at: '
kcount db '000K',13,10,10,'$'
mess3 db 'Current DOS memory map shows '
kcount1 db '000K total memory',13,10,10,'$'
mess4 db 'Creating memory allocation blocks to show 4K at',13,10
db 'B000h reserved for this program',13,10,10,'$'
mess5 db 'Altering DOS memory to show top of memory at F000h',13,10,10,'$'
;
mess6 db 'Altering system memory to show top of memory at F000h',13,10,10,'$'
mess7 db 'Exiting and remaining resident to keep DOS out of B000h',13,10,10,'$'
err1 db 'Aborting... System must show 704K for MAXDOS to run',13,10,10,'$'
err2 db 'Aborting... DOS must show 704K for MAXDOS to run',13,10,10,'$'
main proc near
print mess1
; get the current top of memory in K
push ds
MOV bx,40h
MOV DS,bx
MOV BX,13h
mov ax,ds:[BX]
pop ds
push ax
; the memory is in ax in K
call do_dec
mov kcount,dl
mov word ptr kcount+1,ax
print mess2
pop ax
cmp ax,704
je got_704
print err1
int 20h
got_704:
; get the allocated memory and get the current total memory
;
; get the top of memory
mov AX,ds:[2] ; top of memory?
; convert to K
MOV CL,6
SHR AX,CL
push ax
call do_dec
mov kcount1,dl
mov word ptr kcount1+1,ax
print mess3
pop ax
cmp ax,704
je got_704a
print err2
int 20h
got_704a:
print mess4
mov ax,704
mov cl,6
shl ax,cl
push ax
mov bx,cs
sub ax,bx
; ax has the paragraphs of free memory
sub ax,1 ; one for the high block
mov dx,ax
; now fix the next guy
push ds
mov ax,cs
sub ax,1
mov ds,ax
mov word ptr ds:[3],dx
mov byte ptr ds:[0],'M'
pop ds
; now the hig memory block must go int
print mess5
pop ax ; 704k
dec ax
push ds
mov ds,ax
mov byte ptr ds:[0],'M'
mov word ptr ds:[1],0ffffh ; fake PSP
mov word ptr ds:[3],00fah ; top of 4k buffer
pop ds
push ds
mov ax,0b0fah
mov ds,ax
mov byte ptr ds:[0],'Z'
mov ax,cs
mov word ptr ds:[1],ax ; free PSP
mov word ptr ds:[3],3fbfh
pop ds
;
;
; alter the bios memory to show the high memory
print mess6
;
push ds
MOV bx,40h
MOV DS,bx
MOV BX,13h
mov word ptr ds:[BX],960
pop ds
int 20h
do_dec:
; converts the number in ax into a dec digit in DL:AX
mov dx,0
mov cx,100
div cx
xchg ax,dx
or dl,30h
mov cx,10
div cl
or ax,3030h
ret
main endp
cseg ends
end enter


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : MAXDOS.ZIP
Filename : MAXDOS.ASM

  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/