TweetFollow Us on Twitter

Jul 85 Letters
Volume Number:1
Issue Number:8
Column Tag:Letters

Letters

Startup Disk

David Dunham

Maitreya Design

Goleta, CA.

I'd be willing to submit a DA that changes the default drive, but you should know that the default drive has absolutely nothing to do with the start-up disk [MacTutor, June 1985, p. 24]. To change the start-up disk, you'd need to close the open system file and open a new one. This could present problems, since the application may have handles to purged resources from the system file. I don't know what happens if the file's closed from under it. What are your writer's guidelines and how much do you pay? Nothing for tips in letters, I know from experience...

[Typical pay is $100 for a column. Another $50 if you become a regular contributing editor. We hope that some things (like letter tips) people will donate for the good of the cause; we only have so much $$ to go around...-Ed.]

MicroFinder Bug Fix

Shawn Mikiten

San Antonio, Tx.

MicroFinder [June MacTutor 1-7] works well as long as you do not select a file on the other disk drive. The bug appears in the way the _Launch trap runs the application. The filename is properly passed but not the volumne the file is on. The _Launch trap will automatically attempt to run the application on the disk the MicroFinder was started from because the filename did not have the volumne specifier before it. The solution lies in the _Pack3 reply record. The variable vRefNum contains the disk drive number of the file when it returns from a successful call. Using the vRefNum value obtained, it is put in a parameter block for the File Manager call _SetVol. The parameter used is ioDrvNum. The following are directions for patching the source code so that it will work (See File Manager /OS/FS.A.1, page 26 & 33 in the new "Inside Macintosh" phone book.)

Add _SetVol trap value:

.TRAP      _SetVol               $A015

The code following _PaintRect is to be added:

_PaintRect

;   Launch Routine here

LEA          PARMBLK, A0         ;get pointer
LEA           vRefNum, A1           ; get addr. of vRefNum
MOVE.W   (A1), 22(A0)           ; put vRefNum into the
                                                               ; ioDrvNum 
parameter.
_SetVol                                            ; set it. (note A0 
points to
                                                             ; the param. 
block!)

LEA        SFileName, A1          ; get addr. of filename

Next, add the data structures necessary for the Reply record and parameter block. Add vRefNum in the Reply record:

SFREPLY:         DC.B      0,0       ; good, copy 
                 DC.B      'TYPE'    ; FType     (ostype)
 vRefNum:        DC.W       0,0      ;  vRefNum, version 
SFILENAME:       DCB.B    63,0       ; fname (string[63]) 

And now the parameter block, to be added after the WHITEPAT definition (Note that the file name pointer must be nil to force invocation of vRefNum inserted into ioDrvNum.):

;  standard 8 field parameter block for setvol.

PARMBLK:           DC.L       0            ;ioLink ptr.
                                    DC.W      0           ; ioType
                                    DC.W      0           ; ioTrap
                                    DC.W      0          ; ioCmdAddr
                                    DC.L         0          ; ioCompletion 
ptr.
                                    DC.W        0          ; ioResult
                                    DC.L          0          ; ioFileName 
ptr.
                                    DC.W        0          ; ioDrvNum

I hope this bug fix will offset the cost of the MDS software I am about to purchase. I havebeen using a friends copy and find it the easiest assembler I have used in 7 years of Apple II's, Digital 2065, IBM PC and VAX computers!

[Shawn wins the $50 for being first with his bug fix. Thank you to the four other people who submitted a fix: Loftus Becker Jr. of Hartford, CT, who submitted a similar solution to Shawn's; Tom Taylor of Provo Utah and Neal Lebedin of Palm Bay, FL., both of whom submitted similar solutions but slightly different from Shawn's; And Paul Snively of Columbus, IN. in MacAsm...-Ed.]

More Bug Fix Comments

Loftus E. Becker, Jr.

Hartford, CT.

The bug in Chris Yerga's microfinder program (ID=26) is "failure to launch". This stems from the fact that the lanuch routine will look for the named file on the default volume unless it is told otherwise. Hence, when the microfinder program is run from the default volume (usually drive 1) and tries to launch a program on drive 2, Launch gets the filename, doesn't know it's on drive 2, and tries to launch from drive 1!

Two points may be of some interest. First this is a bomb that is not trapped by Macsbug. Second, a similar bug appears in the MDS development system: If you are developing a program with the .asm, .link, and other files on the external drive, but the program itsef on the internal drive, an attempt to run it from the TRANSFER menu in the linker will produce the same error.My compliments on a magzine that has gotten better with every issue.

Alternate Bug Fix

Tom Taylor

Provo, UT

This is similar in function , but uses the stack for the parameter block...

ioVQElSize           EQU   $40     ;io param blk length
ioCompletion       EQU   $C       ;offset (ptr.)
ioVNPtr                   EQU   $12     ;offset (ptr. or nil)
ioVRefNum          EQU   $16     ;offset (word)

SUB.L    #ioVQElSize, SP    ;allocate block on stack
MOVE.L  SP, A0                        ;block ptr. to A0
CLR.L     ioCompletion(A0)  ; I always clear this
LEA         SFReply, A1             ; reply record ptr to A0
MOVE.W 6(A1), ioVRefNum(A0)  
CLR.L      ioVNPtr(A0)             ;clear name ptr.

_SetVol                                           ; go for it...
ADD.L      #ioVQElSize, SP  ; dump block

MacAsm Version of Bug Fix

Paul Snively

Columbus, IN

Apparently the standard file package, even though it automatically senses the presence of a second disk drive and, if one is present, gives you the "Drive" button in the standard dialog box, does not automatically change the default volume if the "Drive" button is hit. Where I come from, features like this are called "bugs." In other words, as far as I'm concerned, the bug is in the standard file package, not Chris' code

.

01150 *--------------------------------
01160 *        Launch Routine (MacAsm)
01170 *--------------------------------
01180          LEA     ParamBlock(PC),A0       ;File Manager paramBlock
01190          LEA     vRefNum(PC),A1          ;Volume Reference Number
01200          MOVE.W  (A1),22(A0)             ;Move to paramBlock
01210          OST     SetVol                  ;Make the default volume
01220          LEA     SFileName(PC),A1        ;Get address of file name
01230          LEA     LaunchPtr(PC),A0        ;Get address of launch 
ptr
01240          MOVE.L  A1,(A0)                 ;Move pointer to name
01250          TBX     Launch                  ;And call Launch...

Don't Like Glossy Look

Warren Michelsen

Page, Az.

I may as well comment on your new glossy look. In a word, YUCK! The gloss degrades the readability. The older stock could be viewed at any angle without glare. The older stock holds up better too; (they receive very heavy use as I refer back to them constantly). [We agree; how do you like this look? -Ed.]

Need Pascal Detective on this Bug!

Jack Cassidy

San Diego, CA.

Put a MacPascal detective on this one! The program below causes a system error (ID=02). Needless to say, I discovered this bug in a much longer program and was very confused.

program SystemBomb;
type
   count = (one, two, three, four, five);
var
   simple:array[count] of integer;

begin
    simple[five]:=31;
end.

[We'll ask our resident guru, Steve Brecher to research out this one!]

Mental Starvation of MacWorld

Rick Barrett

Dallas, TX.

AH! EUREKA,

This is the publication that I've been looking for. It's not glossy [well...-Ed.], slick, or condescending. It's meat, fact, it's wonderful! Keep up the good work...I've been rescued from the mental starvation of MacWorld.

Desperately Seeking Chief Wizard

James Muirhead

I was dissappointed to see Chris Derossi's Pascal Procedures column missing from the last issue. I was all psyched for learning window dynamics and then there was a no-show. His column is a must. Please let him know that he is sorely needed and most appreciated.

[Chris has stopped writing for reasons known only to him; perhaps your plea will awaken him...-Ed.]

MacTutor leaves me Codeless

R. Onzo

FW. Inc.

I have just recieved your complimentary issue of MacTutor and I must admit that it was an immediate sale. Your "Journal" is certainly unique compared to anything I've ever seen and the anticipation of finally being able to associate myself with a first rate tech journal leaves me almost "codeless". You've honestly made me feel like I've been trapped inside my Mac. You seemd to have just peeked inside, found me there tangled in the chips and guided me to the nearest exit showing me in the interum, the vast highways leading outward (and subsequently, inward). [Wow! we did all that? Thanks for those kind words...-Ed.]

Changing Basic Poke Codes

Terry Bartelmey

Chicago, Il.

My print routines are set up with pokes to change PRINT to LPRINT and back. I have inquired with Microsoft as to the poke locations required for the Mac, but to no avail. Could you help? [YES! See Mike Steiner's column on the structure of a Basic Program. It has all the info you need to change PRINT to LPRINT under program control.-Ed.]

Imagewrite Cutesy, but...

David Haupt

Littleton, CO.

It is cutesy to have the magazine printed out on an imagewriter but unprofessional in appearance. It is not as easy to read as a typset style woulld be. One would think that any magazine would be able to at least afford 7 grand for the Apple laser printer, wouldn't one? That would drastically increase the readability and the perceived professional level of MacTutor simultaneously.

[MacTutor is run by individuals, who, like any of us, are poor! Seven grand is seven grand, no matter if you publish a magazine or not! However, we have sacrificed the baby's milk money and now have the laser, after a three month delivery delay from Apple! How do you like it now?-Ed.]

Untested Code?

Inexcuseable is the only word for publishing untested code. Just plain sloth. Yet that is exactly what Robert Denny confesses to print [in the May issue]. I like his column on C, but I am startled at his lack of professional pride.

[ I think your letter was a little hard on us; Bob's code was taken from a much longer program that is running, but the code fragments were not re-assembled into a program just to test them specifically, hence the warning. -Ed.]

 

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.