LIBRARY "GEMAES" REM $option q30,y- REM GB array filler ' GB is a HiSoft BASIC function which gives the address ' of an array of 6 more addresses which point to other arrays which each have names. ' The first array is called the Control array and has a length of 5 words. PRINT "The opcode of the last AES command called was";PEEKW(PEEKL(GB)) ' This gives the opcode (command number) of the last command called PRINT "It had ";PEEKW(PEEKL(GB)+2);" intin operands" ' This gives the number of integers (16 bit words) the command was sent. ' It varies form command to command. PRINT "It had space for";PEEKW(PEEKL(GB)+4);" intout operands" ' This gives the number of integers the command was allowed to return. ' Depending on the command, some need to return more integers ' than others. PRINT "It had ";PEEKW(PEEKL(GB)+6);" addrin operands" ' This gives the number of addresses the command was given. ' It is often used to give commands the address of strings that are needed ' such as the (e.g.) [1][Alert][OK] String used by alert boxes. PRINT "It had ";PEEKW(PEEKL(GB)+6);" addrout operands" ' This gives the number of addresses the command has returned, if any. REM *************** ' The global Array ' The global array contains information which is needed by many GEM programs. PRINT HEX$(PEEKW(PEEKL(GB+4)) ' This gives the AES version number of the AES that the progeam is running upon. ' Or 0 if no AES is loaded (e.g.) If your application has been started from an auto folder PRINT PEEKW(PEEKL(GB+4)+2) ' This gives the number of applications that can be run at once under this AES ' MultiTOS gives -1 (65535) which means infinity applications can be run at once. ' It is 1 under non-multitasking systems ap_id=PEEKW(PEEKL(GB+4)+4) ' This gives your programs application id which is needed with menu_register or when sending a message. ' ( ap_id goes in word 1 of any standard message being sent by an application) appglobal&=PEEKL(PEEKL(GB+4)+6) ' this gives the contents of a variable for the applications own use rscfile&=PEEKL(PEEKL(GB+4)+10) ' this gives the starting address of the programs .RSC file in memory if it uses one via rsrc_load REM if the AES version is = or > 400 IF PEEKW(PEEKL(GB+4))=>&H400 THEN REM then these give the maximum and minimum character height used by the AES for vst_height maximum=PEEKW(PEEKL(GB+4)+26) minimum=PEEKW(PEEKL(GB+4)+28)