Trailing-Edge
-
PDP-10 Archives
-
TOPS-20_V6.1_DECnetSrc_7-23-85
-
mcb/tkb36/wtsk.bli
There are 2 other files named wtsk.bli in the archive. Click here to see a list.
!<REL4A.TKB-VNP>WTSK.BLI.3, 3-Dec-79 15:19:43, Edit by SROBINSON
MODULE WTSK ( !WRITE TASK FILE
IDENT = 'X2.0'
) =
BEGIN
!
!
!
! COPYRIGHT (c) 1980, 1981, 1982
! DIGITAL EQUIPMENT CORPORATION
! Maynard, Massachusetts
!
! This software is furnished under a license and may be used
! and copied only in accordance with the terms of such license
! and with the inclusion of the above copyright notice. This
! software or any other copies thereof may not be provided or
! otherwise made available to any other person. No title to
! and ownership of the software is hereby transferred.
!
! The information in this software is subject to change
! without notice and should not be construed as a commitment
! by DIGITAL EQUIPMENT CORPORATION.
!
! DIGITAL assumes no responsibility for the use or reliability
! of its software on equipment which is not supplied by
! DIGITAL.
!
!++
! FACILITY: TKB-20
!
! ABSTRACT:
!
!
! THIS MODULE WRITES THE TASK FILE, IN RSX-11M VERSION 3 FORMAT.
!
!
! ENVIRONMENT: TOPS-20 USER MODE
!
! AUTHOR: J. SAUTER, CREATION DATE: 14-MAR-78
!
! MODIFIED BY:
!
! Scott G. Robinson, 3-DEC-79 : Version X2.0
! - Ensure DECnet-10 Compatibility
!
! , : VERSION
! 01 -
!--
!<BLF/PAGE>
!
! TABLE OF CONTENTS:
!
FORWARD ROUTINE
GET11, !GET A BYTE FROM PDP-11 CORE
WTSK : NOVALUE; !WRITE TASK FILE
!
! INCLUDE FILES
!
LIBRARY 'TKBLIB';
!REQUIRE 'BLOCKH.REQ'; !PREPARE TO DEFINE STORAGE BLOCKS
!REQUIRE 'FILE.REQ'; !FILE DATA BLOCK
!REQUIRE 'FILSW.REQ'; !SWITCH STORAGE BLOCK
!REQUIRE 'BLOCKT.REQ'; !END OF STORAGE BLOCK DEFINITIONS
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
LITERAL
DEBUG = 0;
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
EXTERNAL ROUTINE
ERRMSG : NOVALUE, !TYPE AN ERROR MESSAGE
ERROR : NOVALUE, !SIGNAL AN INTERNAL ERROR
OUTNUM : NOVALUE, !WRITE A NUMBER ON A FILE
OUTPUT : NOVALUE; !WRITE ON A FILE
ROUTINE GET11 (CORE_IMAGE, CORE_SIZE, ADDRESS) = !GET A BYTE FROM PDP-11 CORE
!++
! FUNCTIONAL DESCRIPTION:
!
!
! ROUTINE TO GET A BYTE OF DATA FROM SIMUALTED PDP-11 CORE
!
!
! FORMAL PARAMETERS:
!
! CORE_IMAGE - SIMULATED PDP-11 MEMORY
! CORE_SIZE - LENGTH OF SIMULATED PDP-11 MEMORY
! ADDRESS - PLACE TO GET THE BYTE FROM
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! THE BYTE FROM THE SPECIFIED LOCATION
!
! SIDE EFFECTS
!
! NONE
!
!--
BEGIN
BIND
ROUTINE_NAME = UPLIT (%ASCIZ'GET11');
MAP
CORE_IMAGE : REF VECTOR;
LOCAL
ADDR1,
ADDR2,
BYTE_VAL,
CORE_WORD;
IF (.ADDRESS GEQU .CORE_SIZE)
THEN
BEGIN
ERROR (UPLIT (%ASCIZ'ADDRESS OUT OF RANGE - GET11'));
0;
END
ELSE
BEGIN
ADDR1 = .ADDRESS/4;
ADDR2 = .ADDRESS MOD 4;
CORE_WORD = .CORE_IMAGE [.ADDR1];
BYTE_VAL = .CORE_WORD<(CASE .ADDR2 FROM 0 TO 3 OF
SET
[0] : 18;
[1] : 26;
[2] : 0;
[3] : 8;
TES), 8>;
.BYTE_VAL
END
END; !OF GET11
GLOBAL ROUTINE WTSK (CORE_IMAGE, CORE_SIZE, LBL_IMAGE, LBL_SIZE, FILE_PTR, CHAN) : NOVALUE =
!WRITE CORE IMAGE
!++
! FUNCTIONAL DESCRIPTION:
!
!
! ROUTINE TO WRITE OUT THE TASK FILE
!
!
! FORMAL PARAMETERS:
!
! CORE_IMAGE - SIMULATED PDP-11 MEMORY
! CORE_SIZE - LENGTH OF SIMULATED PDP-11 MEMORY
! LBL_IMAGE - POINTER TO THE TASK'S LABEL BLOCKS
! LBL_SIZE - LENGTH OF THE LABEL, IN BYTES
! FILE_PTR - POINTER TO THE FILE ON WHICH TO WRITE THE CORE IMAGE
! CHAN - CHANNEL ON WHICH THE FILE IS OPEN, IN BINARY MODE
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS
!
! WRITES ON THE SPECIFIED FILE
!
!--
BEGIN
BIND
ROUTINE_NAME = UPLIT (%ASCIZ'WTSK');
MAP
CORE_IMAGE : REF VECTOR,
LBL_IMAGE : REF VECTOR;
LOCAL
BYTE_VAL;
!
! FIRST WRITE OUT THE LABEL BLOCKS
!
INCR COUNTER FROM 0 TO .LBL_SIZE - 1 DO
BEGIN
BYTE_VAL = .LBL_IMAGE [.COUNTER];
OUTPUT (.CHAN, .BYTE_VAL);
END;
!
! NOW WRITE OUT THE CORE IMAGE
!
INCR COUNTER FROM 0 TO .CORE_SIZE - 1 DO
BEGIN
BYTE_VAL = GET11 (.CORE_IMAGE, .CORE_SIZE, .COUNTER);
OUTPUT (.CHAN, .BYTE_VAL);
END;
END; !OF WTSK
END
ELUDOM
! Local Modes:
! Comment Start:!
! Comment Column:36
! Mode:Fundamental
! Auto Save Mode:2
! End: