Original Post
I'm doing a project for a computer science class in which I have to send and receive data between to computers using serial cable communications. I'm using MASM to compile my code, and I keep getting the same error. The entire code and error are shown below. any help would be appreciated! .code main proc ;Serial communication program ;1. Initialize serial port ;Obtain the serial port address push ES xor AX,AX ;AX=0 mov ES,AX ;Set ES to segment base mov DX,ES:0400H ;Base address of COM1 pop ES ;Restore segment register ;at this point DX has the port address Initialize: mov ah, 0 ;Initialize opcode mov al, 10011010b ;Parameter data. (baud rate=1200, even parity, 1 stop bit, 7-bit word length) mov dx, 0 ;port=COM1. int 14h ;2. look for keyboard input ClrBuffer: mov ah, 1 ;Is a key available? int 16h mov ah, 0 ;Flush this character from the int 16h ; buffer and try again. jmp ClrBuffer BufferIsClr: mov cx, 0 ;Initialize "random" number. GenRandom: mov ah, 6 mov dl, FF int 21 cmp al, 0 jz ReceiveData ; Random number is now in CL, key pressed by user is in AX ;send character to serial port SendData: mov dx, 0 ;Select COM1: mov al, 'a' ;character to transmit mov ah, 1 ;Transmit opcode int 14h test ah, 80h ;Check for error jnz SerialError ;3. Receive data ReceiveData: mov dx, 0 ;Select COM1: mov ah, 2 ;Receive opcode int 14h test ah, 80h ;Check for error jnz SerialError ;print character to screen putc jmp GenRandom SerialError: print byte "There is an error in the serial transmission",cr,lf,0 jmp Initialize ret end main **************************** Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. Object filename [ee129.OBJ]: Source listing [NUL.LST]: Cross-reference [NUL.CRF]: End of file encountered on input file ee129.asm(1): warning A4085: End of file, no END directive End of file encountered on input file ee129.asm(1): warning A4085: End of file, no END directive 49048 + 394392 Bytes symbol space free 1 Warning Errors 1 Severe Errors