Questions tagged [68000]

The 68000 is a 16/32 bit CISC CPU, originally designed by Motorola, Inc.

The 68000 is a 16/32 bit CISC CPU, originally designed by Motorola, Inc.

After its introduction in 1979, it rapidly became popular among the system designers of its time. In its heyday, the 68000 was used in computers from Hewlett-Packard, Apollo/Domain, Sun Microsystems, Commodore (Amiga), Atari (ST), and Apple, among others.

Today, the 68000 and its derivatives are primarily used in embedded systems.

232 questions
6
votes
2 answers

Why isn't # needed before numbers with DC.W (Define Constant), only instructions?

I have this line of code: X DC.W 5 This means basically X = 5 But shouldn't be X DC.W #5 ? When using MOVE I need always # MOVE.B #1,VAR
dynamic
  • 46,985
  • 55
  • 154
  • 231
5
votes
1 answer

M68K: predecrement on the same register

In M68040 asm, given: mov.l #0x1000, %a0 mov.l -(%a0), -(%a0) What is the %a0 value after the second mov? Is the register decremented twice or once? What instead of mov.l we use one of the few other instructions that support…
sbabbi
  • 11,070
  • 2
  • 29
  • 57
5
votes
1 answer

Decoding 68k instructions

I'm writing an interpreted 68k emulator as a personal/educational project. Right now I'm trying to develop a simple, general decoding mechanism. As I understand it, the first two bytes of each instruction are enough to uniquely identify the…
mwcz
  • 8,949
  • 10
  • 42
  • 63
5
votes
3 answers

68k register addresses

This question is begging for a bunch of "why are you doing this?" responses. I haven't been able to find this information in the 68k Programmer's Reference Manual, but that may be because I'm not sure of what verbiage to search for. Here is the…
mwcz
  • 8,949
  • 10
  • 42
  • 63
5
votes
1 answer

Prevent GCC from optimizing away a looped write to memory mapped address

I've got an address which points to a control port like so (for context I'm working on a Sega/Megadrive game): volatile u32 * vdp_ctrl = (u32 *) 0x00C00004; And an array of initial values I want to set: const u8 initial_vdp_vals[24] = { 0x20, …
grep
  • 3,986
  • 7
  • 45
  • 67
5
votes
1 answer

68000, portable JIT library

There are several JIT libraries, but is there any which emits Motorola 68000 style instructions, such as for instance 68000, 68040, 68060 or any of the Coldfire CPUs? Bonus points if it could emit for other platforms too, but 68k is most…
Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
5
votes
2 answers

Modulo in 68K assembly

I was wondering if there is a command/method to perform modulo in Motorola 68000 assembly? I want to perform d4 mod 1000 and d3 mod 100. Current I am using the following formula but this take several lines, if a mod n then a - (n * int(a/n)) I…
Dartuso
  • 122
  • 1
  • 8
5
votes
2 answers

68k assembly - plus symbol on address registers

While reverse engineering something for fun, I came across the following piece of assembly: move.b (a1)+,(a0)+ I understand that the parentheses mean 'value of', but what does the plus symbol stand for? How would I accurately translate this to C?
Daniel Sloof
  • 12,568
  • 14
  • 72
  • 106
5
votes
4 answers

68k Assembler on OS X Lion

I need to do some programming stuff in assembler for the 68k for my college class. I'm looking for a programm to do it on os x lion. I found easy68k which is running in wine, but I have the feeling that it's not working porperly. Any guess?
arnoapp
  • 2,416
  • 4
  • 38
  • 70
4
votes
2 answers

How can I segment my Palm OS 68K application?

If you have an 68K application written using CodeWarrior for Palm OS, how do you assign individual functions to different segments without manually moving files around in the segment tab in the IDE?
Ben Combee
  • 16,831
  • 6
  • 41
  • 42
4
votes
1 answer

Divide (DIVS) not working on jack crenshaw's let's build a compiler

I am following the excellent Let's Build a Compiler tutorial by Jack Crenshaw found at http://compilers.iecc.com/crenshaw. I am testing the generated 68k assembly with the Easy68k http://www.easy68k.com/ 68000 editor/assembler/simulator. I have got…
Caltor
  • 2,538
  • 1
  • 27
  • 55
4
votes
3 answers

What was the name of the Mac (68000) assembler?

I'm sure there were several, but the one I was thinking of would display a nice text screen when you crashed the computer thoroughly. The Text was "Well smoke me a kipper."
Dan Blair
  • 2,399
  • 3
  • 21
  • 32
4
votes
1 answer

Why is dbra so fast for a very large loop count in Motorola 68k?

I'm learning Motorola 68k assembly, and I wrote the following time wasting loop: move.l #0x0fffffff,%d0 bsr timewaster rts timewaster: dbra %d0,timewaster rts This time wasting loop finishes almost immediately. I stepped…
Jason
  • 302
  • 2
  • 10
4
votes
1 answer

GNU Assembler .long Declaration Zeroed Out

When assembling code with GNU Binutils declarations such as: .long MY_Label .long MY_Second_label Assemble without errors but consistently map to zeroed out 32-bit strings when doing a hex dump even when opcodes and other information separate them…
user2108
  • 43
  • 6
4
votes
5 answers

How can I turn an odd number even, or vice versa, in Motorola 68000 Assembly?

Basically if I had a number in D1, and wanted it to ALWAYS be even, how would I make sure it is never odd? I know it has something to do with the AND instruction. But when I tried that, it would always subtract 1. So it would turn odd numbers even…
1
2
3
15 16