View Single Post
Old 31 March 2021, 21:29   #4
Exodous
Registered User
 
Join Date: Sep 2019
Location: Leicester / England
Posts: 203
This is pretty much what I used to do in Devpac.

I've put some tabs in your code and added an 'rts' into your macro:

Code:
	moveq	#4,d5	; Just so this is within the table.

	move.l      .td_mr1_jt(pc,d5.w),a5
	jmp         (a5)

.td_mr1_jt:
	dc.l        .td_mr1_1
	dc.l        .td_mr1_2
	dc.l        .td_mr1_3
	dc.l        .td_mr1_4
	dc.l        .td_mr1_5
	dc.l        .td_mr1_6
	dc.l        .td_mr1_7
	dc.l        .td_mr1_8

TDMR1COL    MACRO
.td_mr1_\1:	rts
ENDM

	TDMR1COL    8
	TDMR1COL    7
	TDMR1COL    6
	TDMR1COL    5
	TDMR1COL    4
	TDMR1COL    3
	TDMR1COL    2
	TDMR1COL    1
Saved it as "test.s" then assembled this with:

Code:
vasmm68k_mot -devpac -Fhunkexe test.s -o test
EDIT: Actually, the "-devpac" option isn't necessary as it still assembles and works without it

And get the following result:

Code:
vasm 1.8j (c) in 2002-2020 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.3n (c) 2002-2020 Frank Wille
vasm motorola syntax module 3.14c (c) 2002-2020 Frank Wille
vasm hunk format output module 2.13 (c) 2002-2020 Frank Wille

CODE(acrx2):	          56 bytes
Which results in a binary file "test", which runs successfully and exits.
Exodous is offline  
 
Page generated in 0.04428 seconds with 11 queries