Extra JOYCE ED xx operations for JOYCE 1.20, 25 September 1997 ============================================================================== ED FE: API. This is the main entry point for JOYCE functions. A=0: Test for JOYCE. Returns A=0FFh, HL=JOYCE version number (BCD). A=1: Boot. Register B contains n; read sector 1 from image .\BOOT\BOOTn.DSK and enter it. A=2: Set screen colours. BCD = RGB for "white" EHL = RGB for "black" A=3,4,5,6: FID_D_LOGIN, FID_D_READ, FID_D_WRITE, FID_D_FLUSH Entered with parameters as for the corresponding FID routine. Return A=0 if OK, 1 if error. A=7: FID_EMS. Called with: BC= flag word at FID+32. Not currently used. D = reason for call: 0 => drive successfully added. 1 => no memory to add drive 2 => no drive letters to add drive 3 => incorrect system version 4 => start of FID_EMS E = if D=0, E=drive number added (2=C: 3=D: etc) HL = address of message buffer; messages can be copied to here by JOYCE. Returns: A=0: return with carry clear and message at HL. A=1: return with carry set and message at HL. A=2: Attempt to add a drive. B=drive parameter (normally 0FFh). A=8: Save JOYCE settings. A=9: Switch to LPT port given in DE (0, 1 or 2). Returns previous port in HL. Set DE to 0FFFFh not to change. A=10: File operations... C=0Fh: Open file to read/write. DE->pathname. Returns HL=handle or 0 if failed. C=10h: Close file. DE=handle. Returns HL=0 if failed, 1 if OK. C=15h: Write a byte to open file. DE=handle, B=byte. Returns HL=0 if failed, 1 if OK. C=16h: Create file for read/write, DE->name. Returns HL=0 if failed, file handle if succeeded. C=69h: Get the time from the PC clock - as for BDOS 69h. C=91h: Expand filename with wildcards. DE->PC afn with path HL->result buffer B = which file (0=first, 1=second...) returns HL=0 if not found, 1 if found First 11 bytes of buffer hold filename in FCB form Remainder of buffer holds ASCIIZ filename with path A=11: (v1.10+) Screen operations C = 0: Select PCW screen C = 1: Select 800x600x256 screen C = 2: Write character in E C = 3: Write status line character in E C = 4: (v1.20+) GSX call, DE->GSX PB C = 5: FID_EMS for screen driver FID C = 6: (v1.20+) Get capabilities bitmap for screen into HL Bit 0 set if 800x600 mode is possible. Bit 1 set if GSX is possible. Other bits of HL, DE BC IX IY all zero (reserved) A=12: Keyboard operations C = 0: Get mapping for key DE, into HL. C = 1: Set mapping for key DE, in HL. C = 2: Set mapping for keys, at (IX): DW DEvalue,HLvalue, ... In each case: E = keynumber, 1-7Fh. D = modifier flags, bit 0 set for "extended". L = offset in PCW key map, 0-16 (16 for the. two "special" keys f9 and f10). H = bitmask in PCW key map. A=0FEh: Set / Get timing parameters. A:=Screen refresh cycles. HL:=Cycles between 900Hz signals. C = if nonzero, new refresh cycles DE = if nonzero, new cycles between 900Hz signals. A=0FFh: Shut down JOYCE. B = error level to return. When JOYCE quits normally, the error level is: 99: Exited using [f10] 98: Exited using QUIT.COM 0: Exited from the opening screen ED FD: If executed at 0FC4Eh, reads the PC's clock into the SCB. This was done so that the "TIME" call would fit in 3 bytes (ED FD C9).