TITLE "Z3PCRPR - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3PCRT & Z3PPRT.Z80 Ver 1.1 by Richard Conn ; Date : 29 Mar 89 ; Version : 1.0 ; Module : Z3PCRPR ; Abstract: This module contains the routines PUTCRT which stores ; the specified CRT selection (0 only) in the Z3 Environment, ; and PUTPRT which stores a specified Print Device selection ; (0..1 only) in the Z3 Environment. The new restrictions ; are to comply with the Extended ENV definition. PUTCRT is ; now a "do-nothing" routine, since the CRT definition byte ; is free for other uses. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC PUTCRT, PUTPRT ; External References EXT ENVPTR .Z80 CSEG ;=============================================================== ; NAME - PUTCRT ; Entry: A - Contains the desired CRT (only 0 returns Ok Status) ; Exit : A <> 0, Zero Flag Reset (NZ) if OK ; A = 0, Zero Flag Set (Z) if invalid selection ; Uses : AF ; Special Requirements: None ;=============================================================== PUTCRT: PUSH DE ; Save regs OR A ; Check acceptable value (0 only) JR Z,PUT0 ; ..and join common code if Ok JR PPERR ; Else take error exit ;=============================================================== ; NAME - PUTPRT ; Entry: A - Contains the desired printer device (0..1) ; Exit : A <> 0, Zero Flag Reset (NZ) if Ok ; A = 0, Zero Flag Set (Z) if invalid value (not 0..1) ; Uses : AF ; Special Requirements: None ;=============================================================== PUTPRT: PUSH DE ; Save regs LD DE,30H ; Set offset for Printer device CP 2 ; Check for acceptable range JR NC,PPERR PUSH HL ; Save HL reg pair as well LD HL,(ENVPTR) ; Point to Environment ADD HL,DE LD (HL),A ; Store the selection POP HL ; Restore HL PUT0: DEFB 0F6H ; Set Ok of NZ with "OR 0AFH" PPERR: XOR A ; Error return if entered here POP DE ; Restore DE RET END