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

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 »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more

Jobs Board

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
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, 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.