;/* STARTUP.A86 05/03/84 - 01/05/85 Lee Lorenzen */ ; ; GLOBAMNT equ 0 ; cseg ; GEMENTRY equ 0efh ; PUBLIC crystal extrn main:near extrn PROGEND:word ;/* link proend.obj last */ ;/* this allows us to free */ ;/* memory so the memory alloc*/ ;/* in RSLIB.C will work */ ; cli mov ax,seg stk mov ds,ax mov ss,ax mov sp,offset stk sti ; ; free up any memory we're not using ; es points at our psp ; mov bx,0 ;get our psp address mov ax,es ;es has our psp mov PARABEG,ax mov ax,offset PROGEND add ax, GLOBAMNT add ax,15 mov cl,4 shr ax,cl mov cx,ax ; cx = our data size in paragraphs mov bx,ds add bx,cx mov PARAEND,bx ; ; free_ex: mov ax,PARABEG mov es,ax mov bx,PARAEND sub bx,ax mov ah,4ah int 21h jc fre_error mov ax,0 jmp fre_done fre_error: mov ax,-1 fre_done: ; ; ; mov ax,ds mov es,ax call main mov ax,04c00h int 21h ; ; ; ; crystal: push bp mov bp,sp mov cx,200 mov dx,0 mov bx,4[bp] mov ax,6[bp] mov es,ax int GEMENTRY pop bp ret ; ; sseg rw 32 tmpstk dw 0 ; dseg PARABEG dw 0 PARAEND dw 0 rw 1024 stk dw 0 end