An Experiment in Real-Time Networking.



by

Stuart Cheshire

Sidney Sussex College


Previous | Table of Contents | Next

Chapter 6 -- MacTransfer

To produce the Macintosh version, it was necessary to transfer files to it from the BBC micro. The files containing the graphic data and the map had to be transferred, and the assembler source too. It would have been possible to work from a paper listing -- but I felt that the work would go much faster if I could work with the actual source in an editor and translate it routine-by-routine into C.

Since I had no program to transfer files to the Macintosh, I had to write one. I got a simple program running quite quickly, which just read bytes from the serial port and wrote them to a file on disc. However, I felt that, before I could attempt a major project, I needed to get a little experience of `proper' Macintosh programming -- as opposed to the kind where you type in the required filename in the fopen call and then recompile the program.

Learning the new programming environment took some time, and involved reading and understanding a considerable proportion of the 1500 pages of Inside Macintosh, Volumes 1-4. Since every chapter begins with the phrase, "You should already be familiar with: ..." followed by three or four other chapter titles, whichever chapter you start reading from causes you to recursively traverse a tree consisting of every other chapter in all four volumes.

About a month was spent writing MacTransfer. This may seem a long time to write a simple utility, but I needed to familiarize myself with the style of programming required on the Macintosh, and this much time was required in order to fully understand the Resource Manager, QuickDraw, the Font Manager, the Event Managers, the Window Manager, the Control Manager, the Menu Manager, the Dialog Manager, the Standard File Package, the Memory Manager, the File Manager, the Device Manager, the Serial Drivers, the System Error Handler and the Finder Interface.

The final program supported multiple windows, scrollback, user-selectable fonts and sizes independently for each window, simultaneous use of both the printer and modem serial ports in different windows, and a hex mode for debugging. This was certainly more than was necessary for a file transfer program, but the experience gained was invaluable in helping me to make appropriate design decisions when starting to write MacBolo.


Previous | Table of Contents | Next

[ Intro | News | Links | Archive | Guides | Gallery | People | Misc ]
The Bolo Home Page is copyrighted by
Joseph Lo & Chris Hwang