09 August 2022, 11:29 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
wrong disassembly
This is the result of wrong coding, disassembling in winuae:
Code:
0003bc2c 1038 8260 move.b $8260,d0 it should print Code:
0003bc2c 1038 8260 move.b $FFFF8260,d0 |
10 August 2022, 18:15 | #2 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
I can change it to -$xxxx if negative word address (that some disassemblers use). $ffff.. is too ugly. I also want it to be very clear if address is long (8 digits) or word (4 digits).
Quote:
But seriously, why does it matter, CTRL+C won't work as a copy (or any other command) in Windows console windows. |
|
10 August 2022, 19:28 | #3 | ||
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
Quote:
Quote:
on windows 10 console it does. windows 10 console is so much better than windows 7 in terms of selection & copy/paste. |
||
10 August 2022, 22:02 | #4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
$FFFF8260 might be ugly, however it has a meaning - this is Atari ST hardware register - but a negative value would be meaningless.
The correct way to disassemble it is $ffff8260.w. |
11 August 2022, 13:46 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Address != addressing mode.
I don't think there is "correct" option. I don't remember seeing Motorola documenting how short absolute should get disassembled when address is negative. quick checks: mon and asmone: -$xxxx.w hrtmon: (-$xxxx).w ar3: $ffffxxxx.S I'll make it configurable (some other disassembler options are already configurable) |
11 August 2022, 14:40 | #6 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
16-bit "negative" addresses aren't used on the Amiga so it's clear Amiga-only disassemblers didn't care that much about them.
But they are used very often on the ST. You'll see things such as $ffff8260.w as shortcut to $00ff8260 (this always works, though theoretically incorrect). If the disassembler shows the $ffff8260 version it's easy to understand, while -$7da0 is completely meaningless. Shouldn't the most readable version be preferred ? Quick check : MonAm (Devpac) shows $ffffxxxx.w as expected. |
11 August 2022, 14:54 | #7 | |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
How does this affect winuae though? It is an Amiga product, so surely the Amiga disassembley is all that matters???
Am I missing something? Quote:
|
|
11 August 2022, 15:05 | #8 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
it's just a detail as those addresses are not really useful. Is there valid memory in some config at $FFFFxxxx ?
|
11 August 2022, 15:15 | #9 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
My point still remains: unless Motorola documented it, there is no official or correct format.
And so far it seems Amiga-only disassemblers use 4 digit format. Only reason I can optionally support it is because Hatari uses UAE CPU core. It would make sense to have hardware matching disassembly format. Quote:
Quote:
|
||
11 August 2022, 15:45 | #10 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
Quote:
Another example how Microsoft stole ctrl+c from unix, but still used ctrl+c to copy from clipboard (unix used mouse buttons, shift+ins...) then mixed them both together for a nice backfire... Same goes for all the shit Microsoft invented to avoid adopting unix special characters (backslash instead of slash, CR+LF instead of LF...) then went on having to support filepaths with slashes and unix linefeeds in windows, regexes... Bill Gates - that visionnary... |
|
11 August 2022, 15:48 | #11 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Mine does too : in that case the most readable format must prevail. |
|
11 August 2022, 15:59 | #12 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
|
11 August 2022, 16:08 | #13 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
For those who want to know, $(ff)ff8260 on the ST is hardware video mode register.
|
22 August 2022, 20:06 | #14 | |
Registered User
Join Date: Nov 2017
Location: Paris
Posts: 5
|
Quote:
another possibility, often used in ST asm sources is to add ".w" to the address, keeping the address as it is in the opcode word : move.w $8260.w,d0 ie : this doesn't change the address to a negative one, which as pointed by meynaf is hard to read in an ST context. Nicolas |
|
22 August 2022, 22:27 | #15 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Stupid Amiga snippet that uses negative addresses, too bad it only works in machines with 24 bit addressing:
Code:
suba.l a0,a0 suba.l -20.w,a0 ; <--- :) move.l a0,12.w jmp -1(a0) You have been warned |
22 August 2022, 22:42 | #16 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
Only ross would show us some code and then tell us to never use it. It's almost as if he's daring us
|
22 August 2022, 23:39 | #17 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,215
|
It may, and there are cases in which there is. If you use MuRedox, the topmost 32K of memory contain the jump-table into the FPU emulation functions. What MuRedox does is that it replaces the 4-byte FPU opcodes by subroutine jumps into the emulation functions, and these emulation functions are kept in the topmost 32K. The reason why the topmost 32K are used for that is that a JSR.W can be used to reach them, requiring as many bytes as opcode as the original FPU instruction.
|
23 August 2022, 09:16 | #18 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Well, the program is dead even if this code works as expected |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bad references in Resource disassembly | kamelito | support.Apps | 5 | 21 March 2023 20:52 |
Disassembly of Amiga bootblocks on PC | jordans1979 | Coders. General | 8 | 12 October 2020 06:58 |
How do you do a clean base register disassembly using Resource? | Codetapper | Coders. General | 6 | 20 February 2011 12:53 |
How to make sense of disassembly? | Jonathan Drain | Coders. General | 1 | 27 October 2009 22:57 |
Need a little disassembly/binary edit help | mr_a500 | Coders. General | 5 | 30 April 2006 21:33 |
|
|