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

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance 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
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and 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.