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

Ride into the zombie apocalypse in style...
Back in the good old days of Flash games, there were a few staples; Happy Wheels, Stick RPG, and of course the apocalyptic driver Earn to Die. Fans of the running over zombies simulator can rejoice, as the sequel to the legendary game, Earn to Die... | Read more »
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 below... | Read more »
Netflix Games expands its catalogue with...
It is a good time to be a Netflix subscriber this month. I presume there's a good show or two, but we are, of course, talking about their gaming service that seems to be picking up steam lately. May is adding five new titles, and there are some... | Read more »
Pokemon Go takes a step closer to real P...
When Pokemon Go was first announced, one of the best concepts of the whole thing was having your favourite Pokemon follow you in the real world and be able to interact with them. To be frank, the AR Snapshot tool could have done a lot more to help... | Read more »
Seven Knights Idle Adventure drafts in a...
Seven Knights Idle Adventure is opening up more stages, passing the 15k mark, and players may find themselves in need of more help to clear these higher stages. Well, the cavalry has arrived with the introduction of the Legendary Hero Iris, as... | Read more »
AFK Arena celebrates five years of 100 m...
Lilith Games is quite the behemoth when it comes to mobile games, with Rise of Kingdom and Dislyte firmly planting them as a bit name. Also up there is AFK Arena, which is celebrating a double whammy of its 5th anniversary, as well as blazing past... | Read more »
Fallout Shelter pulls in ten times its u...
When the Fallout TV series was announced I, like I assume many others, assumed it was going to be an utter pile of garbage. Well, as we now know that couldn't be further from the truth. It was a smash hit, and this success has of course given the... | Read more »
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 »

Price Scanner via MacPrices.net

Apple Studio Display with Standard Glass on s...
Best Buy has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Their price is the lowest available for a Studio Display among Apple’s retailers. Shipping is free... Read more
AirPods Max headphones back on sale for $449,...
Amazon has Apple AirPods Max headphones in stock and on sale for $100 off MSRP, only $449. The sale price is valid for all colors at the time of this post. Shipping is free: – AirPods Max: $449.99 $... Read more
Deal Alert! 13-inch M2 MacBook Airs on record...
Amazon has 13″ MacBook Airs with M2 CPUs in stock and on sale this week for only $829 in Space Gray, Silver, Starlight, and Midnight colors. Their price is $170 off Apple’s MSRP, and it’s the lowest... Read more
Apple Watch Ultra 2 on sale for $50 off MSRP
Best Buy is offering Apple Watch Ultra 2 models for $50 off MSRP on their online store this week. Sale prices available for online orders only, in-store prices may vary. Order online, and choose free... Read more
Apple introduces the new M4-powered 11-inch a...
Today, Apple revealed the new 2024 M4 iPad Pro series, boasting a surprisingly thin and light design that pushes the boundaries of portability and performance. Offered in silver and space black... Read more
Apple introduces the new 2024 11-inch and 13-...
Apple has unveiled the revamped 11-inch and brand-new 13-inch iPad Air models, upgraded with the M2 chip. Marking the first time it’s offered in two sizes, the 11-inch iPad Air retains its super-... Read more
Apple discontinues 9th-gen iPad, drops prices...
With today’s introduction of the new 2024 iPad Airs and iPad Pros, Apple has (finally) discontinued the older 9th-generation iPad with a home button. In response, they also dropped prices on 10th-... Read more
Apple AirPods on sale for record-low prices t...
Best Buy has Apple AirPods on sale for record-low prices today starting at only $79. Buy online and choose free shipping or free local store pickup (if available). Sale price for online orders only,... Read more
13-inch M3 MacBook Airs on sale for $100 off...
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, along with Amazon’s, are the lowest currently available for new 13″... Read more
Amazon is offering a $100 discount on every 1...
Amazon has every configuration and color of Apple’s 13″ M3 MacBook Air on sale for $100 off MSRP, now starting at $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD): $999 $100 off... Read more

Jobs Board

*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
Relationship Banker *Apple* Valley Main - W...
…Alcohol Policy to learn more. **Company:** WELLS FARGO BANK **Req Number:** R-367184 **Updated:** Wed May 08 00:00:00 UTC 2024 **Location:** APPLE VALLEY,California Read more
Rehabilitation Technician - *Apple* Hill (O...
Rehabilitation Technician - Apple Hill (Outpatient Clinic) - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Read more
LPN-Physician Office Nurse - Orthopedics- *Ap...
LPN-Physician Office Nurse - Orthopedics- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Medical Assistant Lead - Orthopedics *Apple*...
Medical Assistant Lead - Orthopedics Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.