------------------ nanoTerm 3.0 ------------------ In the beginning... Long ago I decided to write a terminal program in assembly. I searched everywhere for example source code on how to go about using devices in assembly. Unfortunately all I came up with was two or three terminal programs written in assembly that busy-waited on the serial port (Ack!). Several months and many crashes later I had my first working prototype, GeekTool. GeekTool worked most of the time and rarely crashed so I added a font requester and a couple of other features which made the already clumsy code impossible to debug. Despondant, I gave it up. The new vision... A year later. Disappointed that I never did anything with my terminal program I took the old code back out and re-wrote the entire thing. But that wasn't enough. There had to be somthing more I could do to it. Then one day it hit me. I should edit it down so that the executable code was smaller than 1k. That was it. Hahahahahaha. 1 month later. All of the features were gone. All excess code was removed while retaining the program's origional function as a terminal program. It was still 1134 bytes. I was stumped. I thought about getting rid of the window. I thought about leaving out all of the text strings in the entire program. In the end I never had to go to such extreme measures. Instead I had to invent other extreme measures to go to... Still later. It was over for me. I was done, finished with nanoTerm 2.0 and ready to throw in the towel. Even though the code size was 1010 bytes the executable was 1128 bytes. Then two people sent me e-mail suggesting new and better ways to optimize nanoTerm. They gave me the power to go beyond the 1k executable. Many thanks to Daniele Forsi and Joep Grooten. Questions & Answers about nanoTerm Q: How come when I "list nanoTerm" it says it's 1128 bytes? A: That's because you still have the 2.0 version of nanoTerm. Go get the 3.0 version on aminet. Q: How do I change any of the serial settings? A: You can't do it from nanoTerm. You have to quit, change the settings in Prefs/Serial and then start nanoTerm again. Q: Does nanoTerm share the serial port? A: Yes. So you can use it to connect up before starting some other program. The code is also "pure" so you can make it resident. Q: How come you clear the serial buffer every time? A: Because the serial.device doesn't null-terminate the strings it sends you so my cheap way of null-terminating is to fill the buffer with nulls before asking the serial.device for a string. Q: Can I steal your nanoTerm code and use it in my own projects and never give you credit? A: Sure. But you have to send me a copy of whatever nanoTerm code ends up in. ------------------------------------------------------------------------------ nanoTerm - an experement in frustration by Jason Fonseca. Send Jason Fonseca email, job offers, useful information at: jfonseca@math.uno.edu