English Amiga Board


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

 
 
Thread Tools
Old 06 September 2019, 00:14   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,231
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 online now  
Old 06 September 2019, 07:16   #2
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Have you tried :
A equr D0

This is pretty standard.
meynaf is offline  
Old 06 September 2019, 14:09   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,231
No I didn't, but I will. Thanks. anyway this Z80 to 68000 conversion project is flawed... More in another post.
jotd is online now  
Old 06 September 2019, 14:58   #4
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
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, 16:16   #5
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,979
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, 18:47   #6
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,231
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 19:28.
jotd is online now  
 


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 15:27
Macros in imagefx source support.Apps 3 10 August 2018 03:30
Devpac Macros etc. Galahad/FLT Coders. Asm / Hardware 15 18 April 2016 23:59
Creating Macros Lonewolf10 Coders. Tutorials 3 18 June 2013 22:12
Keyboard Input Options > macros/key combinations ? Konrad support.WinUAE 3 23 May 2007 17: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 11:15.

Top

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