This is the description of the EGI calls (rst 8 ) with the information I am finding.
CAUTION! this information can be packed of errors....
Call 0 returns doing nothing.
-------------------------
Call 1
-Option A=0, without other parameters, initializes some vars and the latch byte_CE27=1, Also is initialised the screen for EGI(channel FEh), puts the stock menu and initializes the mouse.
-Option A=1, serves to change the base of icons. They are contained on ICS-taged files. DE points to a device filename string. Closes channel FAh if exists, then opens it with the filename string in DE, loads an ICS block(user-created Icon files always have 2304 bytes, except the internal EGI.ICS that has 72 bytes) at unk_F6O4 and closes the FAh channel. The buffer unk_F604(Icons) is manipulated by call 2, obviously.
-Option A=255, 100h is loaded at address word_CE25. I still don't know why.
-------------------------
Call 2
-Option A=1 draws an icon and puts an event that waits for a click inside the icon-drawn zone. BC contains the coordinates of the left-upper corner. DE the number of icon, HL the Z80 address where to jump when the icon is clicked.
-Option A=0, I think it only draws the icon but without putting a click zone.
-------------------------
Call 3 with A=1 puts a personal menu at the Right side of the EGI stock one, but I still don't know how to fill the parameters.
-------------------------
Call 4 draws windows on the screen, only the graphics, it doesn't create a space to put things.
It needs BC, DE and A registers as operands.
BC contains the column and row where the left-upper corner will be drawn.
D contains the number of columns the window will have. E contains the number of lines.
A contains the stile on bits 0, 1, 2, 3, 4. But only some bits seem to do something.
Stile 0 is rectangle without frame.
Stile 1 is line frame,
Stile 2 makes the rectangle a click-event zone, but I still don't know how.
Stile 4 is thick texture frame.
Stile 1+4 is thick solid frame
--------------------------
Call 5 with A=6 selects in L the window where to put the printing cursor, in the same order that they where opened, beginning at 0.
-------------------------
Call 6
-Option A=1 changes the graphics of the mouse pointer. Both HL(shape) and DE(mask) can't be higher than 25h nor 0(observe it can get past number 32 icon upto Arrow shape and Arrow mask). Of course you must have been loaded before buffer Unk_F604 with an ICS-tagged file with 32 icons(call 1, a=1). If not, the pointer will have a strange look.
If HL=0 then file arrshp.dat(arrow shape, 76 bytes ) is loaded at buffer (unk_ff94h ), and file arrmsk.dat(arrow mask, 76 bytes ) loaded at buffer (unk_ff4ch ). It is the default pointer graphic loaded at EGI startup
-Option A=2. If HL is empty then it's loaded with the value of (unk_cdf6=00aah ). (word_cda3 ) is loaded with the value of HL.
-Option A=3. (word_cda1) is loaded with the value of HL.
-Option A=4. If (byte_c429)=ffh, load (word_cd9d) with the content of (word_c427) and (word_c427) with ffh.
If (byte_c429)<>ffh, load (word_c427) with the content of (word_cd9d) and (byte_c429) with ffh.
-Option A=6. If L>11 then returns. The value of L is loaded on (byte_c3f8 ) and returns.
-------------------------
Call 8 simply closes channel FEh and puts byte_CE27=0. This var is like a latch that only allows calls 1, 6, 125 and 255 to work.
------------------------
call 9
Deals with opening zones to print and printing of strings:
-Option A= 0 opens a space on the screen to print strings. Then BC and DE operands act the same as with call 4.
BC contains the coordinates of the point in the screen where the left-upper corner will be drawn. B as X and C as Y.
D contains the number of columns the window will have. E contains the number of lines.
-Option A=1, implies printing on a zone previously opened with option A=0. "BC" contains the length and "DE" the z80 address where the string begins. It isn't the standard EP string mode "length+string".
The text can have a stile: normal, bold, italic or inverse just inserting a escape sequence on the string:
ESCP,I,0=normal
ESCP,I,1=Bold
ESCP,I,2=italic
ESCP,I,4=inverse
They are binary so, for example, mode 3 is bold+italic.
Also there are the usual LF, ERA, DEL, INS etc.
I still don't know what register L does(displaces the box some lines down).
------------------------
Call 13
Loads and executes a new EGI module. DE points to a device filename string.
------------------------
Call 126
Register A can have options 1 and 2 that are converted to 1 and 0 respectively and stored on byte_C231. I still don't know what it does.
------------------------
Call 255
Starts a sort of script of EGI calls. HL holds the start address. The eight bytes starting on (HL ) contain:
(HL) = Register A
(HL+1 )= Number of call
(HL+2 )= Register C
(HL+3 )= Register B
(HL+4 )= Register E
(HL+5 )= Register D
(HL+6 )= Register L
(HL+7 )= Register H
Once transferred the data to the appropriate register or var address, the routine sub_c195(sorting of EGI calls) is called.
When returned HL is incremented by 8 and the following eight bytes are read and so on.
The way to exit from that loop is putting a zero on the two first bytes of a group of eight.
------------------------
I still don't know what the rest of calls do (7, 10, 125 and 127).