Feb 97 Tips

Volume Number: 13 (1997)
Issue Number: 2
Column Tag: Tips & Tidbits

# Tips & Tidbits

By Steve Sisak

I hope this surprises at least some readers and helps avoid a bug or two. Here's a self-test to see what you know about subtraction. Be honest.

On a PPC chip, which of the following sets the carry bit (assuming an instruction form that sets the carry is used)?

a) 0 - 0

b) 0 - 1

On a 68K chip, which sets the carry?

c) 0 - 0

d) 0 - 1

Did you answer (a) and (d)? That's right. Subraction is defined differently on PPC than on 68K, which might catch you off guard, especially if you're an old hand at 68K asm.

On 68K, sub d0,d1 is defined as d1 = d1 - d0, and the carry behaves like a simple borrow. However, PPC makes direct use of the definition -n = NOT(n) + 1 and, subf r5,r3,r4 is defined as r5 = r4 + NOT(r3) + 1, making the XER[CA] bit (for instructions that update it) reflect an addition carry instead of a borrow.

This difference propagates to extended subtraction. You would do extended subtraction similarly on either chip.

68K:

1) sub low words.

2) subx high words.

PPC:

1) subfc low words.

2) subfe high words.

However, the internal details are different.

subx d0,d1 --> d1 = d1 - d0 - X bit.

subfe r5,r3,r4 --> r5 = r4 + NOT(r3) + XER[CA].

There are many other examples where the carry works completely differently on the two chips (e.g., arithmetic right-shifts).

68K: carry is set (for any type of source) if and only if the LAST bit shifted out of the right was a one.

PPC: carry is set only if the source was negative and ANY ones are shifted out of the right.

Yes, it's all in the manuals, but who reads manuals?

Bill Karsh
billKarsh@aol.com

1) When patching a libraray, _Open needs more param block fields cleared than does _OpenDF.

2) when changing the font of a (popup) menu by hooking the MDEF, LastSPExtra must be set to -1 to clear the font cache both before calling the MDEF and after restoring the font stuff.

Tony Nelson
tonyn@tiac.net

Having trouble getting Apple Menu Options' hierarchical menus to show? You may not have called MaxApplZone() early in your application. The various patches AMO installs require sufficient heap to draw the menus; if you don't expand your heap to its maximum early on, the patches may not have the right amount of memory available when first called, and your hierarchical Apple menu will not draw.

Brian Bechtel
blob@apple.com

Apple's System 7.5.3 (aka System 7.5 Update 2.0) adds a slick new way to quickly get around while in a StandardFile dialog. While the dialog is up, click on the desktop or any folder open on your desktop. You did not receive the annoying beep you expected as in 7.5.1 and earlier - instead, StandardFile took you right to that directory! This is invaluable when you have your deeply-nested work folder opened on the desktop and StandardFile decides to stick you in some remote location. Now anything visible is one click away! If Apple would give us the new movable modal file dialogs, we could really take advantage of this. These are coming in Copland, but I am hoping they will appear in System 7.6 that has OpenDoc built-in.

Bill Hayden
nikol@codewell.com

Community Search:
MacTech Search:

Civilization VI 1.1.0 - Next iteration o...
Sid Meier’s Civilization VI is the next entry in the popular Civilization franchise. Originally created by legendary game designer Sid Meier, Civilization is a strategy game in which you attempt to... Read more
Network Radar is an advanced network scanning and managing tool. Featuring an easy-to-use and streamlined design, the all-new Network Radar 2 has been engineered from the ground up as a modern Mac... Read more
Printopia 3.0.8 - Share Mac printers wit...
Run Printopia on your Mac to share its printers to any capable iPhone, iPad, or iPod Touch. Printopia will also add virtual printers, allowing you to save print-outs to your Mac and send to apps.... Read more
ForkLift 3.2.1 - Powerful file manager:...
ForkLift is a powerful file manager and ferociously fast FTP client clothed in a clean and versatile UI that offers the combination of absolute simplicity and raw power expected from a well-executed... Read more
BetterTouchTool 2.417 - Customize multi-...
BetterTouchTool adds many new, fully customizable gestures to the Magic Mouse, Multi-Touch MacBook trackpad, and Magic Trackpad. These gestures are customizable: Magic Mouse: Pinch in / out (zoom... Read more
Little Snitch gives you control over your private outgoing data. Track background activity As soon as your computer connects to the Internet, applications often have permission to send any... Read more
Google Chrome 65.0.3325.181 - Modern and...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
TeamViewer 13.1.2991 - Establish remote...
TeamViewer gives you remote control of any computer or Mac over the Internet within seconds or can be used for online meetings. Find out why more than 200 million users trust TeamViewer! Free for non... Read more
Printopia 3.0.8 - Share Mac printers wit...
Run Printopia on your Mac to share its printers to any capable iPhone, iPad, or iPod Touch. Printopia will also add virtual printers, allowing you to save print-outs to your Mac and send to apps.... Read more
BetterTouchTool 2.417 - Customize multi-...
BetterTouchTool adds many new, fully customizable gestures to the Magic Mouse, Multi-Touch MacBook trackpad, and Magic Trackpad. These gestures are customizable: Magic Mouse: Pinch in / out (zoom... Read more

## Latest Forum Discussions

The best games that came out for iPhone...
It's not a huge surprise that there's not a massive influx of new, must-buy games on the App Store this week. After all, GDC is happening, so everyone's busy at parties and networking and dying from a sinister form of jetlag. That said, there are... | Read more »
Destiny meets its mobile match - Everyth...
Shadowgun Legends is the latest game in the Shadowgun series, and it's taking the franchise in some interesting new directions. Which is good news. The even better news is that it's coming out tomorrow, so if you didn't make it into the beta you... | Read more »
How PUBG, Fortnite, and the battle royal...
The history of the battle royale genre isn't a long one. While the nascent parts of the experience have existed ever since players first started killing one another online, it's really only in the past six years that the genre has coalesced into... | Read more »
Around the Empire: What have you missed...
Oh hi nice reader, and thanks for popping in to check out our weekly round-up of all the stuff that you might have missed across the Steel Media network. Yeah, that's right, it's a big ol' network. Obviously 148Apps is the best, but there are some... | Read more »
All the best games on sale for iPhone an...
It might not have been the greatest week for new releases on the App Store, but don't let that get you down, because there are some truly incredible games on sale for iPhone and iPad right now. Seriously, you could buy anything on this list and I... | Read more »
Everything You Need to Know About The Fo...
In just over a week, Epic Games has made a flurry of announcements. First, they revealed that Fortnite—their ultra-popular PUBG competitor—is coming to mobile. This was followed by brief sign-up period for interested beta testers before sending out... | Read more »
The best games that came out for iPhone...
It's not been the best week for games on the App Store. There are a few decent ones here and there, but nothing that's really going to make you throw down what you're doing and run to the nearest WiFi hotspot in order to download it. That's not to... | Read more »
Death Coming (Games)
Death Coming 1.1.1.536 Device: iOS Universal Category: Games Price: \$1.99, Version: 1.1.1.536 (iTunes) Description: --- Background Story ---You Died. Pure and simple, but death was not the end. You have become an agent of Death: a... | Read more »
Hints, tips, and tricks for Empires and...
Empires and Puzzles is a slick match-stuff RPG that mixes in a bunch of city-building aspects to keep things fresh. And it's currently the Game of the Day over on the App Store. So, if you're picking it up for the first time today, we thought it'd... | Read more »
What You Need to Know About Sam Barlow’s...
Sam Barlow’s follow up to Her Story is #WarGames, an interactive video series that reimagines the 1983 film WarGames in a more present day context. It’s not exactly a game, but it’s definitely still interesting. Here are the top things you should... | Read more »

## Price Scanner via MacPrices.net

Thursday roundup of the best 13″ MacBook Pro...
B&H Photo has new 2017 13″ MacBook Pros on sale for up to \$200 off MSRP. Shipping is free, and B&H charges sales tax for NY & NJ residents only. Their prices are the lowest available for... Read more
Sale: 9.7-inch 2017 WiFi iPads starting at \$2...
B&H Photo has 9.7″ 2017 WiFi Apple iPads on sale for \$40 off MSRP for a limited time. Shipping is free, and pay sales tax in NY & NJ only: – 32GB iPad WiFi: \$289, \$40 off – 128GB iPad WiFi: \$... Read more
Apple has Certified Refurbished 9.7″ WiFi iPads available for \$50-\$80 off the cost of new models. An Apple one-year warranty is included with each iPad, and shipping is free: – 9″ 32GB WiFi iPad: \$... Read more
Back in stock! Apple’s full line of Certified...
Save \$300-\$300 on the purchase of a 2017 13″ MacBook Pro today with Certified Refurbished models at Apple. Apple’s refurbished prices are the lowest available for each model from any reseller. A... Read more
Wednesday deals: Huge sale on Apple 15″ MacBo...
Adorama has new 2017 15″ MacBook Pros on sale for \$250-\$300 off MSRP. Shipping is free, and Adorama charges sales tax in NJ and NY only: – 15″ 2.8GHz Touch Bar MacBook Pro Space Gray (MPTR2LL/A): \$... Read more
Apple offers Certified Refurbished Series 3 A...
Apple has Certified Refurbished Series 3 Apple Watch GPS models available for \$50, or 13%, off the cost of new models. Apple’s standard 1-year warranty is included, and shipping is free. Numerous... Read more
12″ 1.2GHz Space Gray MacBook on sale for \$11...
B&H Photo has the Space Gray 12″ 1.2GHz MacBook on sale for \$100 off MSRP. Shipping is free, and B&H charges sales tax for NY & NJ residents only: – 12″ 1.2GHz Space Gray MacBook: \$1199 \$... Read more
Mac minis available for up to \$150 off MSRP w...
Apple has restocked Certified Refurbished Mac minis starting at \$419. Apple’s one-year warranty is included with each mini, and shipping is free: – 1.4GHz Mac mini: \$419 \$80 off MSRP – 2.6GHz Mac... Read more
Back in stock: 13-inch 2.5GHz MacBook Pro (Ce...
Apple has Certified Refurbished 13″ 2.5GHz MacBook Pros (MD101LL/A) available for \$829, or \$270 off original MSRP. Apple’s one-year warranty is standard, and shipping is free: – 13″ 2.5GHz MacBook... Read more
Apple restocks Certified Refurbished 2017 13″...
Apple has Certified Refurbished 2017 13″ MacBook Airs available starting at \$849. An Apple one-year warranty is included with each MacBook, and shipping is free: – 13″ 1.8GHz/8GB/128GB MacBook Air (... Read more

## Jobs Board

*Apple* Genius - Technical Customer Service...
Job Description:Job SummaryAs a Genius at the Apple Store, you maintain customers' trust in Apple as the skilled technical customer service expert, Read more