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

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 »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | 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 »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »

Price Scanner via MacPrices.net

Apple Watch Ultra 2 now available at Apple fo...
Apple has, for the first time, begun offering Certified Refurbished Apple Watch Ultra 2 models in their online store for $679, or $120 off MSRP. Each Watch includes Apple’s standard one-year warranty... Read more
AT&T has the iPhone 14 on sale for only $...
AT&T has the 128GB Apple iPhone 14 available for only $5.99 per month for new and existing customers when you activate unlimited service and use AT&T’s 36 month installment plan. The fine... Read more
Amazon is offering a $100 discount on every M...
Amazon is offering a $100 instant discount on each configuration of Apple’s new 13″ M3 MacBook Air, in Midnight, this weekend. These are the lowest prices currently available for new 13″ M3 MacBook... Read more
You can save $300-$480 on a 14-inch M3 Pro/Ma...
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
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer 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 MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more

Jobs Board

*Apple* Systems Administrator - JAMF - Syste...
Title: Apple Systems Administrator - JAMF ALTA is supporting a direct hire opportunity. This position is 100% Onsite for initial 3-6 months and then remote 1-2 Read more
Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.