From 381d62a7339f1431e562f8df415c8bd399922010 Mon Sep 17 00:00:00 2001 From: Wayne Warthen Date: Sun, 1 Sep 2019 13:25:30 -0700 Subject: [PATCH 1/2] Update API.txt --- Source/HBIOS/API.txt | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Source/HBIOS/API.txt b/Source/HBIOS/API.txt index 74c8794c..c6f71d5e 100644 --- a/Source/HBIOS/API.txt +++ b/Source/HBIOS/API.txt @@ -132,7 +132,7 @@ INT ($FC): Interrupt vector management functions INTSET ($20): Set interrupt vector BC=Function/Subfunction A=Result HL=Interrupt Vector HL=Previous Vector - E=Interrupt Vector Table Position DE=Interrupt Routing Engine Address + E=Interrupt Vector Table Position Set the Interrupt Vector for the specified Interrupt Vector Table Position to the specified Interrupt Vector. The previous value at the specified table position @@ -151,28 +151,25 @@ INT ($FC): Interrupt vector management functions must be saved and restored by the interrupt handler. Interrupt handlers are different for IM1 or IM2. - + For IM1: The new interrupt handler is responsible for chaining (JP) to the previous vector - if the interrupt is not handled. The interrupt handler must return with ZF set - if interrupt is handled and ZF cleared if not handled. + if the interrupt is not handled. If the interrupt is handled, the new handler may + simply return (RET) with ZF cleared (NZ). For IM2: - The interrupt handler requires an invocation stub separate from the actual interrupt - handling code. The stub must be: + The new interrupt handler may either replace or hook the previous interrupt + handler. To replace the previous interrupt handler, the new handler just returns + (RET) when done. To hook the previous handler, the new handler can chain (JP) + to the previous vector. Note that initially all IM2 interrupt vectors are set + to be handled as “BAD” meaning that the interrupt is unexpected. In most cases, + you do not want to chain to the previous vector because it will cause the + interrupt to display a “BAD INT” system panic message. - PUSH HL - LD HL, - JP - - When calling Set Interrupt Vector, the address of the stub must be provided for the - Interrupt Vector parameter. The address of the Interrupt Routing Engine will be - returned in DE and must be inserted into the stub code as indicated above. In the - case of IM2 mode interrutps, the actual interrupt handler should not chain to the - previous entry. The new interrupt handler must assume all responsibilities for - the specific interrupt slot being occupied. + The interrupt framework will take care of issuing an EI and RETI instruction. + Do not put these instructions in your new handler. If the caller is transient, then the caller must remove the new interrupt handler and restore the original one prior to termination. This is accomplished by calling this @@ -236,8 +233,9 @@ DEVICE ($06): Serial Device Attributes Byte: 7: 0=RS-232, 1=Terminal + 6: 1=Parallel Port - If Terminal, 3-0 is attached Video Unit # + If device is of type Terminal, bits 3-0 indicate attached Video Unit # ============== Disk Functions From a473c5c2219af482b9d7b5617b8f908138c137db Mon Sep 17 00:00:00 2001 From: Wayne Warthen Date: Sun, 1 Sep 2019 18:54:13 -0700 Subject: [PATCH 2/2] Minor Updates --- ReadMe.txt | 2 +- Source/CBIOS/ver.inc | 2 +- Source/HBIOS/hbios.asm | 2 +- Source/HBIOS/ver.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ReadMe.txt b/ReadMe.txt index 03895502..bd3667f5 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -7,7 +7,7 @@ *********************************************************************** Wayne Warthen (wwarthen@gmail.com) -Version 2.9.2-pre.6, 2019-08-18 +Version 2.9.2-pre.7, 2019-09-01 https://www.retrobrewcomputers.org/ RomWBW is a ROM-based implementation of CP/M-80 2.2 and Z-System for diff --git a/Source/CBIOS/ver.inc b/Source/CBIOS/ver.inc index 27bb3ad3..187ef730 100644 --- a/Source/CBIOS/ver.inc +++ b/Source/CBIOS/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 9 #DEFINE RUP 2 #DEFINE RTP 0 -#DEFINE BIOSVER "2.9.2-pre.6" +#DEFINE BIOSVER "2.9.2-pre.7" diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 69a0989d..4942e59f 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -3027,7 +3027,7 @@ PRT_ALLD: LD B,E ; MOVE TO B FOR LOOP COUNT LD A,E ; MOVE TO ACCUM OR A ; SET FLAGS - JR Z,PRT_ALLD1 ; IF NONE, BYPASS + RET Z ; IF NONE, JUST RETURN LD C,0 ; C WILL BE UNIT INDEX PRT_ALLD1: PUSH BC ; SAVE LOOP CONTROL diff --git a/Source/HBIOS/ver.inc b/Source/HBIOS/ver.inc index 27bb3ad3..187ef730 100644 --- a/Source/HBIOS/ver.inc +++ b/Source/HBIOS/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 9 #DEFINE RUP 2 #DEFINE RTP 0 -#DEFINE BIOSVER "2.9.2-pre.6" +#DEFINE BIOSVER "2.9.2-pre.7"