home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol264 / zlib2.lbr / Z3MSGH.Z80 < prev    next >
Encoding:
Text File  |  1986-03-23  |  768 b   |  36 lines

  1. ;
  2. ; Z3LIB Module Name:  Z3MSGH
  3. ; Author:  Richard Conn
  4. ; Z3LIB  Version Number:  1.3
  5. ; Module Version Number:  1.1
  6. ;
  7.     public    putshm
  8.  
  9.     ext    getmsg
  10.  
  11. ;
  12. ;    PUTSHM sets the value of the shell message specified in B.  This
  13. ; value is input in the A register.  No registers are affected.  There are
  14. ; only three shell messages, so 0 <= B <= 2.
  15. ;
  16. putshm:
  17.     push    hl        ;save HL
  18.     push    de        ;save DE
  19.     push    af        ;save value
  20.     call    getmsg        ;get ptr to messages
  21.     ld    de,13        ;offset to registers
  22.     add    hl,de
  23.     ld    a,b        ;get register number
  24.     add    a,l        ;make HL pt to register
  25.     ld    l,a
  26.     ld    a,h
  27.     adc    a,0
  28.     ld    h,a
  29.     pop    af        ;get value
  30.     ld    (hl),a        ;put register value
  31.     pop    de        ;get DE
  32.     pop    hl        ;get HL
  33.     ret
  34.  
  35.     end
  36.