1 /* 2 * Package.h 3 * 4 * Defns(!) for package DORS 5 * 6 * djm 9/2/2000 7 * 8 * $Id: package.h,v 1.5 2016-04-23 08:00:38 dom Exp $ 9 */ 10 11 #ifdef MAKE_PACKAGE 12 typedef struct { 13 int (*fn)(); 14 } package_str; 15 16 17 #define PKGNAME_MAC(b) defm b , 0 18 19 #pragma asm 20 INCLUDE "error.def" 21 INCLUDE "packages.def" 22 23 ; Some needed routines 24 25 ; $00xx Package Info 26 .packg_inf 27 ld hl,pkg_name 28 ld a,($4D3) 29 ld b,a ;name of pkg in bhl 30 ld c,$01 ;Version of handling reqd 31 ld de,PACK_VERSION 32 and a ;success 33 ret 34 .pkg_name 35 PKGNAME_MAC(PACK_NAME) 36 37 .packg_exp 38 #ifdef PACK_BOOT 39 ld a,b ;Check for autoboot 40 cp exp_boot ;Fc=0 if so, we want to autoboot 41 ret z 42 #endif 43 ld a,RC_Unk 44 scf 45 ret 46 47 ; Other essential routines have to be done by the app itself 48 49 ; Start the package DOR 50 .in_package_dor 51 defb PACKAGE_ID 52 #ifdef OLDPACK 53 defm "oZ" 54 #else 55 defb 'P' 56 #endif 57 defb MAX_CALL_NUM 58 defw packg_inf ;Get information 59 defw _pack_ayt ;Are You There + Allocate 60 defw _pack_bye ;Bye..and deallocate 61 defw _pack_dat ;Return info abt resources 62 defw packg_exp ;Expansion 63 #pragma endasm 64 #endif 65 66