![]() |
![]() |
#81 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
Quite easy to add, by testing the new option in
itoasc(). Not sure if it will help much, as there will always be displacements which are better viewed in decimal or in hex, in similar amounts. But I can add it for a test. Myself, I used the -aoption in the past, and looked at the hexdump in the comment. ![]() |
![]() |
![]() |
#82 | ||
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
Quote:
![]() Regarding CMakeLists.txt. I have tested the attached CMakeLists.txt with ira_211beta.lha on Windows (Visual Studio 2022), Linux (Ubuntu 18.04, 20.04, 22.04 and Windows WSL Ubuntu 22.04), and Mac OSX Montgomery. It works just fine. Unfortunately it looks like Amiga support for CMake is lacking, but I still think this would make a worthwhile addition to the package. Usage: Code:
Windows: Open "x64 Native Tools Command Prompt for VS 20xx" from the Start menu. Run gensln.bat. Open generated solution with Visual Studio and build. Linux/OSX: mkdir build && cd build && cmake .. && make Last edited by hop; 18 December 2023 at 12:23. |
||
![]() |
![]() |
#83 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Are the TRAP equates in ira off by one and missing an entry?
From constants.c Code:
const x_adr_t x_adrs[] = { {"ABSEXECBASE", 0x0004}, {"BUS_ERROR", 0x0008}, {"ADR_ERROR", 0x000C}, {"ILLEG_OPC", 0x0010}, {"DIVISION0", 0x0014}, {"CHK", 0x0018}, {"TRAPV", 0x001C}, {"PRIVILEG", 0x0020}, {"TRACE", 0x0024}, {"LINEA_EMU", 0x0028}, {"LINEF_EMU", 0x002C}, {"INT_NOINI", 0x003C}, {"INT_WRONG", 0x0060}, {"AUTO_INT1", 0x0064}, {"AUTO_INT2", 0x0068}, {"AUTO_INT3", 0x006C}, {"AUTO_INT4", 0x0070}, {"AUTO_INT5", 0x0074}, {"AUTO_INT6", 0x0078}, {"NMI", 0x007C}, {"TRAP_01", 0x0080}, {"TRAP_02", 0x0084}, {"TRAP_03", 0x0088}, {"TRAP_04", 0x008C}, {"TRAP_05", 0x0090}, {"TRAP_06", 0x0094}, {"TRAP_07", 0x0098}, {"TRAP_08", 0x009C}, {"TRAP_09", 0x00A0}, {"TRAP_10", 0x00A4}, {"TRAP_11", 0x00A8}, {"TRAP_12", 0x00AC}, {"TRAP_13", 0x00B0}, {"TRAP_14", 0x00B4}, {"TRAP_15", 0x00B8}, {"CIAB_PRA", 0xBFD000}, ... Code:
const x_adr_t x_adrs[] = { {"ABSEXECBASE", 0x0004}, {"BUS_ERROR", 0x0008}, {"ADR_ERROR", 0x000C}, {"ILLEG_OPC", 0x0010}, {"DIVISION0", 0x0014}, {"CHK", 0x0018}, {"TRAPV", 0x001C}, {"PRIVILEG", 0x0020}, {"TRACE", 0x0024}, {"LINEA_EMU", 0x0028}, {"LINEF_EMU", 0x002C}, {"INT_NOINI", 0x003C}, {"INT_WRONG", 0x0060}, {"AUTO_INT1", 0x0064}, {"AUTO_INT2", 0x0068}, {"AUTO_INT3", 0x006C}, {"AUTO_INT4", 0x0070}, {"AUTO_INT5", 0x0074}, {"AUTO_INT6", 0x0078}, {"NMI", 0x007C}, {"TRAP_00", 0x0080}, {"TRAP_01", 0x0084}, {"TRAP_02", 0x0088}, {"TRAP_03", 0x008C}, {"TRAP_04", 0x0090}, {"TRAP_05", 0x0094}, {"TRAP_06", 0x0098}, {"TRAP_07", 0x009C}, {"TRAP_08", 0x00A0}, {"TRAP_09", 0x00A4}, {"TRAP_10", 0x00A8}, {"TRAP_11", 0x00AC}, {"TRAP_12", 0x00B0}, {"TRAP_13", 0x00B4}, {"TRAP_14", 0x00B8}, {"TRAP_15", 0x00BC}, {"CIAB_PRA", 0xBFD000}, ... |
![]() |
![]() |
#84 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
Quote:
-radix=n, with n = 10 (default, decimal), 16 for hex and 0 for hex-positive, decimal-negative. Unfortunately I realised that itoasc()is not called for moveimmediate addressing modes, which always call itohex()with a fixed number of digits (2, 4, 8). Maybe this makes sense, as, unlike displacements, you don't know whether you are dealing with a signed value. Quote:
Quote:
![]() I really like the minimalistic approach in all my portable projects: ANSI-C90 or C99 (maximum), together with a standard Makefile. Nothing is more portable! ![]() Indeed. Thanks. Fixed! Current snapshot is here (verified): http://sun.hasenbraten.de/~frank/TEST/ira_211beta.lha |
|||
![]() |
![]() |
#85 |
Joy Division
Join Date: Nov 2006
Location: East Yorkshire
Age: 60
Posts: 244
|
@phx
Any reason for not including a ready-built exe in your releases? |
![]() |
![]() |
#86 | ||||
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
EDIT: Sorry - my fault. The package has the changes. Quote:
Quote:
Quote:
EDIT: Sorry - my fault. The package has the changes. Thanks very much for your support. Last edited by hop; 19 December 2023 at 19:33. |
||||
![]() |
![]() |
#87 | |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
I've tested it and it seems to be almost working. I think there may be a problem with null-terminated strings in TEXT regions - the trailing zero ends up becoming a single $ with radix=16. Attached a repro with output in included txt file. -radix=10 Code:
LAB_1105: ;01105 ;DC.B $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$45,$4e,$54,$45,$52 ;DC.B $20,$57,$4f,$52,$4c,$44,$20,$43,$4f,$44,$45,$00 DC.B " ENTER WORLD CODE",0 DC.B $ff ;01121 Code:
LAB_1105: ;01105 ;DC.B $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$45,$4e,$54,$45,$52 ;DC.B $20,$57,$4f,$52,$4c,$44,$20,$43,$4f,$44,$45,$00 DC.B " ENTER WORLD CODE",$ DC.B $ff ;01121 |
|
![]() |
![]() |
#88 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
Quote:
![]() (Especially, I don't have a development environment for Windows, if you are refering to that.) Quote:
I updated yesterday's download link with it. |
||
![]() |
![]() |
#89 | |
Joy Division
Join Date: Nov 2006
Location: East Yorkshire
Age: 60
Posts: 244
|
Quote:
I will investigate how to compile it for windows. |
|
![]() |
![]() |
#90 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
It's really easy. Open the x64 Native Tools Command Prompt for Visual Studio 2022 from the start menu. Change directory to the ira folder and type:
Code:
nmake -f Makefile.win32 Visual Studio Community edition is free and works fine. |
![]() |
![]() |
#91 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
|
![]() |
![]() |
#92 | |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
The results are good, but I think one more tiny tweak could improve the readability of the output: Code:
if (val > -10 && val < 10) always format as decimal From: Code:
MOVE.L A3,$4(A4) MOVEQ #$0,d0 BSET #$6,$E00(A0) MOVEQ #$FFFFFFFF,D0 DC.B "graphics.library",$0 DS.L $1 Code:
MOVE.L A3,4(A4) MOVEQ #0,d0 BSET #6,$E00(A0) MOVEQ #-1,D0 DC.B "graphics.library",0 DS.L 1 Last edited by hop; 22 December 2023 at 11:17. Reason: Further examples |
|
![]() |
![]() |
#93 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
No problem. Please try the update: http://sun.hasenbraten.de/~frank/TEST/ira_211beta.lha
|
![]() |
![]() |
#94 | |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
|
|
![]() |
![]() |
#95 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
|
![]() |
![]() |
#96 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
No problem. Sorry for not being clearer. Please find a minimal repro attached.
test_equ_radix: 80fc1800 Code:
ira -a -compat=bi -binary -preproc test_equ_radix Code:
; IRA V2.11 (Dec 23 2023) (c)1993-1995 Tim Ruehsen ; (c)2009-2023 Frank Wille, (c)2014-2019 Nicolas Bastien ORG $0 SECSTRT_0: DIVU #$1800,D0 ;0: 80fc1800 END Code:
MACHINE 68000 ENTRY $00000000 OFFSET $00000000 CODE $00000000 - $00000004 ; The following line results in decimal value in equate: ; TRACK_SIZE_BYTES EQU 6144 ; even if -RADIX=16 is used EQU TRACK_SIZE_BYTES $2.W END Code:
; IRA V2.11 (Dec 23 2023) (c)1993-1995 Tim Ruehsen ; (c)2009-2023 Frank Wille, (c)2014-2019 Nicolas Bastien ; Custom equates (from config file) TRACK_SIZE_BYTES EQU 6144 ORG $0 SECSTRT_0: DIVU #TRACK_SIZE_BYTES,D0 ;0: 80fc1800 END Code:
ira -a -compat=bi -radix=16 -config test_equ_radix Code:
; IRA V2.11 (Dec 23 2023) (c)1993-1995 Tim Ruehsen ; (c)2009-2023 Frank Wille, (c)2014-2019 Nicolas Bastien ; Custom equates (from config file) TRACK_SIZE_BYTES EQU $1800 ORG $0 SECSTRT_0: DIVU #TRACK_SIZE_BYTES,D0 ;0: 80fc1800 END |
![]() |
![]() |
#97 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
I see. Can be done (try the update at the usual URL).
But there are two types of EQUs. The config-file definitions and the internal ones (interrupt vectors, custom chips, etc.). The latter will always be printed in hexadecimal, which is still unchanged. Should they follow the selected radix as well? |
![]() |
![]() |
#98 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Thanks very much - that's looking much better. I was reluctant to use EQU before, because it often obfuscated the code with decimal!
Code:
diff --git a/Game.asm b/Game.asm index ba9f8dc..b891fbb 100644 --- a/Game.asm +++ b/Game.asm @@ -1,4 +1,4 @@ -; IRA V2.11 (Dec 23 2023) (c)1993-1995 Tim Ruehsen +; IRA V2.11 (Dec 26 2023) (c)1993-1995 Tim Ruehsen ; (c)2009-2023 Frank Wille, (c)2014-2019 Nicolas Bastien INCLUDE "hardware/custom.i" @@ -60,8 +60,8 @@ SPR7PTH EQU $DFF13C COLOR00 EQU $DFF180 ; Custom equates (from config file) -ciaicr EQU 3328 -TRACK_SIZE_BYTES EQU 6144 +ciaicr EQU $D00 +TRACK_SIZE_BYTES EQU $1800 |
![]() |
![]() |
#99 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,581
|
Quote:
Now I also finished my work on PC-relative references, which point outside of the originating section. Instructions are generated with constant displacements instead of DC.W. |
|
![]() |
![]() |
#100 | |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Quote:
Code:
diff --git a/Game.asm b/Game.asm index b891fbb..ac62fea 100644 --- a/Game.asm +++ b/Game.asm @@ -1,4 +1,4 @@ -; IRA V2.11 (Dec 26 2023) (c)1993-1995 Tim Ruehsen +; IRA V2.11 (Dec 27 2023) (c)1993-1995 Tim Ruehsen ; (c)2009-2023 Frank Wille, (c)2014-2019 Nicolas Bastien INCLUDE "hardware/custom.i" @@ -60,8 +60,8 @@ SPR7PTH EQU $DFF13C COLOR00 EQU $DFF180 ; Custom equates (from config file) -ciaicr EQU $D00 -TRACK_SIZE_BYTES EQU $1800 +ciaicr EQU $89698DC8 +TRACK_SIZE_BYTES EQU $89698DC8 |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ira for Windows | jotd | Coders. General | 63 | 12 December 2023 10:53 |
New tutorial on sprites | Yragael | Coders. Tutorials | 8 | 04 September 2023 21:00 |
Debugging messages in serial (small tutorial, mainly for cross-dev) | alkis | Coders. Asm / Hardware | 7 | 22 February 2016 14:16 |
68020 to 68000 code convertion using Ira and PhxAss | gulliver | Coders. Asm / Hardware | 18 | 12 April 2014 01:09 |
Looking for IRA v1.07 or newer :-) | voxel | request.Apps | 7 | 30 July 2008 01:39 |
|
|