# File: chkhrdl_v04.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "chkhrdl_v04.ips"
descr "Loads IP queue instructions"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; 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  32
tcblock mbipcmd 0x0091 0x0B20   0x0140 0x009F 0x0020 
#    PURGELST  R152                      ; Wait 160 ms
tcblock mbipcmd 0x0091 0x0B23   0x0190 0x0098 
#    BRANCHNR  0x4000  &CHKDL_EXIT       ; P8 should be busy
tcblock mbipcmd 0x0091 0x0B25   0x01A6 0x4000 0x0B3A 
#    GOTO      &CHKR0081
tcblock mbipcmd 0x0091 0x0B28   0x0156 0x0B34 
#;
#QSR_STR_CHKDL9::
#    SETREG    R159  32
tcblock mbipcmd 0x0091 0x0B2A   0x0140 0x009F 0x0020 
#    PURGELST  R152                      ; Wait 160 ms
tcblock mbipcmd 0x0091 0x0B2D   0x0190 0x0098 
#    BRANCHNR  0x4800  &CHKDL_EXIT       ; P9 should be busy
tcblock mbipcmd 0x0091 0x0B2F   0x01A6 0x4800 0x0B3A 
#    GOTO      &CHKR0081
tcblock mbipcmd 0x0091 0x0B32   0x0156 0x0B34 
#;
#CHKR0081:
#    BRANCHGT  R0081   0   &CHKDL_SKIPHR ; BAD > 0; Skip HR
tcblock mbipcmd 0x0091 0x0B34   0x01BA 0x0051 0x0000 0x0B3E 
#    GOTO      &CHKDL_ERREXT             ; Set BAD
tcblock mbipcmd 0x0091 0x0B38   0x0156 0x0B42 
#
#CHKDL_EXIT:
#    SETREG   R0081    0                 ; Clear HR NOK Flag
tcblock mbipcmd 0x0091 0x0B3A   0x0140 0x0051 0x0000 
#    RTNQUE
tcblock mbipcmd 0x0091 0x0B3D   0x01FA 
#;
#CHKDL_SKIPHR:
#    ADDREGD  R0081  0xFFFF              ; R81 <- R81 - 1
tcblock mbipcmd 0x0091 0x0B3E   0x01BC 0x0051 0xFFFF 
#    RTNQUE
tcblock mbipcmd 0x0091 0x0B41   0x01FA 
#;
#CHKDL_ERREXT:
#    SETREG    R0081   3                 ; Set HR NOK flag
tcblock mbipcmd 0x0091 0x0B42   0x0140 0x0051 0x0003 
#    SETREG    R0026   1                 ; Set "Save_Context" Flag
tcblock mbipcmd 0x0091 0x0B45   0x0140 0x001A 0x0001 
#    RTNQUE
tcblock mbipcmd 0x0091 0x0B48   0x01FA 
#;................................................................
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
