TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Wankadia
from: Adam Fitzpatrick
date: 1996-11-27 01:29:16
subject: Writing structs

Quoting Paul Wankadia to Paul Edwards:

PE>What did you hope that "CRC" would look like when printed
to the screen?

PW>Like a CRC?

Eh? A CRC is a thing the computer calculates; it doesn't "look like"
anything. D'you mean like a 4 or 8 digit hexadecimal number?

sprintf(mmmunprocessedfishsticks,"%08X",crc);
 
PW>or to a COM port?

PE>You "need" comms routines to do that.  Various unsavoury people would
PE>attempt to write to stdaux or open file "COM3", but invariably they
PE>will fail.  FREQ "PDCOMM" from 3:711/934.  While it lasts.  BFN. 

PW>Why won't it work?  You'd just be writing a byte to a stream,
PW>wouldn't you?

Comm code is a bit more complicated than that. It might work, but it's much
better to work with the comm port directly, so you actually know it's going
to work. You can make sure you're using the correct I/O address and IRQ
line, for one thing.

A better idea than working with the hardware directly is to use a Fossil
driver. IIRC X00 comes with a list of all the functions it supports.
And just another suggestion: if, say, you want to set the transfer
speed, write a function that does it, and call it when necessary,
even if it's only needed once. That way you only have to change one
function if you end up on another operating system that would require
a completely different approach (eg OS/2 or Unix).

A better idea still is to get comm routines from someone else. :)


--- FMail/Win32 1.22
* Origin: Power BBS - +61-2-858-4114 - Files/Games/EchoMail/Internet (3:711/953)
SEEN-BY: 633/267 270
@PATH: 711/953 410 808 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.