YMODEM.docx
《YMODEM.docx》由会员分享,可在线阅读,更多相关《YMODEM.docx(37页珍藏版)》请在冰豆网上搜索。
![YMODEM.docx](https://file1.bdocx.com/fileroot1/2022-12/30/7cf0de29-def4-4489-a2e3-0480612feee2/7cf0de29-def4-4489-a2e3-0480612feee21.gif)
YMODEM
-1-
XMODEM/YMODEMPROTOCOLREFERENCE
Acompendiumofdocumentsdescribingthe
XMODEMandYMODEM
FileTransferProtocols
Thisdocumentwasformatted8-4-87.
EditedbyChuckForsberg
Pleasedistributeaswidelyaspossible.
QuestionstoChuckForsberg
OmenTechnologyInc
TheHighReliabilitySoftware
17505-VSauvieIslandRoad
PortlandOregon97231
VOICE:
503-621-3406:
VOICE
Modem(TeleGodzilla):
503-621-3746Speed19200,2400,1200,300
CompuServe:
70007,2304
GEnie:
CAF
UUCP:
...!
tektronix!
reed!
omen!
caf
-2-
1.TOWEROFBABEL
A"YMODEMTowerofBabel"hasdescendedonthemicrocomputingcommunity
bringingwithitconfusion,frustration,bloatedphonebills,andwasted
manhours.Sadly,I(ChuckForsberg)ampartlytoblameforthismess.
Asauthoroftheearly1980sbatchand1kXMODEMextensions,Iassumed
readersofearlierversionsofthisdocumentwouldimplementasmuchof
theYMODEMprotocolastheirprogrammingskillsandcomputingenvironments
wouldpermit.Thisprovedarathernaiveassumptionasprogrammers
motivatedbycompetitivepressureimplementedaslittleofYMODEMas
possible.SomehavetakenwhateverpartsofYMODEMthatappealedtothem,
appliedthemtoMODEM7Batch,Telink,XMODEMorwhatever,andcalledthe
resultYMODEM.
JeffGarbers(Crosstalkpackagedevelopmentdirector)saiditall:
"With
protocolsinthepublicdomain,anyonewhowantstodinkaroundwiththem
cangoahead."[1]
DocumentscontainingalteredexamplesderivedfromYMODEM.DOChaveadded
totheconfusion.Inoneinstance,theheadinginYMODEM.DOC'sFigure1
hasmutatedfrom"1024bytePackets"to"YMODEM/CRCFileTransfer
Protocol".NoneoftheXMODEMandYMODEMexamplesshowninonedocument
werecorrect.
Toputanendtothisconfusion,wemustmake"perfectlyclear"what
YMODEMstandsfor,asWardChristensendefineditinhis1985coiningof
theterm.
Tothemajorityofyouwhoread,understood,andrespectedWard's
definitionofYMODEM,Iapologizefortheinconvenience.
1.1Definitions
ARCARCisaprogramthatcompressesoneormorefilesintoanarchive
andextractsfilesfromsucharchives.
XMODEMreferstothefiletransferetiquetteintroducedbyWard
Christensen's1977MODEM.ASMprogram.ThenameXMODEMcomesfrom
KeithPetersen'sXMODEM.ASMprogram,anadaptationofMODEM.ASM
forRemoteCP/M(RCPM)systems.It'salsocalledtheMODEMor
MODEM2protocol.SomewhoareunawareofMODEM7'sunusualbatch
filemodecallitMODEM7.Otheraliasesinclude"CP/MUsers'
Group"and"TERMIIFTP3".ThenameXMODEMcaughtonpartly
becauseitisdistinctiveandpartlybecauseofmediainterestin
__________
1.PageC/12,PC-WEEKJuly12,1987
Chapter1
X/YMODEMProtocolReference08-03-873
bulletinboardandRCPMsystemswhereitwasaccessedwithan
"XMODEM"command.Thisprotocolissupportedbyeveryserious
communicationsprogrambecauseofitsuniversality,simplicity,
andreasonableperformance.
XMODEM/CRCreplacesXMODEM's1bytechecksumwithatwobyteCyclical
RedundancyCheck(CRC-16),givingmodernerrordetection
protection.
XMODEM-1kReferstotheXMODEM/CRCprotocolwith1024bytedatablocks.
YMODEMReferstotheXMODEM/CRC(optional1kblocks)protocolwithbatch
transmissionasdescribedbelow.
TrueYMODEM(TM)InanattempttosortouttheYMODEMTowerofBabel,Omen
TechnologyhastrademarkedthetermTrueYMODEM(TM)torepresent
thecompleteYMODEMprotocoldescribedinthisdocument,including
pathname,length,andmodificationdatetransmittedinblock0.
PleasecontactOmenTechnologyaboutcertifyingprogramsforTrue
YMODEM(TM)compliance.
ZMODEMusesfamiliarXMODEM/CRCandYMODEMtechnologyinanewprotocol
thatprovidesreliability,throughput,filemanagement,anduser
amenitiesappropriatetocontemporarydatacommunications.
ZOOLikeARC,ZOOisaprogramthatcompressesoneormorefilesinto
a"zooarchive".ZOOsupportsmanydifferentoperatingsystems
includingUnixandVMS.
Chapter1
X/YMODEMProtocolReference08-03-874
2.YMODEMMINIMUMREQUIREMENTS
AllprogramsclaimingtosupportYMODEMmustmeetthefollowingminimum
requirements:
+Thesendingprogramshallsendthepathname(filename)inblock0.
+ThepathnameshallbeanullterminatedASCIIstringasdescribed
below.
+Thereceivingprogramshallusethispathnameforthereceivedfile
name,unlessexplicitlyoverridden.
+ThesendingprogramshalluseCRC-16inresponsetoa"C"pathname
nak,otherwiseuse8bitchecksum.
+Thereceivingprogrammustacceptanymixtureof128and1024byte
blocksitreceives.
+Thesendingprogrammustnotchangethelengthofanunacknowledged
block.
+Attheendofeachfile,thesendingprogramshallsendEOTuptoten
timesuntilitreceivesanACKcharacter.(Thisispartofthe
XMODEMspec.)
+Theendofatransfersessionshallbesignifiedbyanull(empty)
pathname.
ProgramsnotmeetingalloftheserequirementsarenotYMODEMcompatible.
Meetingtheminimumrequirementsdoesnotguaranteereliablefile
transfersunderstress.
Chapter2
X/YMODEMProtocolReference08-03-875
3.WHYYMODEM?
Sinceitsdevelopmenthalfadecadeago,theWardChristensenmodem
protocolhasenabledawidevarietyofcomputersystemstointerchange
data.Thereishardlyacommunicationsprogramthatdoesn'tatleast
claimtosupportthisprotocol.
Recentadvancesincomputing,modemsandnetworkinghaverevealedanumber
ofweaknessesintheoriginalprotocol:
+Theshortblocklengthcausedthroughputtosufferwhenusedwith
timesharingsystems,packetswitchednetworks,satellitecircuits,
andbuffered(errorcorrecting)modems.
+The8bitarithmeticchecksumandotheraspectsallowedline
impairmentstointerferewithdependable,accuratetransfers.
+Onlyonefilecouldbesentpercommand.Thefilenamehadtobe
giventwice,firsttothesendingprogramandthenagaintothe
receivingprogram.
+Thetransmittedfilecouldaccumulateasmanyas127extraneous
bytes.
+Themodificationdateofthefilewaslost.
Anumberofotherprotocolshavebeendevelopedovertheyears,butnone
havedisplacedXMODEMtodate:
+Lackofpublicdomaindocumentationandexampleprogramshavekept
proprietaryprotocolssuchasBlast,Relay,andotherstightlybound
tothefortunesoftheirsuppliers.
+ComplexitydiscouragesthewidespreadapplicationofBISYNC,SDLC,
HDLC,X.25,andX.PCprotocols.
+Performancecompromisesandcomplexityhavelimitedthepopularityof
theKermitprotocol,whichwasdevelopedtoallowfiletransfersin
environmentshostiletoXMODEM.
TheXMODEMprotocolextensionsandYMODEMBatchaddresssomeofthese
weaknesseswhilemaintainingmostofXMODEM'ssimplicity.
YMODEMissupportedbythepublicdomainprogramsYAM(CP/M),
YAM(CP/M-86),YAM(CCPM-86),IMP(CP/M),KMD(CP/M),rz/sz(Unix,Xenix,
VMS,BerkeleyUnix,Venix,Xenix,Coherent,IDRIS,Regulus).Commercial
implementationsincludeMIRROR,andProfessional-YAM.[1]Communications
Chapter3
X/YMODEMProtocolReference08-03-876
programssupportingtheseextensionshavebeeninusesince1981.
The1kblocklength(XMODEM-1k)describedbelowmaybeusedinconjunction
withYMODEMBatchProtocol,orwithsinglefiletransfersidenticaltothe
XMODEM/CRCprotocolexceptforminimalchangestosupport1kblocks.
AnotherextensionistheYMODEM-gprotocol.YMODEM-gprovidesmaximum
throughputwhenusedwithendtoenderrorcorrectingmedia,suchasX.PC
anderrorcorrectingmodems,including9600bpsunitsbyTeleBit,
U.S.Robotics,Hayes,ElectronicVaults,DataRace,andothers.
Tocompletethistome,editedversionsofWardChristensen'soriginal
protocoldocumentandJohnByrns'sCRC-16documentareincludedfor
reference.
ReferencestotheMODEMorMODEM7protocolhavebeenchangedtoXMODEMto
accommodatethevernacular.InAustralia,itisproperlycalledthe
ChristensenProtocol.
3.1SomeMessagesfromthePioneer
#:
130940S0/Communications25-Apr-8518:
38:
47
Sb:
myprotocol
Fm:
WardChristensen76703,302[2]
To:
all
Beawarethearticle[3]DIDquotemecorrectlyintermsofthephrases
like"notrobust",etc.
ItwasaquickhackIthrewtogether,veryunplanned(likeeverythingI
do),tosatisfyapersonalneedtocommunicatewith"someother"people.
ONLYthefactthatitwasdonein8/77,andthatIputitinthepublic
domainimmediately,madeitbecomethestandardthatitis.
Ithinkitstimeformeto
(1)documentit;(peoplecallmeandsay"myproductisgoingtoinclude
it-whatcanI'reference'",or"I'mwritingapaperonit,whatdoIput
inthebibliography")and
__________________________________________________________________________
1.AvailableforIBMPC,XT,AT,UnixandXenix
2.Editedfortypesettingappearance
3.InfoworldApril29p.16
Chapter3
X/YMODEMProtocolReference08-03-877
(2)proposean"incrementalextension"toit,whichmighttake"exactly"
theformofChuckForsberg'sYAMprotocol.HewroteYAMinCforCP/Mand
putitinthepublicdomain,andwroteabatchprotocolforUnix[4]called
rbandsb(receivebatch,sendbatch),whichwasbasicallyXMODEMwith
(a)arecord0containingfilenamedatetimeandsize
(b)a1Kblocksizeoption
(c)CRC-16.
HedidsomecleverprogrammingtodetectfalseACKorEOT,butbasically
leftthemthesame.
PeoplewhosuggestImakeSIGNIFICANTchangestotheprotocol,suchas
"fullduplex","multipleoutstandingblocks","multipledestinations",etc
etcdon'tunderstandthattheincred