.TITLE DLON .ENABLE LC .IDENT /101488/ ; File:[22,310]DLON.MAC ; Author: Jim Bostwick 14-MAY-1988 ; History: JMB 14-MAY-1988 ; ; Last Edit: 9-OCT-1989 18:18:05 ; .REM | Procedure DLON(table:Logical_table_typ; Log_nam: Packed array [lo..hi:Integer] of char );External; {*USER* Pascal-3 procedure to delete a logical name. Table specifies the logical name table containing the name (include the file LogNam.Typ). The modifiers "terminal" and "privileged" are NOT provided. Use "SPAWN DFL" if required. Log_nam is defined as a conformant string parameter. .note If the logical name string is of zero length, then ALL logical names in the specified table will be deleted! .end note Directive Status is available in $DSW on return. } | ; ; Assemble with PASMAC.MAC as prefix file. ; ; j.m.b. 14-MAY-1988 22:10:03 ; .MCALL DLON$S PROC DLON PARAM Table, INTEGER ; Pascal scalar used as number PARAM lnm, ADDRESS ; pointer to logical name string PARAM lnmlo, INTEGER ; low conformant param PARAM lnmhi, INTEGER ; hi conformant param SAVE BEGIN mov lnm(sp), r2 ; get lnm pointer mov lnmlo(sp), r0 ; get low bound beq 10$ ; if eq - type-0 string ; ; find length-in-use of type-1 string ; mov r2, r3 ; copy string pointer mov lnmhi(sp), r1 ; get high bound sub r0, r1 ; get max length add r1, r3 ; point to end of string inc r3 ; point past end 5$: tstb -(r3) ; scan down past null bytes bne 20$ ; found virtual end sob r1, 5$ ; keep looking br 20$ ; if zero length 10$: movb (r2)+, r1 ; get length in r1, and ; skip length byte bic #^C377, r1 ; it's an unsigned byte 20$: tst r1 ; length zero? bne 30$ ; no - br clr r2 ; zap name string address 30$: mov sp, r0 ; local copy ;50$: br 50$ DLON$S #1,table(r0),r2,r1 ENDPR .END