home *** CD-ROM | disk | FTP | other *** search
-
- TITLE 'PROC5'
-
- ORG 4200H
-
- START EQU 83A8H
- STOP EQU 84AEH
- SENDM EQU 863AH
- SENDQ EQU 8649H
- SENDA EQU 8661H
-
- NM6: DB 'PROC6 '
- NM7: DB 'PROC7 '
- NM8: DB 'PROC8 '
- NM: DB 'PROC '
-
-
- BEGIN: LXI SP,41F0H ; Set stack pointer
- LXI B,NM6
- MVI E,0FFH
- CALL START ; Start PROC6
- LXI B,NM7
- MVI E,0FFH
- CALL START ; Start PROC7
- LXI B,NM8
- MVI E,0FFH
- CALL START ; Start PROC8
- LXI B,0651H
- LXI D,NM6
- CALL SENDM ; Send message to PROC6
- LXI B,0652H
- LXI D,NM6
- CALL SENDM ; Send message to PROC6
- LXI B,QBLK1
- LXI D,NM7
- CALL SENDQ ; Send question to PROC7
- LXI B,QBLK2
- LXI D,NM7
- CALL SENDQ ; Send question to PROC7
- LXI D,NM
- CALL SENDM ; Send message to nonexistent process
- CPI 2
- JZ P1
- HLT ; Halt if RESULT is incorrect
-
- P1: LXI B,QBLK3
- LXI D,NM8
- CALL SENDQ ; Send question to PROC8
- LXI D,NM6
- CALL SENDM ; Send message to PROC6 even though
- ; all MBs are used up
- CPI 1
- JZ P2
- HLT ; Halt if RESULT is incorrect
-
- P2: LXI D,3
- CALL SENDA ; Send answer even though abp = 0
- CPI 1
- JZ P3
- HLT ; Halt if RESULT is incorrect
-
- P3: MVI B,0
- CALL STOP ; Stop this process and switch to PROC6
- HLT
-
- QBLK1: DS 1
- DB 53H,7H
-
- QBLK2: DS 1
- DB 54H,7H
-
- QBLK3: DS 1
- DB 55H,8H
-
- END BEGIN