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
2
votes
1 answer

What is the best way to handle errors in 68000 assembly language?

I've been writing a lot of 68K assembly language, recently, and I've noticed a pattern, roughly the following: do_something: movem.l d2-d5/a2-a3,-(sp) ... jsr xxx tst.l d0 beq open_error ... jsr yyy …
tim.smith
  • 143
  • 7
2
votes
3 answers

How do you define an enumeration in 68000 assembly language?

I'm using the assembler that came with the Manx Aztec C compiler (version 5.0) on a Commodore Amiga 500. I want to code the equivalent of the following C code: enum STATUS { STATUS_OKAY, STATUS_WAITING, STATUS_ERROR }; I tried the…
tim.smith
  • 143
  • 7
2
votes
1 answer

Not displaying output in branching program Motorola 68K

I'm having trouble displaying any output to my answer buffer after going through the loop even when I put in 2 it doesn't show that as an output. I'm sure my problem is in the for, if, or factor blocks but I have been looking at my code for a while…
Dom
  • 25
  • 5
2
votes
1 answer

68k ASM addressing modes

I learned some 68k/Coldfire at the Uni, and having difficult understanding the more complex addressing modes (with the numbers near the parentheses of dereference). I think example are the best here: A) lea: A1) lea $5(a1,a2.l), a0 A2) lea…
Lala yoyo
  • 36
  • 3
2
votes
1 answer

How to implement logical OR || in an if() condition in easy68k?

Suppose I have a to compare a data register and i have to compare it to equalling one of 2 numbers. how would i go about that? I know how to do it for just comparing with one number not 2. CMP #0, D3 BNE ELSE REST OF THE CODE HERE How do i compare…
romano
  • 23
  • 2
2
votes
2 answers

Function pointers in 68k assembly for Ti-89

I have been trying to build a home-brew B cross-compiler for my Ti-89 for a few months now, and am finally at the point at which I would like to generate assembly which my calculator executes. The language is 'B' in the sense that there is only 1…
2.71828-asy
  • 171
  • 1
  • 5
2
votes
4 answers

What Does # Mean in Assembly?

For example, what would be the difference between, MOVE 8,D2 and MOVE #8,D2? Just wondering what the # represents and what would happen without it.
User9123
  • 675
  • 1
  • 8
  • 20
2
votes
2 answers

68k Assembly: Does the CPU does store the status register on interrupt?

I have not been able to find any information as to whether the MC68000 preserves its status register / CCR during external interrupts. I imagine it would be an issue if the CPU were to interrupt immediately before a conditional branch, and the…
cjgriscom
  • 176
  • 1
  • 12
2
votes
2 answers

Basic for-loop in 68k assembly?

I'm attempting to write a program which requires the use of a for-loop, among other things. I am having a terrible time trying to find examples of basic code such as this on other websites. If someone could please provide me with a simple for loop,…
Blackbinary
  • 3,936
  • 18
  • 49
  • 62
2
votes
2 answers

Understanding user vs. system stack pointers in Motorola 68k

I'm trying to understand the usage and implementation of a Stacks in assembly language (Motorola 68k). I know that the MC 68k, has 8 address registers, A7 being the special one. Since it's two stack pointers, sharing the name of "System stack…
TTEd
  • 309
  • 1
  • 10
2
votes
1 answer

How can globalizing 2 small arrays result in significant performance drop?

I have 2 small local arrays: short int xpLeft [4], xpRight [4]; The moment I make them global (to access them in different method, but only within same C file (e.g. not accessible to other modules)), the performance (on Motorola 68000) drops.…
3D Coder
  • 498
  • 1
  • 5
  • 10
2
votes
1 answer

How to make GNU as output dependencies only?

I'm working on an assembly-language project using GNU bintools 2.25 built to target m68k-elf, with GNU make 3.81 handling the build. (As this is an assembly-only project, I do not have gcc built for m68k.) In refining my build system, I'd like to be…
DarkMorford
  • 505
  • 1
  • 4
  • 12
2
votes
3 answers

How do I move a byte into a specific location in a data register?

I want to move 4 bytes, $B1,B2,B3,B4, one at a time, into data register D1. The value I want in D1 is $B1B2B3B4. Which instruction(s) will help me do this?
Plaidypus
  • 81
  • 9
2
votes
1 answer

Motorola 68K TRAP instruction as a bridge to OS

I'm not an expert, but just a hobbyist. I was playing with 68000 architecture in the past and I've been always thinking of its TRAP instruction. This instruction is always described as a "bridge" to an OS (in some systems however it's not used in…
2
votes
4 answers

audio to 8-bit text sample conversion

I have an interesting question today. I need to convert some pokemon audio files to a list of 8-bit samples (0-255 values). I am writing an assembly routine on the MC6800 chipset that will require these sounds to be played. I plan on including an…
jonathan
  • 23
  • 1
  • 3