The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-1 SAMPLDR program listing ; page 84,131 title SAMPLDR program listing ;******************************************************************** ; IBM Remote Program Load Sample Loader ; ; (C) Copyright IBM Corp., 1986 ; This program is the property of IBM. All rights reserved. ; ; This program services Remote Program Load requests adhering to ; the protocols descriped in the IBM Token-Ring Network Remote ; Program Load User's Guide. ; ;******************************************************************** C include sampequ.inc C ; C ;******************************************************************** C ; EQUATES C ;******************************************************************** C ; C ; DOS EQUATES = 0021 C DOS equ 21h ; DOS interrupt vector = 0030 C GET_DOS equ 30h ; get DOS version number function = 0035 C GET_VEC equ 35h ; get vector function = 4C00 C DOS_TERMINATE equ 4C00h ; 4ch = DOS terminate 00h = return code = 3D00 C READ_OPEN equ 3d00h ; 3dh = DOS open 00h = open for reading = 003E C DOS_CLOSE equ 3eh ; 3eh = DOS close file = 4200 C BSEEK equ 4200h ; 42h = DOS seek 00h = from the beginning = 003F C DOSREAD equ 3fh ; 3fh = DOS read from file C ; C ; BIOS EQUATES = 0016 C KEYBOARD equ 16h ; BIOS keyboard interrupt = 0000 C GET_KS equ 0 ; get keystroke function = 0001 C KB_STATUS equ 01h ; keystroke status = 0010 C VIDEO equ 10h ; BIOS video interrupt = 0006 C SCRLL equ 06h ; scroll screen function = 000F C GET_PAGE equ 0fh ; get current page function = 0009 C PRINT_CHAR equ 09h ; print char function = 0003 C GET_CUR equ 03h ; get cursor position function = 0002 C SET_CUR equ 02h ; set cursor position function = 0007 C NORMAL equ 07h ; screen attribute for video functions = 0000 C UPPER_LEFT equ 0 ; upper left row,col of screen = 0,0 = 184F C LOWER_RIGHT equ 184fh ; lower right row,col of screen = 24,79 = 0019 C LASTLINE equ 25 ; there are only 25 lines on the screen 0-24 C ; C ; STRING EQUATES = 000A C LINEFEED equ 0ah ; linefeed character = 000D C CARRIAGE_RETURN equ 0dh ; carriage return character = 0000 C EOS equ 0 ; end of string character C ; C ; MISCELLANEOUS EQUATES = 0002 C GOOD_DOS equ 0002h ; SAMPLDR must run with DOS 2.00 or higher = 1000 C ALT_Q equ 1000h ; for keystroke alt q , al = 0 ah = 16 = 005C C ADPTR_INT equ 5ch ; interrupt vector for adapter interface = 002A C MSG_SIZE equ 42 ; size of message strings in characters = 0002 C RETRY_CNT equ 2 ; a retry count for initialization code = 00FF C NOT_DONE equ 0ffh ; CCB_RC indicating command in process = 0080 C NOT_TOK equ 80h ; bit to check in DIR.STATUS adapter_config C ; field to see if card is a Token-Ring adapter = 0001 C ON equ 1 = 0000 C OFF equ 0 = 0000 C NULL equ 0 = FFFF C IN_USE equ 0ffffh ; resource in use = 0600 C MAXFRAME equ 1536 ; max number of data bytes in a FILE DATA C ; RESPONSE frame = 007B C OVRHD equ 123 ; overhead in a FILE DATA RESPONSE frame = 06CC C RCB_SIZE equ 204+MAXFRAME ; RCB_SIZE = 0100 C CLASS1 equ 0100h ; loader services only connection class 1 = 00FC C SAP_VAL equ 0fch ; architected SAP value for discovery = 00F8 C LOAD_SAP equ 0f8h ; architected SAP value for loader = 0082 C BRDCST equ 0082h ; routing bytes for broadcast = 0004 C RCB_CNT equ 4 ; number of RCB's C ; C ; MESSAGE CODES = 0000 C INIT_MC equ 0 ; msg # to display for DIR.INIT error = 0001 C DO_MC equ 1 ; msg # to display for DIR.OPEN.ADAPTER error = 0002 C DS_MC equ 2 ; msg # to display for DIR.STATUS error = 0003 C BAD_CARD_MC equ 3 ; msg # to display if card is not Token-Ring = 0004 C OSP_MC equ 4 ; msg # to display for DLC.OPEN.SAP error  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-2 SAMPLDR program listing C ; C ; EQUATES FOR RECEIVE CCB = 0000 C r_ccb_adapter equ 0 ; CCB_ADAPTER = 0001 C r_ccb_cmd equ 1 ; CCB_CMD = 0002 C r_ccb_rc equ 2 ; CCB_RETCODE = 0003 C r_ccb_wrk equ 3 ; CCB_WORK = 0004 C r_ccb_ptr equ 4 ; CCB_POINTER = 0008 C r_ccb_cc equ 8 ; CCB_CMD_CPL = 000C C r_ccb_pt equ 12 ; CCB_PARM_TAB C ; C ; EQUATES FOR RECEIVE PARM TABLE = 0010 C rcv_sid equ 16 = 0012 C rcv_user_len equ 18 = 0014 C rcv_rcvd equ 20 = 0018 C rcv_buffer equ 24 = 001C C rcv_options equ 28 C ; C ; EQUATES FOR RECEIVE BUFFER INCLUDING RPL FRAMES RECEIVED FROM C ; REQUESTING DEVICES (see Token-Ring Network PC Adapter Technical C ; Reference for details on the fields in this buffer = 0000 C r_buf_pointer equ 0 = 0004 C r_rcv_len equ 4 = 0006 C r_length_in_buffer equ 6 = 0008 C r_adapter_offset equ 8 = 000A C r_user_length equ 10 = 000C C r_station_id equ 12 = 000E C r_options equ 14 = 000F C r_message_type equ 15 = 0010 C r_buffers_left equ 16 = 0012 C r_rcv_fs equ 18 = 0013 C r_adapter_num equ 19 = 0014 C r_lan_header_length equ 20 = 0015 C r_dlc_header_length equ 21 C ; = 0016 C r_lan_header equ 22 = 0018 C lan_dest_addr equ r_lan_header+2 = 001E C lan_source_addr equ r_lan_header+8 = 0024 C lan_routing_info equ r_lan_header+14 C ; = 0036 C r_dlc_header equ 54 = C dlc_dsap equ r_dlc_header = 0037 C dlc_ssap equ r_dlc_header+1 = 0038 C dlc_control equ r_dlc_header+2 C ; = 003A C r_data equ 58 C ; = C program_length equ r_data = 003C C program_command equ r_data+2 C ; C ; EQUATES FOR FIND FRAME (see IBM Token-Ring Network Remote Program C ; Load User's Guide for details on the fields in this frame) = 003E C fin_corr_hdr equ r_data+4 = 0042 C fin_correlator equ r_data+8 = 0046 C fin_info_hdr equ r_data+12 = 004A C fin_frame_hdr equ r_data+16 = 004E C fin_max_frame equ r_data+20 = 0050 C fin_class_hdr equ r_data+22 = 0054 C fin_conn_class equ r_data+26 = 0056 C fin_source_hdr equ r_data+28 = 005A C fin_source_addr equ r_data+32 = 0060 C fin_lsap_hdr equ r_data+38 = 0064 C fin_rsap equ r_data+42 = 0065 C fin_search_hdr equ r_data+43 = 0069 C fin_loader_hdr equ r_data+47 = 006D C fin_mach_conf equ r_data+51 = 0075 C fin_equip_flags equ r_data+59 = 0077 C fin_memory_size equ r_data+61 = 0079 C fin_module_ec equ r_data+63 = 0081 C fin_adapter_id equ r_data+71 = 0083 C fin_adapter_ec equ r_data+73 = 008D C fin_file_hdr equ r_data+83 = 0091 C fin_file_name equ r_data+87 = 0057 C FIND_SIZE equ 87 C ; C ; EQUATES FOR SEND FILE REQUEST FRAME (see IBM Token-Ring Network Remote C ; Program Load User's Guide for details on the fields in this frame) = 003E C sfr_seq_hdr equ r_data+4 = 0042 C sfr_seq_num equ r_data+8 = 0046 C sfr_info_hdr equ r_data+12  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-3 SAMPLDR program listing = 004A C sfr_frame_hdr equ r_data+16 = 004E C sfr_max_frame equ r_data+20 = 0050 C sfr_class_hdr equ r_data+22 = 0054 C sfr_conn_class equ r_data+26 = 0056 C sfr_source_hdr equ r_data+28 = 005A C sfr_source_addr equ r_data+32 = 0060 C sfr_lsap_hdr equ r_data+38 = 0064 C sfr_rsap equ r_data+42 = 0065 C sfr_search_hdr equ r_data+43 = 0069 C sfr_loader_hdr equ r_data+47 = 006D C sfr_mach_conf equ r_data+51 = 0075 C sfr_equip_flags equ r_data+59 = 0077 C sfr_memory_size equ r_data+61 = 0079 C sfr_module_ec equ r_data+63 = 0081 C sfr_adapter_id equ r_data+71 = 0083 C sfr_adapter_ec equ r_data+73 = 008D C sfr_file_hdr equ r_data+83 = 0091 C sfr_file_name equ r_data+87 C ; C ; EQUATES FOR ALERT FRAME (see IBM Token-Ring Network Remote C ; Program Load User's Guide for details on the fields in this frame) = 003E C alr_seq_hdr equ r_data+4 = 0042 C alr_seq_num equ r_data+8 = 0046 C alr_info_hdr equ r_data+12 = 004A C alr_frame_hdr equ r_data+16 = 004E C alr_max_frame equ r_data+20 = 0050 C alr_class_hdr equ r_data+22 = 0054 C alr_conn_class equ r_data+26 = 0056 C alr_source_hdr equ r_data+28 = 005A C alr_source_addr equ r_data+32 = 0060 C alr_lsap_hdr equ r_data+38 = 0064 C alr_rsap equ r_data+42 = 0065 C alr_search_hdr equ r_data+43 = 0069 C alr_loader_hdr equ r_data+47 = 006D C alr_mach_conf equ r_data+51 = 0075 C alr_equip_flags equ r_data+59 = 0077 C alr_memory_size equ r_data+61 = 0079 C alr_module_ec equ r_data+63 = 0081 C alr_adapter_id equ r_data+71 = 0083 C alr_adapter_ec equ r_data+73 = 008D C alr_file_hdr equ r_data+83 = 0091 C alr_file_name equ r_data+87 C ; C ; RPL COMMAND EQUATES = 0100 C FIND equ 0100h = 1000 C SEND equ 1000h = 3000 C ALERT equ 3000h C ; C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-4 SAMPLDR program listing page C include samprcb.inc C ; C ; this is a struc definition for a Resource Control Block C ; One RCB contains all the resources necessary to process C ; one remote program load request C rcb struc C ; ccb for processing request 0000 00 C ccb_adapter db 0 0001 00 C ccb_cmd db 0 0002 00 C ccb_rc db 0 0003 00 C ccb_work db 0 0004 00 00 00 00 C ccb_pointer dd 0 0008 00 00 00 00 C ccb_cc dd 0 000C 00 00 00 00 C ccb_pt dd 0 C ; misc values 0010 0000 C max_frame dw 0 ; size of data portion of C ; FILE.DATA.RESPONSE frame 0012 04 [ C seq_number db 4 dup(0) ; current frame sequenc number 00 C ] C C 0016 00 C alrt_flag db 0 ; ON when an alert has been received C ; OFF otherwise 0017 00 C rcb_cntr db 0 0018 0000 C next dw 0 ; pointer to next RCB C ; TRANSMIT parm table 001A 0000 C trn_sid dw 0 001C 00 C trn_fs db 0 001D FC C trn_rsap db 0fch 001E 00 00 00 00 C trn_q1 dd 0 0022 00 00 00 00 C trn_q2 dd 0 0026 0000 C trn_len1 dw 0 0028 0000 C trn_len2 dw 0 002A 00 00 00 00 C trn_buf1 dd 0 002E 00 00 00 00 C trn_buf2 dd 0 C ; LAN header ( refer to Token-Ring Network/PC Adapter Technical Reference C ; for more details 0032 00 00 00 00 C lan_next dd 0 0036 0000 C lan_reserved dw 0 0038 0000 C lan_len_buf dw 0 003A 0000 C lan_user_data dw 0 003C 0000 C lan_user_len dw 0 003E 0000 C lan_fs dw 0 0040 06 [ C lan_dest db 6 dup(0) 00 C ] C C 0046 06 [ C lan_source db 6 dup(0) 00 C ] C C 004C 12 [ C lan_route db 18 dup(0) 00 C ] C C C ; reserved area for remote program load frames to be sent to requesting devices 005E 6E [ C frame db 110 dup(0) 00 C ] C C C ; reserved area for data to transmit 00CC 0600 [ C load_data db MAXFRAME dup(?) ?? C ] C C 06CC C rcb ends C ; C ; C ; EQUATES FOR FRAMES LOADER SENDS C ; C ; Refer to IBM Token-Ring Network Remote Program Load C ; User's Guide for details on all frame fields C ; FOUND FRAME EQUATES = 0000 C fou_length equ 0 = 0002 C fou_command equ 2 = 0004 C fou_corr_hdr equ 4 = 0008 C fou_corr equ 8 = 000C C fou_resp_hdr equ 12  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-5 SAMPLDR program listing = 0010 C fou_resp_code equ 16 = 0011 C fou_dest_hdr equ 17 = 0015 C fou_dest_addr equ 21 = 001B C fou_source_hdr equ 27 = 001F C fou_source_addr equ 31 = 0025 C fou_info_hdr equ 37 = 0029 C fou_frame_hdr equ 41 = 002D C fou_max_frame equ 45 = 002F C fou_class_hdr equ 47 = 0033 C fou_conn_class equ 51 = 0035 C fou_lsap_hdr equ 53 = 0039 C fou_rsap equ 57 C ; C ; FILE.DATA.RESPONSE FRAME EQUATES = 0000 C fdr_length equ 0 = 0002 C fdr_command equ 2 = 0004 C fdr_seq_hdr equ 4 = 0008 C fdr_seq_number equ 8 = 000C C fdr_loader_hdr equ 12 = 0010 C fdr_locate_addr equ 16 = 0014 C fdr_xfer_addr equ 20 = 0018 C fdr_flags equ 24 = 0019 C fdr_data_hdr equ 25 C ; C ; LOAD.ERROR.RESPONSE FRAME EQUATES = 0000 C ler_length equ 0 = 0002 C ler_command equ 2 = 0004 C ler_error_hdr equ 4 = 0008 C ler_error_code equ 8 = 000A C ler_file_hdr equ 10 = 000E C ler_file_name equ 14 C ; C ; FIELD VALUES = 3A00 C FL equ 3a00h ; length of FOUND frame = 0200 C FC equ 0200h ; command code for FOUND frame = 2000 C FDRC equ 2000h ; command code for FILE.DATA.RESPONSE frame = 001D C FDRL equ 29 ; length of FILE.DATA.RESPONSE frame excluding data = 000E C LERL equ 14 ; length of LOAD.ERROR.RESPONSE frame = 4000 C LERC equ 4000h ; command code for LOAD.ERROR.RESPONSE frame C ; C ; Following are various header values for the header fields in C ; various Remote Program Load frames. Refer to IBM Token-Ring Network C ; Remote Program Load User's Guide for details. = 0800 C CORR_HDR1 equ 0800h = 0340 C CORR_HDR2 equ 0340h = 0500 C RESP_HDR1 equ 0500h = 0B40 C RESP_HDR2 equ 0b40h = 0A00 C DEST_HDR1 equ 0a00h = 0C40 C DEST_HDR2 equ 0c40h = 0A00 C SOURCE_HDR1 equ 0a00h = 0640 C SOURCE_HDR2 equ 0640h = 1000 C INFO_HDR1 equ 1000h = 0800 C INFO_HDR2 equ 0800h = 0600 C FRAME_HDR1 equ 0600h = 0940 C FRAME_HDR2 equ 0940h = 0600 C CLASS_HDR1 equ 0600h = 0A40 C CLASS_HDR2 equ 0a40h = 0500 C LSAP_HDR1 equ 0500h = 0740 C LSAP_HDR2 equ 0740h = 0800 C SEQ_HDR1 equ 0800h = 1140 C SEQ_HDR2 equ 1140h = 0D00 C LDR_HDR1 equ 0d00h = 14C0 C LDR_HDR2 equ 14c0h = 1840 C DATA_HDR2 equ 1840h = 0080 C EOF_FLAG equ 80h = 0200 C FILE_NOT_FND equ 0200h = 0600 C ERR_HDR1 equ 0600h = 1A40 C ERR_HDR2 equ 1a40h = 1340 C FILE_HDR2 equ 1340h C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-6 SAMPLDR program listing page C include sampdat.inc C ;  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-7 SAMPLDR program listing C page C ;******************************************************************** C ; DATA SEGMENT * C ;******************************************************************** 0000 C data segment C ; C ; FLAGS 0000 00 C stat_flag db 0 ; 0 = all ok, > 0 means fatal error C ; C ; MESSAGES 0001 44 4F 53 20 6C 65 C baddos db 'DOS level must be 2.00 or higher.',13,10,0 76 65 6C 20 6D 75 C 73 74 20 62 65 20 C 32 2E 30 30 20 6F C 72 20 68 69 67 68 C 65 72 2E 0D 0A 00 C 0025 41 64 61 70 74 65 C no_ai db 'Adapter support required.',13,10,0 72 20 73 75 70 70 C 6F 72 74 20 72 65 C 71 75 69 72 65 64 C 2E 0D 0A 00 C 0041 49 42 4D 20 52 65 C cpywrt db 'IBM Remote Program Load Sample Loader',13,10 6D 6F 74 65 20 50 C 72 6F 67 72 61 6D C 20 4C 6F 61 64 20 C 53 61 6D 70 6C 65 C 20 4C 6F 61 64 65 C 72 0D 0A C 0068 28 43 29 20 43 6F C db '(C) Copyright IBM Corp., 1986',13,10 70 79 72 69 67 68 C 74 20 49 42 4D 20 C 43 6F 72 70 2E 2C C 20 31 39 38 36 0D C 0A C 0087 54 68 69 73 20 70 C db 'This program is the property of IBM.',13,10 72 6F 67 72 61 6D C 20 69 73 20 74 68 C 65 20 70 72 6F 70 C 65 72 74 79 20 6F C 66 20 49 42 4D 2E C 0D 0A C 00AD 53 61 6D 70 6C 65 C db 'Sample Loader initialization is in progress. Please wait . . .',13,10,13,10,0 20 4C 6F 61 64 65 C 72 20 69 6E 69 74 C 69 61 6C 69 7A 61 C 74 69 6F 6E 20 69 C 73 20 69 6E 20 70 C 72 6F 67 72 65 73 C 73 2E 20 20 50 6C C 65 61 73 65 20 77 C 61 69 74 20 2E 20 C 2E 20 2E 0D 0A 0D C 0A 00 C 00F1 53 61 6D 70 6C 65 C installed db 'Sample Loader is running.',13,10 20 4C 6F 61 64 65 C 72 20 69 73 20 72 C 75 6E 6E 69 6E 67 C 2E 0D 0A C 010C 50 72 65 73 73 20 C db 'Press ALT Q to return to DOS.',13,10,0 41 4C 54 20 51 20 C 74 6F 20 72 65 74 C 75 72 6E 20 74 6F C 20 44 4F 53 2E 0D C 0A 00 C 012C 41 20 66 61 74 61 C fatal db 'A fatal error has been reported.',13,10 6C 20 65 72 72 6F C 72 20 68 61 73 20 C 62 65 65 6E 20 72 C 65 70 6F 72 74 65 C 64 2E 0D 0A C 014E 53 61 6D 70 6C 65 C db 'Sample Loader execution halted . . .',13,10,0 20 4C 6F 61 64 65 C 72 20 65 78 65 63 C 75 74 69 6F 6E 20 C 68 61 6C 74 65 64 C 20 2E 20 2E 20 2E C 0D 0A 00 C C ; C ; MESSAGE TABLE FOR ERROR MESSAGES  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-8 SAMPLDR program listing 0175 44 49 52 2E 49 4E C msg_tbl db 'DIR.INITIALIZE failed. CCB_RETCODE = ',0 49 54 49 41 4C 49 C 5A 45 20 66 61 69 C 6C 65 64 2E 20 20 C 20 43 43 42 5F 52 C 45 54 43 4F 44 45 C 20 3D 20 20 20 00 C 019F 44 49 52 2E 4F 50 C db 'DIR.OPEN.ADAPTER failed. CCB_RETCODE = ',0 45 4E 2E 41 44 41 C 50 54 45 52 20 66 C 61 69 6C 65 64 2E C 20 43 43 42 5F 52 C 45 54 43 4F 44 45 C 20 3D 20 20 20 00 C 01C9 44 49 52 2E 53 54 C db 'DIR.STATUS failed. CCB_RETCODE = ',0 41 54 55 53 20 66 C 61 69 6C 65 64 2E C 20 20 20 20 20 20 C 20 43 43 42 5F 52 C 45 54 43 4F 44 45 C 20 3D 20 20 20 00 C 01F3 41 64 61 70 74 65 C db 'Adapter 0 is not a PC Token-Ring Adapter.',0 72 20 30 20 69 73 C 20 6E 6F 74 20 61 C 20 50 43 20 54 6F C 6B 65 6E 2D 52 69 C 6E 67 20 41 64 61 C 70 74 65 72 2E 00 C 021D 44 4C 43 2E 4F 50 C db 'DLC.OPEN.SAP failed. CCB_RETCODE = ',0 45 4E 2E 53 41 50 C 20 66 61 69 6C 65 C 64 2E 20 20 20 20 C 20 43 43 42 5F 52 C 45 54 43 4F 44 45 C 20 3D 20 20 20 00 C C ; C ; 0247 30 31 32 33 34 35 C asciinums db '0123456789ABCDEF' ; table to convert ascii to hex 36 37 38 39 41 42 C 43 44 45 46 C 0257 20 20 0D 0A 00 C hxstr db ' ',13,10,0 ; converted hex string is stored here C ; C ; Refer to Token-Ring Network/PC Adapter Technical Reference for details C ; on CCB's and all associated pararmeter tables C ; CCB for initialization code 025C C i_ccb label byte 025C 00 C i_ccb_adapter db 0 025D FF C i_ccb_cmd db 0ffh 025E 00 C i_ccb_rc db 0 025F 00 C i_ccb_wrk db 0 0260 00 00 00 00 C i_ccb_ptr dd 0 0264 00 00 00 00 C i_ccb_cc dd 0 0268 00 00 00 00 C i_ccb_pt dd 0 C ; C ; DIR.INITIALIZE parameter table 026C C di_pt label byte 026C 0000 C di_bu dw 0 026E 0000 C di_sram_addr dw 0 0270 00 00 00 00 C di_reserved dd 0 0274 00BA ---- R C di_ad_chk_ex dd ac_exit 0278 00C6 ---- R C di_rs_ex dd rs_exit 027C 00 00 00 00 C di_pc_err_ex dd 0 C ; C ; DIR.OPEN.ADAPTER parameter table 0280 C do_pt label byte 0280 0290 ---- R C do_ap dd apo_tbl 0284 02B0 ---- R C do_dp dd dp_tbl 0288 02CC ---- R C do_dlc dd dlc_tbl 028C 00 00 00 00 C do_msg dd 0 C ; C ; ADAPTER PARMS OPEN PARAMETERS 0290 C apo_tbl label byte 0290 0000 C apo_oec dw 0 0292 0000 C apo_open_opts dw 0 0294 06 [ C apo_node_addr db 6 dup(0) 00 C ] C C 029A 00 00 00 00 C apo_grp_addr dd 0  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-9 SAMPLDR program listing 029E 40 00 00 00 C apo_func_addr db 40h,0,0,0 02A2 0008 C apo_num_rcv_buf dw 8 02A4 00F0 C apo_rcv_buf_len dw 240 02A6 0800 C apo_dhb_buf_len dw 2048 02A8 01 C apo_dhb db 1 02A9 00 C db 0 02AA 0000 C apo_open_lock dw 0 02AC 00 00 00 00 C apo_pid_addr dd 0 C ; C ; DIRECT PARMS OPEN PARAMETERS 02B0 C dp_tbl label byte 02B0 0000 C dp_dir_buf_size dw 0 02B2 0000 C dp_dir_pool_len dw 0 02B4 00 00 00 00 C dp_dir_pool_adr dd 0 02B8 00 00 00 00 C dp_ad_chk_ex dd 0 02BC 00 00 00 00 C dp_rs_ex dd 0 02C0 00 00 00 00 C dp_pce_ex dd 0 02C4 00 00 00 00 C dp_work_adr dd 0 02C8 0000 C dp_wrk_len_req dw 0 02CA 0000 C dp_wrk_len_act dw 0 C ; C ; DLC PARMS OPEN PARAMETERS 02CC C dlc_tbl label byte 02CC 02 C dlc_max_sap db 2 02CD 00 C dlc_max_sta db 0 02CE 00 C dlc_max_gsap db 0 02CF 00 C dlc_max_gmem db 0 02D0 00 C dlc_t1_1 db 0 02D1 00 C dlc_t2_1 db 0 02D2 00 C dlc_ti_1 db 0 02D3 00 C dlc_t1_2 db 0 02D4 00 C dlc_t2_2 db 0 02D5 00 C dlc_ti_2 db 0 C ; C ; DIR.STATUS PARM TABLE 02D6 19 [ C ds_pt db 25 dup(?) ?? C ] C C 02EF ?? C ds_ad_config db ? 02F0 18 [ C db 24 dup(?) ?? C ] C C C C ; C ; DLC.OPEN.SAP PARAMETER TABLE 0308 C osp_pt label byte 0308 0000 C osp_sid dw 0 030A 0000 C osp_usv dw 0 030C 00 C osp_timer_t1 db 0 030D 00 C osp_timer_t2 db 0 030E 00 C osp_timer_ti db 0 030F 00 C osp_maxout db 0 0310 00 C osp_maxin db 0 0311 00 C osp_maxout_incr db 0 0312 00 C osp_max_retry db 0 0313 00 C osp_max_members db 0 0314 0000 C osp_i_field dw 0 0316 00 C osp_sap_value db 0 0317 04 C osp_options db 04h 0318 00 C osp_stat_cnt db 0 0319 0000 C dw 0 031B 00 C osp_group_cnt db 0 031C 00 00 00 00 C osp_group_list dd 0 0320 00 00 00 00 C osp_status_ex dd 0 0324 00F0 C osp_buf_size dw 240 0326 000F C osp_pool_len dw 15 0328 032C ---- R C osp_pool_adr dd rcv_buf1 C ; C ; rcv buffer 032C F0 [ C rcv_buf1 db 240 dup(?) ?? C ] C C 041C F0 [ C rcv_buf2 db 240 dup(?) ?? C ] C C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-10 SAMPLDR program listing C ; C ; CCB for RECEIVE w/ parm tableD 050C C r_ccb1 label byte 050C 00 C db 0 050D 28 C db 28h 050E ?? C db ? 050F ?? C db ? 0510 ???????? C dd ? 0514 00D6 ---- R C dd rcv_appen 0518 051C ---- R C dd rcv_tbl1 051C C rcv_tbl1 label byte 051C ???? C dw ? 051E 0000 C dw 0 0520 0148 ---- R C dd rpl_appen1 0524 00 00 00 00 C dd 0 0528 00 C db 0 0529 C r_ccb2 label byte 0529 00 C db 0 052A 28 C db 28h 052B ?? C db ? 052C ?? C db ? 052D ???????? C dd ? 0531 00D6 ---- R C dd rcv_appen 0535 0539 ---- R C dd rcv_tbl2 0539 C rcv_tbl2 label byte 0539 ???? C dw ? 053B 0000 C dw 0 053D 01A0 ---- R C dd rpl_appen2 0541 00 00 00 00 C dd 0 0545 00 C db 0 C ; C ; BUFFER.FREE PARM TABLE 0546 C bf_pt label byte 0546 ???? C bf_sid dw ? 0548 0000 C bf_buf_left dw 0 054A 00 00 00 00 C dd 0 054E 00 00 00 00 C bf_1st_buf dd 0 C ; C ; RCB'S C ; Each RCB contains the resources necessary to process one Remote Program C ; Load frame received from a requesting device. 0552 00 C rcb1 rcb <0,0dh,0,0,0,,rcb1.trn_sid,,,,,rcb2,0,0,0fch,rcb1.lan_next,0,0,0,rcb1.frame,rcb1.load_dat a,0,0,0,0,0,0,,,,,> 0553 0D C 0554 00 C 0555 00 C 0556 00 00 00 00 C 055A 00 00 00 00 C 055E 056C ---- R C 0562 0000 C 0564 04 [ C 00 C ] C 0568 00 C 0569 00 C 056A 0C1E R C 056C 0000 C 056E 00 C 056F FC C 0570 0584 ---- R C 0574 00 00 00 00 C 0578 0000 C 057A 0000 C 057C 05B0 ---- R C 0580 061E ---- R C 0584 00 00 00 00 C 0588 0000 C 058A 0000 C 058C 0000 C 058E 0000 C 0590 0000 C 0592 06 [ C 00 C ] C 0598 06 [ C 00 C ] C 059E 12 [ C 00 C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-11 SAMPLDR program listing ] C 05B0 6E [ C 00 C ] C 061E 0600 [ C ?? C ] C C 0C1E 00 C rcb2 rcb <0,0dh,0,0,0,,rcb2.trn_sid,,,,,rcb3,0,0,0fch,rcb2.lan_next,0,0,0,rcb2.frame,rcb2.load_dat a,0,0,0,0,0,0,,,,,> 0C1F 0D C 0C20 00 C 0C21 00 C 0C22 00 00 00 00 C 0C26 00 00 00 00 C 0C2A 0C38 ---- R C 0C2E 0000 C 0C30 04 [ C 00 C ] C 0C34 00 C 0C35 00 C 0C36 12EA R C 0C38 0000 C 0C3A 00 C 0C3B FC C 0C3C 0C50 ---- R C 0C40 00 00 00 00 C 0C44 0000 C 0C46 0000 C 0C48 0C7C ---- R C 0C4C 0CEA ---- R C 0C50 00 00 00 00 C 0C54 0000 C 0C56 0000 C 0C58 0000 C 0C5A 0000 C 0C5C 0000 C 0C5E 06 [ C 00 C ] C 0C64 06 [ C 00 C ] C 0C6A 12 [ C 00 C ] C 0C7C 6E [ C 00 C ] C 0CEA 0600 [ C ?? C ] C C 12EA 00 C rcb3 rcb <0,0dh,0,0,0,,rcb3.trn_sid,,,,,rcb4,0,0,0fch,rcb3.lan_next,0,0,0,rcb3.frame,rcb3.load_dat a,0,0,0,0,0,0,,,,,> 12EB 0D C 12EC 00 C 12ED 00 C 12EE 00 00 00 00 C 12F2 00 00 00 00 C 12F6 1304 ---- R C 12FA 0000 C 12FC 04 [ C 00 C ] C 1300 00 C 1301 00 C 1302 19B6 R C 1304 0000 C 1306 00 C 1307 FC C 1308 131C ---- R C 130C 00 00 00 00 C 1310 0000 C 1312 0000 C 1314 1348 ---- R C 1318 13B6 ---- R C 131C 00 00 00 00 C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-12 SAMPLDR program listing 1320 0000 C 1322 0000 C 1324 0000 C 1326 0000 C 1328 0000 C 132A 06 [ C 00 C ] C 1330 06 [ C 00 C ] C 1336 12 [ C 00 C ] C 1348 6E [ C 00 C ] C 13B6 0600 [ C ?? C ] C C 19B6 00 C rcb4 rcb <0,0dh,0,0,0,,rcb4.trn_sid,,,,,NULL,0,0,0fch,rcb4.lan_next,0,0,0,rcb4.frame,rcb4.load_dat a,0,0,0,0,0,0,,,,,> 19B7 0D C 19B8 00 C 19B9 00 C 19BA 00 00 00 00 C 19BE 00 00 00 00 C 19C2 19D0 ---- R C 19C6 0000 C 19C8 04 [ C 00 C ] C 19CC 00 C 19CD 00 C 19CE 0000 C 19D0 0000 C 19D2 00 C 19D3 FC C 19D4 19E8 ---- R C 19D8 00 00 00 00 C 19DC 0000 C 19DE 0000 C 19E0 1A14 ---- R C 19E4 1A82 ---- R C 19E8 00 00 00 00 C 19EC 0000 C 19EE 0000 C 19F0 0000 C 19F2 0000 C 19F4 0000 C 19F6 06 [ C 00 C ] C 19FC 06 [ C 00 C ] C 1A02 12 [ C 00 C ] C 1A14 6E [ C 00 C ] C 1A82 0600 [ C ?? C ] C C 2082 0552 R C rcb_free dw rcb1 C ; C ; boot file table 2084 42 4F 4F 54 49 4D C bootname db 'BOOTIMAG.COM',0 ; name of boot file 41 47 2E 43 4F 4D C 00 C 2091 0000 C boothandle dw 0 ; handle for boot file 2093 00 C file_use db 0 ; > 0 means file is open and in use 2094 C data ends C  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-13 SAMPLDR program listing page ;******************************************************************** ; CODE SEGMENT * ;******************************************************************** 0000 code segment public ;******************************************************************** ;* sampldr ;* This is the main routine for this program. It initializes ;* the loader. ;* ;* input ;* ;* output ;* ;******************************************************************** public sampldr assume cs:code,ds:data,ss:stack 0000 sampldr proc far ; 0000 start: 0000 B8 ---- R mov ax,data ; set up data segment register 0003 8E D8 mov ds,ax ; 0005 8D 36 0041 R lea si,cpywrt ; print copywrite statement 0009 E8 0428 R call print_msg ; & initialization message ; 000C B4 30 mov ah,GET_DOS ; get DOS level 000E CD 21 int DOS 0010 3D 0002 cmp ax,GOOD_DOS ; if DOS level ok then 0013 73 0A jnc chk_ai ; goto DOSOK 0015 8D 36 0001 R lea si,baddos ; else 0019 E8 0428 R call print_msg ; print error message 001C E9 00B4 R jmp exit2 ; exit program ; 001F chk_ai: 001F B4 35 mov ah,GET_VEC ; check interrupt vector 5ch to see if 0021 B0 5C mov al,ADPTR_INT ; adapter interface is installed 0023 CD 21 int DOS ; 0025 8C C0 mov ax,es 0027 0B D8 or bx,ax ; if int vector 5ch is 0000:0000 0029 74 15 jz no_adp_sup ; then goto NO_ADP_SUP 002B BB 025C R mov bx,offset i_ccb ; else make sure its adapter interface 002E 1E push ds ; by issuing invalid command 002F 07 pop es 0030 CD 5C int ADPTR_INT ; 0032 80 3E 025E R 00 cmp i_ccb_rc,0 ; if return code is good 0037 74 07 jz no_adp_sup ; adapter support is not installed 0039 80 3E 025E R 1D cmp i_ccb_rc,1Dh ; check for no adapter code 003E 75 0A jnz init_retry ; adapter code is present 0040 no_adp_sup: 0040 8D 36 0025 R lea si,no_ai ; else 0044 E8 0428 R call print_msg ; print error message 0047 EB 6B 90 jmp exit2 ; exit program ; 004A init_retry: 004A B5 02 mov ch,RETRY_CNT ; set number of times to retry if ; initialization fails 004C init_adptr: 004C E8 026A R call dir_init ; issue DIR.INITIALIZE 004F 72 59 jc err_exit ; if it fails then goto err_exit ; 0051 E8 02BA R call dir_open ; issue DIR.OPEN.ADAPTER 0054 72 54 jc err_exit ; if it fails then goto err_exit ; 0056 E8 031E R call dir_status ; issue DIR.STATUS 0059 72 4F jc err_exit ; if it fails then goto err_exit ; 005B B8 041C R mov ax,offset rcv_buf2 ; ax = addr of SAP buffer pool 005E B1 F8 mov cl,LOAD_SAP ; cl = F8h SAP value 0060 E8 0370 R call open_sap ; issue DLC.OPEN.SAP for SAP F8h 0063 72 45 jc err_exit ; if it fails then goto err_exit ; 0065 BB 0529 R mov bx,offset r_ccb2 ; bx = addr of CCB 0068 A1 0308 R mov ax,osp_sid ; ax = station-id from DLC.OPEN.SAP 006B E8 03CC R call receive ; issue RECEIVE for SAP F8h ; 006E B8 032C R mov ax,offset rcv_buf1 ; ax = addr of SAP buffer pool 0071 B1 FC mov cl,SAP_VAL ; cl = FCh SAP value 0073 E8 0370 R call open_sap ; issue DLC.OPEN.SAP for SAP FCh  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-14 SAMPLDR program listing 0076 72 32 jc err_exit ; if it fails then goto err_exit ; 0078 BB 050C R mov bx,offset r_ccb1 ; bx = addr of CCB 007B A1 0308 R mov ax,osp_sid ; ax = station-id from DLC.OPEN.SAP 007E E8 03CC R call receive ; issue RECEIVE for SAP FCh ; 0081 8D 36 00F1 R lea si,installed ; tell user loader is ready 0085 E8 0428 R call print_msg ; ; even 0088 get_status: 0088 F6 06 0000 R FF test stat_flag,0ffh ; has a fatal error occurred 008D 74 0A jz still_ok ; if not check for keystroke 008F 8D 36 012C R lea si,fatal ; else print fatal error msg 0093 E8 0428 R call print_msg 0096 EB 19 90 jmp exit ; return to DOS ; 0099 still_ok: 0099 B4 01 mov ah,KB_STATUS ; get keystroke status 009B CD 16 int KEYBOARD ; using bios 009D 74 E9 jz get_status ; wait till key is ready ; 009F B4 00 mov ah,GET_KS ; get the keystroke 00A1 CD 16 int KEYBOARD 00A3 3D 1000 cmp ax,ALT_Q ; quit if q is pressed 00A6 74 09 je exit ; else ignore the keystroke 00A8 EB DE jmp get_status ; 00AA err_exit: 00AA FE CD dec ch ; decrement retry counter 00AC 75 9E jnz init_adptr ; if > 0 then try to initialize again 00AE E8 0486 R call errout ; print error message as indicated ; by contents of AX 00B1 exit: 00B1 E8 03E6 R call close ; issue DIR.CLOSE 00B4 B8 4C00 exit2: mov ax,DOS_TERMINATE ; return to DOS 00B7 CD 21 int DOS ;  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-15 SAMPLDR program listing page ;********************************************************************L ;* ac_exit ;* this code simply turns on a flag to tell the main routine ;* that an adapter check has occurred and the adapter is closed ;* ;* input ;* none used ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;********************************************************************L 00B9 90 even 00BA ac_exit: ; 00BA B8 ---- R mov ax,data ; set up ds register 00BD 8E D8 mov ds,ax ; 00BF C6 06 0000 R 01 mov stat_flag,ON ; turn adapter check flag on 00C4 CF iret  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-16 SAMPLDR program listing page ;********************************************************************L ;* rs_exit ;* this code simply turns on a flag to tell the main routine ;* that ring status has changed to a nonrecoverable state. ;* ;* input ;* ax = ring status code ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;********************************************************************L 00C5 90 even 00C6 rs_exit: 00C6 A9 0D00 test ax,0d00h ; is it a recoverable error 00C9 74 0A jz rs_ret ; if yes just return ; 00CB B8 ---- R mov ax,data ; set up ds register 00CE 8E D8 mov ds,ax ; 00D0 C6 06 0000 R 01 mov stat_flag,ON ; else turn status_flag on 00D5 rs_ret: 00D5 CF iret  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-17 SAMPLDR program listing page ;******************************************************************** ;* rcv_appen ;* command completion appendage for RECEIVE command. This ;* appendage is taken only if an error occurred for the ;* RECEIVE ccb. ;* ;* input ;* ah = 0 ;* al = CCB_RETCODE ;* es:bx = address of the RECEIVE ccb ;* cx = adapter ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** even 00D6 rcv_appen: ; 00D6 06 push es ; fix segment registers 00D7 1F pop ds ; 00D8 3C 07 cmp al,07h ; is it a fatal error 00DA 74 65 je rcv_fatal ; if it is fatal then goto code 00DC 3C 0B cmp al,0bh ; to turn on status flag 00DE 74 61 je rcv_fatal ; 00E0 8B 57 18 mov dx,rcv_buffer[bx] ; its a recoverable error, see if 00E3 0B 57 1A or dx,rcv_buffer+2[bx] ; a SAP buffer needs to be freed 00E6 74 50 jz rcv_reissue ; if not then reissue RECEIVE ; else free the buffer ; CCB_ADAPTER = 0 00E8 C6 06 025D R 27 mov i_ccb_cmd,27h ; CCB_CMD = 27h 00ED C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 00F2 C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 00F7 C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 00FD C7 06 0262 R 0000 mov i_ccb_ptr+2,0 0103 C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 0109 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = bf_pt 010F C7 06 0268 R 0546 R mov i_ccb_pt,offset bf_pt 0115 8C 1E 026A R mov i_ccb_pt+2,ds ; 0119 8B 47 10 mov ax,rcv_sid[bx] ; set STATION_ID 011C A3 0546 R mov bf_sid,ax 011F C7 06 0548 R 0000 mov bf_buf_left,0 ; set BUFFER_LEFT = 0 0125 8B 47 18 mov ax,rcv_buffer[bx] ; set FIRST_BUFFER 0128 A3 054E R mov bf_1st_buf,ax 012B 8B 47 1A mov ax,rcv_buffer+2[bx] 012E A3 0550 R mov bf_1st_buf+2,ax ; 0131 53 push bx 0132 BB 025C R mov bx,offset i_ccb ; es:bx = address of ccb 0135 CD 5C int ADPTR_INT ; issue CCB 0137 5B pop bx ; 0138 rcv_reissue: 0138 8B 47 10 mov ax,rcv_sid[bx] ; ax = station-id 013B E8 03CC R call RECEIVE ; issue the receive again 013E EB 06 90 jmp rcv_appen_exit ; 0141 rcv_fatal: 0141 C6 06 0000 R 01 mov stat_flag,ON ; turn fatal error flag on ; 0146 rcv_appen_exit: 0146 CF iret ; return from interrupt  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-18 SAMPLDR program listing page ;******************************************************************** ;* rpl_appen1 ;* RECEIVE_DATA appendage for RECEIVE command. This ;* appendage is invoked when data has been received ;* thru SAP FCh ;* ;* input ;* ax = CCB_RETCODE ;* es:bx = address of SAP buffer containing received data ;* cx = adapter number ;* ds:si = address of the RECEIVE ccb ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** 0147 90 even 0148 rpl_appen1: 0148 56 push si ; save offset of CCB ; ; is it a FIND frame? 0149 81 7F 3C 0100 cmp word ptr program_command[bx],FIND 014E 75 03 jne rpl_freebf1 ; if not free the SAP buffer 0150 E8 052C R call found ; else respond w/ a FOUND ; 0153 rpl_freebf1: 0153 5E pop si ; restore offset of CCB ; free the SAP buffer ; CCB_ADAPTER = 0 0154 C6 06 025D R 27 mov i_ccb_cmd,27h ; CCB_CMD = 27h 0159 C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 015E C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 0163 C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 0169 C7 06 0262 R 0000 mov i_ccb_ptr+2,0 016F C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 0175 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = bf_pt 017B C7 06 0268 R 0546 R mov i_ccb_pt,offset bf_pt 0181 8C 1E 026A R mov i_ccb_pt+2,ds ; 0185 8B 44 10 mov ax,rcv_sid[si] ; set STATION_ID 0188 A3 0546 R mov bf_sid,ax 018B C7 06 0548 R 0000 mov bf_buf_left,0 ; set BUFFER_LEFT = 0 0191 89 1E 054E R mov bf_1st_buf,bx ; set FIRST_BUFFER 0195 8C 06 0550 R mov bf_1st_buf+2,es ; 0199 BB 025C R mov bx,offset i_ccb ; set es:bx = ccb address 019C CD 5C int ADPTR_INT ; issue CCB ; 019E CF iret ; return from the interrupt  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-19 SAMPLDR program listing page ;******************************************************************** ;* rpl_appen2 ;* RECEIVE_DATA appendage for RECEIVE command. This ;* appendage is invoked when data has been received ;* thru SAP F8h ;* ;* input ;* ax = CCB_RETCODE ;* es:bx = address of SAP buffer containing received data ;* cx = adapter number ;* ds:si = address of the RECEIVE ccb ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** 019F 90 even 01A0 rpl_appen2: 01A0 56 push si ; save offset of CCB ; ; is it a SEND.FILE.REQUEST? 01A1 81 7F 3C 1000 cmp word ptr program_command[bx],SEND 01A6 75 06 jne rpl_alert ; if not see if its an ALERT 01A8 E8 0660 R call snd_data ; else send the data 01AB EB 0B 90 jmp rpl_freebf2 ; free the SAP buffer ; 01AE rpl_alert: ; is it an ALERT frame? 01AE 81 7F 3C 3000 cmp word ptr program_command[bx],ALERT 01B3 75 03 jne rpl_freebf2 ; if not then just free the SAP buffer 01B5 E8 0988 R call alert_sub ; else call the alert subroutine ; 01B8 rpl_freebf2: 01B8 5E pop si ; restore offset of CCB ; free the SAP buffer ; CCB_ADAPTER = 0 01B9 C6 06 025D R 27 mov i_ccb_cmd,27h ; CCB_CMD = 27h 01BE C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 01C3 C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 01C8 C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 01CE C7 06 0262 R 0000 mov i_ccb_ptr+2,0 01D4 C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 01DA C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = bf_pt 01E0 C7 06 0268 R 0546 R mov i_ccb_pt,offset bf_pt 01E6 8C 1E 026A R mov i_ccb_pt+2,ds ; 01EA 8B 44 10 mov ax,rcv_sid[si] ; set STATION_ID 01ED A3 0546 R mov bf_sid,ax 01F0 C7 06 0548 R 0000 mov bf_buf_left,0 ; set BUFFER_LEFT = 0 01F6 89 1E 054E R mov bf_1st_buf,bx ; set FIRST_BUFFER 01FA 8C 06 0550 R mov bf_1st_buf+2,es ; 01FE BB 025C R mov bx,offset i_ccb ; set es:bx = ccb address 0201 CD 5C int ADPTR_INT ; issue CCB ; 0203 CF iret ; return from the interrupt  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-20 SAMPLDR program listing page ;******************************************************************** ;* fnd_appen ;* Appendage to process a FOUND when the transmit completes ;* ;* input ;* ah = 0 ;* al = CCB_RETCODE ;* es:bx = CCB (RCB for this request) ;* cx = adapter number ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** even 0204 fnd_appen: ; 0204 06 push es ; set ds register 0205 1F pop ds 0206 8B F3 mov si,bx ; ds:si = address of RCB to free ; 0208 E8 051E R call put_rcb ; free the resources for this request ; 020B CF iret  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-21 SAMPLDR program listing page ;******************************************************************** ;* ui_appen ;* Command completion appendage for TRANSMIT ccb ;* ;* input ;* ah = 0 ;* al = CCB_RETCODE ;* es:bx = CCB (RCB for this request) ;* cx = adapter number ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** even 020C ui_appen: ; 020C 06 push es ; set ds register 020D 1F pop ds 020E 8B F3 mov si,bx ; ds:si = address of RCB to free ; ; is alert flag on 0210 F6 44 16 01 test [si].alrt_flag,ON 0214 75 1B jnz ua_free ; if so then free the resources ; 0216 22 C0 and al,al ; check CCB_RETCODE 0218 74 20 jz ua_next ; if its 0 then send next frame 021A 3C 22 cmp al,22h ; if 22h or 23h then retry 021C 74 04 je ua_retry 021E 3C 23 cmp al,23h 0220 75 0F jne ua_free 0222 ua_retry: 0222 8A 44 17 mov al,[si].rcb_cntr ; increment the retry counter 0225 FE C0 inc al 0227 3C 02 cmp al,RETRY_CNT 0229 73 06 jae ua_free ; try until max retry count is reached 022B 88 44 17 mov [si].rcb_cntr,al 022E EB 15 90 jmp ua_send_it ; resend the last frame ; 0231 ua_free: 0231 E8 07B2 R call close_file ; close boot file if necessary 0234 E8 051E R call put_rcb ; free resources 0237 EB 22 90 jmp ua_end ; exit ; 023A ua_next: ; has last frame been sent 023A F6 44 76 80 test byte ptr [si].frame+fdr_flags,EOF_FLAG 023E 75 F1 jnz ua_free ; if yes then close file and free resources ; 0240 E8 0818 R call set_fdr_var ; else prepare next frame 0243 72 EC jc ua_free ; if no error then send the frame ; 0245 ua_send_it: ; set CCB values ; CCB_ADAPTER = 0 ; CCB_CMD = 0Dh 0245 C6 44 02 00 mov [si].ccb_rc,0 ; CCB_RETCODE = 0 0249 C6 44 03 00 mov [si].ccb_work,0 ; CCB_WORK = 0 ; CCB_POINTER = 0 024D C7 44 04 0000 mov word ptr [si].ccb_pointer,0 0252 C7 44 06 0000 mov word ptr [si].ccb_pointer+2,0 ; CCB_CMD_CPL = ui_appen ; CCB_PARM_TAB = trn table ; 0257 8B DE mov bx,si ; es:bx = address of CCB 0259 CD 5C int ADPTR_INT ; issue CCB ; 025B ua_end: 025B CF iret  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-22 SAMPLDR program listing page ;******************************************************************** ;* ler_appen ;* Appendage to process a LOAD.ERROR.RESPONSE when transmit ;* completes. ;* ;* input ;* ah = 0 ;* al = CCB_RETCODE ;* es:bx = CCB (RCB for this request) ;* cx = adapter number ;* ;* output ;* all registers are preserved by the Token-Ring Adapter Handler ;* interface before this appendage is called. ;* ;******************************************************************** even 025C ler_appen: ; 025C 06 push es ; set ds register 025D 1F pop ds 025E 8B F3 mov si,bx ; ds:si = address of RCB to free ; ; restore CCB_CC for FILE.DATA.RESPONSE processing 0260 C7 44 08 020C R mov word ptr [si].ccb_cc,offset ui_appen ; 0265 E8 051E R call put_rcb ; free the resources for this request ; 0268 CF iret 0269 sampldr endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-23 SAMPLDR program listing page ;******************************************************************** ;* dir_init ;* issues DIR.INITIALIZE for the loader ;* ;* input ;* ds:0000 = data segment ;* ;* output ;* ah = INIT_MC if carry flag is set ;* al = CCB_RETCODE ;* es:bx = address of ccb issued ;* CF = 1 if al <> 0 else CF = 0 ;* all other registers are preserved ;* ;******************************************************************** 0269 90 even 026A dir_init proc ; 026A BB 025C R mov bx,offset i_ccb ; es:bx = address of CCB 026D 1E push ds 026E 07 pop es ; ; CCB_ADAPTER = 0 026F C6 06 025D R 20 mov i_ccb_cmd,20h ; CCB_CMD = 20h 0274 C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 0279 C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 027E C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 0284 C7 06 0262 R 0000 mov i_ccb_ptr+2,0 028A C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 0290 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = di_pt 0296 C7 06 0268 R 026C R mov i_ccb_pt,offset di_pt 029C 8C 1E 026A R mov i_ccb_pt+2,ds ; 02A0 C7 06 026C R 0000 mov di_bu,0 ; BRING_UPS = 0 02A6 C7 06 026E R 0000 mov di_sram_addr,0 ; SRAM_ADDR = 0 ; ADPTR_CHK_EXIT = ac_exit ; RING_STATUS_EXIT = rs_exit ; PC_ERROR_EXIT = 0 ; 02AC CD 5C int ADPTR_INT ; issue CCB ; ; check return code in al 02AE 84 C0 test al,al ; is al = 0 02B0 74 06 jz di_ok ; if al = 0 then good return ; 02B2 B4 00 mov ah,INIT_MC ; else command has failed, set message code 02B4 F9 stc ; CF = 1 02B5 EB 02 90 jmp di_ret ; 02B8 di_ok: 02B8 F8 clc ; CF = 0 02B9 di_ret: 02B9 C3 ret 02BA dir_init endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-24 SAMPLDR program listing page ;******************************************************************** ;* dir_open ;* issues DIR.OPEN.ADAPTER for the loader ;* ;* input ;* ds:0000 = data segment ;* ;* output ;* ah = DO_MC if carry flag is set ;* al = CCB_RETCODE ;* es:bx = address of ccb issued ;* CF = 1 if al <> 0 else CF = 0 ;* all other registers are preserved ;* ;******************************************************************** even 02BA dir_open proc ; 02BA BB 025C R mov bx,offset i_ccb ; es:bx = address of CCB 02BD 1E push ds 02BE 07 pop es ; ; CCB_ADAPTER = 0 02BF C6 06 025D R 03 mov i_ccb_cmd,03h ; CCB_CMD = 03h 02C4 C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 02C9 C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 02CE C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 02D4 C7 06 0262 R 0000 mov i_ccb_ptr+2,0 02DA C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 02E0 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = di_pt 02E6 C7 06 0268 R 0280 R mov i_ccb_pt,offset do_pt 02EC 8C 1E 026A R mov i_ccb_pt+2,ds ; ; set values in parm table ; ADAPTER_PARMS = apo_tbl ; DIRECT_PARMS = dp_tbl ; DLC_PARMS = dlc_tbl ; MSG_PARMS = 0 ; ; set values in ADAPTER_PARMS table (apo_tbl) 02F0 C7 06 0290 R 0000 mov apo_oec,0 ; OPEN_ERROR_CODE = 0 ; OPEN_OPTIONS = 0 02F6 C6 06 0294 R 00 mov apo_node_addr,0 ; NODE_ADDRESS = 0 02FB C6 06 0296 R 00 mov apo_node_addr+2,0 0300 C6 06 0298 R 00 mov apo_node_addr+4,0 ; GROUP_ADDRESS = 0 ; FUNCTIONAL_ADDR = 40 00 00 00 ; NUM_RCV_BUFFERS = 8 ; RCV_BUFFER_LEN = 240 ; DHB_BUFFER_LEN = 2048 ; DATA_HOLD_BUF = 1 ; LOCK_CODE = 0 ; PROD_ID_ADDR = 0 ; ; set values in DIRECT_PARMS table (dp_tbl) ; DIR_BUF_SIZE = 0 ; DIR_POOL_BLOCKS = 0 ; DIR_POOL_ADDRESS = 0 ; ADPT_CHK_EXIT = 0 ; RING_STATUS_EXIT = 0 ; PC_ERROR_EXIT = 0 ; WORK_ADDR = 0 ; WORK_LEN_REQ = 0 ; WORK_LEN_ACT = 0 ; ; set values in DLC_PARMS table (dlc_tbl) ; DLC_MAX_SAP = 1 ; DLC_MAX_STA = 0 ; DLC_MAX_GSAP = 0 ; DLC_MAX_GMEM = 0 ; DLC_T1_TICK_ONE = 0 ; DLC_T2_TICK_ONE = 0 ; DLC_TI_TICK_ONE = 0 ; DLC_T1_TICK_TWO = 0 ; DLC_T2_TICK_TWO = 0 ; DLC_TI_TICK_TWO = 0 ;  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-25 SAMPLDR program listing 0305 CD 5C int ADPTR_INT ; issue CCB ; 0307 do_wait: ; wait for command to finish 0307 80 3E 025E R FF cmp i_ccb_rc,NOT_DONE 030C 74 F9 je do_wait 030E A0 025E R mov al,i_ccb_rc ; check return code 0311 84 C0 test al,al ; is al = 0 0313 74 06 jz do_ok ; if al = 0 then good return ; 0315 B4 01 mov ah,DO_MC ; else command has failed, set message code 0317 F9 stc ; CF = 1 0318 EB 02 90 jmp do_ret ; 031B do_ok: 031B F8 clc ; CF = 0 031C do_ret: 031C C3 ret 031D dir_open endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-26 SAMPLDR program listing page ;******************************************************************** ;* dir_status ;* issues DIR.STATUS for the loader to check that installed ;* adapter is a PC Token-Ring adapter ;* ;* input ;* ds:0000 = data segment ;* ;* output ;* ah = appropriate message number if carry flag is set ;* al = CCB_RETCODE ;* es:bx = address of ccb issued ;* CF = 1 if al <> 0 else CF = 0 ;* all other registers are preserved ;* ;******************************************************************** 031D 90 even 031E dir_status proc ; 031E BB 025C R mov bx,offset i_ccb ; es:bx = address of CCB 0321 1E push ds 0322 07 pop es ; ; CCB_ADAPTER = 0 0323 C6 06 025D R 21 mov i_ccb_cmd,21h ; CCB_CMD = 21h 0328 C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 032D C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 0332 C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 0338 C7 06 0262 R 0000 mov i_ccb_ptr+2,0 033E C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 0344 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = ds_pt 034A C7 06 0268 R 02D6 R mov i_ccb_pt,offset ds_pt 0350 8C 1E 026A R mov i_ccb_pt+2,ds ; 0354 CD 5C int ADPTR_INT ; issue CCB ; ; check return code 0356 84 C0 test al,al ; is al = 0 0358 74 06 jz ds_chk ; if al = 0 then good return ; 035A B4 02 mov ah,DS_MC ; else command has failed, set message code 035C F9 stc ; CF = 1 035D EB 0F 90 jmp ds_ret ; 0360 ds_chk: ; make sure its a Token-Ring card 0360 F6 06 02EF R 80 test ds_ad_config,NOT_TOK 0365 74 06 jz ds_ok ; if its not then set message code 0367 B4 03 mov ah,BAD_CARD_MC 0369 F9 stc ; CF = 1 (error indication) 036A EB 02 90 jmp ds_ret ; 036D ds_ok: 036D F8 clc ; CF = 0 (good return) 036E ds_ret: 036E C3 ret 036F dir_status endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-27 SAMPLDR program listing page ;******************************************************************** ;* open_sap ;* issues DLC.OPEN.SAP for the loader ;* ;* input ;* ax = offset of SAP buffer pool ;* cl = sap value ;* ds:0000 = data segment ;* ;* output ;* ah = appropriate message number if carry flag is set ;* al = CCB_RETCODE ;* es:bx = address of ccb issued ;* CF = 1 if al <> 0 else CF = 0 ;* all other registers are preserved ;* ;******************************************************************** 036F 90 even 0370 open_sap proc ; 0370 BB 025C R mov bx,offset i_ccb ; es:bx = address of CCB 0373 1E push ds 0374 07 pop es ; ; CCB_ADAPTER = 0 0375 C6 06 025D R 15 mov i_ccb_cmd,15h ; CCB_CMD = 15h 037A C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 037F C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 0384 C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 038A C7 06 0262 R 0000 mov i_ccb_ptr+2,0 0390 C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 0396 C7 06 0266 R 0000 mov i_ccb_cc+2,0 ; CCB_PARM_TAB = osp_pt 039C C7 06 0268 R 0308 R mov i_ccb_pt,offset osp_pt 03A2 8C 1E 026A R mov i_ccb_pt+2,ds ; ; set parm table values 03A6 C7 06 0308 R 0000 mov osp_sid,0 ; STATION_ID = 0 ; USER_STAT_VALUE = 0 ; TIMER_T1 = 0 ; TIMER_T2 = 0 ; TIMER_TI = 0 ; MAXOUT = 0 ; MAXIN = 0 ; MAXOUT_INCR = 0 ; MAX_RETRY_CNT = 0 ; MAX_MEMBERS = 0 ; MAX_I_FIELD = 0 ; SAP_VALUE = cl 03AC 88 0E 0316 R mov osp_sap_value,cl ; OPTIONS_PRIORITY = 04h ; STATION_COUNT = 0 ; GROUP_COUNT = 0 ; GROUP_LIST = 0 ; DLC_STATUS_EXIT = 0 ; DLC_BUF_SIZE = 240 ; DLC_POOL_LEN = 15 ; DLC_POOL_ADDR = addr of SAP buffer pool 03B0 A3 0328 R mov osp_pool_adr,ax ; 03B3 CD 5C int ADPTR_INT ; issue CCB ; 03B5 osp_wait: ; wait for command to finish 03B5 80 3E 025E R FF cmp i_ccb_rc,NOT_DONE 03BA 74 F9 je osp_wait 03BC A0 025E R mov al,i_ccb_rc ; check return code 03BF 84 C0 test al,al ; is al = 0 03C1 74 06 jz osp_ok ; if al = 0 then good return ; 03C3 B4 04 mov ah,OSP_MC ; else command has failed, set message code 03C5 F9 stc ; CF = 1 03C6 EB 02 90 jmp osp_ret ; 03C9 osp_ok: 03C9 F8 clc ; CF = 0 03CA osp_ret: 03CA C3 ret  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-28 SAMPLDR program listing 03CB open_sap endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-29 SAMPLDR program listing page ;******************************************************************** ;* receive ;* issues RECEIVE for the loader ;* ;* input ;* ax = station_id ;* bx = offset of CCB ;* ds:0000 = data segment ;* ;* output ;* es:bx = address of ccb issued ;* all other registers are preserved ;* ;******************************************************************** 03CB 90 even 03CC receive proc ; ; es:bx = address of CCB 03CC 1E push ds 03CD 07 pop es ; ; CCB_ADAPTER = 0 ; CCB_CMD = 28h 03CE C6 47 02 00 mov byte ptr r_ccb_rc[bx],0 ; CCB_RC = 0 03D2 C6 47 03 00 mov byte ptr r_ccb_wrk[bx],0 ; CCB_WORK = 0 03D6 C7 47 04 0000 mov word ptr r_ccb_ptr[bx],0 ; CCB_POINTER = 0 03DB C7 47 06 0000 mov word ptr r_ccb_ptr+2[bx],0 ; CCB_CMD_CPL = rcv_appen ; CCB_PARM_TAB = rcv_pt ; ; set RECEIVE parm table 03E0 89 47 10 mov rcv_sid[bx],ax ; USER_LENGTH = 0 ; RECEIVED_DATA = rpl_appen ; FIRST_BUFFER = 0 ; OPTIONS = 0 ; 03E3 CD 5C int ADPTR_INT ; issue CCB ; 03E5 C3 ret 03E6 receive endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-30 SAMPLDR program listing page ;******************************************************************** ;* close ;* issues DIR.CLOSE for the loader ;* ;* input ;* ds:0000 = data segment ;* ;* output ;* es:bx = address of ccb issued ;* all other registers are preserved ;* ;******************************************************************** even 03E6 close proc ; 03E6 BB 025C R mov bx,offset i_ccb ; es:bx = address of CCB 03E9 1E push ds 03EA 07 pop es ; ; CCB_ADAPTER = 0 03EB C6 06 025D R 04 mov i_ccb_cmd,04h ; CCB_CMD = 04h 03F0 C6 06 025E R 00 mov i_ccb_rc,0 ; CCB_RC = 0 03F5 C6 06 025F R 00 mov i_ccb_wrk,0 ; CCB_WORK = 0 03FA C7 06 0260 R 0000 mov i_ccb_ptr,0 ; CCB_POINTER = 0 0400 C7 06 0262 R 0000 mov i_ccb_ptr+2,0 0406 C7 06 0264 R 0000 mov i_ccb_cc,0 ; CCB_CMD_CPL = 0 040C C7 06 0266 R 0000 mov i_ccb_cc+2,0 0412 C7 06 0268 R 0000 mov i_ccb_pt,0 ; CCB_PARM_TAB = 0 0418 C7 06 026A R 0000 mov i_ccb_pt+2,0 ; 041E CD 5C int ADPTR_INT ; issue CCB ; 0420 cls_wait: ; wait until command completes 0420 80 3E 025E R FF cmp i_ccb_rc,NOT_DONE 0425 74 F9 je cls_wait 0427 C3 ret ; return to calling routine 0428 close endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-31 SAMPLDR program listing page ;******************************************************************** ;* print_msg ;* print a message on the default video device at the current ;* cursor location ;* ;* input ;* di:si = address of asciiz string to print ;* ;* output ;* si is destroyed ;* all other registers preserved ;* ;******************************************************************** even 0428 print_msg proc ; 0428 50 push ax ; save registers used 0429 53 push bx 042A 52 push dx 042B 51 push cx ; 042C B4 0F mov ah,GET_PAGE ;get the current page into bh 042E CD 10 int VIDEO ; 0430 B4 03 mov ah,GET_CUR ; get the current cursor positione 0432 CD 10 int VIDEO ; into dx (dh = row, dl = column) ; ; write the string pointed to by ds:si 0434 B9 0001 mov cx,1 ; cx = number of characters to write at a time 0437 B3 07 mov bl,NORMAL ; bl = attribute 0439 90 even 043A write_string: 043A AC lodsb ; al = character to write 043B 3C 00 cmp al,EOS ; if al = 0 then its end of string 043D 74 29 jz print_done 043F 3C 0A cmp al,LINEFEED ; if its not a linefeed then 0441 75 0F jnz not_lf ; goto not_lf 0443 FE C6 inc dh ; else increment row 0445 80 FE 19 cmp dh,LASTLINE ; if its not the last row then 0448 75 18 jnz set_cursor ; goto set_cursor 044A E8 046E R call scroll ; else scroll the screen 044D B6 18 mov dh,LASTLINE-1 044F EB 11 90 jmp set_cursor ; goto set_cursor 0452 not_lf: ; if its not a carriage return then 0452 3C 0D cmp al,CARRIAGE_RETURN 0454 75 05 jnz write_char ; goto write_char 0456 B2 00 mov dl,0 ; else set cursor to start of line 0458 EB 08 90 jmp set_cursor 045B write_char: 045B B4 09 mov ah,PRINT_CHAR 045D CD 10 int VIDEO ; write the character 045F FE C2 inc dl ; update the cursor position 0461 90 even 0462 set_cursor: 0462 B4 02 mov ah,SET_CUR ; set the cursor 0464 CD 10 int VIDEO ; 0466 EB D2 jmp write_string ; write next character ; 0468 print_done: 0468 59 pop cx ; restore the registers 0469 5A pop dx 046A 5B pop bx 046B 58 pop ax 046C C3 ret ; return to caller 046D print_msg endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-32 SAMPLDR program listing page ;******************************************************************** ;* scroll ;* scrolls video screen 1 line ;* ;* input ;* none ;* ;* output ;* all registers preserved ;* ;******************************************************************** 046D 90 even 046E scroll proc ; 046E 50 push ax ; save registers used 046F 53 push bx 0470 52 push dx 0471 51 push cx ; 0472 B4 06 mov ah,SCRLL ; call BIOS scroll function 0474 B0 01 mov al,1 ; scroll 1 line 0476 B9 0000 mov cx,UPPER_LEFT ; upper left row,col = 0,0 0479 BA 184F mov dx,LOWER_RIGHT ; lower right = 24,79 047C B7 07 mov bh,NORMAL ; bh = screen attribute 047E CD 10 int VIDEO ; call BIOS video routine ; 0480 59 pop cx ; restore the registers 0481 5A pop dx 0482 5B pop bx 0483 58 pop ax 0484 C3 ret ; return to caller 0485 scroll endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-33 SAMPLDR program listing page ;******************************************************************** ;* errout ;* This routine prints error messages followed by an error code ;* ;* input ;* ah = error message number ;* al = error code ;* ;* output ;* ax is destroyed ;* all other registers are preserved ;* ;******************************************************************** 0485 90 even 0486 errout proc 0486 56 push si ; save registers used 0487 52 push dx ; 0488 50 push ax ; save ax 0489 8A C4 mov al,ah ; ax = message number 048B 32 E4 xor ah,ah 048D BA 002A mov dx,MSG_SIZE ; offset into msg_tbl = msg number * msg_size 0490 F7 E2 mul dx ; addr of message = msg_tbl offset + offset into msg_tbl 0492 BE 0175 R mov si,offset msg_tbl 0495 03 F0 add si,ax 0497 E8 0428 R call print_msg ; print the msg 049A 58 pop ax ; retrieve ax with error code ; 049B E8 04A6 R call hxtoa ; convert error code to string 049E E8 0428 R call print_msg ; print the error code ; 04A1 5A pop dx ; restore registers used 04A2 5E pop si 04A3 C3 ret ; return to calling routine 04A4 C3 ret 04A5 errout endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-34 SAMPLDR program listing page ;******************************************************************** ;* hxtoa ;* This program converts the number passed al to an ascii string ;* ;* input ;* al = number to be converted ;* ;* output ;* ds:si = ascii string containing the converted number ;* es,bx,cx,dx,di,sp,bp preserved ;* ;******************************************************************** 04A5 90 even 04A6 hxtoa proc 04A6 51 push cx ; save registers used 04A7 53 push bx 04A8 52 push dx 04A9 57 push di ; 04AA B5 02 mov ch,2 ; set loop counter for 2 digits 04AC BF 0257 R mov di,offset hxstr ; set offset of ascii string ; 04AF hxtoa1: 04AF B1 04 mov cl,4 ; set al to get next nibble 04B1 D2 C0 rol al,cl ; 04B3 50 push ax ; save al 04B4 24 0F and al,0fh ; get one nibble ; ; set base of table 04B6 BB 0247 R mov bx,offset asciinums 04B9 D7 xlat asciinums ; do translation 04BA AA stosb ; save character in string ; 04BB 58 pop ax ; retrieve ax 04BC FE CD dec ch ; decrement loop counter 04BE 75 EF jnz hxtoa1 ; return to start of loop ; 04C0 BE 0257 R mov si,offset hxstr ; return ds:si = ascii string 04C3 5F pop di ; restore registers 04C4 5A pop dx 04C5 5B pop bx 04C6 59 pop cx 04C7 C3 ret ; return to calling routine 04C8 hxtoa endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-35 SAMPLDR program listing page ;******************************************************************** ;* is_it_boot ;* This routine checks that the request is for the boot ;* file that this loader sends ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ;* output ;* cf = 1 if the request is not for this loader's boot file ;* cf = 0 if the request is for this loader's boot file ;* all other registers preserved ;* ;******************************************************************** even 04C8 is_it_boot proc ; 04C8 56 push si ; save registers used 04C9 57 push di 04CA 51 push cx ; ; cx = length of frame 04CB 8B 4F 3A mov cx,program_length[bx] 04CE 86 CD xchg cl,ch 04D0 83 F9 57 cmp cx,FIND_SIZE ; is a filename field ; included in this frame 04D3 77 04 ja iib_ckname ; if so then check that it is for ; this loader's boot file 04D5 F8 clc ; else by default it is for boot file of 04D6 EB 1E 90 jmp iib_end ; this loader ; 04D9 iib_ckname: ; ds:si = address of loader file name 04D9 BE 2084 R mov si,offset bootname ; es:di = address of requested file name 04DC 8D BF 0091 lea di,fin_file_name[bx] 04E0 83 E9 57 sub cx,FIND_SIZE ; cx = length of requested file name 04E3 FC cld ; see if the file names are the same 04E4 F3/ A6 repe cmpsb 04E6 74 04 jz iib_final_chk ; if no match then ; 04E8 F9 stc ; set cf = 1 04E9 EB 0B 90 jmp iib_end ; 04EC iib_final_chk: ; is it a complete match 04EC 80 3C 00 cmp byte ptr 0[si],0 04EF 74 04 je iib_same ; if so then goto clear carry flag 04F1 F9 stc ; else cf = 1 04F2 EB 02 90 jmp iib_end ; 04F5 iib_same: 04F5 F8 clc ; cf = 0 04F6 iib_end: 04F6 59 pop cx ; restore registers 04F7 5F pop di 04F8 5E pop si 04F9 C3 ret 04FA is_it_boot endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-36 SAMPLDR program listing page ;******************************************************************** ;* get_rcb ;* This routine allocates an RCB (Resource Control Block) ;* if one is available ;* ;* input ;* none ;* ;* output ;* ds:si = address of allocated RCB ;* cf = 1 if no RCB is available ;* cf = 0 if an RCB was allocated ;* all other registers preserved ;* ;******************************************************************** even 04FA get_rcb proc ; 04FA 50 push ax ; save registers ; 04FB 8B 36 2082 R mov si,rcb_free ; get pointer to rcb free list 04FF 0B F6 or si,si ; is the list empty 0501 74 17 jz no_rcb ; if so then return with cf set ; 0503 8B 44 18 mov ax,[si].next ; take current RCB off free list 0506 A3 2082 R mov rcb_free,ax ; ; mark RCB as 'in use' 0509 C7 44 18 FFFF mov [si].next,IN_USE ; set alert flag off 050E C6 44 16 00 mov [si].alrt_flag,OFF 0512 C6 44 17 00 mov [si].rcb_cntr,0 ; reset counter 0516 F8 clc ; cf = 0 for RCB found 0517 EB 02 90 jmp gr_end ; 051A no_rcb: 051A F9 stc ; cf = 1 for no RCB available 051B gr_end: 051B 58 pop ax ; restore register 051C C3 ret 051D get_rcb endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-37 SAMPLDR program listing page ;******************************************************************** ;* put_rcb ;* This routine return an RCB to the free list ;* ;* input ;* none ;* ;* output ;* ds:si = address of RCB to free ;* all registers preserved ;* ;******************************************************************** 051D 90 even 051E put_rcb proc ; 051E 50 push ax ; save registers ; 051F A1 2082 R mov ax,rcb_free ; get pointer to rcb free list 0522 89 44 18 mov [si].next,ax ; put RCB at head of list 0525 89 36 2082 R mov rcb_free,si ; 0529 58 pop ax ; restore register 052A C3 ret 052B put_rcb endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-38 SAMPLDR program listing page ;******************************************************************** ;* found ;* This routine responds to a FIND frame ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ;* output ;* all registers preserved ;* ;******************************************************************** 052B 90 even 052C found proc ; 052C 50 push ax ; save registers 052D 52 push dx ; 052E E8 04C8 R call is_it_boot ; see if file requested is this loader's ; boot file 0531 73 03 jnc fnd_classck ; if so then check the connection class 0533 E9 065C R jmp fnd_end ; else ignore the frame ; 0536 fnd_classck: ; can loader service this request 0536 F7 47 54 0100 test word ptr fin_conn_class[bx],CLASS1 053B 75 03 jnz fnd_get ; if so then get necessary resources 053D E9 065C R jmp fnd_end ; else ignore the frame ; 0540 fnd_get: 0540 E8 04FA R call get_rcb ; are resources available 0543 73 03 jnc fnd_ok ; if so then fill in the FOUND frame 0545 E9 065C R jmp fnd_end ; else ignore the frame ; ; fill in the found frame 0548 fnd_ok: ; set MAX_FRAME 0548 8B 47 4E mov ax,fin_max_frame[bx] 054B 86 C4 xchg al,ah ; reverse bytes for intel format 054D BA 067B mov dx,MAXFRAME+OVRHD 0550 3B C2 cmp ax,dx 0552 72 02 jb fnd_set ; if FIND max frame is smaller 0554 8B C2 mov ax,dx ; value in dx is the max frame size 0556 fnd_set: 0556 86 C4 xchg al,ah ; fix ax for frame format ; set max frame 0558 89 84 008B mov word ptr [si].frame+fou_max_frame,ax ; ; PROGRAM_LENGTH = 00 3A 055C C7 44 5E 3A00 mov word ptr [si].frame+fou_length,FL ; PROGRAM_COMMAND = 00 01 0561 C7 44 60 0200 mov word ptr [si].frame+fou_command,FC ; CORR_HEADER = 00 08 40 03 0566 C7 44 62 0800 mov word ptr [si].frame+fou_corr_hdr,CORR_HDR1 056B C7 44 64 0340 mov word ptr [si].frame+fou_corr_hdr+2,CORR_HDR2 ; CORRELATOR = 0 0570 C7 44 66 0000 mov word ptr [si].frame+fou_corr,NULL 0575 C7 44 68 0000 mov word ptr [si].frame+fou_corr+2,NULL ; RESP_HDR = 00 05 40 0B 057A C7 44 6A 0500 mov word ptr [si].frame+fou_resp_hdr,RESP_HDR1 057F C7 44 6C 0B40 mov word ptr [si].frame+fou_resp_hdr+2,RESP_HDR2 ; RESP_CODE = 0 0584 C6 44 6E 00 mov byte ptr [si].frame+fou_resp_code,NULL ; DEST_HDR = 00 0A 40 0C 0588 C7 44 6F 0A00 mov word ptr [si].frame+fou_dest_hdr,DEST_HDR1 058D C7 44 71 0C40 mov word ptr [si].frame+fou_dest_hdr+2,DEST_HDR2 ; SOURCE_HDR = 00 0A 40 06 0592 C7 44 79 0A00 mov word ptr [si].frame+fou_source_hdr,SOURCE_HDR1 0597 C7 44 7B 0640 mov word ptr [si].frame+fou_source_hdr+2,SOURCE_HDR2 ; INFO_HDR = 00 10 00 08 059C C7 84 0083 1000 mov word ptr [si].frame+fou_info_hdr,INFO_HDR1 05A2 C7 84 0085 0800 mov word ptr [si].frame+fou_info_hdr+2,INFO_HDR2 ; FRAME_HDR = 00 06 40 09 05A8 C7 84 0087 0600 mov word ptr [si].frame+fou_frame_hdr,FRAME_HDR1 05AE C7 84 0089 0940 mov word ptr [si].frame+fou_frame_hdr+2,FRAME_HDR2 ; CLASS_HDR = 00 06 40 0A 05B4 C7 84 008D 0600 mov word ptr [si].frame+fou_class_hdr,CLASS_HDR1 05BA C7 84 008F 0A40 mov word ptr [si].frame+fou_class_hdr+2,CLASS_HDR2  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-39 SAMPLDR program listing ; CONN_CLASS = class 1 05C0 C7 84 0091 0100 mov word ptr [si].frame+fou_conn_class,CLASS1 ; LSAP_HDR = 00 05 40 07 05C6 C7 84 0093 0500 mov word ptr [si].frame+fou_lsap_hdr,LSAP_HDR1 05CC C7 84 0095 0740 mov word ptr [si].frame+fou_lsap_hdr+2,LSAP_HDR2 ; RSAP = fch 05D2 C6 84 0097 F8 mov byte ptr [si].frame+fou_rsap,LOAD_SAP ; set SOURCE.ADDR 05D7 A1 0294 R mov ax,word ptr apo_node_addr 05DA 89 44 7D mov word ptr [si].frame+fou_source_addr,ax 05DD A1 0296 R mov ax,word ptr apo_node_addr+2 05E0 89 44 7F mov word ptr [si].frame+fou_source_addr+2,ax 05E3 A1 0298 R mov ax,word ptr apo_node_addr+4 05E6 89 84 0081 mov word ptr [si].frame+fou_source_addr+4,ax ; set DEST.ADDR 05EA 8B 47 5A mov ax,fin_source_addr[bx] 05ED 89 44 73 mov word ptr [si].frame+fou_dest_addr,ax 05F0 8B 47 5C mov ax,fin_source_addr[bx+2] 05F3 89 44 75 mov word ptr [si].frame+fou_dest_addr+2,ax 05F6 8B 47 5E mov ax,fin_source_addr[bx+4] 05F9 89 44 77 mov word ptr [si].frame+fou_dest_addr+4,ax ; ; fill in LAN HEADER ; set the source address in the lan header 05FC 8B 47 1E mov ax,word ptr lan_source_addr[bx] 05FF 25 FF7F and ax,0ff7fh 0602 89 44 40 mov word ptr [si].lan_dest,ax 0605 8B 47 20 mov ax,word ptr lan_source_addr[bx+2] 0608 89 44 42 mov word ptr [si].lan_dest+2,ax 060B 8B 47 22 mov ax,word ptr lan_source_addr[bx+4] 060E 89 44 44 mov word ptr [si].lan_dest+4,ax ; send it broadcast 0611 C7 44 4C 0082 mov word ptr [si].lan_route,BRDCST 0616 C7 44 38 0010 mov word ptr [si].lan_len_buf,16 ; ; fill in TRANSMIT PARM TABLE ; STATION_ID = id return from DLC.OPEN.SAP 061B A1 051C R mov ax,word ptr rcv_tbl1 061E 89 44 1A mov word ptr [si].trn_sid,ax ; TRANSMIT_FS =0 0621 C6 44 1C 00 mov byte ptr [si].trn_fs,0 ; RSAP = FCh ; XMIT_QUEUE_ONE = addr of lan header 0625 8C 5C 20 mov word ptr [si].trn_q1+2,ds ; XMIT_QUEUE_TWO = 0 ; BUFFER_LEN_ONE = length of FOUND frame 0628 C7 44 26 003A mov word ptr [si].trn_len1,03ah ; BUFFER_LEN_TWO = 0 062D C7 44 28 0000 mov word ptr [si].trn_len2,0 ; BUFFER_ONE = addr of FOUND frame 0632 8C 5C 2C mov word ptr [si].trn_buf1+2,ds ; BUFFER_TWO not used ; ; fill in the CCB ; CCB_ADAPTER = 0 ; CCB_COMMAND = 0DH 0635 C6 44 01 0D mov byte ptr [si].ccb_cmd,0dh ; CCB_RETCODE = 0 0639 C6 44 02 00 mov byte ptr [si].ccb_rc,0 ; CCB_WORK = 0 063D C6 44 03 00 mov byte ptr [si].ccb_work,0 ; CCB_POINTER = 0 0641 C7 44 04 0000 mov word ptr [si].ccb_pointer,0 0646 C7 44 06 0000 mov word ptr [si].ccb_pointer+2,0 ; CCB_CMD_CPL = fnd_appen 064B C7 44 08 0204 R mov word ptr [si].ccb_cc,offset fnd_appen 0650 8C 4C 0A mov word ptr [si].ccb_cc+2,cs ; CCB_PARM_TAB = transmit table for this ccb 0653 8C 5C 0E mov word ptr [si].ccb_pt+2,ds ; 0656 87 F3 xchg si,bx ; es:bx = address of CCB 0658 CD 5C int ADPTR_INT ; issue the CCB 065A 87 F3 xchg si,bx ; restore the registers ; 065C fnd_end: 065C 5A pop dx ; restore registers 065D 58 pop ax 065E C3 ret 065F found endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-40 SAMPLDR program listing page ;******************************************************************** ;* snd_data ;* This routine responds to a SEND.FILE.REQUEST frame ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ;* output ;* all registers preserved ;* ;******************************************************************** 065F 90 even 0660 snd_data proc ; 0660 50 push ax ; save registers 0661 52 push dx 0662 51 push cx 0663 57 push di ; 0664 E8 04C8 R call is_it_boot ; see if file requested is this loader's ; boot file 0667 73 09 jnc sd_classck ; if so then check the connection class 0669 B8 0200 mov ax,FILE_NOT_FND 066C E8 08A6 R call send_ler ; else send LOAD.ERROR.RESPONSE frame 066F E9 0706 R jmp sd_end ; 0672 sd_classck: ; can loader service this machine 0672 F7 47 54 0100 test word ptr sfr_conn_class[bx],CLASS1 0677 75 03 jnz sd_get ; if so then get necessary resources 0679 E9 0706 R jmp sd_end ; else ignore the frame ; 067C sd_get: 067C E8 070C R call find_rcb ; see if this is duplicate request 067F 72 29 jc sd_1st ; if not then allocate resources for it ; else update the sequence number if necessary 0681 8B 4F 42 mov cx,word ptr sfr_seq_num[bx] 0684 86 CD xchg cl,ch 0686 8B 54 12 mov dx,word ptr [si].seq_number 0689 86 D6 xchg dl,dh 068B 3B CA cmp cx,dx 068D 75 0C jne sd_conditional 068F 8B 47 44 mov ax,word ptr sfr_seq_num[bx+2] 0692 86 C4 xchg al,ah 0694 8B 54 14 mov dx,word ptr [si].seq_number+2 0697 86 D6 xchg dl,dh 0699 3B C2 cmp ax,dx 069B sd_conditional: 069B 77 0A ja sd_set_done ; if sfr_seq_num > rcb_seq_num then do nothing ; ; else rcb_seq_num = sfr_seq_num 069D 86 E9 xchg ch,cl 069F 86 E0 xchg ah,al 06A1 89 4C 12 mov word ptr [si].seq_number,cx 06A4 89 44 14 mov word ptr [si].seq_number+2,ax ; 06A7 sd_set_done: 06A7 EB 5D 90 jmp sd_end ; all done with this request ; 06AA sd_1st: 06AA E8 04FA R call get_rcb ; see if resources are available 06AD 72 57 jc sd_end ; if not then ignore the request ; ; fill in the RCB parameters ; set the rcb_seq_num 06AF 8B 47 42 mov ax,word ptr sfr_seq_num[bx] 06B2 89 44 12 mov word ptr [si].seq_number,ax 06B5 8B 47 44 mov ax,word ptr sfr_seq_num[bx+2] 06B8 89 44 14 mov word ptr [si].seq_number+2,ax ; ; set max_frame 06BB 8B 47 4E mov ax,word ptr sfr_max_frame[bx] 06BE 3D 067B cmp ax,MAXFRAME+OVRHD 06C1 77 09 ja sd_set_max 06C3 2D 007B sub ax,OVRHD 06C6 89 44 10 mov [si].max_frame,ax 06C9 EB 06 90 jmp sd_max_set  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-41 SAMPLDR program listing 06CC sd_set_max: 06CC C7 44 10 0600 mov [si].max_frame,MAXFRAME ; 06D1 sd_max_set: ; set address of requesting device 06D1 8B 47 5A mov ax,word ptr sfr_source_addr[bx] 06D4 89 44 40 mov word ptr [si].lan_dest,ax 06D7 8B 47 5C mov ax,word ptr sfr_source_addr[bx+2] 06DA 89 44 42 mov word ptr [si].lan_dest+2,ax 06DD 8B 47 5E mov ax,word ptr sfr_source_addr[bx+4] 06E0 89 44 44 mov word ptr [si].lan_dest+4,ax ; ; set lan length buffer 06E3 8A 47 14 mov al,r_lan_header_length[bx] 06E6 32 E4 xor ah,ah 06E8 89 44 38 mov [si].lan_len_buf,ax ; 06EB 2D 000E sub ax,14 ; set routing info 06EE 8B C8 mov cx,ax ; cx = length of routing info 06F0 56 push si ; save pointer to rcb ; es:di = destination 06F1 8D 7C 4C lea di,[si].lan_route ; ds:si = source 06F4 8D 77 24 lea si,lan_routing_info[bx] 06F7 FC cld ; copy the routing info 06F8 F3/ A4 rep movsb ; into the RCB 06FA 5E pop si ; restore si 06FB 80 64 4C 1F and byte ptr [si].lan_route,1fh 06FF 80 74 4D 80 xor byte ptr [si].lan_route+1,80h ; 0703 E8 0744 R call transmit_ui ; send the requested data ; 0706 sd_end: 0706 5F pop di ; restore the registers 0707 59 pop cx 0708 5A pop dx 0709 58 pop ax 070A C3 ret 070B snd_data endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-42 SAMPLDR program listing page ;******************************************************************** ;* find_rcb ;* This routine searches RCB's for one that contains ;* same lan_dest_addr as the source address of the request ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ;* output ;* si = offset of RCB with matching node address if cf = 0 ;* cf = 1 if no match is found ;* cf = 0 if match is found ;* all other registers preserved ;* ;******************************************************************** 070B 90 even 070C find_rcb proc ; 070C 50 push ax ; save registers 070D 51 push cx 070E 57 push di ; 070F BE 0552 R mov si,offset rcb1 ; si = offset of 1st RCB ; di = offset of source address 0712 8D 7F 5A lea di,sfr_source_addr[bx] 0715 B9 0004 mov cx,RCB_CNT ; loop counter (loop thru RCB's) ; 0718 fr_loop: 0718 51 push cx ; save registers for loop 0719 57 push di 071A 56 push si ; is this RCB in use 071B 81 7C 18 FFFF cmp [si].next,IN_USE 0720 75 0D jne fr_next ; if not then skip it ; ds:si = address of node address in RCB 0722 8D 44 40 lea ax,[si].lan_dest 0725 8B F0 mov si,ax 0727 B9 0003 mov cx,3 ; length of node address in words 072A FC cld ; compare the two node addresses 072B F3/ A7 repe cmpsw 072D 74 0D jz fr_found ; if match then return with si and cf set ; 072F fr_next: 072F 5E pop si ; get ready to go thru loop again 0730 81 C6 06CC add si,RCB_SIZE ; si = next RCB 0734 5F pop di 0735 59 pop cx 0736 E2 E0 loop fr_loop ; 0738 F9 stc ; didn't find a match, so set cf and return 0739 EB 05 90 jmp fr_end ; 073C fr_found: 073C 5E pop si ; si = offset of RCB w/ matching node addr 073D 5F pop di 073E 59 pop cx 073F F8 clc ; 0740 fr_end: 0740 5F pop di ; restore registers 0741 59 pop cx 0742 58 pop ax 0743 C3 ret 0744 find_rcb endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-43 SAMPLDR program listing page ;******************************************************************** ;* transmit_ui ;* This routine sends the first FILE.DATA.RESPONSE frame ;* in response to a SEND.FILE.REQUEST ;* ;* input ;* es:bx = address of SAP buffer ;* ds:si = address of RCB ;* ;* output ;* all registers preserved ;* ;******************************************************************** even 0744 transmit_ui proc ; 0744 50 push ax ; save registers used ; 0745 E8 0790 R call open_file ; open the boot file if not already open 0748 73 0C jnc tui_get_data ; if open is successful, then read some data 074A E8 051E R call put_rcb ; else release all resources for this request 074D B8 0200 mov ax,FILE_NOT_FND 0750 E8 08A6 R call send_ler ; send LOAD.ERROR.RESPONSE frame 0753 EB 39 90 jmp tui_end ; exit ; 0756 tui_get_data: 0756 E8 07CA R call set_fdr_fixed ; setup FILE.DATA.RESPONSE frame 0759 E8 0818 R call set_fdr_var ; and TRANSMIT parmeter tablee and 075C 73 09 jnc tui_ccb ; if successful then issue the ccb 075E E8 07B2 R call close_file ; else close the boot file (if necessary) 0761 E8 051E R call put_rcb ; & release resources for this request 0764 EB 28 90 jmp tui_end ; exit ; 0767 tui_ccb: ; fill in the CCB ; CCB_ADAPTER = 0 ; CCB_COMMAND = 0DH 0767 C6 44 01 0D mov byte ptr [si].ccb_cmd,0dh ; CCB_RETCODE = 0 076B C6 44 02 00 mov byte ptr [si].ccb_rc,0 ; CCB_WORK = 0 076F C6 44 03 00 mov byte ptr [si].ccb_work,0 ; CCB_POINTER = 0 0773 C7 44 04 0000 mov word ptr [si].ccb_pointer,0 0778 C7 44 06 0000 mov word ptr [si].ccb_pointer+2,0 ; CCB_CMD_CPL = ui_appen 077D C7 44 08 020C R mov word ptr [si].ccb_cc,offset ui_appen 0782 8C 4C 0A mov word ptr [si].ccb_cc+2,cs ; CCB_PARM_TAB = transmit table for this ccb 0785 8C 5C 0E mov word ptr [si].ccb_pt+2,ds ; 0788 87 F3 xchg si,bx ; es:bx = address of CCB 078A CD 5C int ADPTR_INT ; issue the CCB 078C 87 DE xchg bx,si ; restore registers ; 078E tui_end: 078E 58 pop ax ; restore registers used 078F C3 ret 0790 transmit_ui endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-44 SAMPLDR program listing page ;******************************************************************** ;* open_file ;* This routine opens the boot file if its not already open ;* ;* input ;* none ;* ;* output ;* all registers preserved ;* cf = 1 if open is unsuccessful ;* cf = 0 if open is successful ;* ;******************************************************************** even 0790 open_file proc ; 0790 50 push ax ; save registers 0791 52 push dx ; 0792 F6 06 2093 R FF test file_use,0ffh ; see if boot file is already open 0797 75 0D jnz opf_good_ret ; if it is then everything's ok ; ; open the file ; ds:dx = address of filename 0799 BA 2084 R mov dx,offset bootname 079C B8 3D00 mov ax,READ_OPEN ; open it for reading 079F CD 21 int DOS ; call DOS 07A1 72 0B jc opf_bad_ret ; if unsuccessful set carry flag ; 07A3 A3 2091 R mov boothandle,ax ; save the handle ; 07A6 opf_good_ret: ; successful open 07A6 FE 06 2093 R inc file_use ; increment the use counter 07AA F8 clc ; cf = 0 for good return 07AB EB 02 90 jmp opf_end ; exit ; 07AE opf_bad_ret: 07AE F9 stc ; cf = 1 for bad return ; 07AF opf_end: 07AF 5A pop dx ; restore registers 07B0 58 pop ax 07B1 C3 ret 07B2 open_file endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-45 SAMPLDR program listing page ;******************************************************************** ;* close_file ;* This routine closes the boot file if its not being used ;* ;* input ;* none ;* ;* output ;* all registers preserved ;* ;******************************************************************** even 07B2 close_file proc ; 07B2 50 push ax ; save registers 07B3 53 push bx ; 07B4 FE 0E 2093 R dec file_use ; decrement the file use counter ; 07B8 F6 06 2093 R FF test file_use,0ffh ; see if boot file is being used 07BD 75 08 jnz clf_end ; if its is being used then don't close it ; 07BF 8B 1E 2091 R mov bx,boothandle ; else close it (bx = handle) 07C3 B4 3E mov ah,DOS_CLOSE ; set function code to close file 07C5 CD 21 int DOS ; call DOS ; 07C7 clf_end: 07C7 5B pop bx ; restore registers 07C8 58 pop ax 07C9 C3 ret 07CA close_file endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-46 SAMPLDR program listing page ;******************************************************************** ;* set_fdr_fixed ;* This routine sets all the fixed fields (i.e., fields that ;* don't change once set) in the FILE.DATA.RESPONSE frame & ;* the TRANSMIT parameter table ;* ;* input ;* ds:si = address of RCB ;* ;* output ;* all registers preserved ;* ;******************************************************************** even 07CA set_fdr_fixed proc ; 07CA 50 push ax ; save registers ; ; set fixed fields in FILE.DATA.RESPONSE frame ; PROGRAM_COMMAND = 00 20 07CB C7 44 60 2000 mov word ptr [si].frame+fdr_command,FDRC ; SEQ_HDR = 00 08 40 11 07D0 C7 44 62 0800 mov word ptr [si].frame+fdr_seq_hdr,SEQ_HDR1 07D5 C7 44 64 1140 mov word ptr [si].frame+fdr_seq_hdr+2,SEQ_HDR2 ; LOADER_HDR = 00 0D C0 14 07DA C7 44 6A 0D00 mov word ptr [si].frame+fdr_loader_hdr,LDR_HDR1 07DF C7 44 6C 14C0 mov word ptr [si].frame+fdr_loader_hdr+2,LDR_HDR2 ; LOCATE_ADDR = 0 07E4 C7 44 6E 0000 mov word ptr [si].frame+fdr_locate_addr,0 07E9 C7 44 70 0000 mov word ptr [si].frame+fdr_locate_addr+2,0 ; XFER_ADDR = 0 07EE C7 44 72 0000 mov word ptr [si].frame+fdr_xfer_addr,0 07F3 C7 44 74 0000 mov word ptr [si].frame+fdr_xfer_addr+2,0 ; DATA_HDR = ?? ?? 40 18 07F8 C7 44 79 1840 mov word ptr [si].frame+fdr_data_hdr+2,DATA_HDR2 ; ; set fixed fields in TRANSMIT parameter table ; STATION_ID = id return from DLC.OPEN.SAP 07FD A1 0539 R mov ax,word ptr rcv_tbl2 0800 89 44 1A mov [si].trn_sid,ax 0803 C6 44 1C 00 mov [si].trn_fs,0 ; TRANSMIT_FS ; XMIT_QUEUE_ONE = addr of lan header 0807 8C 5C 20 mov word ptr [si].trn_q1+2,ds ; XMIT_QUEUE_TWO = 0 ; BUFFER_ONE_LEN = 00 1D 080A C7 44 26 001D mov [si].trn_len1,FDRL ; BUFFER_ONE = addr of FILE.DATA.RESPONSE frame 080F 8C 5C 2C mov word ptr [si].trn_buf1+2,ds ; BUFFER_TWO = addr of data portion of frame 0812 8C 5C 30 mov word ptr [si].trn_buf2+2,ds ; 0815 58 pop ax ; restore registers 0816 C3 ret 0817 set_fdr_fixed endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-47 SAMPLDR program listing page ;******************************************************************** ;* set_fdr_var ;* This routine sets all the variable fields in the ;* in the FILE.DATA.RESPONSE frame & ;* the TRANSMIT parameter table ;* ;* input ;* ds:si = address of RCB ;* ;* output ;* all registers preserved ;* cf = 1 if error ;* cf = 0 if no error ;* ;******************************************************************** 0817 90 even 0818 set_fdr_var proc ; 0818 50 push ax ; save registers ; 0819 E8 086C R call set_file_ptr ; set the file pointer in the boot file for the read 081C 72 4B jc gdf_end ; if error then exit ; 081E E8 0896 R call read_boot ; get data from boot file to fill data portion of frame 0821 72 46 jc gdf_end ; if error then exit ; ; ; BUFFER_LEN_TWO = number of data bytes read 0823 89 44 28 mov [si].trn_len2,ax 0826 05 001D add ax,FDRL ; PROGRAM_LENGTH = 1dh + length of data portion 0829 86 C4 xchg al,ah ; convert to frame format 082B 89 44 5E mov word ptr [si].frame+fdr_length,ax 082E 86 C4 xchg al,ah ; restore ax 0830 2D 0019 sub ax,FDRL-4 ; set length portion of DATA_HDR 0833 86 C4 xchg al,ah ; set to frame format 0835 89 44 77 mov word ptr [si].frame+fdr_data_hdr,ax ; 0838 86 C4 xchg al,ah 083A 2D 0004 sub ax,4 ; ax = number of bytes read 083D 3B C1 cmp ax,cx ; set flags 083F 74 07 je gdf_not_last ; if last frame then set eof flag bit 0841 C6 44 76 80 mov byte ptr [si].frame+fdr_flags,EOF_FLAG 0845 EB 05 90 jmp fdr_set_rest 0848 gdf_not_last: 0848 C6 44 76 00 mov byte ptr [si].frame+fdr_flags,0 ; 084C fdr_set_rest: ; set SEQ_NUM in frame 084C 8B 44 12 mov ax,word ptr [si].seq_number 084F 89 44 66 mov word ptr [si].frame+fdr_seq_number,ax 0852 8B 44 14 mov ax,word ptr [si].seq_number+2 0855 89 44 68 mov word ptr [si].frame+fdr_seq_number+2,ax ; ; update the seq_number in the RCB 0858 80 44 15 01 add byte ptr [si].seq_number+3,1 085C 80 54 14 00 adc byte ptr [si].seq_number+2,0 0860 80 54 13 00 adc byte ptr [si].seq_number+1,0 0864 80 54 12 00 adc byte ptr [si].seq_number,0 ; 0868 F8 clc ; cf = 0 for good return ; 0869 gdf_end: 0869 58 pop ax ; restore registers 086A C3 ret 086B set_fdr_var endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-48 SAMPLDR program listing page ;******************************************************************** ;* set_file_ptr ;* This routine set the file pointer in the boot file ;* in preparation for a read. ;* offset into boot file = max_frame * seq_number ;* ;* input ;* ds:si = address of RCB ;* ;* output ;* ax,bx,cx,dx destroyed ;* all other registers preserved ;* cf = 1 if error ;* cf = 0 if no error ;* ;******************************************************************** 086B 90 even 086C set_file_ptr proc ; ; ; cx = max frame 086C 8B 4C 10 mov cx,[si].max_frame 086F 33 D2 xor dx,dx ; dx = 0 ; ax = low order word of seq_number 0871 8B 44 14 mov ax,word ptr [si].seq_number+2 0874 86 C4 xchg al,ah 0876 F7 E1 mul cx ; dx:ax = max_frame * low order word of seq_number 0878 50 push ax ; save ds:ax 0879 8B DA mov bx,dx 087B 8B 44 12 mov ax,word ptr [si].seq_number 087E 86 C4 xchg al,ah 0880 33 D2 xor dx,dx 0882 F7 E1 mul cx ; dx:ax = max_frame * high order word of seq_number 0884 72 0E jc sfp_end ; if cf = 1 then offset is out of range 0886 03 C3 add ax,bx ; set high order portion of offset in cx 0888 8B C8 mov cx,ax 088A 5A pop dx ; set low order portion of offset in dx ; 088B B8 4200 mov ax,BSEEK ; seek from the beginning of the file 088E 8B 1E 2091 R mov bx,boothandle ; bx = file handle 0892 CD 21 int DOS ; call DOS ; 0894 sfp_end: 0894 C3 ret 0895 set_file_ptr endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-49 SAMPLDR program listing page ;******************************************************************** ;* read_boot ;* This routine reads max_frame bytes from the boot file ;* into the load_data buffer of the RCB as ds:si. ;* ;* input ;* ds:si = address of RCB ;* ;* output ;* ax = number of bytes read from boot file if cf = 0 ;* cx = number of bytes requested to be read ;* bx,dx destroyed ;* all other registers preserved ;* cf = 1 if error ;* cf = 0 if no error ;* ;******************************************************************** 0895 90 even 0896 read_boot proc ; 0896 B4 3F mov ah,DOSREAD ; set function code to READ 0898 8B 1E 2091 R mov bx,boothandle ; bx = handle of boot file ; cx = number of bytes to read 089C 8B 4C 10 mov cx,[si].max_frame ; ds:dx = read buffer 089F 8D 94 00CC lea dx,[si].load_data ; 08A3 CD 21 int DOS ; do the read ; 08A5 C3 ret 08A6 read_boot endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-50 SAMPLDR program listing page ;******************************************************************** ;* send_ler ;* This routine sends a LOAD.ERROR.RESPONSE frame ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ax = ERROR_CODE for LOAD.ERROR.RESPONSE frame ;* ;* output ;* all registers preserved ;* ;******************************************************************** even 08A6 send_ler proc ; 08A6 50 push ax ; save registers 08A7 51 push cx 08A8 57 push di 08A9 53 push bx 08AA 56 push si ; 08AB E8 04FA R call get_rcb ; allocate resources to send frame 08AE 73 03 jnc sl_name_len ; if resources available then continue 08B0 E9 0982 R jmp sl_end ; else exit ; 08B3 sl_name_len: ; get length of filename 08B3 8B 4F 3A mov cx,word ptr program_length[bx] 08B6 86 CD xchg cl,ch 08B8 83 F9 53 cmp cx,FIND_SIZE-4 08BB 74 16 je sl_nofile ; if no file_hdr then no filename specified 08BD 8B 8F 008F mov cx,sfr_file_hdr[bx+2] 08C1 81 F9 1340 cmp cx,FILE_HDR2 ; is this a file header 08C5 75 0C jne sl_nofile ; if not then no filename specified ; ; ax = length of filename 08C7 8B 8F 008D mov cx,sfr_file_hdr[bx] 08CB 86 CD xchg cl,ch ; change to Intel format 08CD 83 E9 04 sub cx,4 ; subtract length of file header 08D0 EB 03 90 jmp sl_fill_frame ; 08D3 sl_nofile: 08D3 33 C9 xor cx,cx ; length of filename = 0 ; 08D5 sl_fill_frame: 08D5 83 C1 0E add cx,LERL ; set length of LOAD.ERROR RESPONSE frame 08D8 86 CD xchg cl,ch ; fix format for frame 08DA 89 4C 5E mov word ptr [si].frame+ler_length,cx 08DD 86 CD xchg cl,ch ; change to Intel format ; set length of BUFFER_ONE 08DF 89 4C 26 mov [si].trn_len1,cx 08E2 83 E9 0E sub cx,LERL ; ; PROGRAM_COMMAND = 00 40 08E5 C7 44 60 4000 mov word ptr [si].frame+ler_command,LERC ; ERROR_HDR = 00 06 40 1A 08EA C7 44 62 0600 mov word ptr [si].frame+ler_error_hdr,ERR_HDR1 08EF C7 44 64 1A40 mov word ptr [si].frame+ler_error_hdr+2,ERR_HDR2 ; ERROR_CODE = ax 08F4 89 44 66 mov word ptr [si].frame+ler_error_code,ax 08F7 83 C1 04 add cx,4 ; set FILE_HDR 08FA 86 CD xchg cl,ch 08FC 89 4C 68 mov word ptr [si].frame+ler_file_hdr,cx 08FF C7 44 6A 1340 mov word ptr [si].frame+ler_file_hdr+2,FILE_HDR2 0904 86 CD xchg cl,ch 0906 83 E9 04 sub cx,4 ; 0909 56 push si ; copy filename from SAP buffer to LER ; es:di = destination 090A 8D 7C 6C lea di,[si].frame+ler_file_name ; ds:si = source 090D 8D B7 0091 lea si,sfr_file_name[bx] 0911 FC cld 0912 F3/ A4 rep movsb 0914 5E pop si ; ; fill in the LAN header  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-51 SAMPLDR program listing ; copy source addr from SAP buffer 0915 8B 47 1E mov ax,lan_source_addr[bx] 0918 25 FF7F and ax,0ff7fh 091B 89 44 40 mov word ptr [si].lan_dest,ax 091E 8B 47 20 mov ax,lan_source_addr[bx+2] 0921 89 44 42 mov word ptr [si].lan_dest+2,ax 0924 8B 47 22 mov ax,lan_source_addr[bx+4] 0927 89 44 44 mov word ptr [si].lan_dest+4,ax ; ; copy any routing infor 092A 8A 4F 14 mov cl,r_lan_header_length[bx] 092D 32 ED xor ch,ch ; set length of islands buffer 092F 89 4C 38 mov [si].lan_len_buf,cx 0932 83 E9 0E sub cx,14 ; ax = length of routing info 0935 56 push si ; es:di = copy to 0936 8D 7C 4C lea di,[si].lan_route ; ds:si = copy from 0939 8D 77 24 lea si,lan_routing_info[bx] 093C FC cld 093D F3/ A4 rep movsb 093F 5E pop si 0940 80 64 4C 1F and byte ptr [si].lan_route,1fh 0944 80 74 4D 80 xor byte ptr [si].lan_route+1,80h ; ; fill in the CCB ; CCB_ADAPTER = 0 ; CCB_COMMAND = 0DH 0948 C6 44 01 0D mov byte ptr [si].ccb_cmd,0dh ; CCB_RETCODE = 0 094C C6 44 02 00 mov byte ptr [si].ccb_rc,0 ; CCB_WORK = 0 0950 C6 44 03 00 mov byte ptr [si].ccb_work,0 ; CCB_POINTER = 0 0954 C7 44 04 0000 mov word ptr [si].ccb_pointer,0 0959 C7 44 06 0000 mov word ptr [si].ccb_pointer+2,0 ; CCB_CMD_CPL = ler_appen 095E C7 44 08 025C R mov word ptr [si].ccb_cc,offset ler_appen 0963 8C 4C 0A mov word ptr [si].ccb_cc+2,cs ; CCB_PARM_TAB = transmit table for this ccb 0966 8C 5C 0E mov word ptr [si].ccb_pt+2,ds ; ; fill in the transmit parameter table ; STATION_ID = id return from DLC.OPEN.SAP 0969 A1 0539 R mov ax,word ptr rcv_tbl2 096C 89 44 1A mov [si].trn_sid,ax 096F C6 44 1C 00 mov [si].trn_fs,0 ; TRANSMIT_FS = 0 ; RSAP = FCh ; XMIT_QUEUE_ONE = addr of lan header 0973 8C 5C 20 mov word ptr [si].trn_q1+2,ds ; XMIT_QUEUE_TWO = 0 ; BUFFER_LEN_ONE = length of LOAD.ERROR.RESPONSE frame ; BUFFER_LEN_TWO = 0 0976 C7 44 28 0000 mov [si].trn_len2,0 ; BUFFER_ONE = addr of LOAD.ERROR.RESPONSE frame 097B 8C 5C 2C mov word ptr [si].trn_buf1+2,ds ; 097E 8B DE mov bx,si ; es:bx = addr of CCB 0980 CD 5C int ADPTR_INT ; issue the CCB ; 0982 sl_end: 0982 5E pop si ; restore registers 0983 5B pop bx 0984 5F pop di 0985 59 pop cx 0986 58 pop ax 0987 C3 ret 0988 send_ler endp  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-52 SAMPLDR program listing page ;******************************************************************** ;* alert_sub ;* This routine processes ALERT frames from requesting devices ;* ;* input ;* es:bx = address of SAP buffer ;* ds = es ;* ;* output ;* all registers preserved ;* ;******************************************************************** even 0988 alert_sub proc ; 0988 56 push si ; save registers ; 0989 E8 070C R call find_rcb ; find RCB associated with this ; requesting device 098C 72 04 jc al_end ; if not found then nothing to do ; ; turn alert flag on 098E C6 44 16 01 mov [si].alrt_flag,ON ; 0992 al_end: 0992 5E pop si ; restore registers 0993 C3 ret 0994 alert_sub endp ; 0994 code ends  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE 1-53 SAMPLDR program listing page ;******************************************************************** ; STACK SEGMENT * ;******************************************************************** 0000 stack segment stack 0000 0200 [ dw 512 dup (?) ???? ] 0400 stack ends end start  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-1 SAMPLDR program listing Structures and records: N a m e Width # fields Shift Width Mask Initial RCB. . . . . . . . . . . . . . . 06CC 0020 CCB_ADAPTER. . . . . . . . . . . 0000 CCB_CMD. . . . . . . . . . . . . 0001 CCB_RC . . . . . . . . . . . . . 0002 CCB_WORK . . . . . . . . . . . . 0003 CCB_POINTER. . . . . . . . . . . 0004 CCB_CC . . . . . . . . . . . . . 0008 CCB_PT . . . . . . . . . . . . . 000C MAX_FRAME. . . . . . . . . . . . 0010 SEQ_NUMBER . . . . . . . . . . . 0012 ALRT_FLAG. . . . . . . . . . . . 0016 RCB_CNTR . . . . . . . . . . . . 0017 NEXT . . . . . . . . . . . . . . 0018 TRN_SID. . . . . . . . . . . . . 001A TRN_FS . . . . . . . . . . . . . 001C TRN_RSAP . . . . . . . . . . . . 001D TRN_Q1 . . . . . . . . . . . . . 001E TRN_Q2 . . . . . . . . . . . . . 0022 TRN_LEN1 . . . . . . . . . . . . 0026 TRN_LEN2 . . . . . . . . . . . . 0028 TRN_BUF1 . . . . . . . . . . . . 002A TRN_BUF2 . . . . . . . . . . . . 002E LAN_NEXT . . . . . . . . . . . . 0032 LAN_RESERVED . . . . . . . . . . 0036 LAN_LEN_BUF. . . . . . . . . . . 0038 LAN_USER_DATA. . . . . . . . . . 003A LAN_USER_LEN . . . . . . . . . . 003C LAN_FS . . . . . . . . . . . . . 003E LAN_DEST . . . . . . . . . . . . 0040 LAN_SOURCE . . . . . . . . . . . 0046 LAN_ROUTE. . . . . . . . . . . . 004C FRAME. . . . . . . . . . . . . . 005E LOAD_DATA. . . . . . . . . . . . 00CC Segments and groups: N a m e Size align combine class CODE . . . . . . . . . . . . . . 0994 PARA PUBLIC DATA . . . . . . . . . . . . . . 2094 PARA NONE STACK. . . . . . . . . . . . . . 0400 PARA STACK Symbols: N a m e Type Value Attr AC_EXIT. . . . . . . . . . . . . L NEAR 00BA CODE ADPTR_INT. . . . . . . . . . . . Number 005C ALERT. . . . . . . . . . . . . . Number 3000 ALERT_SUB. . . . . . . . . . . . N PROC 0988 CODE Length =000C ALR_ADAPTER_EC . . . . . . . . . Number 0083 ALR_ADAPTER_ID . . . . . . . . . Number 0081 ALR_CLASS_HDR. . . . . . . . . . Number 0050 ALR_CONN_CLASS . . . . . . . . . Number 0054 ALR_EQUIP_FLAGS. . . . . . . . . Number 0075 ALR_FILE_HDR . . . . . . . . . . Number 008D ALR_FILE_NAME. . . . . . . . . . Number 0091 ALR_FRAME_HDR. . . . . . . . . . Number 004A ALR_INFO_HDR . . . . . . . . . . Number 0046 ALR_LOADER_HDR . . . . . . . . . Number 0069 ALR_LSAP_HDR . . . . . . . . . . Number 0060 ALR_MACH_CONF. . . . . . . . . . Number 006D ALR_MAX_FRAME. . . . . . . . . . Number 004E ALR_MEMORY_SIZE. . . . . . . . . Number 0077 ALR_MODULE_EC. . . . . . . . . . Number 0079 ALR_RSAP . . . . . . . . . . . . Number 0064 ALR_SEARCH_HDR . . . . . . . . . Number 0065 ALR_SEQ_HDR. . . . . . . . . . . Number 003E ALR_SEQ_NUM. . . . . . . . . . . Number 0042 ALR_SOURCE_ADDR. . . . . . . . . Number 005A ALR_SOURCE_HDR . . . . . . . . . Number 0056 ALT_Q. . . . . . . . . . . . . . Number 1000 AL_END . . . . . . . . . . . . . L NEAR 0992 CODE APO_DHB. . . . . . . . . . . . . L BYTE 02A8 DATA APO_DHB_BUF_LEN. . . . . . . . . L WORD 02A6 DATA  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-2 SAMPLDR program listing APO_FUNC_ADDR. . . . . . . . . . L BYTE 029E DATA APO_GRP_ADDR . . . . . . . . . . L DWORD 029A DATA APO_NODE_ADDR. . . . . . . . . . L BYTE 0294 DATA Length =0006 APO_NUM_RCV_BUF. . . . . . . . . L WORD 02A2 DATA APO_OEC. . . . . . . . . . . . . L WORD 0290 DATA APO_OPEN_LOCK. . . . . . . . . . L WORD 02AA DATA APO_OPEN_OPTS. . . . . . . . . . L WORD 0292 DATA APO_PID_ADDR . . . . . . . . . . L DWORD 02AC DATA APO_RCV_BUF_LEN. . . . . . . . . L WORD 02A4 DATA APO_TBL. . . . . . . . . . . . . L BYTE 0290 DATA ASCIINUMS. . . . . . . . . . . . L BYTE 0247 DATA BADDOS . . . . . . . . . . . . . L BYTE 0001 DATA BAD_CARD_MC. . . . . . . . . . . Number 0003 BF_1ST_BUF . . . . . . . . . . . L DWORD 054E DATA BF_BUF_LEFT. . . . . . . . . . . L WORD 0548 DATA BF_PT. . . . . . . . . . . . . . L BYTE 0546 DATA BF_SID . . . . . . . . . . . . . L WORD 0546 DATA BOOTHANDLE . . . . . . . . . . . L WORD 2091 DATA BOOTNAME . . . . . . . . . . . . L BYTE 2084 DATA BRDCST . . . . . . . . . . . . . Number 0082 BSEEK. . . . . . . . . . . . . . Number 4200 CARRIAGE_RETURN. . . . . . . . . Number 000D CHK_AI . . . . . . . . . . . . . L NEAR 001F CODE CLASS1 . . . . . . . . . . . . . Number 0100 CLASS_HDR1 . . . . . . . . . . . Number 0600 CLASS_HDR2 . . . . . . . . . . . Number 0A40 CLF_END. . . . . . . . . . . . . L NEAR 07C7 CODE CLOSE. . . . . . . . . . . . . . N PROC 03E6 CODE Length =0042 CLOSE_FILE . . . . . . . . . . . N PROC 07B2 CODE Length =0018 CLS_WAIT . . . . . . . . . . . . L NEAR 0420 CODE CORR_HDR1. . . . . . . . . . . . Number 0800 CORR_HDR2. . . . . . . . . . . . Number 0340 CPYWRT . . . . . . . . . . . . . L BYTE 0041 DATA DATA_HDR2. . . . . . . . . . . . Number 1840 DEST_HDR1. . . . . . . . . . . . Number 0A00 DEST_HDR2. . . . . . . . . . . . Number 0C40 DIR_INIT . . . . . . . . . . . . N PROC 026A CODE Length =0050 DIR_OPEN . . . . . . . . . . . . N PROC 02BA CODE Length =0063 DIR_STATUS . . . . . . . . . . . N PROC 031E CODE Length =0051 DI_AD_CHK_EX . . . . . . . . . . L DWORD 0274 DATA DI_BU. . . . . . . . . . . . . . L WORD 026C DATA DI_OK. . . . . . . . . . . . . . L NEAR 02B8 CODE DI_PC_ERR_EX . . . . . . . . . . L DWORD 027C DATA DI_PT. . . . . . . . . . . . . . L BYTE 026C DATA DI_RESERVED. . . . . . . . . . . L DWORD 0270 DATA DI_RET . . . . . . . . . . . . . L NEAR 02B9 CODE DI_RS_EX . . . . . . . . . . . . L DWORD 0278 DATA DI_SRAM_ADDR . . . . . . . . . . L WORD 026E DATA DLC_CONTROL. . . . . . . . . . . Number 0038 DLC_DSAP . . . . . . . . . . . . Alias R_DLC_HEADER DLC_MAX_GMEM . . . . . . . . . . L BYTE 02CF DATA DLC_MAX_GSAP . . . . . . . . . . L BYTE 02CE DATA DLC_MAX_SAP. . . . . . . . . . . L BYTE 02CC DATA DLC_MAX_STA. . . . . . . . . . . L BYTE 02CD DATA DLC_SSAP . . . . . . . . . . . . Number 0037 DLC_T1_1 . . . . . . . . . . . . L BYTE 02D0 DATA DLC_T1_2 . . . . . . . . . . . . L BYTE 02D3 DATA DLC_T2_1 . . . . . . . . . . . . L BYTE 02D1 DATA DLC_T2_2 . . . . . . . . . . . . L BYTE 02D4 DATA DLC_TBL. . . . . . . . . . . . . L BYTE 02CC DATA DLC_TI_1 . . . . . . . . . . . . L BYTE 02D2 DATA DLC_TI_2 . . . . . . . . . . . . L BYTE 02D5 DATA DOS. . . . . . . . . . . . . . . Number 0021 DOSREAD. . . . . . . . . . . . . Number 003F DOS_CLOSE. . . . . . . . . . . . Number 003E DOS_TERMINATE. . . . . . . . . . Number 4C00 DO_AP. . . . . . . . . . . . . . L DWORD 0280 DATA DO_DLC . . . . . . . . . . . . . L DWORD 0288 DATA DO_DP. . . . . . . . . . . . . . L DWORD 0284 DATA DO_MC. . . . . . . . . . . . . . Number 0001 DO_MSG . . . . . . . . . . . . . L DWORD 028C DATA DO_OK. . . . . . . . . . . . . . L NEAR 031B CODE DO_PT. . . . . . . . . . . . . . L BYTE 0280 DATA DO_RET . . . . . . . . . . . . . L NEAR 031C CODE DO_WAIT. . . . . . . . . . . . . L NEAR 0307 CODE DP_AD_CHK_EX . . . . . . . . . . L DWORD 02B8 DATA DP_DIR_BUF_SIZE. . . . . . . . . L WORD 02B0 DATA DP_DIR_POOL_ADR. . . . . . . . . L DWORD 02B4 DATA DP_DIR_POOL_LEN. . . . . . . . . L WORD 02B2 DATA  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-3 SAMPLDR program listing DP_PCE_EX. . . . . . . . . . . . L DWORD 02C0 DATA DP_RS_EX . . . . . . . . . . . . L DWORD 02BC DATA DP_TBL . . . . . . . . . . . . . L BYTE 02B0 DATA DP_WORK_ADR. . . . . . . . . . . L DWORD 02C4 DATA DP_WRK_LEN_ACT . . . . . . . . . L WORD 02CA DATA DP_WRK_LEN_REQ . . . . . . . . . L WORD 02C8 DATA DS_AD_CONFIG . . . . . . . . . . L BYTE 02EF DATA DS_CHK . . . . . . . . . . . . . L NEAR 0360 CODE DS_MC. . . . . . . . . . . . . . Number 0002 DS_OK. . . . . . . . . . . . . . L NEAR 036D CODE DS_PT. . . . . . . . . . . . . . L BYTE 02D6 DATA Length =0019 DS_RET . . . . . . . . . . . . . L NEAR 036E CODE EOF_FLAG . . . . . . . . . . . . Number 0080 EOS. . . . . . . . . . . . . . . Number 0000 ERROUT . . . . . . . . . . . . . N PROC 0486 CODE Length =001F ERR_EXIT . . . . . . . . . . . . L NEAR 00AA CODE ERR_HDR1 . . . . . . . . . . . . Number 0600 ERR_HDR2 . . . . . . . . . . . . Number 1A40 EXIT . . . . . . . . . . . . . . L NEAR 00B1 CODE EXIT2. . . . . . . . . . . . . . L NEAR 00B4 CODE FATAL. . . . . . . . . . . . . . L BYTE 012C DATA FC . . . . . . . . . . . . . . . Number 0200 FDRC . . . . . . . . . . . . . . Number 2000 FDRL . . . . . . . . . . . . . . Number 001D FDR_COMMAND. . . . . . . . . . . Number 0002 FDR_DATA_HDR . . . . . . . . . . Number 0019 FDR_FLAGS. . . . . . . . . . . . Number 0018 FDR_LENGTH . . . . . . . . . . . Number 0000 FDR_LOADER_HDR . . . . . . . . . Number 000C FDR_LOCATE_ADDR. . . . . . . . . Number 0010 FDR_SEQ_HDR. . . . . . . . . . . Number 0004 FDR_SEQ_NUMBER . . . . . . . . . Number 0008 FDR_SET_REST . . . . . . . . . . L NEAR 084C CODE FDR_XFER_ADDR. . . . . . . . . . Number 0014 FILE_HDR2. . . . . . . . . . . . Number 1340 FILE_NOT_FND . . . . . . . . . . Number 0200 FILE_USE . . . . . . . . . . . . L BYTE 2093 DATA FIND . . . . . . . . . . . . . . Number 0100 FIND_RCB . . . . . . . . . . . . N PROC 070C CODE Length =0038 FIND_SIZE. . . . . . . . . . . . Number 0057 FIN_ADAPTER_EC . . . . . . . . . Number 0083 FIN_ADAPTER_ID . . . . . . . . . Number 0081 FIN_CLASS_HDR. . . . . . . . . . Number 0050 FIN_CONN_CLASS . . . . . . . . . Number 0054 FIN_CORRELATOR . . . . . . . . . Number 0042 FIN_CORR_HDR . . . . . . . . . . Number 003E FIN_EQUIP_FLAGS. . . . . . . . . Number 0075 FIN_FILE_HDR . . . . . . . . . . Number 008D FIN_FILE_NAME. . . . . . . . . . Number 0091 FIN_FRAME_HDR. . . . . . . . . . Number 004A FIN_INFO_HDR . . . . . . . . . . Number 0046 FIN_LOADER_HDR . . . . . . . . . Number 0069 FIN_LSAP_HDR . . . . . . . . . . Number 0060 FIN_MACH_CONF. . . . . . . . . . Number 006D FIN_MAX_FRAME. . . . . . . . . . Number 004E FIN_MEMORY_SIZE. . . . . . . . . Number 0077 FIN_MODULE_EC. . . . . . . . . . Number 0079 FIN_RSAP . . . . . . . . . . . . Number 0064 FIN_SEARCH_HDR . . . . . . . . . Number 0065 FIN_SOURCE_ADDR. . . . . . . . . Number 005A FIN_SOURCE_HDR . . . . . . . . . Number 0056 FL . . . . . . . . . . . . . . . Number 3A00 FND_APPEN. . . . . . . . . . . . L NEAR 0204 CODE FND_CLASSCK. . . . . . . . . . . L NEAR 0536 CODE FND_END. . . . . . . . . . . . . L NEAR 065C CODE FND_GET. . . . . . . . . . . . . L NEAR 0540 CODE FND_OK . . . . . . . . . . . . . L NEAR 0548 CODE FND_SET. . . . . . . . . . . . . L NEAR 0556 CODE FOUND. . . . . . . . . . . . . . N PROC 052C CODE Length =0133 FOU_CLASS_HDR. . . . . . . . . . Number 002F FOU_COMMAND. . . . . . . . . . . Number 0002 FOU_CONN_CLASS . . . . . . . . . Number 0033 FOU_CORR . . . . . . . . . . . . Number 0008 FOU_CORR_HDR . . . . . . . . . . Number 0004 FOU_DEST_ADDR. . . . . . . . . . Number 0015 FOU_DEST_HDR . . . . . . . . . . Number 0011 FOU_FRAME_HDR. . . . . . . . . . Number 0029 FOU_INFO_HDR . . . . . . . . . . Number 0025 FOU_LENGTH . . . . . . . . . . . Number 0000  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-4 SAMPLDR program listing FOU_LSAP_HDR . . . . . . . . . . Number 0035 FOU_MAX_FRAME. . . . . . . . . . Number 002D FOU_RESP_CODE. . . . . . . . . . Number 0010 FOU_RESP_HDR . . . . . . . . . . Number 000C FOU_RSAP . . . . . . . . . . . . Number 0039 FOU_SOURCE_ADDR. . . . . . . . . Number 001F FOU_SOURCE_HDR . . . . . . . . . Number 001B FRAME_HDR1 . . . . . . . . . . . Number 0600 FRAME_HDR2 . . . . . . . . . . . Number 0940 FR_END . . . . . . . . . . . . . L NEAR 0740 CODE FR_FOUND . . . . . . . . . . . . L NEAR 073C CODE FR_LOOP. . . . . . . . . . . . . L NEAR 0718 CODE FR_NEXT. . . . . . . . . . . . . L NEAR 072F CODE GDF_END. . . . . . . . . . . . . L NEAR 0869 CODE GDF_NOT_LAST . . . . . . . . . . L NEAR 0848 CODE GET_CUR. . . . . . . . . . . . . Number 0003 GET_DOS. . . . . . . . . . . . . Number 0030 GET_KS . . . . . . . . . . . . . Number 0000 GET_PAGE . . . . . . . . . . . . Number 000F GET_RCB. . . . . . . . . . . . . N PROC 04FA CODE Length =0023 GET_STATUS . . . . . . . . . . . L NEAR 0088 CODE GET_VEC. . . . . . . . . . . . . Number 0035 GOOD_DOS . . . . . . . . . . . . Number 0002 GR_END . . . . . . . . . . . . . L NEAR 051B CODE HXSTR. . . . . . . . . . . . . . L BYTE 0257 DATA HXTOA. . . . . . . . . . . . . . N PROC 04A6 CODE Length =0022 HXTOA1 . . . . . . . . . . . . . L NEAR 04AF CODE IIB_CKNAME . . . . . . . . . . . L NEAR 04D9 CODE IIB_END. . . . . . . . . . . . . L NEAR 04F6 CODE IIB_FINAL_CHK. . . . . . . . . . L NEAR 04EC CODE IIB_SAME . . . . . . . . . . . . L NEAR 04F5 CODE INFO_HDR1. . . . . . . . . . . . Number 1000 INFO_HDR2. . . . . . . . . . . . Number 0800 INIT_ADPTR . . . . . . . . . . . L NEAR 004C CODE INIT_MC. . . . . . . . . . . . . Number 0000 INIT_RETRY . . . . . . . . . . . L NEAR 004A CODE INSTALLED. . . . . . . . . . . . L BYTE 00F1 DATA IN_USE . . . . . . . . . . . . . Number FFFF IS_IT_BOOT . . . . . . . . . . . N PROC 04C8 CODE Length =0032 I_CCB. . . . . . . . . . . . . . L BYTE 025C DATA I_CCB_ADAPTER. . . . . . . . . . L BYTE 025C DATA I_CCB_CC . . . . . . . . . . . . L DWORD 0264 DATA I_CCB_CMD. . . . . . . . . . . . L BYTE 025D DATA I_CCB_PT . . . . . . . . . . . . L DWORD 0268 DATA I_CCB_PTR. . . . . . . . . . . . L DWORD 0260 DATA I_CCB_RC . . . . . . . . . . . . L BYTE 025E DATA I_CCB_WRK. . . . . . . . . . . . L BYTE 025F DATA KB_STATUS. . . . . . . . . . . . Number 0001 KEYBOARD . . . . . . . . . . . . Number 0016 LAN_DEST_ADDR. . . . . . . . . . Number 0018 LAN_ROUTING_INFO . . . . . . . . Number 0024 LAN_SOURCE_ADDR. . . . . . . . . Number 001E LASTLINE . . . . . . . . . . . . Number 0019 LDR_HDR1 . . . . . . . . . . . . Number 0D00 LDR_HDR2 . . . . . . . . . . . . Number 14C0 LERC . . . . . . . . . . . . . . Number 4000 LERL . . . . . . . . . . . . . . Number 000E LER_APPEN. . . . . . . . . . . . L NEAR 025C CODE LER_COMMAND. . . . . . . . . . . Number 0002 LER_ERROR_CODE . . . . . . . . . Number 0008 LER_ERROR_HDR. . . . . . . . . . Number 0004 LER_FILE_HDR . . . . . . . . . . Number 000A LER_FILE_NAME. . . . . . . . . . Number 000E LER_LENGTH . . . . . . . . . . . Number 0000 LINEFEED . . . . . . . . . . . . Number 000A LOAD_SAP . . . . . . . . . . . . Number 00F8 LOWER_RIGHT. . . . . . . . . . . Number 184F LSAP_HDR1. . . . . . . . . . . . Number 0500 LSAP_HDR2. . . . . . . . . . . . Number 0740 MAXFRAME . . . . . . . . . . . . Number 0600 MSG_SIZE . . . . . . . . . . . . Number 002A MSG_TBL. . . . . . . . . . . . . L BYTE 0175 DATA NORMAL . . . . . . . . . . . . . Number 0007 NOT_DONE . . . . . . . . . . . . Number 00FF NOT_LF . . . . . . . . . . . . . L NEAR 0452 CODE NOT_TOK. . . . . . . . . . . . . Number 0080 NO_ADP_SUP . . . . . . . . . . . L NEAR 0040 CODE NO_AI. . . . . . . . . . . . . . L BYTE 0025 DATA NO_RCB . . . . . . . . . . . . . L NEAR 051A CODE  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-5 SAMPLDR program listing NULL . . . . . . . . . . . . . . Number 0000 OFF. . . . . . . . . . . . . . . Number 0000 ON . . . . . . . . . . . . . . . Number 0001 OPEN_FILE. . . . . . . . . . . . N PROC 0790 CODE Length =0022 OPEN_SAP . . . . . . . . . . . . N PROC 0370 CODE Length =005B OPF_BAD_RET. . . . . . . . . . . L NEAR 07AE CODE OPF_END. . . . . . . . . . . . . L NEAR 07AF CODE OPF_GOOD_RET . . . . . . . . . . L NEAR 07A6 CODE OSP_BUF_SIZE . . . . . . . . . . L WORD 0324 DATA OSP_GROUP_CNT. . . . . . . . . . L BYTE 031B DATA OSP_GROUP_LIST . . . . . . . . . L DWORD 031C DATA OSP_I_FIELD. . . . . . . . . . . L WORD 0314 DATA OSP_MAXIN. . . . . . . . . . . . L BYTE 0310 DATA OSP_MAXOUT . . . . . . . . . . . L BYTE 030F DATA OSP_MAXOUT_INCR. . . . . . . . . L BYTE 0311 DATA OSP_MAX_MEMBERS. . . . . . . . . L BYTE 0313 DATA OSP_MAX_RETRY. . . . . . . . . . L BYTE 0312 DATA OSP_MC . . . . . . . . . . . . . Number 0004 OSP_OK . . . . . . . . . . . . . L NEAR 03C9 CODE OSP_OPTIONS. . . . . . . . . . . L BYTE 0317 DATA OSP_POOL_ADR . . . . . . . . . . L DWORD 0328 DATA OSP_POOL_LEN . . . . . . . . . . L WORD 0326 DATA OSP_PT . . . . . . . . . . . . . L BYTE 0308 DATA OSP_RET. . . . . . . . . . . . . L NEAR 03CA CODE OSP_SAP_VALUE. . . . . . . . . . L BYTE 0316 DATA OSP_SID. . . . . . . . . . . . . L WORD 0308 DATA OSP_STATUS_EX. . . . . . . . . . L DWORD 0320 DATA OSP_STAT_CNT . . . . . . . . . . L BYTE 0318 DATA OSP_TIMER_T1 . . . . . . . . . . L BYTE 030C DATA OSP_TIMER_T2 . . . . . . . . . . L BYTE 030D DATA OSP_TIMER_TI . . . . . . . . . . L BYTE 030E DATA OSP_USV. . . . . . . . . . . . . L WORD 030A DATA OSP_WAIT . . . . . . . . . . . . L NEAR 03B5 CODE OVRHD. . . . . . . . . . . . . . Number 007B PRINT_CHAR . . . . . . . . . . . Number 0009 PRINT_DONE . . . . . . . . . . . L NEAR 0468 CODE PRINT_MSG. . . . . . . . . . . . N PROC 0428 CODE Length =0045 PROGRAM_COMMAND. . . . . . . . . Number 003C PROGRAM_LENGTH . . . . . . . . . Alias R_DATA PUT_RCB. . . . . . . . . . . . . N PROC 051E CODE Length =000D RCB1 . . . . . . . . . . . . . . L 06CC 0552 DATA RCB2 . . . . . . . . . . . . . . L 06CC 0C1E DATA RCB3 . . . . . . . . . . . . . . L 06CC 12EA DATA RCB4 . . . . . . . . . . . . . . L 06CC 19B6 DATA RCB_CNT. . . . . . . . . . . . . Number 0004 RCB_FREE . . . . . . . . . . . . L WORD 2082 DATA RCB_SIZE . . . . . . . . . . . . Number 06CC RCV_APPEN. . . . . . . . . . . . L NEAR 00D6 CODE RCV_APPEN_EXIT . . . . . . . . . L NEAR 0146 CODE RCV_BUF1 . . . . . . . . . . . . L BYTE 032C DATA Length =00F0 RCV_BUF2 . . . . . . . . . . . . L BYTE 041C DATA Length =00F0 RCV_BUFFER . . . . . . . . . . . Number 0018 RCV_FATAL. . . . . . . . . . . . L NEAR 0141 CODE RCV_OPTIONS. . . . . . . . . . . Number 001C RCV_RCVD . . . . . . . . . . . . Number 0014 RCV_REISSUE. . . . . . . . . . . L NEAR 0138 CODE RCV_SID. . . . . . . . . . . . . Number 0010 RCV_TBL1 . . . . . . . . . . . . L BYTE 051C DATA RCV_TBL2 . . . . . . . . . . . . L BYTE 0539 DATA RCV_USER_LEN . . . . . . . . . . Number 0012 READ_BOOT. . . . . . . . . . . . N PROC 0896 CODE Length =0010 READ_OPEN. . . . . . . . . . . . Number 3D00 RECEIVE. . . . . . . . . . . . . N PROC 03CC CODE Length =001A RESP_HDR1. . . . . . . . . . . . Number 0500 RESP_HDR2. . . . . . . . . . . . Number 0B40 RETRY_CNT. . . . . . . . . . . . Number 0002 RPL_ALERT. . . . . . . . . . . . L NEAR 01AE CODE RPL_APPEN1 . . . . . . . . . . . L NEAR 0148 CODE RPL_APPEN2 . . . . . . . . . . . L NEAR 01A0 CODE RPL_FREEBF1. . . . . . . . . . . L NEAR 0153 CODE RPL_FREEBF2. . . . . . . . . . . L NEAR 01B8 CODE RS_EXIT. . . . . . . . . . . . . L NEAR 00C6 CODE RS_RET . . . . . . . . . . . . . L NEAR 00D5 CODE R_ADAPTER_NUM. . . . . . . . . . Number 0013 R_ADAPTER_OFFSET . . . . . . . . Number 0008 R_BUFFERS_LEFT . . . . . . . . . Number 0010 R_BUF_POINTER. . . . . . . . . . Number 0000 R_CCB1 . . . . . . . . . . . . . L BYTE 050C DATA R_CCB2 . . . . . . . . . . . . . L BYTE 0529 DATA  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-6 SAMPLDR program listing R_CCB_ADAPTER. . . . . . . . . . Number 0000 R_CCB_CC . . . . . . . . . . . . Number 0008 R_CCB_CMD. . . . . . . . . . . . Number 0001 R_CCB_PT . . . . . . . . . . . . Number 000C R_CCB_PTR. . . . . . . . . . . . Number 0004 R_CCB_RC . . . . . . . . . . . . Number 0002 R_CCB_WRK. . . . . . . . . . . . Number 0003 R_DATA . . . . . . . . . . . . . Number 003A R_DLC_HEADER . . . . . . . . . . Number 0036 R_DLC_HEADER_LENGTH. . . . . . . Number 0015 R_LAN_HEADER . . . . . . . . . . Number 0016 R_LAN_HEADER_LENGTH. . . . . . . Number 0014 R_LENGTH_IN_BUFFER . . . . . . . Number 0006 R_MESSAGE_TYPE . . . . . . . . . Number 000F R_OPTIONS. . . . . . . . . . . . Number 000E R_RCV_FS . . . . . . . . . . . . Number 0012 R_RCV_LEN. . . . . . . . . . . . Number 0004 R_STATION_ID . . . . . . . . . . Number 000C R_USER_LENGTH. . . . . . . . . . Number 000A SAMPLDR. . . . . . . . . . . . . F PROC 0000 CODE Global Length =0269 SAP_VAL. . . . . . . . . . . . . Number 00FC SCRLL. . . . . . . . . . . . . . Number 0006 SCROLL . . . . . . . . . . . . . N PROC 046E CODE Length =0017 SD_1ST . . . . . . . . . . . . . L NEAR 06AA CODE SD_CLASSCK . . . . . . . . . . . L NEAR 0672 CODE SD_CONDITIONAL . . . . . . . . . L NEAR 069B CODE SD_END . . . . . . . . . . . . . L NEAR 0706 CODE SD_GET . . . . . . . . . . . . . L NEAR 067C CODE SD_MAX_SET . . . . . . . . . . . L NEAR 06D1 CODE SD_SET_DONE. . . . . . . . . . . L NEAR 06A7 CODE SD_SET_MAX . . . . . . . . . . . L NEAR 06CC CODE SEND . . . . . . . . . . . . . . Number 1000 SEND_LER . . . . . . . . . . . . N PROC 08A6 CODE Length =00E2 SEQ_HDR1 . . . . . . . . . . . . Number 0800 SEQ_HDR2 . . . . . . . . . . . . Number 1140 SET_CUR. . . . . . . . . . . . . Number 0002 SET_CURSOR . . . . . . . . . . . L NEAR 0462 CODE SET_FDR_FIXED. . . . . . . . . . N PROC 07CA CODE Length =004D SET_FDR_VAR. . . . . . . . . . . N PROC 0818 CODE Length =0053 SET_FILE_PTR . . . . . . . . . . N PROC 086C CODE Length =0029 SFP_END. . . . . . . . . . . . . L NEAR 0894 CODE SFR_ADAPTER_EC . . . . . . . . . Number 0083 SFR_ADAPTER_ID . . . . . . . . . Number 0081 SFR_CLASS_HDR. . . . . . . . . . Number 0050 SFR_CONN_CLASS . . . . . . . . . Number 0054 SFR_EQUIP_FLAGS. . . . . . . . . Number 0075 SFR_FILE_HDR . . . . . . . . . . Number 008D SFR_FILE_NAME. . . . . . . . . . Number 0091 SFR_FRAME_HDR. . . . . . . . . . Number 004A SFR_INFO_HDR . . . . . . . . . . Number 0046 SFR_LOADER_HDR . . . . . . . . . Number 0069 SFR_LSAP_HDR . . . . . . . . . . Number 0060 SFR_MACH_CONF. . . . . . . . . . Number 006D SFR_MAX_FRAME. . . . . . . . . . Number 004E SFR_MEMORY_SIZE. . . . . . . . . Number 0077 SFR_MODULE_EC. . . . . . . . . . Number 0079 SFR_RSAP . . . . . . . . . . . . Number 0064 SFR_SEARCH_HDR . . . . . . . . . Number 0065 SFR_SEQ_HDR. . . . . . . . . . . Number 003E SFR_SEQ_NUM. . . . . . . . . . . Number 0042 SFR_SOURCE_ADDR. . . . . . . . . Number 005A SFR_SOURCE_HDR . . . . . . . . . Number 0056 SL_END . . . . . . . . . . . . . L NEAR 0982 CODE SL_FILL_FRAME. . . . . . . . . . L NEAR 08D5 CODE SL_NAME_LEN. . . . . . . . . . . L NEAR 08B3 CODE SL_NOFILE. . . . . . . . . . . . L NEAR 08D3 CODE SND_DATA . . . . . . . . . . . . N PROC 0660 CODE Length =00AB SOURCE_HDR1. . . . . . . . . . . Number 0A00 SOURCE_HDR2. . . . . . . . . . . Number 0640 START. . . . . . . . . . . . . . L NEAR 0000 CODE STAT_FLAG. . . . . . . . . . . . L BYTE 0000 DATA STILL_OK . . . . . . . . . . . . L NEAR 0099 CODE TRANSMIT_UI. . . . . . . . . . . N PROC 0744 CODE Length =004C TUI_CCB. . . . . . . . . . . . . L NEAR 0767 CODE TUI_END. . . . . . . . . . . . . L NEAR 078E CODE TUI_GET_DATA . . . . . . . . . . L NEAR 0756 CODE UA_END . . . . . . . . . . . . . L NEAR 025B CODE UA_FREE. . . . . . . . . . . . . L NEAR 0231 CODE UA_NEXT. . . . . . . . . . . . . L NEAR 023A CODE  The IBM Personal Computer MACRO Assembler 03-25-87 PAGE Symbols-7 SAMPLDR program listing UA_RETRY . . . . . . . . . . . . L NEAR 0222 CODE UA_SEND_IT . . . . . . . . . . . L NEAR 0245 CODE UI_APPEN . . . . . . . . . . . . L NEAR 020C CODE UPPER_LEFT . . . . . . . . . . . Number 0000 VIDEO. . . . . . . . . . . . . . Number 0010 WRITE_CHAR . . . . . . . . . . . L NEAR 045B CODE WRITE_STRING . . . . . . . . . . L NEAR 043A CODE Warning Severe Errors Errors 0 0