English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 06 September 2019, 01:14   #1
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,243
VASM macros/equates for registers

Hi


I'd like to use a letter (like A) for a register (D0)


I've tried a macro:


A:MACRO
D0
ENDM


and an equate


A = D0


but it doesn't work at least on vasm. Is it possible? I don't want to manually replace all "A"s (or CCR/SR => CCR) manually.
jotd is offline  
Old 06 September 2019, 08:16   #2
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,588
Have you tried :
A equr D0

This is pretty standard.
meynaf is online now  
Old 06 September 2019, 15:09   #3
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,243
No I didn't, but I will. Thanks. anyway this Z80 to 68000 conversion project is flawed... More in another post.
jotd is offline  
Old 06 September 2019, 15:58   #4
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,474
Quote:
Originally Posted by jotd View Post
No I didn't, but I will. Thanks. anyway this Z80 to 68000 conversion project is flawed... More in another post.
Yup... If I understand what I think you are doing then it will be flawed.
mcgeezer is offline  
Old 06 September 2019, 17:16   #5
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 51
Posts: 1,154
Quote:
Originally Posted by jotd View Post
Hi


I'd like to use a letter (like A) for a register (D0)


I've tried a macro:


A:MACRO
D0
ENDM


and an equate


A = D0


but it doesn't work at least on vasm. Is it possible? I don't want to manually replace all "A"s (or CCR/SR => CCR) manually.
You dont need to replace registers manually. You can use CED for this job. I often replaced hundred registers in some routines. I used next method, if i want f.e to replace D7 with D5, at first i replaced all D5 with D8. Later all D7 with D5, and at end all D8 with D7. Then you can replace all (A) with (D0) without problems, maybe you can need 2-3 passes only, you can replace "A," with "D0," and ",A" with ",D0" etc.
Don_Adan is offline  
Old 06 September 2019, 19:47   #6
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,243
yes but I have "A" in comments to (original Z80 register name), and I don't want to change that.

I don't think it matters much now anyway... But thanks it works. Will be handy at some other moment. Sorry, googling for asm syntax is so complex...

Last edited by jotd; 06 September 2019 at 20:28.
jotd is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros for debugging in VASM mcgeezer Coders. Asm / Hardware 11 14 May 2019 16:27
Macros in imagefx source support.Apps 3 10 August 2018 04:30
Devpac Macros etc. Galahad/FLT Coders. Asm / Hardware 15 19 April 2016 00:59
Creating Macros Lonewolf10 Coders. Tutorials 3 18 June 2013 23:12
Keyboard Input Options > macros/key combinations ? Konrad support.WinUAE 3 23 May 2007 18:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06702 seconds with 15 queries