/
/  DF32 SYSTEM DEVICE MONITOR HEAD
/
DEAC=6616
DEAL=6615
/
SAVBLK=373
/
*5200
/  ASSEMBLED HERE ONLY BECAUSE THIS IS WHERE IT
/ APPARENTLY IS IN THE SYSTEM BUILDER.  IT IS
/ LOADED FROM BLOCK 0 AND EXECUTED AT 7600.
/
C77,77
  COREADDR=.
  7200
MONLNK,7400
  7200
  7400
/ EXECUTING THE PREVIOUS CONSTANTS HAS NO EFFECT.
/ MEANINGFUL EXECUTION OF THE MONITOR CALL STARTS
/ HERE BUT WE CAN TELL EVERYONE TO START AT 7600.
/
  TAD TADCORE
  DCA ICORE
  TAD WFUNCT
  DCA FUNCT
  TAD SCRATCH
  JMS DOER / SAVE 7200 AT SCRATCH
  TAD SCRATCH
  IAC
  JMS DOER / SAVE 7400 AT SCRATCH + 1
  TAD RFUNCT
  DCA FUNCT
  IAC
  JMS DOER / READ SAVE COMMAND DECODER INTO 7200
  CLA CLL CML RTL
  JMS DOER / READ TTY SERVER INTO 7400
  JMP I MONLNK / GO TO TTY SERVER
/
DOER,0
  DCA BLOCK
ICORE,0 / SET TO TAD COREADDR ABOVE
  ISZ ICORE
  DCA CORE
  JMS SYSIO / USE REGULAR SYSIO FOR SAVE AND LOAD
/  THE NEXT FOUR WORDS ARE ALSO USED BY SYSIO
/ FOR TEMPORARY STORAGE.
FUNCT,0
BLOCK,0
CORE, 0
LINK,0
  HLT / ON ERROR ON RETRY ON ERROR
  JMP I DOER
/
SCRATCH, SAVBLK
/
/  THIS IS THE SYSTEM I/O ROUTINE FOR THE DF32
/
SYSIO, 0
  CLA CMA
  DCA SWITCH / RESET SWITCH TO ALLOW 1 RETRY
  TAD I SYSIO / FUNCTION
  ISZ SYSIO
  CLL RTL
  SPA / SKIP NOT INDIRECT RETURN
  TAD SETLINK
  RTR
  C200=.
  AND C77
  DCA AFUNCT
  TAD I SYSIO / BLOCK
  ISZ SYSIO
  DCA BLOCK
  TAD I SYSIO / CORE ADDRESS
  DCA ACORE
  TAD SYSIO
  SZL
  CLA CMA
  DCA RECA
  ISZ SYSIO / BYPASS LINK
  ISZ SYSIO
  TAD I SYSIO
  SZL
  DCA SYSIO / STRIPPING INDIRECT ADDRESS
  C7600=.
RETRY,CLA+400
  TAD BLOCK
  CLL RAL
  AND C3700
  DCA DSKHI
  TAD BLOCK
  AND C37
  CLL RTR
  RTR
  RTR
  TAD BLOCK
  IAC
  DCA DSKLO
  SZL
  TAD C100
  TAD DSKHI
  TAD AFUNCT
  DEAL / SEND EXTENDED ADDRESS
  AND C7 / RETAIN FUNCTION
  TAD C6600
  DCA DKINST / EITHER 6603(READ) OR 6605(WRITE)
  TAD C7600
  DCA WC / SET WORD COUNT
  CMA
  TAD ACORE
  DCA CA / SET CORE ADDRESS
  JMS DSKRTN
  CMA
  DCA WC / RESET WORD COUNT
  DEAC / GET STATUS
  AND C3700 / RETAIN ADDRESS
  DEAL
  CLA CLL
  TAD RECA
  DCA CA / RESET CORE ADDRESS
  TAD C200
  JMS DSKRTN
  ISZ SYSIO / SHIFT TO NORMAL RETURN
  JMP FINIS
ERRONE,ISZ SWITCH
  SKP
  JMP RETRY
FINIS,DCMA / STOP DISK OPERATIONS
  CLA CLL
  JMP I SYSIO
/
/****FOR THE DF32****
WC,0 / WORD COUNT @ 7750
CA,0 / CORE ADDR. @ 7751
/
RECA,0
C37,37
SWITCH,0
AFUNCT,0 / MEMFLD(6-8), FUNCTION(9-11)
DSKLO,0
DSKHI,0
RFUNCT=.
SETLINK,3
C100,100
/
DSKRTN,0
  TAD DSKLO
DKINST,0 / ASSEMBLED DISK INSTRUCTION
  DFSC
  JMP .-1
  DFSE
  JMP ERRONE / ON ERROR
  JMP I DSKRTN
/
C3700,3700
WFUNCT=.
C5,5
C7,7
C6600,6600
TADCORE,TAD COREADDR
ACORE,0
$
