.TITLE LISUTL - LIST Utility Routines .IDENT /1.0/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: LISUTL.MAC ; Author: Robin Miller ; Date: September 14, 1982 ; ; Description: ; ; This module contains the utility routines for the LIST program. ; ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL MRKT$S, WTSE$S ; Local equates: TICKS = 1 ; TIME UNITS FOR MARKTIME SECNDS = 2 ; MINUTE = 3 ; HOURS = 4 ; .SBTTL CUPPER - Convert Character To Upper Case ;+ ; ; CUPPER - Convert character to upper case. ; ; Inputs: ; (R0) = Character to convert. ; ;- CUPPER:: CMPB (R0),#'a ; POSSIBLE LOWERCASE ? BLO 10$ ; IF LO, NO CMPB (R0),#'z ; REALLY LOWERCASE ? BHI 10$ ; IF HI, NO BICB #40,(R0) ; CONVERT TO UPPERCASE 10$: RETURN .SBTTL CONVRT - CONVERT ASCII DECIMAL TO BINARY ;+ ; ; CONVRT - Convert ASCII decimal number to binary. ; ; Inputs: ; R0 = Address of first byte to be converted. ; ; Outputs: ; C bit is set if end of line or negative number. ; R0 = Address of next byte in the buffer. ; R1 = The converted number. ; R2 = The terminating character. ; ;- CONVRT:: TSTB (R0) ; AT END OF LINE ? BEQ 10$ ; IF EQ, YES CALL $CDTB ; CONVERT DECIMAL TO BINARY TST R1 ; NEGATIVE NUMBER ? BPL 20$ ; IF PL, NO (POSITIVE) 10$: SEC ; SHOW BAD NUMBER 20$: RETURN .SBTTL DELAY - Wait Specified Time Interval ;+ ; ; DELAY - Wait specified time interval. ; ; Inputs: ; R0 = the time interval magnitude. ; R1 = the time interval unit (i.e., TICKS). ; ; Outputs: ; Carry clear/set = success/failure. ; ; All registers are preserved. ; ;- DELAY:: MRKT$S #MRKEFN,R0,R1 ; ISSUE THE MARK TIME BCS 10$ ; IF CS, DIRECTIVE ERROR WTSE$S #MRKEFN ; ELSE WAIT FOR MARKTIME ; BR 20$ ; AND CONTINUE ... 10$: ; *** ERROR ROUTINE NO EXIST *** ; MOV $DSW,R0 ; COPY THE ERROR CODE ; CALL WRTERR ; WRITE THE ERROR MESSAGE 20$: RETURN .END