Welcome, Guest. Please login or register.

Author Topic: A 68K assembler question  (Read 2697 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
A 68K assembler question
« on: September 28, 2005, 03:12:44 PM »
Hi,

I'm at work at the moment so I cant really test this or spend too long looking it up.

Does anybody know if it is possible to subtract label addresses in expressions for 68k asm in order to get an address as an offset from another?

Imagine:

_base

_label_1
; stuff

_label_2
; more stuff

....


_label_n
; last entry, not more than 32KB from _base


_offsetTable
; table consists of 16-bit offsets of each code section as measured from _base
dc.w (_label_1 - _base), (_label_2 - _base), ..... , (_label_n - _base)


Is this allowed?
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: A 68K assembler question
« Reply #1 on: September 28, 2005, 03:23:44 PM »
Any idea about phxass?
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: A 68K assembler question
« Reply #2 on: September 28, 2005, 04:01:30 PM »
Good stuff, that's just what I wanted to know.
int p; // A