TweetFollow Us on Twitter

May 85 Letters
Volume Number:1
Issue Number:6
Column Tag:Editorial, Letters, mousehole

Editorial, Letters

Hot Air

David E. Smith

Publisher

Welcome to the new “slick” look of MacTutor, The Macintosh Programming Journal! This month we go big-time with 10,000 copies printed, most of which I hope will get distributed to computer stores throughout Canada and the US. We now have a new US distributor, Mac America, run by Jim Fitzsimmons, who happens to live about three blocks from my house! Jim is distributing MacTutor, along with Macazine (the mag, not the disk), and The Macintosh Buyer’s Guide. So when you step into your favorite dealer, ask him if he’s got all three of Jim’s publications.

We appreciate the support our readers are giving to MacTutor’s advertisers. Your support is important, because it is advertising that pays the bill for providing high quality (and expensive) technical Macintosh programming information. Mega- max has reported being very pleased with the response Mac- Tutor readers are giving them.

We regret that Chris Derossi, the Chief Wizard, was unable to get a column in this month due to pressing School assignments, but hope he will soon be with us with more Pascal toolbox tutorials. Your letters encouraging him in his efforts I’m sure will be appreciated.

MAC CAMP IS COMING! Come join us over the Labor Day weekend for Mac Camp at the UCLA conference grounds. Should be great fun with a great technical Mac program. Come learn a few new languages like Lisp! The camp can only handle 120 people, so get your $250 deposit in now. First come, first serve. We want MacTutor readers to have the first opportunity at Mac Camp before we advertise nationally.

Heinich “Benchmark” Revisited

In the February 1985 edition of MacTutor, we published this program sent in by Mr. Robert Heinich of Boca Raton, FL:

main()
{
union u_storage{
  long a_long;
  struct T_0000{
    short a_short;
    short b_short;
  }S_0000;
}storage;
storage.a_long = 6;
printf(“\na_short = %d”,
  storage.S_0000.a_short);
printf(“\nb_short = %d”,
  storage.S_0000.b_short);
printf(“\n”);
}

He was looking for the answers “a_short = 0” and “b_short = 6”. The nature of this program compels me to make some comments.

The union maps 2 16-bit words over a 32-bit longword. The order of addressing the two words in the longword is system-dependent.

The 68000 stores the least significant byte of a word at address n and the most significant half at address n+1. Likewise, it stores the most significant half of a longword at address n and the least significant half at address n+2 . It is this latter property that the program uncovers.

Other machines (such as the DEC PDP-11 and VAX systems) store words and bytes in the reverse order. There are sound reasons for each convention and I’ll not argue either point.

What this program has brought up is the “discussion” of whether or not the C language should hide such machine dependencies from the programmer.

Firstly, the current C languages do not hide machine dependencies. The new ANSI standard does not call for machine independence either.

Some people feel that C is a high-level language and therefore a C program written for machine X should run on any other machine (except for OS specific, of course).

I couldn’t disagree more. C is a “system implementation” language. The whole idea of C is to amplify the programmer’s productivity and enhance maintainability by providing a viable alternative to assembly language.

If C compilers scrambled the addres- sing of struct members, it would make the language nearly impossible to use for system programming. In fact, there are many people who feel that automatic padding to insure correct alignment of structure members is not good. The Mac C compiler has an option to control structure padding.

C provides a well-defined access to low-level machine specifics. I don’t want that to change.

- Bob Denny

Board Member

More Mac Tech Stuff Please!

It’s a relief to find a serious and well-meant programmer’s forum. While the thick and slick magazines are fun to look through, they’re not terribly nutritious. Please resist the plaintive cries for tutorials! They’re understandable but would only serve to water down the journal, which is geared toward Mac Tech stuff rather than generic languages or applications (for example, Lisp-ing on the Mac will perhaps spawn an AI applications journal).

-Ricky Evans

New York, NY.

How do you get dimmed text?

I program Mac with the Aztec C development system. Let me pose for you a puzzle I’ve only half solved:

I wanted to display dimmed text. IM says that dimmed text is drawn with a gray pen rather than a black one, so I wrote the code below:

   PenPat(&gray);
   DrawChar(‘D’);
   Line(20,0);

The line was gray, but the “D” was black. Several tries later, I kluged gray characters with the next five lines:

   DrawChar(‘D’);
   Line(20,0);
   PenPat(&gray);
   PenMode(patBic);
  PaintRect(&screenBits.bounds);

These mysteries remain: Why don’t the first three lines work? What is the “right” way to draw dimmed text?

-David Levner

Rego Park, NY

Pascal Turtle Program

I want to program my Macintosh and you guys seem to be the only hacker magazine around...I’m grateful. Some questions: Which C language do you use? Where can I get the famous Apple Assembler? In MacPascal, how does one use the sound driver procedures? Everytime I try to use them I get a short blip and “Sorry, out of memory”. Help! I tried to make a simple crash noise using the free form driver and nothing seemed to happen. How do I do it? Here’s a little Pascal Turtle Program I wrote:

program TURTLE;
{The turtlegraphics interface}
{by David Ezekiel}

const
 twopi = 6.283185307;
 cf=0.017453292
var
 tx,ty:integer;
 ta: real;
 i:integer;

Procedure comp;
begin
 while ta<0 do
 ta:=ta+twopi;
 while ta>=twopi do
 ta:=ta-twopi;
end;

Procedure turn(an:integer);
begin
ta:=ta+cf*an;
comp;
end;

Procedure turnto(an:integer);
begin
ta:=cf*(an+90);
comp;
end;

Procedure move(dist:integer);
var
 dx,dy:integer;
begin
dx:=round(dist*sin(ta));
dy:=round(dist*cos(ta));
tx:=tx+dx;
ty:=ty+dy;
lineto(tx,ty);
end;

Procedure turt(x,y:integer);
begin
tx:=x;
ty:=y;
moveto(tx,ty);
turnto(0);
end;

Procedure spiral;
var
 i:integer;
begin
 for i:=1 to 20 do
 begin
 turn(400-i);
 move(i)
 end;
 turn(20);
 spiral;
end;

begin {main}
 showDrawing;
 turt(200,150);
 spiral
end.

-David Exekiel

Saratoga, CA.

Need Serial I/O Specs!

I am trying to find a way to set the baud rate of the SCC (serial communications controller) to 31,250 baud. The closest baud rate that can be achieved using the clock in the Mac is 28,803, which isn’t close enough!

I have read in “Inside Mac” that pin 7, the HSHK (hand-shake) line of the DB-9 connector is connected to TRxC on the SCC (Zilog 8530). It states that, depending on the mode of the SCC, this pin can be used for an external clock by the SCC to set it’s baud rate. The Zilog manual states that the SCC can be set to receive the clock signal thru TRxC, by which to determine it’s receive and transmit baud rates, by writing into the control register WR-11. Do you know of a way to set up the SCC to receive an external clock signal, preferrably in Modula-2 rather than Assembly Language?

-Robert Stine

Chapel Hill, N.C.

Megamax vs Consulair

It seems that the Consulair with its toolkit interface is great for traveling through the dark caverns of the Mac toolbox, but its lack of a floating point and linker that can’t discern between what to link in and not link in, is frustrating for those who are code size sensitive. Megamax has a code optimizer, inline assembly, register variables and a smart linker. The documentation is terse, but functional. Both products are stable, I haven’t heard of any serious bugs. I have started collecting names of other Mac developers that don’t mind being called about their Mac experiences. I’m developing a network of serious users and with technical publications as yours, we can seed the growth of some decent development tools.

-John Hutchinson

The Programmer’s Shop

Hanover,MA

Likes Pascal Tutorials

I am most interested in the Pascal tutorials, particularly those dealing with graphics: quickdraw, windows, menus, etc. Your magazine seems to have excellent examples showing how to use the Mac’s features, if the article on “Ports” by Chris Derossi is representative of what we can expect.

-Pat Thomas

Los Altos, CA.

[We are also hopeful that the Chief Wizard’s column will re- appear in the near future! - Ed. ]

MORE ON THE C BENCHMARK

I tried that short benchmark on three different systems ranging from a Vax 11/785 to a rainbow 100 under CP/M. Which one is correct? [ See Bob’s letter above...-Ed.]

VAX 11/785, VMS 3.7, VAX11C 1.4:
a_short = 6, b_short=0

DEC Rainbow 100+, CP/M 86, Mark 
Williams C 2.01:
a_short=6, b_short=0

Fat Mac, OS 1.1g, Aztec level II:
a_short=0, b_short=6

By the way, the Aztec C compiler and unix shell is excellent - I love it.

[ Applications to the Mousehole,a closed Mac BBS system, may be made in writing to MacTutor, care of the ‘Hole. They will be forwarded to Mr. Hodge for processing.-ed.]

Sys OPs Remarks

It’s anniversary time at the Mousehole! On May 12, 1985, we will be celebrating our first year of operation, and what a year it was. Back then, the assembler was only a dream [ it’s still only a dream,Rusty! ], that might be available in a very rough draft soon, and MS Basic 1.0 was our only high level language (although it was eventually followed by Forth). And old timers remember the thrill of getting a MacsBug register dump on their printer! Those were the days... (not really!)

Lately, it seems the ‘Hole has been more active than usual with just an incredible amount of messages floating around. There was the high level language wars, which Consulair C won, with Lisa Pascal a close second. Then there were the hard disk wars, which are still going on. Then all the furor over the LaserWriter and it’s support software (like MacWrite 4.0, which still has bugs) [ Write 4.2 is the latest. -ed ] Then finally the thought, “Why do Mac owners think they are superior to all other computer owners?” This last one was solved easily, it is the best personal computer ever, period!

Anyways, here is a cross section of everything else of interest that happened on the Mousehole:

-Rusty Hodge

Sys Op

ExperLisp Hardware Protected?

Now the bad news...it’s really bad news! Experlisp will be copy protected via hardware! I tried to find if they were going to use the laser-hole-in-the-disk method, but they wouldn’t tell me. Too bad. I wanted to put it un my Tecmar as well as backup disks.

-Macowaco

LIisssppth Copy Protection

Expertelligence is using (will use) a hardware protection method that connects via the keyboard cable. Apparently they will have an intelligent BOX that will send a signal to the program when requested saying, yeh, they bought me. This way, you can move the program wherever you want (hard disk, ram disk, network) without any problem. Isn’t that swell?! Well, guess we’ll have to wait for someone to no-op that section of code...hee hee.

-Rusty Hodge

Modula 2 Fluff

Speaking of MacTutor, Dave, is the Modula 2 column going to be regular? It seemed to just be (dare I say it?) just fluff this month. I hope to see more and that it will be up to the quality of the rest of your mag.

-Burrill Smith

[ Maybe your post will encourage Mr. Bogan to dig deeper. -ed. ]

Draw trouble with laserwriter

Beware of using MacDraw with the laserwriter and pasted Paint documents. I have a 12K paint file pasted into Draw, and when printing out to the laser printer, I get a system crash after about 10 minutes. Problem is that the stack and heap meet. (at the pass?) Remember, postscript uses the stack quite heavily. However, the code must be different between Paint and Draw, since I have no trouble with printing Paint files out of the laser printer.

-The Terminator

Inside Mac to the Supermarkets?

At MacExpo, one of the Apple Reps said Inside Mac would be released in a “telephone book” version on thin paper for about $25, and the existing 8" manual should be shrunk down to under 1"! They joked that it would be cheap enough to sell with the National Enquirer and other tabloids at your local supermarket. ( A final printed version was due in June, but apparently is going to be late; an Apple product late? Who ever heard of such a thing?)

- Midnight

Mac Camp at Lake Arrowhead

MacTutor is holding a Mac Camp at the UCLA conference grounds at Lake Arrowhead over the Labor Day Weekend. Three days and nights of Mac fun and classes covering C, Assembly, Basic and Pascal. Toolbox stuff too, on quickdraw, resources, clipboarding and printing. Registration is $495 for room and board plus conference. Only 120 beds (double occupancy in cabins under the Pine Trees overlooking the lake) are available so it’s strictly first come first serve; ie who gets their deposits in first! Deposit is $250, balance due July 1st.

- David Smith

Whose got the latest version?

Switcher version 1.9 will run up to 8 applications on a 512K Mac. Andy Hertzfeld is getting a 2 meg hyperdrived Mac to experiment with. I want one too! Here’s the latest versions I’ve found:

switcher:   1.9
Paint:        1.46
Write:         4.2
Terminal:   2.0
Draw:          1.7
MS Basic:   2.1  (300% faster than 2.0?)
Red Ryder:  5.0
MDS:           A    (release version?)
Finder:        3.4

-Katz

Comdex a bore

MacCharlie, a PC-compatibility box for the Mac was there, two models perched behind glass. Careful inspection showed these to only be mock-ups, with “vents” on the top painted on and disk drive faceplates only. Keyboard was wood, and the keys didn’t look like they work. It will ship May 25. Well, they got 60 days to make a real case for it. Price for 640K, 2-drive mode was $1700. Apple, IBM and Commodre (as well as Atari) WEREN’T there. AT&T was, showing (Safari, 7300?) their new machine only if you signed a non-disclosure agreement! I, of course, didn’t.

-Rusty Hodge

CRASH DRAW 1.1

Try this to crash Draw 1.1: Select the pen (arrow) icon, then go to the pen pattern menu and drag the mouse over the top three patterns starting from left to right; while holding down the mouse button, drag the mouse all the way up into the upper right hand corner and poof! Instant freeze up!

-The Terminator

Mac Logic Board Explained

The January issue of IEEE Computers has a very comprehensive technical/ design article on the logic board of the Mac that I am sure most people would enjoy reading. Now that I have access to a laser printer, I am really looking for a great newspaper type program so I can put pictures and words right next to each other for a Mac clubs newsletter. [Try Page Maker ver. 1.8 from Aldus; theirs is the best, but still buggy and in beta release. Just starting beta release, actually. -ed.]

-The Terminator

Back up Tank 512

To back-up ThinkTank 512, use FEDIT to change a single byte at sector 46 (relative to the start of the file), byte position 330. You should find a $67. If so, change it to a $60. Thats it.

-Katz

FORTRAN BENCHMARKS

Heres a benchmark for Absoft Fortran. I don’t think I’ve posted it before. Also ran it on some other Fortran systems and other computers. It may not be the best benchmark, but it tests the features I was interested in.

-The Atom

FORTRAN BENCHMARKS

(UNLESS NOTED; 100 iterations)

Mac Fortran 15.92 secs

applesoft compiled 390

applesoft 1400

IBM 120

IBM w/8087 11.37

DEC PDP 11/34 27.6

APPLE W/ SAYBROOK 40.7

MAC MS BASIC 720

UNIVAC 1103 2

VAX 11/782 1.7 (DON L.)

Heres the program...

DIMENSION X(20,20),Y(20,20),Z(20,20)
 N=20
TYPE *,’ENTER NUMBER OF TIMES TO LOOP’
 ACCEPT 100,MAX
100FORMAT(I7)
 TYPE *,’START TIMING’
 DO 1 I=1,N
 DO 1 J=1,N
 Y(I,J)=I+J+1.0
1X(I,J)=I+J
 DO 3 K=1,MAX
 DO 2 I=1,N
 DO 2 J=1,N
 Z(I,J)=X(I,J)*Y(I,J)
2Z(I,J)=X(I,J)/Y(J,I)
 CONTINUE
 TYPE *,’STOP TIMING’
 STOP
 END

ASSEMBLY LAB IMPROVEMENTS

Just noticed while reading Assembly Lab in #5 (April), that you consistently use:

MOVE <SOMETHING>, D0
CMP    #0, D0
Bcc    <SOMEWHERE>

The CMP is superflous, because the MOVE will set the condition codes appropriately. In fact, CMP #0, <anything> is always either completely unnecessary (as in the above case) or -- where the condition codes haven’t been set to reflect <anything> -- can be replaced with a TST <anything> instead.

Also, use the addressing modes that Motorola provides. Instead of:

MOVE (A0), (A1)  ;TOP
MOVE 2(A0), 2(A1);LEFT
MOVE 4(A0), 4(A1);BOTTOM
etc.

use instead:

MOVE (A0)+, (A1)+
MOVE (A0)+,(A1)+
MOVE (A0)+, (A1)+
etc.

or even:

MOVE.L  (A0)+, (A1)+  ;top, left
MOVE.L  (A0), (A1)      ;bottom, right

And, instead of:

LEA  mouse(A5), A0
LEA oldmouse(A5), A1
MOVE.L  (A0), (A1)

just...

MOVE.L  mouse(A5), oldmouse(A5)

-Steve Brecher

COMMODORE FEELING THE WATERS

Although they were from a marketing company, and didn’t specifically say so, Commode-door was calling retail stores to see how to represent their new 32 bitter, which they referred to as “Omega”. What they wanted to know was whether they should associate the name ‘Commodore’ with it or call it ‘CBM Omega’, whether the store would be interested in carrying it, were we happy with the way Apple is doing things, and comparisons between Apples, Commodores, Kaypros etc.

I told them to stay with K-Mart & Toys-R-Us.

-MacGeorge

Bus’d out drivers

Bus’d out requires two drivers, both of which are included in the Bus’d out application file, .DDP, and .ABUS

Simply copy the two driver resources from the Bus’d Out application file and paste ‘em into the System File. That’s it.

Oh...for some reason the Resource Editor won’t work ... use RMOVER.

-Bob Denny

MacTraps in Filevison Format

A filevision template has come out that is a collection of the guts of Inside Macintosh. Price $53.95. Contact MacTraps, c/o Network Nexus, Box 64, 1081 Alameda, Belmont, CA. 94002. Or call 414-591-2101.

-The Terminator

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.