A89: Re: Re: Serial Communication in ASM


[Prev][Next][Index][Thread]

A89: Re: Re: Serial Communication in ASM




>I'm not exactly the one to answer all of your questions, but I think that
>the PC program only echos VT100 or other specific data over the serial
port.
>For this you would have to know about the VT100 standard and how it sends
>and receives data.  I have no idea where to find this information other
than
>that it is probably on the net somewhere.


I must say something about this otherwise everyone will be completely
confused.  VT100 is a terminal protocol, not a serial protocol.  By this I
mean it is at a higher level than serial.  VT100 contains a system of
commands for controlling the terminal end such as cursor controls, text
modes, arrow keys, and special functions.  If you send an 'A' to a VT100
terminal program, then it displays an 'A'.  If you send an 'A' to a dumb
terminal (non-VT100) then it will display an 'A' also.  However, if you send
a command across (which is a series of bytes), the VT100 terminal will pick
out the command and interpret the command while the dumb terminal won't
interpret it at all and instead it will just display it.  Basically what I'm
saying is that VT100 has nothing to do with how serial communication works.

>I think what your code does is just send binary data through the link port,
>and since it is not VT100 standard, the PC doesn't display it.  If the PC
>program did display anything, it would be in binary and look something
like:
>001010001110110010111001101000101110000110110010110101101101010101101010101
0
>10101010101010100101
>since it is twelve characters long. (8bits per char)

If you send a byte across the serial line, then the PC program will pick up
that byte and display the character that is represented by that byte number.
If you send a 97 across, then the PC program will display an 'a'.  To
display 1's and 0's would require more work on the PC program's part.

>I don't think baud rate has anything to do with this since this is a
>hardware thing and the GL has a constant baud of 9600, and the PC adapts to
>that.  Has anyone gotten the GL to do anything lower?  I've tried to
connect
>my GL to a very very old modem and it wouldn't work.

I believe this to be true.  Old hardware that never was around when things
operated at 9600bps+, will not work with the Graphlink.  However, most
modems nowadays can autodetect the baud rate.  I've plugged my Graphlink
into a US Robotics 56k external modem and the modem downspeeded to 9600bps
(of course, it did take some fiddling around with the switches on the back
of it).

>No handshaking is necessary in your example, since all the PC is doing is
>echoing (displaying) what is sent over the serial port you specified.

Yep.  There is no handshake in RS-232.  Some terminal programs have CTS/RTS
handshaking with separate pins (or Xon/Xoff which is software) but this is
not standard RS-232 which is simply two pins only: send and receive.  Yes,
even though you may have a 25pin serial cable, only 2 of those pins are
needed for RS-232 communication.

>Of course, I may be wrong about all of this and it might be something as
>simple as you accidentally set the program to listen to the wrong COM port
>=)

It is probably the wrong COM port if anything or some other problem with the
echo program.  Try connecting two PC's with a null modem cable and try to
send data to the echo program with a terminal program on the other PC.  Or
it could be a bug in your 89 code.

-Justin Karneges [infiniti]


>>What is required to send data over the serial port, using ASM?
>>
>>There are several serial I/O commands but I'm not sure what
>>is required.
>>
>>How would one modify the Hello World program to, in addition
>>to sending 'Hello World' to the screen, it would also send
>>it out over the serial port.
>>
>>I have a program that echos to the PC screen anything received
>>by the COM port,
>>
>>I added the following to the Hello World program, just between
>>correcting the stack and the idle statements, but nothing was
>>displayed on my PC screen.  So, obviously there is something
>>that I am missing.
>>
>>   move.w  #12,-(a7)  ; 12 words to xmit
>>   pea  hello(pc)  ; pushes address of string to stack
>>   jsr  doorsos::transmit  ; transmits data
>>   lea  6(a7),a7           ; corrects stack
>>   jsr  doorsos::flush_link
>>
>>What else is required?  What is baud rate?  Is there any
>>special handshake required, on the PC end?  What?  Is there any
>>source code example, for this handshake, if requried?  Where?
>
>



Follow-Ups: