Trailing-Edge
-
PDP-10 Archives
-
BB-X117B-SB_1986
-
10,7/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) DIGITAL EQUIPMENT CORPORATION 1980,1981,1982,1986. ALL RIGHTS RESERVED.
!
!
!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: