TweetFollow Us on Twitter

Protocol Standards
Volume Number:2
Issue Number:1
Column Tag:Mac Meets Ma Bell

Protocol Standards

By Bruce Lieberman, Communications Engineer, MacTutor Contributing Editor

Mac Binary Standard

A file transfer protocol specific to the Macintosh that originated within the MAUG (Micronet Apple Users Group) on Compuserve has gained widespread acceptance and is becoming a defacto standard, and is a primary feature of the new MacTerminal 2.0 being distributed this month.

The "MacBinary" protocol (everything earns a label nowadays!) allows transmittal of the Data and Resource Forks within a Macintosh application and it also transfers the Finder information on that particular file ( icons, creation date, size, "About" info, etc...). This standard is now being utilized by virtually every Macintosh communications software developer that I have contacted. Look forward to new versions of MacLine, inTouch and Smartcom that will support the "MacBinary" XModem standard by the time this article is in print.

Here is a reprint of the technical aspects of the MacBinary protocol, courtesy of Dennis Brothers ("MacTep" fame) :

The binary format described is independent of the communication protocol used to accomplish the transfer, and assumes only that an 8-bit transparent transfer can be accomplished. Such protocols as Christensen (usually referred to as XMODEM or MODEM7), Kermit, and CompuServe A or B meet this requirement. Because of the proposed standard's MacTerminal/XMODEM heritage, there is a requirement that the transmitted data be padded (with nulls) to a 128-byte boundary at certain points, but this in no way implies that a block-oriented protocol must be used. The basic format proposed is identical to that used by MacTerminal, by Mike Boich and Martin Haeberli, and can be used with a version of MacTerminal that has had a patch applied to "normalize" its implementation of the XMODEM protocol.

In brief, the binary format consists of a 128-byte header containing all the information necessary to reproduce the document's directory entry on the receiving Macintosh; followed by the document's Data Fork (if it has one), padded with nulls to a multiple of 128 bytes (if necessary); followed by the document's Resource Fork (again, padded if necessary). The lengths of these forks (either or both of which may be zero) are contained in the header.

The format of the 128-byte header is as follows (offsets and lengths are given in decimal):

Offset Length Contents

000 1 Zero. This is a "version" byte.

001 1 Length of filename.

002 63 Filename (only "length" bytes are significant).

(the following 16 bytes are a standard Finder Info record)

065 4 File type.

069 4 File creator.

073 1 Finder flags:

Bit 7 - Locked.

Bit 6 - Invisible.

Bit 5 - Bundle.

Bit 4 - System.

Bit 3 - Bozo.

Bit 2 - Busy.

Bit 1 - Changed.

Bit 0 - Inited.

074 1 Zero.

075 2 File's vertical position within its window.

077 2 File's horizontal position within its window.

079 2 File's window or folder ID.

(End of Finder Info)

081 1 "Protected" flag (in low order bit).

082 1 Zero.

083 4 Data Fork length (bytes, zero if no Data Fork).

087 4 Resource Fork lenth (bytes, zero if no R.F.).

091 4 File's creation date.

095 4 File's "last modified" date.

099 27 Zero fill (reserved for expansion of standard).

126 2 Reserved for computer type and OS ID

(this field will be zero for the current Macintosh).

Note that it is the responsibility of the receiving terminal program to resolve file name conflicts, generally by somehow modifying the name of received file if there already exists a file with the original name on the target volume.

Note also that, while the original window or folder ID and position may be transmitted, the receiving terminal program would not normally set these items for the received file, but would instead accept the values that the File Manager assigns when it creates the new file.

It is suggested that Macintosh terminal programs implement two modes of protocol transfer: text and document. Text mode is used for unformatted files of type TEXT (with only a data fork), and document mode (using the binary format proposed here) is used for all other files. Document mode may also be used on text files, of course, if it is desired to preserve such things as the file's creator ID or creation date.

The intent of text mode is to provide compatibility with text files on other systems. Toward that end, it is recommended that a linefeed be inserted after each return character as the text file is transmitted, and that, in the case of block-oriented protocols, the last block be explicitely padded with nulls if the text does not end on a block boundary. When receiving in text mode, linefeeds and trailing nulls should be stripped. If a CTRL-Z (Hex 1A) character is received following all other text (and before any null padding), it should also be stripped (Ctrl-Z is a common text terminator on CP/M and some other systems). Note that the above discussion applies only to text files transferred under some protocol, where an exact image of the transmitted data will be stored in a file on the remote system.

When receiving a file via a protocol, a terminal program may distinguish between text and document modes by examining bytes 0, 74, and 82 of the first 128 bytes received. If they are each zero (and at least 128 bytes have been received), then it is a safe assumption that a MacBinary-formatted document is being received. Terminal programs implementing possible future versions of the proposed standard would, of course, accept an appropriate set of version numbers in byte 0. Note also that compatible extensions of Version 0 of the proposed standard are possible (one such is suggested below) that involve transmission of additional information following the information described here. For this reason, a terminal program should be implemented so as to perform the proper receive procedures for all data sent to it, but to ignore any data that it does not know what to do with.

Since a text-mode document does not contain a file name, it is suggested that when text-mode is detected, a file be opened under a dummy name on the receiving Macintosh, the text written to that file, and the file renamed to a name selected by the user (via an SFPutFile box) after the reception is completed. This will avoid problems caused by indeterminate delays for name selection at the beginning of the file transfer.

It is desirable to allow the user to specify the destination volume in advance of the actual start of transfer for either type of transfer. Two methods are suggested for this: provide a "Select Destination Volume" menu selection, presumably in the menu containing the "Receive File" selection; or query the user immediately after the "Receive File" menu selection is made. Either or both of these methods could be implemented in a given terminal program - the independent "Select Receive Volume" method is particularly desirable if the ESC-a/ESC-b automatic receive facility (see below) is implemented. The volume selection procedure should provide the same functions as the volume selection portion of the SFGetFile and SFPutFile dialog boxes.

First Proposed Extension

It is proposed that the binary format described above be extended to allow the transmission of descriptive text with a Macintosh document (specifically, the descriptive text from the Finder's "Get Info" box for the file being transferred). This is to be accomplished in a transparent manner by assigning bytes 99 and 100 of the header described above to be used to hold the length of the descriptive text (or zero, if there is none). The descriptive text, if any, will begin on the 128-boundary immediately following the Resource Fork, if present, else the Data Fork, if present, else immediately following the header if neither fork is present. It is hoped that methods for reading and setting a file's "Get Info" text will be made public at some point.

Notes on MacTerminal's XMODEM implementation, and a proposed extension: Familiarity with the Christensen (XMODEM) protocol is assumed in the following discussion.

When doing "Mac-to-Mac" transfers, using the binary format described above, unmodified MacTerminal does not use a true XMODEM protocol, and is therefore incompatible with most non-Mac systems. The differences lie in two specifics: the transmitting Macintosh initiates the transfer by sending the the two characters ESCAPE (hex 1B) and "a" (hex 61); the receiving Macintosh is expected to reply with the character ACK (hex 06). The transfer then proceeds using normal XMODEM procedures, except that each of the header and the two forks (if present) is treated as a separate XMODEM transfer, with the transmitting Macintosh waiting for a NAK (hex 15), then sending the blocks of that phase (beginning with a block number of one), then sending EOT (hex 04) and waiting for an ACK (hex 06) from the receiving Macintosh.

It is proposed that a modified procedure be accepted as a standard, to be implemented instead of or in addition to the above-described MacTerminal "Mac-to-Mac" protocol in complying terminal programs. The modified procedure, which is compatible with standard XMODEM implementations, functions as follows: The transmitting Macintosh sends the two characters ESCAPE (hex 1B) and "b" (hex 62). The receiving Macintosh may optionally reply with ACK (hex 06) (this is allowed so as to have minimum impact on existing MacTerminal-compatible implementations). The transmitting Macintosh then awaits receipt of a NAK (hex 15) (or optionally a "C" (hex 43), if the receiving terminal program supports CRC checking), following which a single, normal XMODEM transfer occurs. The transfer may be in text mode or document mode, will begin with block number one, and block numbers will increment uniformly (modulo 256) throughout the transfer.

It is expected that a patch to MacTerminal making it compatible with the above proposed procedure will be available in the near future.

Responses to proposals

Please address comments or questions on the above proposals to:

Dennis F. Brothers

197 Old Connecticut Path

Wayland, MA 01778


CompuServe: 70065,172



New Communications Programs

Presently there are a number of new programs that incorporate MacBinary, including Red Ryder 6.2, FreeTerm 1.7, Telescape & VersaTerm. The proliferation of new Communications software for the Mac is truly amazing ! Most of these are very functional and flexible pieces of software. Most incorporate command languages for unattended functions, multiple terminal emulations, etc. Others have nice little features that make you wonder how you ever got along without them. Like the "view file" function from within the "inTouch" program that allows you to review a file (ascii or vidtex) before it is sent or after it is captured; or the pull down menu in VersaTerm that allows you to store 8 of your most often called numbers and just CALL them without going through all kinds of hassle to pull up a new file. I guess a dream program would synthesize the best features of all of these programs, but right now it isn't as hard to accept what is available as it was a little earlier in the life of Mac communications.

Our next few areas of discussion deal with some of the latest developments in telecommunications : 2400 baud modems and some of the new protocols for higher speed data transmission.

"V.22 bis" is the defacto international standard for 2400 baud full duplex asynchronous data communications. Currently modems from Racal Vadic, Hayes, U.S. Robotics, Novation, AT&T and Microcom support this standard. It is a creation of the CCITT and as has earned the stamp of approval from Bell. The CCITT is actually tied into the United Nations and it produces recommendations for communications standards in the "X" and "V" categories. The "X" series (such as the X.25 standard) applies to packet switched networks such as Telenet, Tymnet and Uninet. The "V" series applies to ordinary switched telephone lines; the 1200 baud standard is V.22 and the 2400 baud standard is now V.22 "bis" (which is French for secondary, kinda like the European version of revisionitis). In the USA there are some slight modifications made to V.22bis to accomodate some of our own domestic quirks, ie: switching between Bell 212a and V.22bis (rather than V.22); and with call-waiting as a widespread feature they have changed the loss of carrier disconnect delay from 40-65 milliseconds to 600 or more milliseconds.

Telephone circuits normally have a frequency bandwidth that is limited to around 300-3000 cycles per second (also known as cps, Hertz.). The carrier signal that the modem modulates must fit within this bandwidth, to exceed the capacity of this frequency "window" we resort to another type of modulation, PHASE encoding. Going beyond representing 1 and 0 with two different frequencies, we now switch between multiple states of phase (for 2400 baud there are 16 states of phase, the current Bell 212a standard uses 4 states of phase) and divide our information within each state. In V.22bis things like "Quadbits" (four consecutive bits) come into play. The first two bits in a quadbit define the change of quadrant (0, 90, 180, 270 degrees of phase) relative to the quadrant occupied by the preceding signal element. The last two bits of the quadbit define one of 4 signalling elements related to the new quadrant.

Here is a chart of common baud rates and their appropriate carrier states :

Bit Rate (bps) Baud Rate Carrier States

300 300 2

1200 600 4

2400 600 16

4800 1200 16

9600 2400 32

Notice how none of the baud rates exceeds the frequency bandwidth limit. Remember that this is for FULL DUPLEX transmission. There is a "High" and "Low" channel for simultaneous transmission and reception. Each channel operating at HALF the overall speed of the unit. At baud rates above 2400 line equalization is necessary to combat the poor quality of phone lines. The next step beyond V.22bis will be V.32.

V.32 will allow full duplex asynchronous transmissions of up to 9600 baud. Telebit of Cupertino (where else ?) is entering into an agreement with a number of heavy telecommunications companies to market their new 10K-baud modem called the "FastLink" (you'll probably see this under the "IRMA" label first). While it is not presently V.32 compatible, they intend to submit what they feel is a superior standard to the CCITT and see if they can have their method adopted in lieu of the current V.32 (V.32 "bis" maybe ?). Concord Data Systems of Waltham, Mass. (among others) intends to release a V.32 standard modem by the end of the year. Both the CDS and the Telebit technologies fall into the $2,000 per modem bracket. For a LOT of corporations, these technologies will pay for themsleves VERY quickly (for FAX transmissions among many other things). And WE are the folks that will inherit this technology as the prices fall. Come on now, admit it ..... wouldn't you just LOVE to have one ??

NOW, onto the protocols that will be necessary to support these high speeds ..... the following two Protocols are in contention. X.PC and MNP. X.PC is being promoted by Tymnet (a major packet switched network) and MNP is being promoted by Microcom (a major modem manufacturer). X.PC is being placed in the public domain and MNP requires a $2,500 licensing fee.

X.PC is a subset of X.25, which is a CCITT standard for packet switched networks such as Tymnet. It is a full duplex asynchronous error correcting protocol that supports up to 15 logical channels. X.PC is a Link Level protocol. The link level is one of the seven levels defined in the ISO / OSI (International Standards Organization Open Systems Interconnect) model. It maintains transparent full time automatic error correction during any communications session between two or more machines (right now this is limited to multiple PC's and/or machines on a Network that supports the X.PC protocol). X.PC protocol (as does MNP) groups bits of data into packets, does a high level statistical analysis of the packets (16 bit CRC) and transmits the results to the receiving end. The X.PC on the receiving end will also perform a statistical analysis of the received packet and if there has been an error in transmission it will request that the originator retransmit the packet. When connected to a Host Network that supports X.PC (such as Tymnet or Telenet) you can execute up to 15 different concurrent sessions (simultaneously talk to 15 different Host Computers) with just one phone link. Each packet of data is encoded with both an address as to which computer system it is destined for and an address as to which system the packet originated from.


Community Search:
MacTech Search:

Software Updates via MacUpdate

Dropbox 37.4.29 - Cloud backup and synch...
Dropbox is an application that creates a special Finder folder that automatically syncs online and between your computers. It allows you to both backup files and keep them up-to-date between systems... Read more
iClock Pro 3.8 - Customize your menubar...
iClock Pro is a menu-bar replacement for Apple's default clock. iClock Pro is an update, total rewrite, and improvement to the popular iClock. Have the day, date, and time in different fonts and... Read more
A Better Finder Attributes 6.06 - Change...
A Better Finder Attributes is the ultimate file-tweaking tool for OS X. It combines photo-shooting date and file date changing along with a few unique tricks of its own. Change EXIF Timestamps at... Read more
Chromium 62.0.3202.62 - Fast and stable...
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. Version 62.0.3202.62: High CVE-2017-5124: UXSS with... Read more
Things 3.2.1 - Elegant personal task man...
Things is a task management solution that helps to organize your tasks in an elegant and intuitive way. Things combines powerful features with simplicity through the use of tags and its intelligent... Read more
MacCleanse 6.0.5 - $29.95
MacCleanse is the product of thousands of hours of intense research and development. It meticulously scans all of the nooks and crannies of a computer for unnecessary junk that can take up huge... Read more
Fantastical 2.4.3 - Create calendar even...
Fantastical 2 is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event... Read more
Google Chrome 62.0.3202.62 - Modern and...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
VirtualBox 5.2.0 - x86 virtualization so...
VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers... Read more
iClock Pro 3.8 - Customize your menubar...
iClock Pro is a menu-bar replacement for Apple's default clock. iClock Pro is an update, total rewrite, and improvement to the popular iClock. Have the day, date, and time in different fonts and... Read more

Warhammer Quest 2 (Games)
Warhammer Quest 2 1.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0 (iTunes) Description: Dungeon adventures in the Warhammer World are back! | Read more »
4 of the best Halloween updates for mobi...
Halloween is certainly one of our favorite times for mobile game updates. Many popular titles celebrate this spooky season with fun festivities that can stretch from one week to even the whole month. As we draw closer and closer to Halloween, we'... | Read more »
Fire Rides guide - how to swing to succe...
It's another day, which means another Voodoo game has come to glue our hands to our mobile phones. Yes, it's been an especially prolific month for this particular mobile publisher, but we're certainly not complaining. Fire Rides is yet another... | Read more »
Time Recoil (Games)
Time Recoil 1.0.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0.1 (iTunes) Description: Time Recoil is a top-down shooter where you kill to slow time, dominate slow motion gunfights, and trigger devastating special... | Read more »
Campfire Cooking (Games)
Campfire Cooking 1.0 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0 (iTunes) Description: | Read more »
Returner 77 (Games)
Returner 77 1.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0 (iTunes) Description: Returner 77 is a cinematic space mystery puzzle game. You are in a giant alien spaceship hovering above Earth, after everything... | Read more »
Dune! guide - how to toe the line and ge...
Publisher Voodoo is at it again with an all new high score chaser -- Dune! In this fast-paced arcade game, you have to propel yourself along sand dunes, gaining enough momentum to jump above the line to score points, while making sure you have... | Read more »
The best deals on the App Store this wee...
Happy Tuesday, dear readers. Your favorite part of the week as officially arrived. It's time to take a look at the best deals in games. Things are admittedly a bit sparse, but there are a few diamonds in the rough to see you through if you're... | Read more »
Be the last person standing in Legacy of...
Yoozoo Games’ popular action MMO Legacy of Discord is getting a huge new update to celebrate its first anniversary. Perhaps the biggest change is the addition of an exciting survival mode titled Last Guardian. This new survival mode will pit you... | Read more »
Home Street guide - how to make friends...
From the creators of Food Street comes Home Street, a new simulation game that tasks you with building a social network and designing a beautiful home. It's a bit like The Sims, but you won't have to worry about the daily chores involved (feeding,... | Read more »

Price Scanner via

13″ MacBook Pros on sale for up to $120 off M...
B&H Photo has 2017 13″ MacBook Pros in stock today and on sale for up to $120 off MSRP, each including free shipping plus NY & NJ sales tax only: – 13-inch 2.3GHz/128GB Space Gray MacBook... Read more
15″ MacBook Pros on sale for up to $200 off M...
B&H Photo has 15″ MacBook Pros on sale for up to $200 off MSRP. Shipping is free, and B&H charges sales tax in NY & NJ only: – 15″ 2.8GHz MacBook Pro Space Gray (MPTR2LL/A): $2249, $150... Read more
Roundup of Apple Certified Refurbished iMacs,...
Apple has a full line of Certified Refurbished 2017 21″ and 27″ iMacs available starting at $1019 and ranging up to $350 off original MSRP. Apple’s one-year warranty is standard, and shipping is free... Read more
Sale! 27″ 3.8GHz 5K iMac for $2098, save $201...
Amazon has the 27″ 3.8GHz 5K iMac (MNED2LL/A) on sale today for $2098 including free shipping. Their price is $201 off MSRP, and it’s the lowest price available for this model (Apple’s $1949... Read more
Sale! 10″ Apple WiFi iPad Pros for up to $100...
B&H Photo has 10.5″ WiFi iPad Pros in stock today and on sale for $50-$100 off MSRP. Each iPad includes free shipping, and B&H charges sales tax in NY & NJ only: – 10.5″ 64GB iPad Pro: $... Read more
Apple iMacs on sale for up to $130 off MSRP w...
B&H Photo has 21-inch and 27-inch iMacs in stock and on sale for up to $130 off MSRP including free shipping. B&H charges sales tax in NY & NJ only: – 27″ 3.8GHz iMac (MNED2LL/A): $2179 $... Read more
2017 3.5GHz 6-Core Mac Pro on sale for $2799,...
B&H Photo has the 2017 3.5GHz 6-Core Mac Pro (MD878LL/A) on sale today for $2799 including free shipping plus NY & NJ sales tax only . Their price is $200 off MSRP. Read more
12″ 1.2GHz Space Gray MacBook on sale for $11...
Amazon has the 2017 12″ 1.2GHz Space Gray Retina MacBook on sale for $100 off MSRP. Shipping is free: 12″ 1.2GHz Space Gray MacBook: $1199.99 $100 off MSRP Read more
Bare Bones Software Releases macOS High Sierr...
Bare Bones Software has announced the release and immediate availability of BBEdit 12.0, a significant upgrade to its professional strength text and code editor. BBEdit 12 introduces a new foundation... Read more
Yale Announces Availability of Apple HomeKit-...
Yale Locks & Hardware has announced that Apple HomeKit support for its Assure Lock family is available this month. The new Yale iM1 Network Module, which provides support for the Apple Home app... Read more

Jobs Board

Frameworks Engineer, *Apple* Watch - Apple...
Job Summary Join the team that is shaping the future of software development for Apple Watch! As a software engineer on the Apple Watch Frameworks team you will Read more
*Apple* News Product Marketing Mgr., Publish...
Job Summary The Apple News Product Marketing Manager will work closely with a cross-functional group to assist in defining and marketing new features and services. Read more
Fraud Analyst, *Apple* Advertising Platform...
Job Summary Apple Ad Platforms has an opportunity to redefine advertising on mobile devices. Apple reaches hundreds of millions of iPhone, iPod touch, and iPad Read more
*Apple* Information Security - Security Data...
Job Summary This role is responsible for helping to strengthen Apple 's information security posture through the identification and curation of security event data. Read more
Lead *Apple* Solution Consultant - Apple In...
…develop a team of diverse partner employees focusing on excellence to deliver the Apple story. Even when you're not present, you will maintain a consistent influence Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.