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

  1.  
  2.        TITLE  'PROC3'
  3.  
  4.        ORG    4A00H
  5.  
  6. DUMP   EQU    7200H
  7. V      EQU    8204H
  8. AS     EQU    8004H
  9. START  EQU    83A8H
  10. STOP   EQU    84A0H
  11.  
  12. NM1:   DB     'PROC1 '
  13. NM4:   DB     'PROC4 '
  14.  
  15.  
  16. BEGIN: LXI    SP,49A0H    ; 4
  17.        LXI    B,NM1
  18.        HLT                ; Set AS to 0
  19.  
  20.        MVI    E,3
  21.        CALL   START       ; Start PROC1 with priority 3
  22.                           ; There is jump to PROC2 because AS is 0
  23.        LXI    B,NM1       ; 6
  24.        CALL   STOP
  25.        HLT                ; Set AS to 0
  26.  
  27.        LXI    B,NM4       ; 7
  28.        CALL   STOP        ; There is a jump to PROC4
  29.  
  30.        CALL   DUMP
  31.        LXI    B,AS        ; 10
  32.        CALL   V           ; There is no jump because PROC4 is
  33.                           ; stopped
  34.        LXI    B,NM4
  35.        MVI    E,1
  36.        CALL   START       ; There is a jump to PROC4
  37.  
  38.        ; NOTE: If we had set E to 0FFH, then there would be no
  39.                ; jump which is correct since PROC3 would have a
  40.                ; higher priority than PROC4.  This was tested.
  41.  
  42.        HLT
  43.        END    BEGIN
  44.