; TITLE "SISSP - Syslib 4.0" NAME ('ISSP') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SISSP.Z80 Ver 1.1 by Richard Conn ; Date : 29 Jul 89 ; Version : 1.3 ; Module : SISSP ; Abstract: This module contains only the routine ISSP which evaluates ; the char in register A to see if it is a space, character ; (null, space, vert and horiz tab, carriage return, line feed, ; form feed, back space, or delete). If it is one of these, The ; Zero Flag is Set (Z), otherwise, the Zero Flag is Reset (NZ). ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points: PUBLIC ISSP ; Data Definitions: BS EQU 'H'-'@' ; Ascii Backspace character CR EQU 'M'-'@' ; Carriage Return DEL EQU 7FH ; Delete character .Z80 CSEG ;========================================================================= ; NAME - ISSP ; Entry: A = Character to be evaluated ; Exit : A = Char, Zero Flag Set (Z) if "space", else Zero Flag Reset (NZ). ; Uses : F ; Special Requirements: None ;========================================================================= ISSP: PUSH AF ; Save the original character AND 7FH ; Mask the MSB JR Z,ISSP0 ; ..and jump to "Is Space" exit CP DEL ; Is it Delete? JR Z,ISSP0 ; ..jump to "Is Space" exit if so CP ' ' ; Is it a Space? JR Z,ISSP0 ; ..jump to "Is Space" exit if so CP BS ; Is it less than a BackSpace? JR C,NOSP ; ..jump to "Not Space" exit if so CP CR+1 ; Is it Greater than a Carriage Return? JR NC,NOSP ; ..jump to "Not Space" exit if so ; If we arrive here, we have NULL, Backspace, Horizontal Tab, Line Feed, ; Vertical Tab, Form Feed, Carriage Return, Space or Delete. ISSP0: POP AF ; Restore the original char.. CP A ; ..and Set the Zero Flag for Space char RET NOSP: POP AF ; Restore the original char.. OR A ; ..and Clear Zero Flag for "No Space" char RET END