home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / cpmug / cpmug015.ark / PROC5.ASM < prev    next >
Encoding:
Assembly Source File  |  1984-04-29  |  1.9 KB  |  76 lines

  1.  
  2.        TITLE  'PROC5'
  3.  
  4.        ORG    4200H
  5.  
  6. START  EQU    83A8H
  7. STOP   EQU    84AEH
  8. SENDM  EQU    863AH
  9. SENDQ  EQU    8649H
  10. SENDA  EQU    8661H
  11.  
  12. NM6:   DB     'PROC6 '
  13. NM7:   DB     'PROC7 '
  14. NM8:   DB     'PROC8 '
  15. NM:    DB     'PROC  '
  16.  
  17.  
  18. BEGIN: LXI    SP,41F0H      ; Set stack pointer
  19.        LXI    B,NM6
  20.        MVI    E,0FFH
  21.        CALL   START         ; Start PROC6
  22.        LXI    B,NM7
  23.        MVI    E,0FFH
  24.        CALL   START         ; Start PROC7
  25.        LXI    B,NM8
  26.        MVI    E,0FFH
  27.        CALL   START         ; Start PROC8
  28.        LXI    B,0651H
  29.        LXI    D,NM6
  30.        CALL   SENDM         ; Send message to PROC6
  31.        LXI    B,0652H
  32.        LXI    D,NM6
  33.        CALL   SENDM         ; Send message to PROC6
  34.        LXI    B,QBLK1
  35.        LXI    D,NM7
  36.        CALL   SENDQ         ; Send question to PROC7
  37.        LXI    B,QBLK2
  38.        LXI    D,NM7
  39.        CALL   SENDQ         ; Send question to PROC7
  40.        LXI    D,NM
  41.        CALL   SENDM         ; Send message to nonexistent process
  42.        CPI    2
  43.        JZ     P1
  44.        HLT                  ; Halt if RESULT is incorrect
  45.  
  46. P1:    LXI    B,QBLK3
  47.        LXI    D,NM8
  48.        CALL   SENDQ         ; Send question to PROC8
  49.        LXI    D,NM6
  50.        CALL   SENDM         ; Send message to PROC6 even though
  51.                             ; all MBs are used up
  52.        CPI    1
  53.        JZ     P2
  54.        HLT                  ; Halt if RESULT is incorrect
  55.  
  56. P2:    LXI    D,3
  57.        CALL   SENDA         ; Send answer even though  abp = 0
  58.        CPI    1
  59.        JZ     P3
  60.        HLT                  ; Halt if RESULT is incorrect
  61.  
  62. P3:    MVI    B,0
  63.        CALL   STOP          ; Stop this process and switch to PROC6
  64.        HLT
  65.  
  66. QBLK1: DS     1
  67.        DB     53H,7H
  68.  
  69. QBLK2: DS     1
  70.        DB     54H,7H
  71.  
  72. QBLK3: DS     1
  73.        DB     55H,8H
  74.  
  75.        END    BEGIN
  76.