home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / make.arc / MAKERSX.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-11-01  |  16.1 KB  |  762 lines

  1.         title    'MAKE Utility RSX for CP/M Plus'
  2.         
  3.  
  4.         public    GUSER        ; return actual user number in <A>
  5.         public    NEXT        ; call BDOS via RSX chain
  6.         public    UBDOS        ; call BDOS with user number at (DE)-1
  7.  
  8.         extrn    PARSMF        ; parse make filename into FCB, <A> = error code
  9.         extrn    OPENMF        ; open make file, <A> = error code
  10.         extrn    UNGETC        ; store char in <A> back into file
  11.         extrn    GETC        ; get one char from file into <A>
  12.         extrn    CLOSMF        ; close make file, return EOF in <A>
  13.         extrn    PARFCB        ; parse file at <HL> into FCB at <DE>
  14.  
  15.     ; constant definitions
  16.  
  17. FALSE        equ    0
  18. TRUE        equ    NOT FALSE
  19. EOF        equ    1AH
  20. CR        equ    13
  21. LF        equ    10
  22. TAB        equ    9
  23. TEST        equ    FALSE
  24.  
  25.  
  26.     ; BDOS function calls
  27.  
  28. WBOOT        equ    0        ; warm boot
  29. CONOUT        equ    2        ; output char in <E> to console
  30. DIRCONIO    equ    6        ; direct console input/output/status
  31. PRINTS        equ    9        ; print string at console
  32. RDCON        equ    10        ; read console input buffer
  33. SETDMA        equ    26        ; set DMA address
  34. SETUSR        equ    32        ; set/get user number
  35. GETSCB        equ    49        ; get/set system control block
  36. RDSTAMP        equ    102        ; get date&time stamp of file
  37. GETPRC        equ    108        ; get/set program return code
  38.  
  39.         
  40.     ; RSX- Header
  41.         
  42.         cseg
  43. serial:        db    0,0,0,0,0,0
  44. start:        jmp    ftest        ; start of program
  45. NEXT:        jmp    0        ; link to next RSX in chain
  46. prev:        dw    0        ; link to prev. RSX in chain
  47. remove:        db    TRUE        ; remove RSX on warm start (altered by MAKE.COM)
  48. nonbank:    db    FALSE        ; load in every CP/M Plus system
  49. rname:        db    'MAKERSX '    ; name of RSX (tested by MAKE.COM)
  50. loader:        db    0,0,0        ; reserved for LOADER module usage
  51.  
  52.  
  53.     ; MAKE variables filled in by MAKE.COM :
  54.  
  55.         cseg
  56. make$verbose:    db    FALSE        ; is TRUE after /V option
  57. next$pb1:    db    15h
  58.         db    0FEh
  59. next$com:    dw    0        ; address of next multiple command
  60. next$pb2:    db    12h
  61.         db    0FFh
  62. next$page:    db    0        ; page of command RSX
  63.  
  64.  
  65.     ; parse file name of make file :
  66.  
  67.         cseg
  68. make$parse:    jmp    PARSMF
  69.  
  70.  
  71.     ; open make file
  72.  
  73.         cseg
  74. make$open:    jmp    OPENMF
  75.  
  76.  
  77.     ; filter for BDOS 10 : read console input
  78.  
  79. ftest:        mvi    a,RDCON        ; is it read console buffer ?
  80.         cmp    c
  81.         jnz    NEXT        ; no : jump to next RSX in chain
  82.         
  83.         mov    a,e        ; is prewritten input used ?
  84.         ora    d
  85.         jz    NEXT        ; skip RSX, cannot deal with unknown
  86.                     ; characters, CCP don't use it
  87.  
  88.         lda    remove        ; is RSX active ?
  89.         ora    a        ; or is it DONE, waiting for removal ?
  90.         jnz    NEXT        ; skip RSX if DONE>
  91.  
  92.     ; process valid read console call
  93.  
  94. trap$rdcon:    xchg            ; save address of console buffer
  95.         shld    rdcon$addr
  96.  
  97.         mvi    c,GETPRC    ; get program return code
  98.         lxi    d,0FFFFH    ; ( NOT reset in CCP so far )
  99.         call    NEXT
  100.         inr    h        ; H = 0FFH?
  101.         jz    abort$make    ; because of faulty program execution
  102.  
  103.     ; save BDOS DMA address
  104.  
  105.         mvi    c,GETSCB    ; get entry in SCB
  106.         lxi    d,scb$dma
  107.         call    NEXT
  108.         shld    user$dma    ; because we need it
  109.  
  110.     ; get drive search chain out of SCB
  111.     
  112.         mvi    c,GETSCB
  113.         lxi    d,scb$drive12
  114.         call    NEXT
  115.         shld    drive1
  116.         mvi    c,GETSCB
  117.         lxi    d,scb$drive34
  118.         call    NEXT
  119.         shld    drive3
  120.  
  121.     ; test for CTRL-C
  122.  
  123.         mvi    c,DIRCONIO    ; direct console IO
  124.         mvi    e,0FFh        ; input/status
  125.         call    NEXT
  126.         cpi    3        ; CTRL-C
  127.         jz    break$make
  128.  
  129.     ; test for next execution or evaluation line
  130.  
  131. test$next:    call    GETC        ; read char from make file
  132.         cpi    EOF        ; end of file reached ?
  133.         jz    make$end    ; yes: terminate make normaly
  134.         cpi    ' '        ; space or TAB ?
  135.         jz    test$condition    ; yes: execute or skip tabbed line
  136.         cpi    TAB
  137.         jz    test$condition
  138.         cpi    20H        ; other control char ?
  139.         jc    test$next    ; skip it
  140.  
  141.         call    UNGETC        ; char back into make file
  142.  
  143.     ; read object file name from makefile
  144.  
  145. make$next:    mvi    a,FALSE        ; clear make-flag (default := no operation)
  146.         sta    make$flag
  147.         sta    EOL$flag    ; end of line of make file not reached
  148.         sta    EOF$flag    ; end of make file not reached
  149.  
  150.         call    read$name    ; read file name into name buffer
  151.  
  152.         lda    EOF$flag    ; end of file ?
  153.         ora    a
  154.         jz    make$next1
  155.         lda    name$buffer    ; and name buffer empty ?
  156.         ora    a
  157.         jz    make$end    ; yes: terminate make rsx
  158.         jmp    EOF$error    ; no : rapport EOF error
  159.  
  160. make$next1:    lda    name$buffer    ; test first char of name buffer
  161.         ora    a
  162.         jz    test$next    ; skip empty line
  163.  
  164.         lda    EOL$flag    ; (unexpected) end of input line after file name?
  165.         ora    a
  166.         jnz    format$error    ; yes: bad formatted make file
  167.  
  168.         call    parse$name    ; parse file name into RSX$FCB
  169.         ora    a        ; parse error ?
  170.         jnz    format$error    ; yes: bad formatted make file
  171.  
  172.         call    get$date    ; try to find date$time stamp for this file
  173.         ora    a        ; file not found ?
  174.         jnz    make$object    ; yes: make file
  175.  
  176.         mov    a,b        ; date =0 ? (stamp inactive)
  177.         ora    c
  178.         jz    make$object    ; make file anyway
  179.  
  180.         lxi    h,obj$date    ; store date & time of object file
  181.         mov    m,c        ; BC = date
  182.         inx    h
  183.         mov    m,b
  184.         inx    h
  185.         mov    m,d        ; D = hour
  186.         inx    h
  187.         mov    m,e        ; E = minute
  188.  
  189.         jmp    make$colon    ; read colon after object filename        
  190.  
  191. make$object:    call    set$makef    ; set make flag
  192.  
  193.     ; read colon from makefile
  194.  
  195. make$colon:    call    read$name    ; read over ':'
  196.  
  197.         lda    EOF$flag    ; unexpected end of file ?
  198.         ora    a
  199.         jnz    EOF$error    ; rapport error
  200.  
  201.         lda    name$buffer    ; name buffer contains ':' ?
  202.         cpi    ':'
  203.         jnz    format$error    ; no: bad formatted make file
  204.  
  205.         lda    EOL$flag    ; (unexpected) end of input line after colon?
  206.         ora    a
  207.         jnz    obj$older    ; yes: unconditional execution
  208.  
  209.     ; read list of dependency files
  210.  
  211. depend$list:    lda    EOL$flag    ; end of input line reached ?
  212.         ora    a
  213.         jnz    test$condition    ; yes: execute line if make$flag is set
  214.  
  215.         call    read$name    ; read next file name
  216.  
  217.         lda    EOF$flag    ; unexpected end of file ?
  218.         ora    a
  219.         jnz    EOF$error    ; rapport error
  220.  
  221.         lda    name$buffer    ; name buffer empty (=empty rest of line) ?
  222.         ora    a
  223.         jz    test$condition    ; test & execute make line
  224.  
  225.         call    parse$name    ; parse file name into RSX$FCB
  226.         ora    a        ; parse error ?
  227.         jnz    format$error    ; yes: bad formatted make file
  228.  
  229.         lda    make$flag    ; nesessary to test file ?
  230.         ora    a
  231.         jnz    depend$list    
  232.  
  233.         call    get$date    ; try to find date&time stamp for this file
  234.         ora    a        ; file found ?
  235.         jz    test$date
  236.  
  237.         lda    RSX$FCB        ; no: drive specified ?
  238.         ora    a
  239.         jnz    not$found    ; ERROR: file not found, abort make
  240.  
  241. test$1:        lda    drive1        ; first drive in search chain
  242.         cpi    0FFH        ; empty ?
  243.         jz    test$2
  244.         ora    a        ; default drive ?
  245.         jz    test$2
  246.         sta    RSX$FCB        ; drive ID into FCB
  247.  
  248.         call    get$date    ; try to find date&time stamp for this file
  249.         ora    a        ; file found ?
  250.         jz    test$date
  251.  
  252. test$2:        lda    drive2        ; second drive in search chain
  253.         cpi    0FFH        ; empty ?
  254.         jz    test$3
  255.         ora    a        ; default drive ?
  256.         jz    test$3
  257.         sta    RSX$FCB        ; drive ID into FCB
  258.  
  259.         call    get$date    ; try to find date&time stamp for this file
  260.         ora    a        ; file found ?
  261.         jz    test$date
  262.  
  263. test$3:        lda    drive3        ; third drive in search chain
  264.         cpi    0FFH        ; empty ?
  265.         jz    test$4
  266.         ora    a        ; default drive ?
  267.         jz    test$4
  268.         sta    RSX$FCB        ; drive ID into FCB
  269.  
  270.         call    get$date    ; try to find date&time stamp for this file
  271.         ora    a        ; file found ?
  272.         jz    test$date
  273.  
  274. test$4:        lda    drive4        ; fourth drive in search chain
  275.         cpi    0FFH        ; empty ?
  276.         jz    not$found
  277.         ora    a        ; default drive ?
  278.         jz    not$found
  279.         sta    RSX$FCB        ; drive ID into FCB
  280.  
  281.         call    get$date    ; try to find date&time stamp for this file
  282.         ora    a        ; file found ?
  283.         jnz    not$found
  284.  
  285. test$date:    mov    a,b        ; stamp inactive ?
  286.         ora    c
  287.         jz    obj$older
  288.  
  289.         lxi    h,obj$date+1    ; compare with date & time of object file
  290.         mov    a,m        ; obj.date - dep.date
  291.         sub    b        ; high byte first
  292.         jc    obj$older
  293.         jnz    depend$list
  294.         dcx    h        ; then low byte
  295.         mov    a,m
  296.         sub    c
  297.         jc    obj$older    ; than dep. list
  298.         jnz    depend$list    ; object younger than dep. : 
  299.  
  300.         inx    h        ; obj.time - dep.time
  301.         inx    h
  302.         mov    a,m        ; A = hour
  303.         sub    d
  304.         jc    obj$older    ; than dep. list
  305.         jnz    depend$list    ; object younger than dep. : 
  306.  
  307.         inx    h
  308.         mov    a,m        ; A = minute
  309.         sub    e
  310.         jc    obj$older    ; than dep. list
  311.         jnz    depend$list    ; object younger than dep. : 
  312. obj$older:    call    set$makef    ; set make flag
  313.         jmp    depend$list    ; continue with parsing
  314.  
  315.     ; test make$flag and execute/skip make command line
  316.  
  317. test$condition: lda    make$flag    ; is make$flag set ?
  318.         ora    a
  319.         jz    test$false
  320.  
  321. test$true:    lhld    rdcon$addr    ; copy line into RDCON buffer
  322.         mov    c,m        ; max. count
  323.         inx    h
  324.         inx    h
  325.         mvi    b,0
  326.  
  327. skip$loop:    push    b
  328.         push    h
  329.         call    GETC        ; into a
  330.         pop    h
  331.         pop    b
  332.         cpi    CR        ; end of line ?
  333.         jz    term$line
  334.         cpi    EOF
  335.         jz    eof$line
  336.         cpi    21H
  337.         jc    skip$loop
  338.         jmp    insert$char        
  339.  
  340. line$loop:    push    b
  341.         push    h
  342.         call    GETC        ; into a
  343.         pop    h
  344.         pop    b
  345.         cpi    CR        ; end of line ?
  346.         jz    term$line
  347.         cpi    EOF
  348.         jz    eof$line
  349.  
  350. insert$char:    mov    m,a
  351.  
  352.         push    b        ; print input of RDCON call
  353.         push    h
  354.         mvi    c,CONOUT
  355.         mov    e,a
  356.         call    NEXT
  357.         pop    h
  358.         pop    b        
  359.  
  360.         inx    h
  361.         inr    b
  362.         dcr    c
  363.         jnz    line$loop
  364.         jmp    long$line    ; line is too long to fit into console buffer
  365.  
  366. term$line:    lhld    rdcon$addr    ; store char count in buffer
  367.         inx    h
  368.         mov    m,b
  369.         mvi    c,CONOUT    ; print CR/LF
  370.         mvi    e,CR
  371.         call    NEXT
  372.         jmp    restore$dma    ; restore user dma address
  373.  
  374. eof$line:    call    set$remove    ; this is the last call
  375.         jmp    term$line
  376.  
  377. test$false:    call    getchar        ; get char in A
  378.         cpi    EOF
  379.         jz    make$end
  380.         cpi    CR
  381.         jnz    test$false
  382.         call    getchar
  383.         jmp    test$next    ; try next line of make file
  384.  
  385.     ; normal end of make file
  386.     
  387. make$end:    call    disp$done
  388.         call    restore$dma
  389.         call    set$remove
  390.         lda    next$page    ; is there a command pending ?
  391.         ora    a
  392.         jz    origin
  393.         lhld    rdcon$addr    ; store empty line into console buffer
  394.         inx    h
  395.         mvi    m,0
  396.         ret            ; return to caller
  397.  
  398.  
  399.     ; unfiltered BDOS 10 call
  400.  
  401. origin:        lhld    rdcon$addr    ; restore registers
  402.         xchg
  403.         mvi    c,RDCON
  404.         jmp    NEXT        ; and reach call to next RSX in chain
  405.  
  406.  
  407.     ; restore user dma address
  408.  
  409. restore$dma:    mvi    c,SETDMA    ; set dma address to old value
  410.         lhld    user$dma
  411.         xchg
  412.         call    NEXT
  413.         ret
  414.  
  415.     ; set remove flag in RSX
  416.     
  417. set$remove:    mvi    a,TRUE
  418.         sta    remove
  419.         mvi    c,GETSCB    ; reset address of next command line
  420.         lxi    d,next$pb1
  421.         call    NEXT
  422.         mvi    c,GETSCB    ; reset page of next command line
  423.         lxi    d,next$pb2
  424.         jmp    NEXT
  425.  
  426.  
  427.     ; abort MAKE :
  428.  
  429. abort$make:    mvi    c,PRINTS    ; send error msg
  430.         lxi    d,abort$msg
  431.         call    NEXT
  432.  
  433. abort$close:    call    CLOSMF        ; close make file
  434.  
  435. abort:        call    set$remove
  436.  
  437.         mvi    c,GETPRC    ; set program return code
  438.         lxi    d,0FF00H
  439.         call    NEXT
  440.         mvi    c,WBOOT
  441.         jmp    NEXT
  442.  
  443. EOF$error:    mvi    c,PRINTS    ; send error msg
  444.         lxi    d,EOF$msg
  445.         call    NEXT
  446.         jmp    abort        
  447.  
  448. disp$done:    mvi    c,PRINTS
  449.         lxi    d,done$msg
  450.         jmp    NEXT
  451.  
  452. format$error:    mvi    c,PRINTS
  453.         lxi    d,format$msg
  454.         call    NEXT
  455.         jmp    abort$close
  456.  
  457. not$found:    mvi    c,PRINTS
  458.         lxi    d,found$msg
  459.         call    NEXT
  460.         jmp    abort$close
  461.  
  462. long$line:    mvi    c,PRINTS
  463.         lxi    d,long$msg
  464.         call    NEXT
  465.         jmp    abort$close
  466.  
  467. break$make:    mvi    c,PRINTS
  468.         lxi    d,break$msg
  469.         call    NEXT
  470.         jmp    abort$close
  471.  
  472.  
  473.     ; read a sequence of characters from make file
  474.  
  475. getchar:    push    b
  476.         push    h
  477.         call    GETC        ; from make file into A
  478.         push    psw
  479.         mov    e,a        ; display char if /V option is on
  480.         mvi    c,CONOUT
  481.         lda    make$verbose
  482.         ora    a
  483.         cnz    NEXT
  484.         pop    psw
  485.         pop    h
  486.         pop    b
  487.         ret
  488.  
  489. read$name:    lxi    h,name$buffer    ; let HL point into (empty) name buffer
  490.         mvi    b,29        ; number of free chars in buffer
  491.  
  492. skip$lead$sp:    call    getchar
  493.         cpi    EOF        ; end of file ?
  494.         jz    read$name$EOF
  495.         cpi    CR        ; end of line ?
  496.         jz    read$name$EOL
  497.         cpi    21H        ; space or other control char ?
  498.         jc    skip$lead$sp
  499.         cpi    '\'        ; line extender ?
  500.         jz    skip$EOL    
  501.         cpi    ';'        ; comment-line ?
  502.         jz    skip$comment
  503.  
  504. store$char:    mov    m,a        ; store into buffer
  505.         inx    h
  506.         dcr    b        ; free chars -1
  507.         jz    format$error
  508.  
  509. next$char:    call    getchar        ; read subsequent chars
  510.         cpi    EOF        ; end of file ?
  511.         jz    read$name$EOF
  512.         cpi    CR        ; end of line ?
  513.         jz    read$name$EOL
  514.         cpi    TAB        ; tabulator ?
  515.         jz    read$name$end
  516.         cpi    20H        ; space ?
  517.         jz    read$name$end
  518.         jc    next$char    ; skip control characters
  519.         cpi    '\'
  520.         jz    skip$EOL
  521.         jmp    store$char    ; else store character into buffer
  522.  
  523. read$name$EOF:    mvi    a,TRUE        ; set EOF-Flag
  524.         sta    EOF$flag
  525.  
  526. read$name$EOL:    mvi    a,TRUE        ; set EOL-Flag
  527.         sta    EOL$flag
  528.         lda    make$verbose    ; send cr/lf if /v option
  529.         ora    a
  530.         jz    read$name$end
  531.         call    getchar
  532. read$name$end:    mvi    m,0        ; append NUL delimiter
  533.         ret
  534.  
  535. skip$EOL:    call    getchar        ; from make file into A
  536.         cpi    EOF        ; end of file ?
  537.         jz    read$name$EOF
  538.         cpi    CR        ; end of line ?
  539.         jnz    skip$EOL
  540.         call    getchar
  541.         jmp    skip$lead$sp
  542.  
  543. skip$comment:    call    getchar
  544.         cpi    EOF
  545.         jz    read$name$EOF
  546.         cpi    CR
  547.         jnz    skip$comment
  548.         call    getchar
  549.         jmp    read$name$end
  550.  
  551. parse$name:    lxi    h,name$buffer    ; parse file name into directory FCB
  552.         lxi    d,RSX$FCB
  553.         jmp    PARFCB
  554.  
  555.  
  556.     ; get a time/date stamp from a file in RSX$FCB
  557.  
  558. get$date:    lxi    h,RSX$FCB+1    ; check to find ? or * in file name/type
  559.         mvi    b,11
  560. check$loop:    mov    a,m        ; get char
  561.         cpi    '?'        ; '?' ?
  562.         jz    ambig$error    ; is not allowed in any file name
  563.         cpi    '*'
  564.         jz    ambig$error
  565.         inx    h
  566.         dcr    b
  567.         jnz    check$loop
  568.  
  569.     if TEST
  570.         mvi    c,PRINTS
  571.         lxi    d,search$msg
  572.         call    NEXT
  573.     endif
  574.  
  575.         mvi    c,RDSTAMP    ; read stamps for this file
  576.         lxi    d,RSX$FCB
  577.         call    UBDOS
  578.         ora    a        ; error ?
  579.         rnz            ; return with A <> 0
  580.  
  581.         lxi    h,RSX$FCB+28    ; HL points to update stamp
  582.         call    get$stamp
  583.         mov    a,c        ; valid stamp ?
  584.         ora    b
  585.         cz    get$create    ; no:try create stamp
  586.     if TEST
  587.         call    out$date
  588.     endif
  589.         xra    a        ; A = 0 = ok
  590.         ret
  591.  
  592. get$create:    lxi    h,RSX$FCB+24    ; HL points to create stamp
  593. get$stamp:    mov    c,m        ; BC := date
  594.         inx    h
  595.         mov    b,m
  596.         inx    h
  597.         mov    d,m        ; D := hour
  598.         inx    h
  599.         mov    e,m        ; E := minute
  600.         ret        
  601.         
  602. ambig$error:    mvi    c,PRINTS
  603.         lxi    d,ambig$msg
  604.         call    NEXT
  605.         jmp    abort$close
  606.  
  607.     if TEST
  608. out$date:    push    b
  609.         push    d
  610.         mvi    a,' '
  611.         call    out$c
  612.         pop    d
  613.         pop    b
  614.         push    b
  615.         push    d
  616.         mov    a,b
  617.         call    out$hex
  618.         pop    d
  619.         pop    b
  620.         push    b
  621.         push    d
  622.         mov    a,c
  623.         call    out$hex
  624.         mvi    a,' '
  625.         call    out$c
  626.         pop    d
  627.         pop    b
  628.         push    b
  629.         push    d
  630.         mov    a,d
  631.         call    out$hex
  632.         mvi    a,':'
  633.         call    out$c
  634.         pop    d
  635.         pop    b
  636.         push    b
  637.         push    d
  638.         mov    a,e
  639.         call    out$hex        
  640.         pop    d
  641.         pop    b
  642.         ret
  643.  
  644. out$hex:    push    psw
  645.         rlc
  646.         rlc
  647.         rlc
  648.         rlc
  649.         call    out$nib
  650.         pop    psw
  651.  
  652. out$nib:    ani    0Fh
  653.         adi    '0'
  654.         cpi    '9'+1
  655.         cnc    add$nib
  656.  
  657. out$c:        mvi    c,CONOUT
  658.         mov    e,a
  659.         jmp    NEXT
  660.  
  661. add$nib:    adi    'A'-'9'-1
  662.         ret
  663.     endif
  664.  
  665.     ; set make flag
  666.  
  667.         cseg
  668. set$makef:    mvi    a,TRUE
  669.         sta    make$flag
  670.         ret
  671.  
  672.     ; call bdos file system with another user number
  673.  
  674.         cseg
  675. UBDOS:        dcx    d        ; DE points to user number(+1) of file
  676.         ldax    d
  677.         inx    d        ; restore DE to old value
  678.         ora    a        ; normal execution if file has
  679.         jz    NEXT        ; no user number set
  680.  
  681.         push    b        ; save BC,DE
  682.         push    d
  683.         push    psw        ; save user number(+1) of file
  684.  
  685.         call    GUSER        ; <A> := actual user number
  686.         sta    user$store    ; save it
  687.  
  688.         pop    psw        ; user number(+1) of file
  689.         dcr    a
  690.         call    set$user    ; set it
  691.  
  692.         pop    d        ; restore BC,DE
  693.         pop    b
  694.         call    NEXT        ; make original BDOS call
  695.         push    psw        ; save AF,HL
  696.         push    h
  697.         
  698.         lda    user$store    ; set actual user number
  699.         call    set$user    ; to original value
  700.  
  701.         pop    h        ; restore AF,HL
  702.         pop    psw
  703.         ret            ; and return to caller
  704.  
  705.     ; get actual user number into <A>
  706.  
  707.         cseg
  708. GUSER:        mvi    e,0FFh
  709.         mvi    c,SETUSR
  710.         jmp    NEXT
  711.  
  712.     ; set user number to <A>
  713.  
  714.         cseg
  715. set$user:    mov    e,a
  716.         mvi    c,SETUSR
  717.         jmp    NEXT
  718.  
  719.  
  720.     ; data area :
  721.  
  722.         dseg
  723. scb$drive12:    db    4CH        ; get drive 1,2
  724.         db    0
  725. scb$drive34:    db    4EH        ; get drive 3,4
  726.         db    0
  727. test$ccp:    db    18H        ; offset of ccp running flag
  728.         db    0
  729. scb$dma:    db    3CH        ; offset of current DMA address
  730.         db    0
  731. make$flag:    db    FALSE        ; is TRUE if make condition satisfied
  732.  
  733. abort$msg:    db    'MAKE aborted by unsuccessfull program return',13,10,'$'
  734. ambig$msg:    db    'MAKE aborted by ambiguous file name',13,10,'$'
  735. format$msg:    db    'MAKE aborted by bad format of make file',13,10,'$'
  736. EOF$msg:    db    'MAKE aborted by wrong end of make file',13,10,'$'
  737. found$msg:    db    'MAKE aborted because file not found',13,10,'$'
  738. long$msg:    db    'MAKE aborted because command line too long',13,10,'$'
  739. break$msg:    db    'MAKE aborted by user',13,10,'$'
  740. done$msg:    db    'DONE>$'
  741.     if TEST
  742. search$msg:    db    'SEARCHING$'
  743.     endif
  744.  
  745. rdcon$addr:    ds    2        ; holds address of read console buffer
  746. user$dma:    ds    2        ; holds address of users dma buffer
  747. name$buffer:    ds    30        ; buffer for CP/M Plus filename
  748. RSX$USER:    ds    1        ; user number of dir. search
  749. RSX$FCB:    ds    36        ; FCB for directory search
  750. RSX$PASS:    ds    8        ; password of file
  751. obj$date:    ds    2        ; date of object file
  752. obj$time:    ds    2        ; time of object file
  753. EOF$flag:    ds    1        ; TRUE if end of makefile reached
  754. EOL$flag:    ds    1        ; TRUE if end of line in makefile reached
  755. drive1:        ds    1        ; drive search chain
  756. drive2:        ds    1
  757. drive3:        ds    1
  758. drive4:        ds    1
  759. user$store:    ds    1        ; temporary storage of actual user number
  760.  
  761.         end
  762.