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

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.