home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Z3LIB Module Name: Z3PCRT
- ; Author: Richard Conn
- ; Z3LIB Version Number: 1.3
- ; Module Version Number: 1.1
- ;
- public putcrt
-
- ext envptr
-
- ;
- ; PUTCRT stores the selection of 0 or 1 in the CRT Selection buffer
- ; in the Environment Descriptor.
- ; On exit, A=0 and Zero Flag Set if invalid selection value (not 0 or 1)
- ;
- putcrt:
- push hl ;save regs
- push de
- cp 2 ;range check
- jp nc,pcerror
- push af ;save selection
- ld hl,(envptr) ;pt to environment
- ld de,2fh ;pt to entry
- add hl,de
- pop af ;get selection
- ld (hl),a ;store selection
- pop de ;get regs
- pop hl
- or 0ffh ;set NZ for OK
- ret
- pcerror:
- pop de ;restore registers
- pop hl
- xor a ;error return
- ret
-
- end