;/* DESKSTAR.A86 05/03/84 - 06/09/85 Lee Lorenzen */ ; for 3.0 4/10/86 MDF ; ; ;/* ;* Copyright 1999, Caldera Thin Clients, Inc. ;* This software is licenced under the GNU Public License. ;* Please see LICENSE.TXT for further information. ;* Historical Copyright ;* ------------------------------------------------------------- ;* GEM Desktop Version 2.0 ;* Serial No. XXXX-0000-654321 All Rights Reserved ;* Copyright (C) 1985 Digital Research Inc. ;* ------------------------------------------------------------- ;*/ ; GLOBAMNT equ 7978h ;size of global structure G ; dseg extrn G:near extrn PROGEND:word ;/* link proend.obj last */ ; ; cseg ; GEMENTRY equ 0efh ; PUBLIC gem PUBLIC debug_ru extrn gemain:near ;/* 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 ; ; zero out static uninitialized data ; mov bx,es mov es,ax mov di,offset G mov cx,GLOBAMNT xor ax,ax cld rep stosb mov es,bx 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 mov dx,offset memerrmsg jc errormsg ; ; ; ; check for presence of GEMVDI before calling the application ; push es xor ax,ax mov es,ax mov bx,es:.3bch mov ax,es:.3beh mov es,ax mov di,2 add di,bx mov si,offset gemaesmsg mov cx,6 rep cmpsb pop es jz runapplication mov dx,offset gemaesmsg errormsg: mov ah,9 int 21h mov dx,offset terminmsg mov ah,9 int 21h jmp terminate runapplication: mov ax,ds ; ; mov es,ax call gemain ; ; terminate: mov ax,04c00h int 21h ; ; gem: 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 ; ; debug_ru: push bp mov bp,sp int 3 nop pop bp ret ; ; dseg PARABEG dw 0 PARAEND dw 0 ; ; copyrt db 'GEM Desktop Version 2.0' db 'Serial No. XXXX-0000-654321 All Rights Reserved' db 'Copyright (C) 1985 Digital Research Inc.' db '10/30/85' ; gemaesmsg db 'GEMAES not present in memory.' db '$' ; memerrmsg db 'Unable to free memory.' db '$' ; terminmsg db 0dh,0ah db 'Execution terminated.' db '$' ; rb 512 ; rb 1024 stk dw 0 ; ; sseg rw 16 tmpstk dw 0 end