Category : Files from Magazines
Archive   : PCTJ8804.ZIP
Filename : EXDB3.ASM

 
Output of file : EXDB3.ASM contained in archive : PCTJ8804.ZIP
TITLE EXDB3
COMMENT " Reserve memory for handle table, Exec dBASE III
Convert w/EXE2BIN after linking, name it .COM
Written by Ted Mirecki
"
NHANDLES EQU 63
USERINT EQU 66h

CODE SEGMENT WORD PUBLIC 'CODE'
ASSUME CS:CODE, DS:CODE

ORG 100h
EXDB3 PROC
LEA SP,STACK ;RESET STACK
MOV BX,SP ;POINT TO END OF PROGRAM MEMORY
ADD BX,15 ;ROUND UP TO NEXT PARAG
MOV CL,4
SHR BX,CL ;CONVERT TO PARAGRAPHS
MOV AH,4Ah ;SHRINK MEMORY BLOCK
INT 21h

MOV BX,NHANDLES
ADD BX,15 ;ROUND UP HANDLE TABLE SIZE
SHR BX,CL
MOV AH,48h ;ALLOCATE MEMORY FOR HANDLE TABLE
INT 21h
PUSH DS
MOV DS,AX ;SEG ADDRESS OF TABLE TO DS
MOV DX,NHANDLES ;LENGTH OF TABLE TO DX
MOV AX,2500h+USERINT ;SAVE DS:DX IN INT VECTOR
INT 21h
POP DS
;SET UP EXEC CALL:
LEA DX,FNAME ;DX->FILE NAME
LEA BX,BLOCK ;BX->PARAMETER BLOCK
MOV AX,DS ;PUT SEG ADDRESS INTO PARM BLOCK
MOV SEG1,AX
MOV SEG2,AX
MOV SEG3,AX
MOV SAVSS,SS ;SAVE STACK REGS
MOV SAVSP,SP
MOV AX,4B00h ;EXEC
INT 21h

MOV SS,CS:SAVSS ;RESTORE STACK
MOV SP,CS:SAVSP
XOR AX,AX
MOV DS,AX ;ZERO OUT INT VECTOR
MOV AX,2500h+USERINT
INT 21h
MOV AX,4C00h ;BYE-BYE
INT 21h
EXDB3 ENDP

FNAME DB 'C:\DBASE\DBASE.EXE',0 ;NAME OF PROGRAM TO EXEC
EVEN ;ALIGN TO WORD
BLOCK LABEL BYTE ;EXEC PARAMETER BLOCK
DW 0 ;INHERIT CALLER'S ENVIRONMENT
DW 80h ;FAR ADDRESS OF COMMAND LINE
SEG1 DW ?
DW 5Ch ;ADDRESSES OF FCB's IN PSP
SEG2 DW ?
DW 6Ch
SEG3 DW ?

SAVSS DW ? ;SAVE AREA FOR STACK REGS
SAVSP DW ?
DW 128 DUP(?) ;STACK
STACK LABEL WORD

CODE ENDS
END EXDB3


  3 Responses to “Category : Files from Magazines
Archive   : PCTJ8804.ZIP
Filename : EXDB3.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/