• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

HELP! Learning 68k assembler, Bad F-line instruction/crash in first type-in program

So, I'm running the 'Coin' program from the book MPW and Assembly Language Programming for the Macintosh (1987)

It's giving a bad F-line instruction on line 100

Macsbug gives the following:

Unimplemented instruction at 00000100

No procedure name

000100    DC.W   $FFFF

I'm pretty sure this is due to it being a newer System and possibly RAM/Disk?

My system is:

Macintosh Classic with 4MB memory

Scsi2sd with 4x 2gb volumes

System 7.0.1 with tune-up, extensions off

MPW version 3.2.2 configured according to the instructions in the book.

This is the program I'm trying to run.  I have verified that it is correct line for line.

It builds and links properly, and I am running it according to the instructions.

Can anyone who knows assembly on these machines point to why this code would crash my machine?

I don't have any other known issues with the hardware/software.

Here is a screenshot of the listing.  This is from the following pdf on page 24.  Any help would be appreciated.  Thanks!

http://vintageapple.org/macprogramming/pdf/MPW_and_Assembly_Language_Programming_for_the_Macintosh_1987.pdf

Listing 3-1.pngListing 3-1 (Cont'd).png

 
Last edited by a moderator:
So, I'm running the 'Coin' program from the book MPW and Assembly Language Programming for the Macintosh (1987)

It's giving a bad F-line instruction on line 100

Macsbug gives the following:

Unimplemented instruction at 00000100

No procedure name

000100    DC.W   $FFFF

I'm pretty sure this is due to it being a newer System and possibly RAM/Disk?
There's a bad branch somewhere, or perhaps a stack imbalance. Program execution is reaching the 68000 vectors in low memory. Double-check your source listing for errors; maybe you missed something from the listing in the book. If that still doesn't solve your problem, then you need to post the binary listing of your program so we can see what instructions are in your program after it's been assembled and linked.

 
Last edited by a moderator:
So, after trying the next piece of code in the book on a whim and finding it worked, I decided to push through the lessons in the book and managed to learn enough to start stripping out some of the code to see what call was at fault.  That, and I ran into the problem again in chapter 16.  It turns out that I’m running into this exact issue.  I’ll post again in here if it turns out I’m wrong, but it seems as if earlier versions of the System didn’t require their own QuickDraw variables.  I’m going to follow the advice in this thread and see how far I get:




 
Back
Top