# File: chkhrdl_v05.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/chkhrdl_v05.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#;
#; chkhrdl:
#;
#;  Checks if high rate downlink started properly. If not sets a f
#;  request reset.
#;
#; V0.00 21 Nov 95 Dnyanesh Mathur
#;
#;................................................................
#;
#QSR_STR_CHKDL8::
#    SETREG    R159  40
tcblock mbipmacl 0x0B20    0x0140 0x009F 0x0028 
#    PURGELST  R152                      ; Wait 205 ms
tcblock mbipmacl 0x0B23    0x0190 0x0098 
#    BRANCHNR  0x4000  &CHKDL_EXIT       ; P8 should be busy
tcblock mbipmacl 0x0B25    0x01A6 0x4000 0x0B3A 
#    GOTO      &CHKR0081
tcblock mbipmacl 0x0B28    0x0156 0x0B34 
#;
#QSR_STR_CHKDL9::
#    SETREG    R159  40
tcblock mbipmacl 0x0B2A    0x0140 0x009F 0x0028 
#    PURGELST  R152                      ; Wait 205 ms
tcblock mbipmacl 0x0B2D    0x0190 0x0098 
#    BRANCHNR  0x4800  &CHKDL_EXIT       ; P9 should be busy
tcblock mbipmacl 0x0B2F    0x01A6 0x4800 0x0B3A 
#    GOTO      &CHKR0081
tcblock mbipmacl 0x0B32    0x0156 0x0B34 
#;
#CHKR0081:
#    BRANCHGT  R0081   0   &CHKDL_SKIPHR ; BAD > 0; Skip HR
tcblock mbipmacl 0x0B34    0x01BA 0x0051 0x0000 0x0B3E 
#    GOTO      &CHKDL_ERREXT             ; Set BAD
tcblock mbipmacl 0x0B38    0x0156 0x0B42 
#
#CHKDL_EXIT:
#    SETREG   R0081    0                 ; Clear HR NOK Flag
tcblock mbipmacl 0x0B3A    0x0140 0x0051 0x0000 
#    RTNQUE
tcblock mbipmacl 0x0B3D    0x01FA 
#;
#CHKDL_SKIPHR:
#    ADDREGD  R0081  0xFFFF              ; R81 <- R81 - 1
tcblock mbipmacl 0x0B3E    0x01BC 0x0051 0xFFFF 
#    RTNQUE
tcblock mbipmacl 0x0B41    0x01FA 
#;
#CHKDL_ERREXT:
#    SETREG    R0081   3                 ; Set HR NOK flag
tcblock mbipmacl 0x0B42    0x0140 0x0051 0x0003 
#    SETREG    R0026   1                 ; Set "Save_Context" Flag
tcblock mbipmacl 0x0B45    0x0140 0x001A 0x0001 
#    RTNQUE
tcblock mbipmacl 0x0B48    0x01FA 
#;................................................................
#=======================================================
#
return
#
#=======================================================
