12 August 2024, 19:35 | #1 |
Registered User
Join Date: Jun 2009
Location: United States
Posts: 59
|
vasm - Warn when addressing absolute 16-bit memory?
Hello, I'm wondering if it's possible for vasm (or something else in the build stack) to provide a warning if an instruction is addressing an absolute 16-bit memory address. This only ever happens in my code if I typo, so it would help a lot to preemptively find these bugs if the assembler could warn me about it.
For example, sometimes I accidentally type something like this: Code:
move.w $10(a4),d0 Code:
move.w $10,d0 |
12 August 2024, 20:37 | #2 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,291
|
Maybe I'm wrong, but I doubt any amiga assembler would warn about that. The major issue being the obviously correct
move.l 4.w,..and less (depending on context) reading/setting of interrupt routines. Is this really an issue you've encountered with literal offsets or only with "named" offsets? Asking because I've not really had an issue with the former, while the later might be worth looking at adding more "guard rails" for if possible in a compatible way (IMO). |
12 August 2024, 21:44 | #3 | |
Registered User
Join Date: Jun 2009
Location: United States
Posts: 59
|
Quote:
I could do this the quick and dirty way by writing a script that parses my code and looks for these errors, but I was just hoping a more formal mechanism existed. |
|
Yesterday, 00:34 | #4 |
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 873
|
|
Yesterday, 11:08 | #5 | |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 830
|
Quote:
in source you can disable it in following way Code:
IFD BARFLY BOPT w4- ;disable 64k warnings ENDC ;END IFD BARFLY |
|
Yesterday, 11:22 | #6 |
Registered User
Join Date: Nov 2005
Location: United Kingdom
Age: 41
Posts: 125
|
Yes, Barfly definitely warns about vector accesses by default. I get caught out by this when recompiling disassembled game code.
My similar typo mistake is usually forgetting to put # when using constants, e.g. move.b $10,d0 instead of: move.b #$10,d0 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
16-Bit/32-Bit UK Computer Price Comparisons | Amigajay | Retrogaming General Discussion | 10 | 02 July 2020 17:12 |
Absolute addressing | Old_Bob | Coders. Asm / Hardware | 9 | 20 September 2018 10:36 |
Best Way to Convert 32-bit Signed Value to 16 Bit? | AGS | Coders. Asm / Hardware | 31 | 29 December 2013 13:58 |
Memory addressing | CmdrVimes | Coders. General | 7 | 25 October 2010 22:20 |
Memory Addressing Architecture | Zetr0 | support.Hardware | 2 | 10 July 2007 16:55 |
|
|