home *** CD-ROM | disk | FTP | other *** search
-
- TITLE 'PROC3'
-
- ORG 4A00H
-
- DUMP EQU 7200H
- V EQU 8204H
- AS EQU 8004H
- START EQU 83A8H
- STOP EQU 84A0H
-
- NM1: DB 'PROC1 '
- NM4: DB 'PROC4 '
-
-
- BEGIN: LXI SP,49A0H ; 4
- LXI B,NM1
- HLT ; Set AS to 0
-
- MVI E,3
- CALL START ; Start PROC1 with priority 3
- ; There is jump to PROC2 because AS is 0
- LXI B,NM1 ; 6
- CALL STOP
- HLT ; Set AS to 0
-
- LXI B,NM4 ; 7
- CALL STOP ; There is a jump to PROC4
-
- CALL DUMP
- LXI B,AS ; 10
- CALL V ; There is no jump because PROC4 is
- ; stopped
- LXI B,NM4
- MVI E,1
- CALL START ; There is a jump to PROC4
-
- ; NOTE: If we had set E to 0FFH, then there would be no
- ; jump which is correct since PROC3 would have a
- ; higher priority than PROC4. This was tested.
-
- HLT
- END BEGIN