TweetFollow Us on Twitter

Apr 86 Letters
Volume Number:2
Issue Number:4
Column Tag:Letters

Letters

Stolen From a Mac?

Erik Westra

Wellington, New Zealand

Your magazine is absolutely fantastic. I find that I can use something from every artical, even though I work mostly in assembler. I hope that the "Electrical Mac" column continues; it's got just the type of info that you can't normally get hold of.

Here's something you might be interested in. While I was poking about in the Mac's ROM, I took a look at the bit of code Steve Jasik mentioned on page 48 of your May 1985 issue. Steve said that the code blasts 32 long words into RAM and then hangs. This is the code he was talking about (on a 512K Mac):

40AD30: LEA $40AD40,A0
 MOVEQ  #$18,D1
40AD36: MOVE.L (40)+,(A1)
 ADDA.W D0,A1
 DBRA D1,$40AD36
 BRA  *-02

Looking at this, I thought that this might be the code that displays the "sad Macintosh" icon on the screen if the system bombs while booting. I displayed the 32 long words at $40AD40 as an icon using a program I'd writen in Kriya's NEON language, and look what I found (displayed at twice it's size):

Maybe the code is called by the RAM based operating system if it finds it's using funny hardware (eg, in a Mac lookalike).

[Our Forth editor, Jörg Langowski, recently paid us a visit here in Placentia while visiting from France, and I showed him Mr. Westra's letter. He was most intrigued and promtly wrote this little stolen icon finder program in Mach 1, the subject of his Threaded Code column this month. The icon is shown at twice it's normal size by this program. Note that the location of this code is different in the new ROMS! A sincere thank you Erik, for sharing this with your US friends. To my knowledge, this has never been revealed! -Ed.]

( demo to get the stolen Apple icon out of the ROM )
( c ) ( J. Langowski 1986 for MacTutor )
( start address of the icon is at $40E132, on a Mac Plus)
( and at $40AD40 on a 512K Mac, found with NOSY 2.0)

hex
variable icon   variable icnrect 4 vallot
40e132 icon !
00800080 icnrect ! 00c000c0 icnrect 4 + ! ( use double size )

: stolen icnrect icon call ploticon ; 
   ( don't know why to use pointer instead of handle for ICON )

Feature Articles?

Paul Devey

Ottawa, Ontario

Mactutor is the best Journal I have seen anywhere for any price. I have waited for years for a journal of your calibur. Please sign me up for a one year subscription as well as all of the back issues. How about sometimes having a feature section or feature issues on different topics such as graphics, sound, I/O etc. Keep up the great work. The only place you should be able to find PHLUFF is between your toes. [This month we feature desk accessories! -Ed.]

Abstract Wanted

William T. Cox

Madison, Wi.

Have you considered offering a subscription to source disks? I have no idea what your demand is, but ( based on the last year) I believe that many people would be intersted. Have you considered offering an index/abstract list for volume 1? A Microsoft File data disk would be a useful offering. A brief abstract or keyord list could be included with each article record. Thanks for a fine magazine! [Maybe the folks at MacBriefs would make us one. -Ed]

Likes Fortran

John Fineout

Duncanville, Tx

Enclosed is my payment for 1986 MacTutor subscription. I depend on your publication heavily to learn insights into programing the Macintosh. I am using Mac Fortran 2.1 forom Microsoft and Macintosh Pascal. I have missed the articles on Fortran in the alast few issues. I have ported several progams from an DEC VAX 11/750 over to the Macintosh with very little problem. I am interested to learn more on how to create a Macintosh environment for input and output for such routines. Other unknowns are how to make use of the keypad and detect tab and enter as a line terminator.

The following Mac Fortran program can be used in substitution for the VAX Fortran time and date system call. It can be made into a subroutine that returns the 23 character time and date sring similar to the VAX. [Note: code below is re-typed from a letter, not pasted from source code as we normally do, so beware. -Ed.]

 Program Time_Date
 Character Months(12)*3,APM*3,datetime*23
 Integer Seconds,MM,DD,YY,L,M
 Real Hours
 Data Months/'JAN','FEB','MAR','APR','MAY','JUN', 
2      'JUL','AUG', 'SEP',''OCT','NOV','DEC'/
 Call Time(Seconds)
 Hours = Seconds/86400.0*24.0
 L = AINT(Hours)
 Mins = (Hours - L)* 60.0
 if (L .gt. 12) then
 APM = ' pm'  
 L = L - 12
 Else
 APM = ' am'
 End if
 Call Date(MM,DD,YY)

 Write(datetime,fmt='I2,A,I2.2,A3,
2     a6,I2,a,A3,a,I2')  L,char(58),Mins,APM,
2     ' Date ',DD,char(45), Months(MM),char(45),YY
 Write (9,100)datetime
100Format ('Time is now ',a23)
 pause
 stop
 end

Maybe this will be helpful to someone. Please deep the Fortran articles coming. [What would be the most help is to convince Microsoft to support and upgrade Fortran to run under HFS on the Mac Plus before 1988, and to make their linker more MDS compatible and bug free. A decent Mac interface would be nice also. And don't forget to mention finishing the parameter glue file support and documentation! -Ed.]

Notes on Basic

Gary Voth

Ontario, Ca

I want to say that I enjy Dave Kelly's fine columns on BASIC programming. BASIC is a favorite language of mine, despite its limitations. I love the interactive pampering that only an interpreted language can give.

However, I spotted an error or two in the January article on using scroll bars from BASIC. I'd like to share the corrections with your readers.

On page 25 the author notes a problem using the BASIC function DEFINT a-z with library calls. To prevent errors from occurring when library routines care called, he recommends defining integer arguments individually (by using the % sign) instead of using the DEFINT statement. Actually, this does prevent the errors, but only by accident!

The reason that calling a bibrary routine creates an error after a DEFINT statement has to do with the way the routines are accessed by BASIC. When a programmer invokes a library routine, such a

CALL  DisposeScroll(ScrID%)

BASIC actually creates a data structure in memory that contains the routine's object code and (in our example) assigns the starting address the variable name "DisposeScroll." Since BASIC's interger data type is 16 bits long, and Macintosh memory locations require at least 24 bits to represent, an error is generated if the variable "DisposeScroll" is defined as an interger (as would be the case after a DEFINT statement)!

It is easy to work around this limitation, however, by designating our llibrary routine names as single-precision (32 bit) variables using the ! sign. This is done in the form below:

            DEFINT a-z
            Call DisposeScroll!(scrID)

Alternatively, you can use the form:

          DEFINT a-z
             DisposeScroll! ScrID

Note that this is essentially the same thing as calling an assembly language routine that has been appended to BASIC the old fashioned way-by POKE-ing it into an array. The array's starting address, as returned by the VARPTR function, can never be forced into an integer:

          DEFINT a-z
             ...
             DisposeScroll!=VARPTR(AsmArray(0)
          CALL DisposeScroll!(ScrID) 

One more note: In the question and answer section the author discusses ways to clear parts of the screen individually without using the CLS function. (By "screen" we of course mean window.) One simple way of doing this that wasn't mentioned is to "paint" with white. Use the Quickdraw call FILLRECT or the BASIC LINE statement to draw a rectangle of white pixels over the section of the window that neds to be erased. For example:

Black% = 33
White% =30
...
LINE(50,50)-(100,100),White%,bf

will erase a section of the current output window 50 pixels square. Of course, the current penmode shold be the default COPY mode. If it has been changed the programmer should restore it with a CALL PENMODE(8) statement.

HFS and Dollars & $ense

Terry A. Ward

Cedar Falls, La

I read with interest the status of commecial software with the HFS file system (vol.2 #1). I noticed that Dollars & $ense is noted as bombing with an insufficient memory message. A quick fix that has worked for me is to reduce the number of desk accessories in the system. By reducing the size of desk accessories from 22,730 bytes to 12,926 I am able to use the product with no problems.

Keep up the great work with MacTutor!

The Max Board!

Mike Carlton

Berkeley, Ca

In the Dec. 1985 issue you have included one of my posts on the MouseHole, concerning the MacMemory board. I would like to make a few corrections now that some new information has come to light. I spoke to some of the MacMemory people at the MacWorld conventionin San Francisco and the told me that the TheMax is NOT compatible with the new ROMs from apple. However, they want to be fair to their customers so they are offering an upgrade, at their cost, to TheMax2. This new board comes; with 2 meg. of RAM and sockets for expansion to 4 meg! All you ned to do is plug in 16 1 meg. chips and you have a 4 meg. Mac. The new board is compatible with the new ROMs; however, if you use the new ROMs, you lose the non-volitable RAM disk.

Anyone with TheMax should contact their dealer. MacMemory is selling the boards to the dealers at cost and asking the dealers to do the upgrade (just a board swap) at no profit. They said prices shold be around $150, but this wasn't finalized.

Friend of MacTutor

Doyle B. Myers

Seattle, Wa

I heard about your "setback" - the loss of your equipment and records from Steve Brecher, my Compu Serve buddy. He suggested that subscribing to MacTutor would be a nice way to help out, and you've got such an impressive reputation with all my fellow developers that I have no problems at all with that. Good luck and keep up the good work! [Thank you very much and to all of our friends and supporters who have expressed their appreciation for our continued publication. -Ed.]

Renewal to ease the pain

Rod Paine

Purcellville, Va

Sorry to learn of your robbery at MacTutor, I hope you're able to put things back together without too much of a loss being sustained.

I know that every little bit can help right now, so I've enclosed a subscription renewal... I think mine is up about August, but in any ccase please add this onto it.

While we only met briefly at the Boston Mac Expo and we'd never be able to pick each other out in a crowd, what you are poviding the readers of MacTutor does maake you stand out... and I'm pleased to be a part of the readership and what MacTutor stands for. [Spoken like a true old-timer! Thanks very much. -Ed.]

Share your technical thoughts on Mac snooping and programming. Write to MacTutor today!

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Recruit two powerful-sounding students t...
I am a fan of anime, and I hear about a lot that comes through, but one that escaped my attention until now is A Certain Scientific Railgun T, and that name is very enticing. If it's new to you too, then players of Blue Archive can get a hands-on... | Read more »
Top Hat Studios unveils a new gameplay t...
There are a lot of big games coming that you might be excited about, but one of those I am most interested in is Athenian Rhapsody because it looks delightfully silly. The developers behind this project, the rather fancy-sounding Top Hat Studios,... | Read more »
Bound through time on the hunt for sneak...
Have you ever sat down and wondered what would happen if Dr Who and Sherlock Holmes went on an adventure? Well, besides probably being the best mash-up of English fiction, you'd get the Hidden Through Time series, and now Rogueside has announced... | Read more »
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 »

Price Scanner via MacPrices.net

May 2024 Apple Education discounts on MacBook...
If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take up to $300 off the purchase of a new MacBook... Read more
Clearance 16-inch M2 Pro MacBook Pros in stoc...
Apple has clearance 16″ M2 Pro MacBook Pros available in their Certified Refurbished store starting at $2049 and ranging up to $450 off original MSRP. Each model features a new outer case, shipping... Read more
Save $300 at Apple on 14-inch M3 MacBook Pros...
Apple has 14″ M3 MacBook Pros with 16GB of RAM, Certified Refurbished, available for $270-$300 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year warranty is... Read more
Apple continues to offer 14-inch M3 MacBook P...
Apple has 14″ M3 MacBook Pros, Certified Refurbished, available starting at only $1359 and ranging up to $270 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year... Read more
Apple AirPods Pro with USB-C return to all-ti...
Amazon has Apple’s AirPods Pro with USB-C in stock and on sale for $179.99 including free shipping. Their price is $70 (28%) off MSRP, and it’s currently the lowest price available for new AirPods... Read more
Apple Magic Keyboards for iPads are on sale f...
Amazon has Apple Magic Keyboards for iPads on sale today for up to $70 off MSRP, shipping included: – Magic Keyboard for 10th-generation Apple iPad: $199, save $50 – Magic Keyboard for 11″ iPad Pro/... Read more
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

Jobs Board

Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
*Apple* App Developer - Datrose (United Stat...
…year experiencein programming and have computer knowledge with SWIFT. Job Responsibilites: Apple App Developer is expected to support essential tasks for the RxASL 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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.