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

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more
Sunday Sale: Apple iPad Magic Keyboards for 1...
Walmart has Apple Magic Keyboards for 12.9″ iPad Pros, in Black, on sale for $150 off MSRP on their online store. Sale price for online orders only, in-store price may vary. Order online and choose... Read more

Jobs Board

DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple 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
IT Systems Engineer ( *Apple* Platforms) - S...
IT Systems Engineer ( Apple Platforms) at SpaceX Hawthorne, CA SpaceX was founded under the belief that a future where humanity is out exploring the stars is Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.