Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!E.ISI.EDU!SAC.DYESGPF From: SAC.DYESGPF@E.ISI.EDU Newsgroups: comp.sys.zenith.z100 Subject: HZ100 Interrupts Message-ID: <[E.ISI.EDU]29-May-88.18:53:10.SAC.DYESGPF> Date: 30 May 88 01:53:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 213 The following information applies to MSDOS 3.10 with IO.SYS 3.00 for the Z100. While there are some gaps in the information presented below, the entire ipage is covered. I leave it to others to follow-up on the functions which are accessed but not elucidated below. Until I read the question about bios interrupts for the Z100, I had considered them part of the (I)nferior (B)ut (M)arketable world and had never even looked in the ipage (0000:0000 to 0000:0400) for anything pointing into bios on the HZ100. I see now that there appears to be some functionality to interrupts 40h, 42h, 44h, 45h, 46h and 58h. Also, there is code space reserved in the form of bios CALLs to multiple NOPs followed by RETs to IRETs for interrupts 50 thru 57h, 5Ah and 5Bh; I seem to remember reading something about these pertaining to either planned expansion to multi-tasking OR multi-user OR networking OR something. These may be nothing more than delays since the current bios does execute some of them now (51h, 54h and 55h for sure). I have not decoded the functioning interrupts as I have been using the bios jump table which begins at 0040:0000 for bios service when needed. This is probably faster than using any interrupts and one can always PUSHF if you need the precall flags back. Ray Duncan's book 'ADVANCED MSDOS' does an excellent job of explaining the use of interrupts 20h thru 27h for generic MSDOS as well as a chapter dedicated to interrupts 10h, 13h, 14h, 16h and 17h used for bios access in some machines. There is also a chapter dedicated to (E)xpanded (M)emory (S)pecifications (INT 67h) as used on 80286 and 80386 machines. BTW, Intel reserved interrupts 0 thru 1Fh for harware use. For some reason however, IBM chose to ignore this when they had their IO.SYS written. Also, MicroSoft ignored this when they decided to use INT 5 for 'print screen'. This can be a problem if a print screen is requested while a 80286 is doing EMS service. INT 5 is a BOUND range error to a 286 in "286" mode. Along the same lines, it should be noted that MicroSoft has requested that interrupts 20h thru 3Fh be reserved for MSDOS only. Any modification/chaining in this area should only use ints 21h thru 24h (okay you can use 20h if you really want to, but shouldn't). USE THE FUNCTIONS AVAILABLE IN INT 21H to modifiy/chain to any of these. The WILD INTERRUPTs indicated below actually access an interrupt handler in bios. This prints the words "WILD INTERRUPT" on STNDOUT and then return control to the caller with an IRET. If the software doesn't like what it gets back there can be problems. Interrupts which will cause the system to crash are so labelled. HZ100 Interrupts ----- ---------- INT Remarks --- ------- 0 Reserved by Intel - Used for divide by zero error. 1 - 4 Reserved by Intel - WILD INTERRUPT 5 Print screen if PSC resident, otherwise IRET (reserved by Intel but this was ignored by MicroSoft). 6 - 1FH Reserved - WILD INTERRUPT (10H, 13H, 14H 16H, 17H used for bios by them other guys, contrary to Intel's recommendations.) 20H Program terminate (obsolete) 21H Function dispatcher 22H Terminate vector |(Pointers only - not executed) 23H Ctrl-C vector | / 24H Critical error vector | / 25H Absolute disk read 26H Absolute disk write 27H TSR (obsolete) 28H Reserved for MSDOS - Points to an IRET 29H " " " - Bios (0040:0B32), call to MTR100 smart display output (FE01:0019). 2A - 2DH " " " - Points to an IRETs 2EH " " " - Points to a Data area CRASH/LOCKUP 2FH " " " - Print spooler (Activated/used by PRINT.EXE) 30H " " " - Points non-interrupt code (RET, no IRET) CRASH 31H " " " - Points to a data area CRASH/LOCKUP 32 - 3FH " " " - Points to an IRET. 40H Bios address 0040:00b4, entry at this point makes a call to a data area. (Disk bios in most inferior machines) CRASH/LOCKUP 41H WILD INTERRUPT 42H Bios 0040:0CCC Valid interrupt code, function not evaluated 43H WILD INTERRUPT 44H Bios 0040:1ED7 Valid interrupt code, function not evaluated 45H " 0040:1F3F " / 46H " 0040:1D62 "/ 47 - 4FH WILD INTERRUPT 50H Bios 0040:2717 -------------------------------------------------- 51H " 0040:0d8d | These all point to CALLs to subroutines which 52H " 0040:271f | contain varrying number of NOPs followed by a 53H " 0040:2727 | RET instruction. 54H " 0040:272f | / 55H " 0040:271b | / 56H " 0040:2723 | / 57H " 0040:272b --------------------------------------------------- 58H " 0040:02bc Returns a value from a memory address and sets that variable to 0. Purpose of variable not evaluated. 59H WILD INTERRUPT 5AH Bios 0040:2738 | CALLs to NOPs followed by RETs again 5BH " 0040:2733 | " 5C - F0H WILD INTERRUPT (Int 67H is used by others for EMS management.) F1 - FEH No valid addresses intialized CRASH/LOCKUP FFH WARM BOOT - very useful for installation programs which modify CONFIG.SYS and need the new configuration to run. For those who may not have the bios jump information available, I am attaching a file (TEMPLATE.ASM) that I constructed for assembling .COM programs which use far calls to bios. I read this file into the source file and edit out those items which are not needed. Any one program may use only 1/4 or less of this code but I would rather delete unneeded code than look-up and type-in the code each time. Al Holecek | Probability factor of one to one...we have normality. | Anything you still can't cope with is therefore your | own problem. --------------------------------- CUT HERE ------------------------------- PAGE 62,132 TITLE - ;** Constant values used in program FALSE EQU 0 TRUE EQU NOT FALSE INPUT_BUFFER EQU 80H ; Command Line Address VID_PORT EQU 0D8H ; Vid control port for Z100 VID_GREEN EQU 0E000H ; Green plane for Z100 VID_RED EQU 0D000H ; Red plane for Z100 VID_BLUE EQU 0C000H ; Blue plane for Z100 ;** Definitions for BIOS LORGADDR = 400H ; Loader org address ;** BIOS entry points BIOS_SEG SEGMENT AT 40H ; Where the BIOS is located ORG 3 BIOS_STATUS LABEL FAR ; Console input status ORG 6 BIOS_CONIN LABEL FAR ; Console input ORG 9 BIOS_CONOUT LABEL FAR ; Console output ORG 0CH BIOS_PRINT LABEL FAR ; Printer output ORG 0FH BIOS_AUXIN LABEL FAR ; Aux input ORG 12H BIOS_AUXOUT LABEL FAR ; Aux output ORG 15H BIOS_READ LABEL FAR ; Disk input ORG 18H BIOS_WRITE LABEL FAR ; Disk output ORG 1BH BIOS_DSKCHG LABEL FAR ; Disk change status ORG 1EH BIOS_SETDATE LABEL FAR ; Set current date ORG 21H ; Days since 1/1/80 BIOS_SETTIME LABEL FAR ; Set current time ORG 24H BIOS_GETDATE LABEL FAR ; Get current date (and time) ORG 27H ; Days since 1/1/80 BIOS_FLUSH LABEL FAR ; Flush keyboard buffer ORG 2AH BIOS_MAPDEV LABEL FAR ; Device mapping ; 2DH to 45H reserved by MicroSoft ORG 48H BIOS_DSKFUNC LABEL FAR ; Arbitrary disk function ORG 4BH BIOS_PRNFUNC LABEL FAR ; PRN: function ORG 4EH BIOS_AUXFUNC LABEL FAR ; AUX: function (modem) ORG 51H BIOS_CONFUNC LABEL FAR ; CON: function ; 54H to 60H reserved by ZDS ORG 61H BIOS_CTADDR LABEL WORD ; Addr of configuration information ORG 63H ; WORD PTR [0040:0061]+0=disk vector BIOS_SEG ENDS ; +2=PRN: configuration table ; +4=AUX: configuration table ; +6=CON: configuration table ; +8=Font information ; DWORD PTR [CONFG_FONT] ; +0=PTR to RAM font table ; +4=PTR to ROM font table ; +8=Size of font table in ROM ; +0AH=Space for table in RAM ; +0AH=Addr of date and time fields ; DWORD PTR [CONFG_CLOCK] ; +0=Days since Jan 1, 1980 ; +2=Hours since midnight ; +3=Minutes ; +4=Seconds ; +5=Hundreds of second (WORD) ; +0CH=Addr of DOS disk tables ; +0EH=Addr of value for map ; control latch ; +10H=Length of configuration ; vector CODE SEGMENT BYTE PUBLIC 'CODE' ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE ORG 100H ;** Entry point BEGIN: JMP START0 START0: CODE ENDS END BEGIN