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

The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
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 »

Price Scanner via MacPrices.net

Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
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

Jobs Board

Licensed Practical Nurse - Womens Imaging *A...
Licensed Practical Nurse - Womens Imaging Apple Hill - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Regular Read more
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
Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular 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
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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.