TITLE "Z3MSGD - Z3lib 4.0" ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from Z3MSGD.Z80 Ver 1.1 by Richard Conn ; Date : 2 May 92 ; Version : 1.3 ; Module : Z3MSGD ; Abstract: This module contains the routine PUTREG which sets ; the specified message register to the specified value ; Revision: ; 1.3 - 2 May 92 - Abort if No ENV/Message Buffer. HFB ; 1.2 - 15 Mar 87 - Original Ver 4 release. HFB ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC PUTREG ; External References EXT GETMSG, @PUT1 .Z80 CSEG ;=============================================================== ; NAME - PUTREG ; Entry: B - Contains the number of the specified register ; A - Contains the value to place in "B" register ; Exit : - None, the register value is set ; Uses : - None ; Special Requirements: None ;=============================================================== PUTREG: PUSH HL ;save HL PUSH DE ;save DE PUSH AF ;save value CALL GETMSG ;get ptr to messages JR Z,PUTRER ;1.3 ..exit if No ENV/Message Buffer LD DE,30H ;offset to registers ADD HL,DE LD E,B ;get register number for 16-bit add JP @PUT1 ; ..Offset and save byte PUTRER: POP AF ;1.3 Restore Regs POP DE ;1.3 POP HL ;1.3 RET ;1.3 ..return to caller END