TweetFollow Us on Twitter

Letters, Mousehole
Volume Number:1
Issue Number:3
Column Tag:LETTERS, MOUSEHOLE

Letters, Mousehole

NO VAPOROUS FLUFF

Enclosed is my subscription to MacTech. I really appreciate the quality of the articles and the technical detail they contain. MacTech is a refreshing change from the vaporous mass market Macintosh magazines. I would like to see in a future issue, an article or series of articles describing how to interface with the packages, in particular the disk package.

Robert Leyland

Novato, CA.

A C BENCHMARK PROGRAM

While I do have your attention, I would like to pose the following test for the Mac C compiler from Consulair Corporation:

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”);
}

Three implementations I worked with generated these results:

COMPILER X:
a_short = 60
b_short = 0

COMPILER Y:
a_short = 0
b_short = 60

COMPILER Z:
a_short = 0
b_short = 6

If Consulair’s C generates code similar to Compiler Z, I am definitely interested in it!

Robert Heinich

Boca Raton, Fl.

There wasn’t time to report the results this month, but watch for it next month in Bob’s C column. D.S.

A CONTROL DEFINITION FUNCTION

Thought I’d share with your readers part of a program I’m working on. I need to have a control similar to the small double-pointed arrow used to set the time in the alarm clock, except acting more like the arrows in scroll bars, which activate only when you release the mouse button. According to the Control Manager section of Inside Macintosh, this requires writing a control definition function. The problem is, the other Toolbox routines treat this routine as if it were written in Pascal, and I want to use Aztec C. (Note: there is no problem calling a Pascal format toolbox routine from C). This required writing an assembly-language interface. [Manx informs me that they will soon be upgrading their C to allow imitatiing Pascal; this may still be useful for users of other C compilers]

My routine is called arrow_ctrl; this is actually the name of the assembly lang- uage interface which Toolbox routines like FindControl() call. It saves the caller’s address, then calls the high-level language routine a_ctrl. Since Pascal pushes arguements on the stack in the reverse order from C, I could have switched them in arrow_ctrl. Instead, I decided it was more efficient merely to reverse the order in a_ctrl (thus it varies from the archetypical MyControl() in IM). Aztec C returns the function value in register D0; Pascal expects it to be on the top of the stack. This is because Pascal functions pop their arguments off the stack; C requires the calling function to do this (thus allowing for variable numbers of arguments). [See figure 1 for an illustration of the stack used by C and Pascal; note distinction between words and longwords.]

What took me a bit longer to figure out was that C is using some registers that Pascal considers sacred. According to Manx, these were registers A2 and D3. An earlier version of my interface saved all registers except D0 and SP; you might want to do this for safety if you’re using a different compiler.

C PROGRAM SHELL

/* args are reversed because of Pascal
         call */
long a_ctrl(param,message,ctrl,
 variation)
int      variation,message;
ControlHandle ctrl;
long    param;
{
   Rect        *r;
  
   r = &((**ctrl).contrlRect);    /*pointer 
                      to control’s rectangle */
   switch (message) {
        case initCntl:

.
. etc.
.
   }
   return(OL);
}
ASSEMBLY PROGRAM

long save_r, save_a2, save_d3;   /* Used                             
     in ASM interface  */
#asm
 public arrow_ct_;note truncation

arrow_ct_:

move.l (SP)+, save_r_;pop return addr.
move.l A2, save_a2_;save registers                       that C doesn’t, 
but Pascal does
move.l D3, save_d3_
jsr a_ctrl_ ;call C routine
add.w #12,SP;wipe out params
move.l D0,(SP) ;put return value in Pascal position
move.l save_a2_,A2 ;restore register
move.l save_d3_,D3 ;restore register
move.l save_r_, -(SP);push return addr
rts;return to caller
#endasm

David Dunham

Goleta, CA.

MacPascal Looks Great!

The idea of a magzine devoted to programming and programmers is great. I am really looking forward to getting the first issue. I hope you have some good articles on MacPascal. I got mine the other day and it really looks nice. I just wish Apple would have put in a tutorial since I don’t know Pascal that well (yet). Oh well, learning the hard way is part of the fun. The store where I work is starting a Macintosh Users Group. We plan a newsletter and hopefully a BBS. When we get the newsletter printed up, I’ll send you a copy of it.

Jeff Goza

Abilene, TX.

Inside Mac Trouble

I am writingin regards to your ad in the new MacWorld. Journal looks really fantastic for me. I have trouble with Inside Mac, but seem to have more assembly /Pascal experience than most. However, I am a student, and [it follows...] poor. So, if you would, please send me a sample issue of MacTech at your convenience to try it out. (Enclosed is $2 for said issue).

Barry Polley

Ithaca, NY

Sample issue from last month is on the way. D.S.

C Questions...

I recieved my first issue of MacTech. Terrific! If the content continues to improve from this level of good programming aids for the Mac, it will be a superior Tech Journal. A few quick questions: Several references are made to Consulair C; I would appreciate more info on availability and cost. How does the Aztec C for the Mac stack up against the Consulair C or the Hippo C or others? This might make a good short article for MacTech. I use the Aztec C for the Apple II but it came bare-bones with no support library for Apple Graphics, sound or anything. Is the Aztec Mac C any beter?

David B. William

Professor of Music

Illinois State U.

We currently are avoiding the software review tar pits. But Bob may wish to respond in the next issue.

Doctor’s Orders

I recently noticed your ad in the MacWorld (Jan. 85) issue. It looks as though this may be what the doctor (Ph.D.) ordered! And would you please be sure to include the Nov. 84 [Dec] issue.

Dr. Bill Roberts

Golden, CO.

The Dec. issue is only available for $3, as there are just a few left. D.S.

MOUSEHOLE REPORT

RUSTY HODGE

SYS OP

A MAC BBS

Benchmarks

Here are some “Sieve” benchmark measurements in case no one else has provided them:

MacPascal ..... 1,270 seconds

Basic 2.0 ...... 1,156 seconds

Basic 2.0 (compressed).... 1,040 seconds

I tried programming MacBasic V.82 but had series problems with system errors. (It’s not ready for anything serious yet). Interesting part was that it said “DIM Flags(8190) exceeded dimension limits”. Congrats on issue two, it’s stuffed with lots of goodies and will take a month to explore each of the different articles. I’m kinda disappointed that MacPascal was slower than basic. The “compressor” aspect of Basic 2.0 looks like a good efficiency improver with 15-20 percent for this small program.

JCOM

MacTech

Just got my first MacTech and it looks great!!! Finally something to explain that #$@*@ IM manual! If you are considering sending in your $$ to get MacTech, do it now. Don’t wait, you won’t be sorry. What do I need to do to get Vol. 1, No. 1? I’ll send my right arm to get that assembly shell. Sounds great.

THE ATOM

MS WORD

I just got the Dec. 15 version of MS Word and I must say that it is just what I need in the way of a real word processor. You can have four documents open at once and you can divide them into two sections just like Multiplan. I had heard that the older versions of Word worked really slow, but this seems to work fine and has drivers for lots of letter quality printers. It is not all that easy to change fonts and stuff, but how many times do you really use more than 2 or 3 fonts in a file? Also you have a horizontal scroll bar taht goes out to somewhere around 18" so that problem is history. Also support of footnotes and other goodies make this the real Word processor that anyone who needs series word processing needs. This version still doesn’t have multiple rulers, but I will call them up and see if they are going to implement them. And as most MS products, Word has a nice help file and other goodies.

THE WATCHMAN

WAIT FOR CALL...FOREVER!

When using MacTerminal and Apple modems, do NOT select “Wait for Call”. Just do nothing after starting and it WILL answer calls. With Hayes modems, DO select “Wait for Call”. Apparently the Apple modem isn’t as Hayes compatable as we thought.

ROBERT WIGGINS

SOFTWARE SUPPLEMENT WORTH IT!

If anyone is considering buying INSIDE MACINTOSH from Apple, spend the extra $100 and get the software supplement too. Not only are you the first on your block to get the new Mac utilities (like resource editor), but you also get all the Lisa software. Useless if you don’t have a lisa you ask? The software is no good to you, but I’ve already gotten my money back by using those disks instead of buying another couple of boxes of blank ones!

BURRILL SMITH

 
AAPL
$111.78
Apple Inc.
-0.87
MSFT
$47.66
Microsoft Corpora
+0.14
GOOG
$516.35
Google Inc.
+5.25

MacTech Search:
Community Search:

Software Updates via MacUpdate

LibreOffice 4.3.5.2 - Free Open Source o...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
CleanApp 5.0.0 Beta 5 - Application dein...
CleanApp is an application deinstaller and archiver.... Your hard drive gets fuller day by day, but do you know why? CleanApp 5 provides you with insights how to reclaim disk space. There are... Read more
Monolingual 1.6.2 - Remove unwanted OS X...
Monolingual is a program for removing unnecesary language resources from OS X, in order to reclaim several hundred megabytes of disk space. It requires a 64-bit capable Intel-based Mac and at least... Read more
NetShade 6.1 - Browse privately using an...
NetShade is an Internet security tool that conceals your IP address on the web. NetShade routes your Web connection through either a public anonymous proxy server, or one of NetShade's own dedicated... Read more
calibre 2.13 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital librarian... Read more
Mellel 3.3.7 - Powerful word processor w...
Mellel is the leading word processor for OS X and has been widely considered the industry standard since its inception. Mellel focuses on writers and scholars for technical writing and multilingual... Read more
ScreenFlow 5.0.1 - Create screen recordi...
Save 10% with the exclusive MacUpdate coupon code: AFMacUpdate10 Buy now! ScreenFlow is powerful, easy-to-use screencasting software for the Mac. With ScreenFlow you can record the contents of your... Read more
Simon 4.0 - Monitor changes and crashes...
Simon monitors websites and alerts you of crashes and changes. Select pages to monitor, choose your alert options, and customize your settings. Simon does the rest. Keep a watchful eye on your... Read more
BBEdit 11.0.2 - Powerful text and HTML e...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more
ExpanDrive 4.2.1 - Access cloud storage...
ExpanDrive builds cloud storage in every application, acts just like a USB drive plugged into your Mac. With ExpanDrive, you can securely access any remote file server directly from the Finder or... Read more

Latest Forum Discussions

See All

Make your own Tribez Figures (and More)...
Make your own Tribez Figures (and More) with Toyze Posted by Jessica Fisher on December 19th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
So Many Holiday iOS Sales Oh My Goodness...
The holiday season is in full-swing, which means a whole lot of iOS apps and games are going on sale. A bunch already have, in fact. Naturally this means we’re putting together a hand-picked list of the best discounts and sales we can find in order... | Read more »
It’s Bird vs. Bird in the New PvP Mode f...
It’s Bird vs. Bird in the New PvP Mode for Angry Birds Epic Posted by Jessica Fisher on December 19th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Telltale Games and Mojang Announce Minec...
Telltale Games and Mojang Announce Minecraft: Story Mode – A Telltale Games Series Posted by Jessica Fisher on December 19th, 2014 [ permalink ] | Read more »
WarChest and Splash Damage Annouce Their...
WarChest and Splash Damage Annouce Their New Game: Tempo Posted by Jessica Fisher on December 19th, 2014 [ permalink ] WarChest Ltd and Splash Damage Ltd are teaming up again to work | Read more »
BulkyPix Celebrates its 6th Anniversary...
BulkyPix Celebrates its 6th Anniversary with a Bunch of Free Games Posted by Jessica Fisher on December 19th, 2014 [ permalink ] BulkyPix has | Read more »
Indulge in Japanese cuisine in Cooking F...
Indulge in Japanese cuisine in Cooking Fever’s new sushi-themed update Posted by Simon Reed on December 19th, 2014 [ permalink ] Lithuanian developer Nordcurrent has yet again updated its restaurant simulat | Read more »
Badland Daydream Level Pack Arrives to C...
Badland Daydream Level Pack Arrives to Celebrate 20 Million Downloads Posted by Ellis Spice on December 19th, 2014 [ permalink ] | Read more »
Far Cry 4, Assassin’s Creed Unity, Desti...
Far Cry 4, Assassin’s Creed Unity, Destiny, and Beyond – AppSpy Takes a Look at AAA Companion Apps Posted by Rob Rich on December 19th, 2014 [ permalink ] These day | Read more »
A Bunch of Halfbrick Games Are Going Fre...
A Bunch of Halfbrick Games Are Going Free for the Holidays Posted by Ellis Spice on December 19th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »

Price Scanner via MacPrices.net

The Apple Store offering free next-day shippi...
The Apple Store is now offering free next-day shipping on all in stock items if ordered before 12/23/14 at 10:00am PT. Local store pickup is also available within an hour of ordering for any in stock... Read more
It’s 1992 Again At Sony Pictures, Except For...
Techcrunch’s John Biggs interviewed a Sony Pictures Entertainment (SPE) employee, who quite understandably wished to remain anonymous, regarding post-hack conditions in SPE’s L.A office, explaining “... Read more
Holiday sales this weekend: MacBook Pros for...
 B&H Photo has new MacBook Pros on sale for up to $300 off MSRP as part of their Holiday pricing. Shipping is free, and B&H charges NY sales tax only: - 15″ 2.2GHz Retina MacBook Pro: $1699... Read more
Holiday sales this weekend: MacBook Airs for...
B&H Photo has 2014 MacBook Airs on sale for up to $120 off MSRP, for a limited time, for the Thanksgiving/Christmas Holiday shopping season. Shipping is free, and B&H charges NY sales tax... Read more
Holiday sales this weekend: iMacs for up to $...
B&H Photo has 21″ and 27″ iMacs on sale for up to $200 off MSRP including free shipping plus NY sales tax only. B&H will also include a free copy of Parallels Desktop software: - 21″ 1.4GHz... Read more
Holiday sales this weekend: Mac minis availab...
B&H Photo has new 2014 Mac minis on sale for up to $80 off MSRP. Shipping is free, and B&H charges NY sales tax only: - 1.4GHz Mac mini: $459 $40 off MSRP - 2.6GHz Mac mini: $629 $70 off MSRP... Read more
Holiday sales this weekend: Mac Pros for up t...
B&H Photo has Mac Pros on sale for up to $500 off MSRP. Shipping is free, and B&H charges sales tax in NY only: - 3.7GHz 4-core Mac Pro: $2599, $400 off MSRP - 3.5GHz 6-core Mac Pro: $3499, $... Read more
Save up to $400 on MacBooks with Apple Certif...
The Apple Store has Apple Certified Refurbished 2014 MacBook Pros and MacBook Airs available for up to $400 off the cost of new models. An Apple one-year warranty is included with each model, and... Read more
Save up to $300 on Macs, $30 on iPads with Ap...
Purchase a new Mac or iPad at The Apple Store for Education and take up to $300 off MSRP. All teachers, students, and staff of any educational institution qualify for the discount. Shipping is free,... Read more
iOS and Android OS Targeted by Man-in-the-Mid...
Cloud services security provider Akamai Technologies, Inc. has released, through the company’s Prolexic Security Engineering & Research Team (PLXsert), a new cybersecurity threat advisory. The... Read more

Jobs Board

*Apple* Store Leader Program (US) - Apple, I...
…Summary Learn and grow as you explore the art of leadership at the Apple Store. You'll master our retail business inside and out through training, hands-on experience, Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.