TAL Programmer's Guide

Modular Programming Example
Sample Programs
096254 Tandem Computers Incorporated A–19
Example A-6d. D-Series Output File Module (Page 3 of 3)
?SECTION out_close
PROC out_close;
BEGIN
CALL FILE_CLOSE_ (out_file);
END;
?SECTION end_of_code_sections
?NOMAP
Message Module
Example A-6e shows the message module listing. The terminal number in the private
global data block is is accessible only to procedures in this module.
Example A-6e. D-Series Message Module (Page 1 of 3)
!File name MSGS
NAME message_module;
?SECTION msglit !Define BLOCK MSG_LITERALS
BLOCK msg_literals;
LITERAL
msg_eof = 0,
msg_in_open = 1,
msg_in_name = 2,
msg_read = 3,
msg_out_open = 4,
msg_out_name = 5,
msg_write = 6;
END BLOCK;
?SECTION end_of_data_sections
BLOCK PRIVATE;
LITERAL term_name_max_len = 256;
INT term_file_number;
LITERAL msg_buf_end = 79;
END BLOCK;
!Following are external procedure declarations
?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (
? FILE_CLOSE_, FILE_OPEN_)
?POPLIST
?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (
? NUMOUT, PROCESS_GETINFO_)
?POPLIST
?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (WRITEX)
?POPLIST