TITLE "Z3IOR - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3IOR.Z80 Ver 1.1 by Richard Conn ; Date : 8 Mar 87 ; Version : 1.2 ; Module : Z3IOR ; Abstract: This module contains the routines IORCON, IORCOFF, ; IORLON and IORLOFF which Turn recording on and off to ; the Console and List devices respectively. An FCB entry ; in ZCPR3 format (drive at offset 0, user at offset 13) ; is passed to be used to receive the recorded information ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC IORCON, IORCOFF, IORLON, IORLOFF ; External References EXT GETIOP, GETIOS .Z80 CSEG ;=============================================================== ; NAME - IORCON, IORLON, IORCOFF, IORLOFF ; Entry: HL - Points to ZCPR3 FCB ; Exit : A <> 0, Zero Flag Reset (NZ) if Ok ; A = 0, Zero Flag Set (Z) if error or No IOP ; Uses : AF ; Special Requirements: None ;=============================================================== IORCOFF: PUSH DE LD DE,39 ; offset JR COMMON IORCON: PUSH DE LD DE,36 ; offset JR COMMON IORLOFF:PUSH DE LD DE,45 ; offset JR COMMON IORLON: PUSH DE LD DE,42 ; offset COMMON: PUSH HL ; Save remainder of regs PUSH BC LD (FCBPTR),HL ; save FCB ptr CALL RUNIO ; do recording call POP BC POP HL POP DE RET ;..... ; Run Routine whose Offset is in DE; Check for presence of IOP ; and return with Zero Set if problem (no IOP or IOP not loaded) RUNIO: CALL GETIOP ; get I/O Package address RET Z LD A,(HL) ; check for loaded I/O Package OR A RET Z ADD HL,DE ; pt to routine PUSH HL CALL GETIOS ; check for driver routine AND 80H ; MSB is set if drivers available POP HL RET Z LD DE,RUNIOR PUSH DE PUSH HL ; save address on stack LD HL,(FCBPTR) ; get ptr to FCB containing file name RET ; run routine from address on stack RUNIOR: OR 0FFH ; set OK RET ; Data Storage/Buffers DSEG ; Put in Data Segment FCBPTR: DEFS 2 ; pointer to FCB argument END