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

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom 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.